From 83b7aae54bde197ad7d6a6e0615fc5770929625a Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Sun, 24 Mar 2024 16:21:11 +0530 Subject: common/nix: init --- flake.nix | 7 +++++-- nixos/common/configuration.nix | 1 + nixos/common/modules/nix.nix | 6 ++++++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 nixos/common/modules/nix.nix 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" ]; + }; +} -- cgit v1.2.3