Added user setup

This commit is contained in:
Julien Malka 2021-12-11 13:36:08 +01:00
parent 42cd7bb365
commit 91361e1910
6 changed files with 64 additions and 51 deletions

28
modules/nix/default.nix Normal file
View file

@ -0,0 +1,28 @@
{ pkgs, config, lib, ... }:
let
cfg = config.luj.nix;
in
with lib;
{
options.luj.nix = {
enable = mkEnableOption "Enable nix experimental";
};
config = mkIf cfg.enable
{
nix = {
autoOptimiseStore = true;
allowedUsers = [ "julien" ];
gc = {
automatic = true;
dates = "daily";
};
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
};
}