From ef9c4cbdbbeee056b08f5f7859519bab0577ed2e Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sun, 24 Sep 2023 19:11:38 -0500 Subject: [PATCH] nixos: add nix configurations --- hosts/common/global/default.nix | 1 + hosts/common/global/nix.nix | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 hosts/common/global/nix.nix diff --git a/hosts/common/global/default.nix b/hosts/common/global/default.nix index 968b0e0..9ce1140 100644 --- a/hosts/common/global/default.nix +++ b/hosts/common/global/default.nix @@ -3,6 +3,7 @@ inputs.home-manager.nixosModules.home-manager ./fish.nix ./locale.nix + ./nix.nix ./tailscale.nix ] ++ (builtins.attrValues outputs.nixosModules); diff --git a/hosts/common/global/nix.nix b/hosts/common/global/nix.nix new file mode 100644 index 0000000..1766ed3 --- /dev/null +++ b/hosts/common/global/nix.nix @@ -0,0 +1,22 @@ +{ inputs, lib, ... }: +{ + nix = { + settings = { + trusted-users = [ "root" "@wheel" ]; + auto-optimise-store = lib.mkDefault true; + experimental-features = [ "nix-command" "flakes" "repl-flake" ]; + warn-dirty = false; + system-features = [ "kvm" "big-parallel" "nixos-test" ]; + flake-registry = ""; + }; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than +3"; + }; + + registry = lib.mapAttrs (_: value: { flake = value; }) inputs; + + nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" ]; + }; +} \ No newline at end of file