From d1395f9e6768551967f85128ccab19d12dec4c6f Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 16 Sep 2025 16:43:55 +1200 Subject: feat: added server configuration and setup sops-nix --- modules/nix.nix | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 modules/nix.nix (limited to 'modules/nix.nix') diff --git a/modules/nix.nix b/modules/nix.nix new file mode 100644 index 0000000..2c4ef83 --- /dev/null +++ b/modules/nix.nix @@ -0,0 +1,29 @@ +{ inputs, ... }: +{ + nix.nixPath = [ "/etc/nix/path" ]; + nix.registry.nixpkgs.flake = inputs.nixpkgs; + environment.etc."nix/path/nixpkgs".source = inputs.nixpkgs; + + nix = { + settings = { + experimental-features = [ "nix-command" "flakes" ]; + auto-optimise-store = true; + + trusted-users = [ "boss" ]; + + substituters = [ + "https://cache.nixos.org" + ]; + + # trusted-public-keys = [ + # "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + # ]; + }; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than +7"; + }; + optimise.automatic = true; + }; +} -- cgit v1.2.3