feat: use nom for rebuild only

nixos
Moritz Böhme 2024-08-18 13:05:32 +02:00
parent 6bcccc1ff9
commit 928f8b77fa
Signed by: moritz
GPG Key ID: 970C6E89EB0547A9
1 changed files with 8 additions and 20 deletions

View File

@ -6,26 +6,16 @@
, ...
}:
with lib;
let
inherit (lib) mkEnableOption mkOption types;
cfg = config.my.programs.nix;
mkSuper = system: nix:
if cfg.useSuper
then inputs.nix-super.packages.${system}.default
else nix;
mkNom = system: nix:
if cfg.useNom
then
inputs.nix-monitored.packages.${system}.default.override
{
withNotify = false;
nix = nix;
}
else nix;
mkNix = system: nix: mkNom system (mkSuper system nix);
};
in
{
options.my.programs.nix = {
@ -38,8 +28,6 @@ in
};
};
optimise.enable = mkEnableOption "nix-optimise";
useSuper = mkEnableOption "use nix super";
useNom = mkEnableOption "use nix output monitor" // { default = true; };
};
config = {
@ -59,7 +47,7 @@ in
nix = {
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
package = mkNix pkgs.system pkgs.nix;
package = pkgs.nix;
extraOptions = "experimental-features = nix-command flakes";