about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-02-10 19:22:11 -0800
committerFranck Cuny <franck@fcuny.net>2022-02-10 19:22:11 -0800
commitf64444a0f57322af91245edc3d3175f3a9b5726c (patch)
tree1592b3dd2f0226149c896cbf70d18e14521d48a5 /modules
parentfix a few errors (diff)
downloadworld-f64444a0f57322af91245edc3d3175f3a9b5726c.tar.gz
nix: enable flakes
Diffstat (limited to '')
-rw-r--r--modules/systems/nix.nix21
1 files changed, 12 insertions, 9 deletions
diff --git a/modules/systems/nix.nix b/modules/systems/nix.nix
index b1e422f..48379a4 100644
--- a/modules/systems/nix.nix
+++ b/modules/systems/nix.nix
@@ -1,15 +1,18 @@
 { lib, pkgs, ... }:
 
 {
-  nix.extraOptions = ''
-    experimental-features = nix-command
-  '';
+  # Enable flakes and new 'nix' command
+  nix = {
+    package = pkgs.nixFlakes;
+    extraOptions = ''
+      experimental-features = nix-command flakes
+    '';
+    autoOptimiseStore = true;
+    trustedUsers = [ "root" "@wheel" ];
 
-  nix.autoOptimiseStore = true;
-  nix.trustedUsers = [ "root" "@wheel" ];
-
-  nix.gc = {
-    automatic = true;
-    options = "--delete-older-than 14d";
+    gc = {
+      automatic = true;
+      options = "--delete-older-than 14d";
+    };
   };
 }