summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-03-24 16:21:11 +0530
committersinanmohd <sinan@sinanmohd.com>2024-03-24 16:21:11 +0530
commit83b7aae54bde197ad7d6a6e0615fc5770929625a (patch)
treec3d35eec1194dbb4f8872f3f940ebcf014105aa6
parent92f6bc769cb91793e1d632ee4a90c196ba5a4a28 (diff)
common/nix: init
-rw-r--r--flake.nix7
-rw-r--r--nixos/common/configuration.nix1
-rw-r--r--nixos/common/modules/nix.nix6
3 files changed, 12 insertions, 2 deletions
diff --git a/flake.nix b/flake.nix
index 3e5f310..d8f6d7a 100644
--- a/flake.nix
+++ b/flake.nix
@@ -21,10 +21,13 @@
makeNixos = host: system: lib.nixosSystem {
inherit system;
modules = [
+ {
+ networking.hostName = host;
+ nix.nixPath = [ "nixpkgs=${nixpkgs}" ];
+ }
+
./userdata.nix
- { networking.hostName = host; }
./nixos/${host}/configuration.nix
-
sops-nix.nixosModules.sops
];
};
diff --git a/nixos/common/configuration.nix b/nixos/common/configuration.nix
index 7149c83..4e4ea12 100644
--- a/nixos/common/configuration.nix
+++ b/nixos/common/configuration.nix
@@ -13,6 +13,7 @@ in
imports = [
./modules/tmux.nix
./modules/dev.nix
+ ./modules/nix.nix
./modules/pppd.nix
./modules/stalwart-mail.nix
diff --git a/nixos/common/modules/nix.nix b/nixos/common/modules/nix.nix
new file mode 100644
index 0000000..40ab46d
--- /dev/null
+++ b/nixos/common/modules/nix.nix
@@ -0,0 +1,6 @@
+{ ... }: {
+ nix.settings = {
+ auto-optimise-store = true;
+ experimental-features = [ "flakes" "nix-command" ];
+ };
+}