mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-26 10:06:13 +01:00
5a364448c6
Signed-off-by: main <magic_rb@redalder.org>
27 lines
592 B
Nix
27 lines
592 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
|
|
'';
|
|
};
|
|
};
|
|
}
|