dotfiles/nix/nixos-modules/nix-flakes.nix
Magic_RB 67587f1365
Add and make use of dwarffs on heater
Signed-off-by: Magic_RB <magic_rb@redalder.org>
2021-08-19 18:25:51 +02:00

27 lines
606 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.magic_rb.flakes;
in
{
options.magic_rb.flakes = {
enable = mkEnableOption "Enable flake support";
nixMaster = mkEnableOption "Whether to enable Nix master for dwarffs.";
};
config = mkIf cfg.enable {
nixpkgs.overlays = mkIf cfg.nixMaster [ config.magic_rb.pins.nix.overlay ];
nix =
{
package =
if !cfg.nixMaster then
pkgs.nixFlakes
else
pkgs.nix;
extraOptions = ''
experimental-features = nix-command flakes ca-references
'';
};
};
}