mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 10:10:45 -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"
|
||||
];
|
||||
docker = enabled;
|
||||
backups = enabled;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
rclone
|
||||
|
||||
(pkgs.writeShellScriptBin "gitea" ''
|
||||
(writeShellScriptBin "gitea" ''
|
||||
ssh -p 2222 -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"
|
||||
'')
|
||||
];
|
||||
|
|
|
@ -4,14 +4,20 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) enableAttrs;
|
||||
inherit (lib) enabled;
|
||||
in {
|
||||
imports = with self.nixosModules; [
|
||||
restic
|
||||
];
|
||||
|
||||
oizys =
|
||||
{
|
||||
oizys = {
|
||||
desktop = enabled;
|
||||
chrome = enabled;
|
||||
docker = enabled;
|
||||
nix-ld = enabled;
|
||||
vbox = enabled;
|
||||
vpn = enabled;
|
||||
backups = enabled;
|
||||
languages = [
|
||||
"misc"
|
||||
"python"
|
||||
|
@ -19,19 +25,10 @@ in {
|
|||
"tex"
|
||||
"node"
|
||||
];
|
||||
}
|
||||
// enableAttrs [
|
||||
"chrome"
|
||||
"desktop"
|
||||
"docker"
|
||||
"nix-ld"
|
||||
"vbox"
|
||||
"vpn"
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
zk
|
||||
rclone
|
||||
quarto
|
||||
];
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ in rec {
|
|||
system = "x86_64-linux";
|
||||
modules =
|
||||
[
|
||||
../modules/common.nix
|
||||
../modules/oizys.nix
|
||||
../overlays
|
||||
]
|
||||
++ filter
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
lib,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
inherit (lib) mkEnableOption;
|
||||
in {
|
||||
imports = with self.nixosModules; [
|
||||
users
|
||||
nix
|
||||
|
@ -33,5 +35,5 @@
|
|||
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 = {
|
||||
# BUG: if .conda/environments.txt doesn't exist then this won't work
|
||||
# workaround for now `mkdir ~/.conda && touch ~/.conda/environments.txt`
|
||||
|
@ -24,4 +36,5 @@
|
|||
RandomizedDelaySec = "5h";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue