nixos-config/modules/flakes.nix
2021-01-17 17:08:34 -05:00

17 lines
354 B
Nix

{ 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
'';
};
};
}