diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-07 11:25:48 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-07 11:25:48 +0100 |
commit | e748d6f49372169176c0a78871be805fc63e21bf (patch) | |
tree | bbb23a356cc34aebde023b5a297f6fccc8680b9e /hosts/vidhar/borg/default.nix | |
parent | fc4cbfdc1038c7b0a5e4c64eb48071ba23823579 (diff) | |
download | nixos-e748d6f49372169176c0a78871be805fc63e21bf.tar nixos-e748d6f49372169176c0a78871be805fc63e21bf.tar.gz nixos-e748d6f49372169176c0a78871be805fc63e21bf.tar.bz2 nixos-e748d6f49372169176c0a78871be805fc63e21bf.tar.xz nixos-e748d6f49372169176c0a78871be805fc63e21bf.zip |
vidhar: borg: ...
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 | } |