From d7263b66eb7c8c3b34584608812cc42b07b11156 Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 23 Jul 2023 20:24:12 -0400 Subject: modules/darwin: init --- modules/darwin/base/nix.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 modules/darwin/base/nix.nix (limited to 'modules/darwin/base/nix.nix') diff --git a/modules/darwin/base/nix.nix b/modules/darwin/base/nix.nix new file mode 100644 index 0000000..14aa805 --- /dev/null +++ b/modules/darwin/base/nix.nix @@ -0,0 +1,24 @@ +{ + config, + lib, + ... +}: let + cfg = config.getchoo.base.nix-settings; + inherit (lib) mkDefault mkEnableOption mkIf; +in { + options.getchoo.base.nix-settings.enable = mkEnableOption "base nix settings"; + + config = mkIf cfg.enable { + nix = { + gc.automatic = mkDefault true; + + settings = { + auto-optimise-store = true; + experimental-features = ["nix-command" "flakes" "auto-allocate-uids" "repl-flake"]; + trusted-users = mkDefault ["root" "@wheel"]; + }; + }; + + services.nix-daemon.enable = true; + }; +} -- cgit v1.2.3