about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2023-12-14 14:51:04 +0100
committerGitHub <noreply@github.com>2023-12-14 14:51:04 +0100
commitf66d2b11d7753820b0e45ead2ee6ebcc2090c8d7 (patch)
treee81ddd14dfbdf87599f6c9b0ba895d64dc2e9fd9
parent005c0d4a75ac7456ad5605ea67ce431b2394e0db (diff)
parentf39eb36250a7bd11bacc3454d9378f5bcdf683cf (diff)
downloadnixlib-f66d2b11d7753820b0e45ead2ee6ebcc2090c8d7.tar
nixlib-f66d2b11d7753820b0e45ead2ee6ebcc2090c8d7.tar.gz
nixlib-f66d2b11d7753820b0e45ead2ee6ebcc2090c8d7.tar.bz2
nixlib-f66d2b11d7753820b0e45ead2ee6ebcc2090c8d7.tar.lz
nixlib-f66d2b11d7753820b0e45ead2ee6ebcc2090c8d7.tar.xz
nixlib-f66d2b11d7753820b0e45ead2ee6ebcc2090c8d7.tar.zst
nixlib-f66d2b11d7753820b0e45ead2ee6ebcc2090c8d7.zip
Merge pull request #270084 from Atemu/nixos/snapraid-top-level
nixos/snapraid: remove from top-level
-rw-r--r--nixos/doc/manual/release-notes/rl-2111.section.md2
-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
3 files changed, 9 insertions, 4 deletions
diff --git a/nixos/doc/manual/release-notes/rl-2111.section.md b/nixos/doc/manual/release-notes/rl-2111.section.md
index 400eb1062d9a..8edf4fd35e4f 100644
--- a/nixos/doc/manual/release-notes/rl-2111.section.md
+++ b/nixos/doc/manual/release-notes/rl-2111.section.md
@@ -100,7 +100,7 @@ In addition to numerous new and upgraded packages, this release has the followin
 - [opensnitch](https://github.com/evilsocket/opensnitch), an application firewall. Available as [services.opensnitch](#opt-services.opensnitch.enable).
 
 - [snapraid](https://www.snapraid.it/), a backup program for disk arrays.
-  Available as [snapraid](#opt-snapraid.enable).
+  Available as [snapraid](#opt-services.snapraid.enable).
 
 - [Hockeypuck](https://github.com/hockeypuck/hockeypuck), a OpenPGP Key Server. Available as [services.hockeypuck](#opt-services.hockeypuck.enable).
 
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index a78688ed0845..c0bd0b1600b9 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -366,6 +366,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
@@ -1509,7 +1510,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 = { };