about summary refs log tree commit diff
path: root/modules/system/nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-05 17:02:58 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-05 17:02:58 -0700
commite69ed57ab173b558c3e8bcdb3cbc228fc7ccbc3a (patch)
tree2334080d13341b3af19671ec94dd518d97f55959 /modules/system/nix
parentsound: add a new module (diff)
downloadworld-e69ed57ab173b558c3e8bcdb3cbc228fc7ccbc3a.tar.gz
nix: refactor to a module
Diffstat (limited to 'modules/system/nix')
-rw-r--r--modules/system/nix/default.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/system/nix/default.nix b/modules/system/nix/default.nix
new file mode 100644
index 0000000..2ad20c3
--- /dev/null
+++ b/modules/system/nix/default.nix
@@ -0,0 +1,16 @@
+# Nix related settings
+{ lib, pkgs, ... }: {
+  nix = {
+    package = pkgs.nixFlakes;
+    extraOptions = ''
+      experimental-features = nix-command flakes
+    '';
+    autoOptimiseStore = true;
+    trustedUsers = [ "root" "@wheel" ];
+
+    gc = {
+      automatic = true;
+      options = "--delete-older-than 14d";
+    };
+  };
+}