mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 14:20:44 -06:00
generalize common -> oizys and add backups option
This commit is contained in:
parent
9f8a1692b5
commit
cec9ce730f
5 changed files with 59 additions and 48 deletions
|
@ -16,12 +16,11 @@ in {
|
||||||
"python"
|
"python"
|
||||||
];
|
];
|
||||||
docker = enabled;
|
docker = enabled;
|
||||||
|
backups = enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
rclone
|
(writeShellScriptBin "gitea" ''
|
||||||
|
|
||||||
(pkgs.writeShellScriptBin "gitea" ''
|
|
||||||
ssh -p 2222 -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"
|
ssh -p 2222 -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
|
|
|
@ -4,14 +4,20 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) enableAttrs;
|
inherit (lib) enabled;
|
||||||
in {
|
in {
|
||||||
imports = with self.nixosModules; [
|
imports = with self.nixosModules; [
|
||||||
restic
|
restic
|
||||||
];
|
];
|
||||||
|
|
||||||
oizys =
|
oizys = {
|
||||||
{
|
desktop = enabled;
|
||||||
|
chrome = enabled;
|
||||||
|
docker = enabled;
|
||||||
|
nix-ld = enabled;
|
||||||
|
vbox = enabled;
|
||||||
|
vpn = enabled;
|
||||||
|
backups = enabled;
|
||||||
languages = [
|
languages = [
|
||||||
"misc"
|
"misc"
|
||||||
"python"
|
"python"
|
||||||
|
@ -19,19 +25,10 @@ in {
|
||||||
"tex"
|
"tex"
|
||||||
"node"
|
"node"
|
||||||
];
|
];
|
||||||
}
|
};
|
||||||
// enableAttrs [
|
|
||||||
"chrome"
|
|
||||||
"desktop"
|
|
||||||
"docker"
|
|
||||||
"nix-ld"
|
|
||||||
"vbox"
|
|
||||||
"vpn"
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
zk
|
zk
|
||||||
rclone
|
|
||||||
quarto
|
quarto
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ in rec {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules =
|
modules =
|
||||||
[
|
[
|
||||||
../modules/common.nix
|
../modules/oizys.nix
|
||||||
../overlays
|
../overlays
|
||||||
]
|
]
|
||||||
++ filter
|
++ filter
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
lib,
|
lib,
|
||||||
self,
|
self,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
inherit (lib) mkEnableOption;
|
||||||
|
in {
|
||||||
imports = with self.nixosModules; [
|
imports = with self.nixosModules; [
|
||||||
users
|
users
|
||||||
nix
|
nix
|
||||||
|
@ -33,5 +35,5 @@
|
||||||
nix-ld
|
nix-ld
|
||||||
];
|
];
|
||||||
|
|
||||||
options.oizys.desktop.enable = lib.mkEnableOption "is desktop";
|
options.oizys.desktop.enable = mkEnableOption "is desktop";
|
||||||
}
|
}
|
|
@ -1,4 +1,16 @@
|
||||||
{...}: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkEnableOption mkIf;
|
||||||
|
cfg = config.oizys.backups;
|
||||||
|
in {
|
||||||
|
options.oizys.backups.enable = mkEnableOption "enable restic/rclone backups";
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [rclone];
|
||||||
|
|
||||||
services.restic.backups.gdrive = {
|
services.restic.backups.gdrive = {
|
||||||
# BUG: if .conda/environments.txt doesn't exist then this won't work
|
# BUG: if .conda/environments.txt doesn't exist then this won't work
|
||||||
# workaround for now `mkdir ~/.conda && touch ~/.conda/environments.txt`
|
# workaround for now `mkdir ~/.conda && touch ~/.conda/environments.txt`
|
||||||
|
@ -24,4 +36,5 @@
|
||||||
RandomizedDelaySec = "5h";
|
RandomizedDelaySec = "5h";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue