summaryrefslogtreecommitdiffstats
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
parent91050ea1e57e50388fa87a3302ba12d188ef723a (diff)
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.
-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 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 = { };