add nixos-mods/improvedDefaults

secrix-issue25
Felix Stupp 3 months ago
parent 17ceb62c37
commit 2f8622a062
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -154,6 +154,13 @@ in {
};
x-banananetwork = {
improvedDefaults.enable = true;
};
};

@ -4,6 +4,7 @@
imports = [
# directories
./frontend
./improvedDefaults
# files
./allCommon.nix
./autoUnfree.nix

@ -0,0 +1,30 @@
{ config
, lib
, pkgs
, ...
}:
let
cfg = config.x-banananetwork.improvedDefaults;
in
{
config = lib.mkIf cfg.enable (
let
nixI = config.programs.nix-index;
shellInt = builtins.any (x: x) (with nixI;
[
enableBashIntegration
enableZshIntegration
]);
nixIclash = nixI.enable && shellInt;
in
{
programs.command-not-found.enable = lib.mkIf nixIclash false;
}
);
}

@ -0,0 +1,35 @@
{ config
, lib
, pkgs
, ...
}:
let
cfg = config.x-banananetwork.improvedDefaults;
in
{
imports = [
./command-not-found.nix
];
options = {
x-banananetwork.improvedDefaults = {
enable = lib.mkEnableOption ''
improved defaults for nixpkgs NixOS modules.
Defaults are only changed conditionally,
e.g. modules, which are enabled by default,
get automatically disabled
if another incompatible module is enabled.
'';
};
};
}
Loading…
Cancel
Save