diff options
Diffstat (limited to 'hosts/vidhar/borg/default.nix')
-rw-r--r-- | hosts/vidhar/borg/default.nix | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/hosts/vidhar/borg/default.nix b/hosts/vidhar/borg/default.nix index 3558a421..ee5856c9 100644 --- a/hosts/vidhar/borg/default.nix +++ b/hosts/vidhar/borg/default.nix | |||
@@ -4,16 +4,16 @@ with lib; | |||
4 | 4 | ||
5 | { | 5 | { |
6 | config = { | 6 | config = { |
7 | services.borgbackup.repos.borg = { | 7 | services.borgbackup.repos.jotnar = { |
8 | path = "/srv/backup/borg"; | 8 | path = "/srv/backup/borg/jotnar"; |
9 | authorizedKeysAppendOnly = let | 9 | authorizedKeysAppendOnly = let |
10 | dir = ./authorized-keys; | 10 | dir = ./jotnar; |
11 | toAuthKey = fname: ftype: if ftype != "regular" || !(hasSuffix ".pub" fname) then null else builtins.readFile (dir + "/${fname}"); | 11 | toAuthKey = fname: ftype: if ftype != "regular" || !(hasSuffix ".pub" fname) then null else builtins.readFile (dir + "/${fname}"); |
12 | in filter (v: v != null) (lib.mapAttrsToList toAuthKey (builtins.readDir dir)); | 12 | in filter (v: v != null) (lib.mapAttrsToList toAuthKey (builtins.readDir dir)); |
13 | }; | 13 | }; |
14 | 14 | ||
15 | boot.postBootCommands = mkBefore '' | 15 | boot.postBootCommands = mkBefore '' |
16 | ${pkgs.findutils}/bin/find /srv/backup/borg -maxdepth 1 -type d -empty -delete | 16 | ${pkgs.findutils}/bin/find /srv/backup/borg -type d -empty -delete |
17 | ''; | 17 | ''; |
18 | 18 | ||
19 | users.users.borg.extraGroups = ["ssh"]; | 19 | users.users.borg.extraGroups = ["ssh"]; |
@@ -25,14 +25,5 @@ with lib; | |||
25 | 25 | ||
26 | Match All | 26 | Match All |
27 | ''; | 27 | ''; |
28 | |||
29 | sops.secrets.borg-passphrase = { | ||
30 | sopsFile = ./passphrase.yaml; | ||
31 | format = "yaml"; | ||
32 | key = "borg"; | ||
33 | owner = "borg"; | ||
34 | group = "borg"; | ||
35 | mode = "0440"; | ||
36 | }; | ||
37 | }; | 28 | }; |
38 | } | 29 | } |