aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/nixos/backups.nix (renamed from modules/backups.nix)42
-rw-r--r--modules/nixos/default.nix2
-rw-r--r--modules/nixos/nas-client.nix (renamed from modules/nas-client.nix)0
3 files changed, 22 insertions, 22 deletions
diff --git a/modules/backups.nix b/modules/nixos/backups.nix
index 0724053..78b3144 100644
--- a/modules/backups.nix
+++ b/modules/nixos/backups.nix
@@ -166,14 +166,13 @@ in
};
config = lib.mkIf cfg.enable {
- environment.systemPackages =
- [
- pkgs.restic
- ]
- ++ lib.optionals cfg.helpers [
- restic-local
- restic-remote
- ];
+ environment.systemPackages = [
+ pkgs.restic
+ ]
+ ++ lib.optionals cfg.helpers [
+ restic-local
+ restic-remote
+ ];
services.restic.backups = lib.mkMerge [
# Local backup configuration - only if paths are specified
@@ -192,20 +191,19 @@ in
# Remote backup configuration - only if paths are specified
(lib.mkIf (cfg.remote.paths != [ ]) {
- remote =
- {
- initialize = true;
- repository = "${cfg.remoteBaseRepository}:/${config.networking.hostName}/";
- passwordFile = cfg.passwordFile;
- paths = cfg.remote.paths;
- exclude = cfg.remote.exclude;
- extraBackupArgs = cfg.remote.extraBackupArgs;
- timerConfig = cfg.remote.timerConfig;
- pruneOpts = cfg.remote.pruneOpts;
- }
- // lib.optionalAttrs (cfg.remote.environmentFile != null) {
- environmentFile = toString cfg.remote.environmentFile;
- };
+ remote = {
+ initialize = true;
+ repository = "${cfg.remoteBaseRepository}:/${config.networking.hostName}/";
+ passwordFile = cfg.passwordFile;
+ paths = cfg.remote.paths;
+ exclude = cfg.remote.exclude;
+ extraBackupArgs = cfg.remote.extraBackupArgs;
+ timerConfig = cfg.remote.timerConfig;
+ pruneOpts = cfg.remote.pruneOpts;
+ }
+ // lib.optionalAttrs (cfg.remote.environmentFile != null) {
+ environmentFile = toString cfg.remote.environmentFile;
+ };
})
];
};
diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix
index 47cf81e..73e144c 100644
--- a/modules/nixos/default.nix
+++ b/modules/nixos/default.nix
@@ -1,9 +1,11 @@
{ ... }:
{
imports = [
+ ./backups.nix
./base.nix
./cgroups.nix
./home-manager.nix
+ ./nas-client.nix
./nix.nix
./podman.nix
./remote-unlock.nix
diff --git a/modules/nas-client.nix b/modules/nixos/nas-client.nix
index fe0952e..fe0952e 100644
--- a/modules/nas-client.nix
+++ b/modules/nixos/nas-client.nix