nixos/ifstate: configure kernel params also for initrd-only installations
This commit is contained in:
@@ -144,6 +144,14 @@ in
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf (cfg.enable || initrdCfg.enable) {
|
||||
# sane defaults to not let IfState work against the kernel
|
||||
boot.extraModprobeConfig = ''
|
||||
options bonding max_bonds=0
|
||||
options dummy numdummies=0
|
||||
options ifb numifbs=0
|
||||
'';
|
||||
})
|
||||
(lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
@@ -158,13 +166,6 @@ in
|
||||
|
||||
networking.useDHCP = lib.mkDefault false;
|
||||
|
||||
# sane defaults to not let IfState work against the kernel
|
||||
boot.extraModprobeConfig = ''
|
||||
options bonding max_bonds=0
|
||||
options dummy numdummies=0
|
||||
options ifb numifbs=0
|
||||
'';
|
||||
|
||||
environment = {
|
||||
# ifstatecli command should be available to use user, there are other useful subcommands like check or show
|
||||
systemPackages = [ cfg.package ];
|
||||
|
||||
Reference in New Issue
Block a user