about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorAtemu <atemu.main@gmail.com>2023-11-26 10:23:18 +0100
committerAtemu <atemu.main@gmail.com>2023-12-06 19:02:38 +0100
commitf39eb36250a7bd11bacc3454d9378f5bcdf683cf (patch)
tree835d7883b9b7e8f15bd1ca305193d48e2d4d23d2 /nixos/modules
parent91050ea1e57e50388fa87a3302ba12d188ef723a (diff)
downloadnixlib-f39eb36250a7bd11bacc3454d9378f5bcdf683cf.tar
nixlib-f39eb36250a7bd11bacc3454d9378f5bcdf683cf.tar.gz
nixlib-f39eb36250a7bd11bacc3454d9378f5bcdf683cf.tar.bz2
nixlib-f39eb36250a7bd11bacc3454d9378f5bcdf683cf.tar.lz
nixlib-f39eb36250a7bd11bacc3454d9378f5bcdf683cf.tar.xz
nixlib-f39eb36250a7bd11bacc3454d9378f5bcdf683cf.tar.zst
nixlib-f39eb36250a7bd11bacc3454d9378f5bcdf683cf.zip
nixos/snapraid: remove from top-level
I don't use this tool but saw it in the top level and that's not where it should
live.

This could arguably also be seen as a RAID; it's a bit of an in-between.
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/module-list.nix2
-rw-r--r--nixos/modules/services/backup/snapraid.nix (renamed from nixos/modules/tasks/snapraid.nix)9
2 files changed, 8 insertions, 3 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 7f708f6e57c7..99a4dc850d61 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -364,6 +364,7 @@
   ./services/backup/mysql-backup.nix
   ./services/backup/postgresql-backup.nix
   ./services/backup/postgresql-wal-receiver.nix
+  ./services/backup/snapraid.nix
   ./services/backup/restic-rest-server.nix
   ./services/backup/restic.nix
   ./services/backup/rsnapshot.nix
@@ -1501,7 +1502,6 @@
   ./tasks/network-interfaces.nix
   ./tasks/powertop.nix
   ./tasks/scsi-link-power-management.nix
-  ./tasks/snapraid.nix
   ./tasks/stratis.nix
   ./tasks/swraid.nix
   ./tasks/trackpoint.nix
diff --git a/nixos/modules/tasks/snapraid.nix b/nixos/modules/services/backup/snapraid.nix
index 9570c6b76123..c9b2550e80e8 100644
--- a/nixos/modules/tasks/snapraid.nix
+++ b/nixos/modules/services/backup/snapraid.nix
@@ -2,10 +2,15 @@
 
 with lib;
 
-let cfg = config.snapraid;
+let cfg = config.services.snapraid;
 in
 {
-  options.snapraid = with types; {
+  imports = [
+    # Should have never been on the top-level.
+    (mkRenamedOptionModule [ "snapraid" ] [ "services" "snapraid" ])
+  ];
+
+  options.services.snapraid = with types; {
     enable = mkEnableOption (lib.mdDoc "SnapRAID");
     dataDisks = mkOption {
       default = { };