add flakes module

This commit is contained in:
Sean Buckley 2021-01-17 17:08:34 -05:00
parent a6dcf54097
commit ec43f7557b
2 changed files with 18 additions and 0 deletions

View file

@ -29,6 +29,7 @@ in
./modules/alacritty.nix
./modules/baseline.nix
./modules/cli.nix
./modules/flakes.nix
./modules/scroll-boost
./modules/status-on-console.nix
];

17
modules/flakes.nix Normal file
View file

@ -0,0 +1,17 @@
{ config, pkgs, lib, ... }:
let
cfg = config.sconfig.flakes;
in
{
options.sconfig.flakes = lib.mkEnableOption "Enable Flakes";
config = lib.mkIf cfg {
environment.systemPackages = [ pkgs.nixFlakes ];
nix = {
package = pkgs.nixFlakes;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
};
}