diff options
Diffstat (limited to 'hosts')
| -rw-r--r-- | hosts/sif/default.nix | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix index 4e9826bd..9271515f 100644 --- a/hosts/sif/default.nix +++ b/hosts/sif/default.nix | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | { flake, pkgs, customUtils, lib, config, ... }: | 1 | { flake, pkgs, customUtils, lib, config, path, ... }: |
| 2 | { | 2 | { |
| 3 | imports = with flake.nixosModules.systemProfiles; [ | 3 | imports = with flake.nixosModules.systemProfiles; [ |
| 4 | ./hw.nix | 4 | ./hw.nix |
| @@ -259,6 +259,30 @@ | |||
| 259 | SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="${systemd}/bin/systemctl --no-block start ac-plugged.service" | 259 | SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="${systemd}/bin/systemctl --no-block start ac-plugged.service" |
| 260 | ''; | 260 | ''; |
| 261 | 261 | ||
| 262 | services.borgbackup = { | ||
| 263 | snapshots = "btrfs"; | ||
| 264 | prefix = "yggdrasil.midgard.sif."; | ||
| 265 | targets = { | ||
| 266 | "munin" = { | ||
| 267 | repo = "borg.munin:borg"; | ||
| 268 | paths = [ "/home/gkleen" ]; | ||
| 269 | prune = { | ||
| 270 | "home" = | ||
| 271 | [ "--keep-within" "24H" | ||
| 272 | "--keep-daily" "31" | ||
| 273 | "--keep-monthly" "12" | ||
| 274 | "--keep-yearly" "-1" | ||
| 275 | ]; | ||
| 276 | }; | ||
| 277 | keyFile = "/run/secrets/borg-repokey--borg_munin__borg"; | ||
| 278 | }; | ||
| 279 | }; | ||
| 280 | }; | ||
| 281 | sops.secrets.borg-repokey--borg_munin__borg = { | ||
| 282 | sopsFile = /. + path + "/modules/borgbackup/repokeys/borg_munin__borg.yaml"; | ||
| 283 | key = "key"; | ||
| 284 | }; | ||
| 285 | |||
| 262 | services.btrfs.autoScrub = { | 286 | services.btrfs.autoScrub = { |
| 263 | enable = true; | 287 | enable = true; |
| 264 | fileSystems = [ "/" "/home" ]; | 288 | fileSystems = [ "/" "/home" ]; |
