From f64444a0f57322af91245edc3d3175f3a9b5726c Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Thu, 10 Feb 2022 19:22:11 -0800 Subject: nix: enable flakes --- modules/systems/nix.nix | 21 ++++++++++++--------- 1 file 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"; + }; }; } -- cgit 1.4.1