mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-06 04:24:28 +03:00
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 {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
@ -508,6 +518,13 @@ in
|
||||
'';
|
||||
target = "systemd/journald.conf";
|
||||
}
|
||||
{ source = pkgs.writeText "logind.conf"
|
||||
''
|
||||
[Logind]
|
||||
${config.services.logind.extraConfig}
|
||||
'';
|
||||
target = "systemd/logind.conf";
|
||||
}
|
||||
];
|
||||
|
||||
system.activationScripts.systemd =
|
||||
|
Loading…
Reference in New Issue
Block a user