aboutsummaryrefslogtreecommitdiffstats
path: root/nixos/nix.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/nix.nix')
-rw-r--r--nixos/nix.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/nixos/nix.nix b/nixos/nix.nix
new file mode 100644
index 0000000..a2ec6b0
--- /dev/null
+++ b/nixos/nix.nix
@@ -0,0 +1,22 @@
+{
+ inputs,
+ lib,
+ config,
+ ...
+}: {
+ nix = {
+ settings = {
+ experimental-features = "nix-command flakes";
+ auto-optimise-store = true;
+ allowed-users = ["@wheel"];
+ };
+ # gc = {
+ # automatic = true;
+ # dates = "weekly";
+ # options = "--delete-older-than +3";
+ # };
+
+ registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
+ nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
+ };
+}