aboutsummaryrefslogtreecommitdiffstats
path: root/nixos/nix.nix
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2024-10-07 11:47:06 +0300
committergramanas <anastasis.gramm2@gmail.com>2024-10-07 11:47:06 +0300
commit4547e75868cba2a265b78661ddc386b5e81c1bb0 (patch)
tree71924feb573c8af5030080fc007eee7bfbaabb20 /nixos/nix.nix
downloadnix-4547e75868cba2a265b78661ddc386b5e81c1bb0.tar.gz
nix-4547e75868cba2a265b78661ddc386b5e81c1bb0.tar.bz2
nix-4547e75868cba2a265b78661ddc386b5e81c1bb0.zip
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;
+ };
+}