diff options
| author | Franck Cuny <franck@fcuny.net> | 2025-10-13 08:52:36 -0700 |
|---|---|---|
| committer | Franck Cuny <franck@fcuny.net> | 2025-10-13 08:52:36 -0700 |
| commit | bca7e01468e0bb43fdefaf3d13f5ecea44501417 (patch) | |
| tree | 9d3134fa94cb9cef086b2d7f2dc65ef08617b986 /modules | |
| parent | delete unused module (diff) | |
| download | infra-bca7e01468e0bb43fdefaf3d13f5ecea44501417.tar.gz | |
move modules under nixos
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/nixos/backups.nix (renamed from modules/backups.nix) | 42 | ||||
| -rw-r--r-- | modules/nixos/default.nix | 2 | ||||
| -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 |
