summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSilas Schöffel <sils@sils.li>2025-01-20 16:24:59 +0100
committerSilas Schöffel <sils@sils.li>2025-01-20 16:24:59 +0100
commit958f969592d51f69e63d28fb7af3d4c5e0488bab (patch)
treebe1f0cc345ee6d61a41ed728064e59d6e97c6f57
parentfeat(modules/invidious-router): init (diff)
downloadnixos-server-958f969592d51f69e63d28fb7af3d4c5e0488bab.zip
feat(modules/nixconfig): init
-rw-r--r--hosts/by-name/server2/configuration.nix1
-rw-r--r--hosts/by-name/server3/configuration.nix1
-rw-r--r--modules/by-name/ni/nixconfig/module.nix28
-rw-r--r--system/services/default.nix1
-rw-r--r--system/services/nix/default.nix23
5 files changed, 30 insertions, 24 deletions
diff --git a/hosts/by-name/server2/configuration.nix b/hosts/by-name/server2/configuration.nix
index 5d3c7fb..b256c5f 100644
--- a/hosts/by-name/server2/configuration.nix
+++ b/hosts/by-name/server2/configuration.nix
@@ -41,6 +41,7 @@
         "source.foss-syndicate.org" = "https://git.foss-syndicate.org/vhack.eu/nixos-server";
       };
     };
+    nixconfig.enable = true;
     openssh.enable = true;
     persist = {
       enable = true;
diff --git a/hosts/by-name/server3/configuration.nix b/hosts/by-name/server3/configuration.nix
index 8b21e79..e16c67a 100644
--- a/hosts/by-name/server3/configuration.nix
+++ b/hosts/by-name/server3/configuration.nix
@@ -15,6 +15,7 @@
         "miniflux.vhack.eu"
       ];
     };
+    nixconfig.enable = true;
     openssh.enable = true;
     persist = {
       enable = true;
diff --git a/modules/by-name/ni/nixconfig/module.nix b/modules/by-name/ni/nixconfig/module.nix
new file mode 100644
index 0000000..a5bf950
--- /dev/null
+++ b/modules/by-name/ni/nixconfig/module.nix
@@ -0,0 +1,28 @@
+{
+  config,
+  lib,
+  ...
+}: let
+  cfg = config.vhack.nixconfig;
+in {
+  options.vhack.nixconfig = {
+    enable = lib.mkEnableOption "sophisticated nix settings";
+  };
+  config = lib.mkIf cfg.enable {
+    nix = {
+      #    gc = {
+      #      automatic = true;
+      #      dates = "daily";
+      #      options = "--delete-older-than 3";
+      #    };
+      settings = {
+        auto-optimise-store = true;
+        experimental-features = ["nix-command" "flakes"];
+        trusted-users = [
+          "root"
+          "@wheel"
+        ];
+      };
+    };
+  };
+}
diff --git a/system/services/default.nix b/system/services/default.nix
index 3403eea..819c36a 100644
--- a/system/services/default.nix
+++ b/system/services/default.nix
@@ -6,7 +6,6 @@
     ./matrix
     ./minecraft
     ./murmur
-    ./nix
     ./restic
     ./taskserver
   ];
diff --git a/system/services/nix/default.nix b/system/services/nix/default.nix
deleted file mode 100644
index 13be0f0..0000000
--- a/system/services/nix/default.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{
-  config,
-  lib,
-  pkgs,
-  ...
-}: {
-  nix = {
-    #    gc = {
-    #      automatic = true;
-    #      dates = "daily";
-    #      options = "--delete-older-than 3";
-    #    };
-    settings = {
-      auto-optimise-store = true;
-      experimental-features = ["nix-command" "flakes"];
-      trusted-users = [
-        "root"
-        "nixremote"
-        "@wheel"
-      ];
-    };
-  };
-}