Add service.logind.extraConfig option
So that we can customize systemd-logind in configuration.nix. Example: services.logind.extraConfig = "HandleLidSwitch=ignore"; See man logind.conf for available options.
This commit is contained in:
parent
568683316b
commit
08c9a0ad5e
@ -462,6 +462,16 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.logind.extraConfig = mkOption {
|
||||||
|
default = "";
|
||||||
|
type = types.uniq types.string;
|
||||||
|
example = "HandleLidSwitch=ignore";
|
||||||
|
description = ''
|
||||||
|
Extra config options for systemd-logind. See man logind.conf for
|
||||||
|
available options.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
systemd.enableEmergencyMode = mkOption {
|
systemd.enableEmergencyMode = mkOption {
|
||||||
default = true;
|
default = true;
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
@ -508,6 +518,13 @@ in
|
|||||||
'';
|
'';
|
||||||
target = "systemd/journald.conf";
|
target = "systemd/journald.conf";
|
||||||
}
|
}
|
||||||
|
{ source = pkgs.writeText "logind.conf"
|
||||||
|
''
|
||||||
|
[Logind]
|
||||||
|
${config.services.logind.extraConfig}
|
||||||
|
'';
|
||||||
|
target = "systemd/logind.conf";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
system.activationScripts.systemd =
|
system.activationScripts.systemd =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user