nixos/logind: only enable if systemd-logind was built (#508968)
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
}:
|
||||
{
|
||||
options.services.logind = {
|
||||
enable = lib.mkEnableOption "the `systemd-logind` login service" // {
|
||||
default = config.systemd.package.withLogind;
|
||||
defaultText = lib.literalExpression "config.systemd.package.withLogind";
|
||||
};
|
||||
settings.Login = lib.mkOption {
|
||||
description = ''
|
||||
Settings option for systemd-logind.
|
||||
@@ -40,7 +44,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
config = lib.mkIf config.services.logind.enable {
|
||||
systemd.additionalUpstreamSystemUnits = [
|
||||
"systemd-logind.service"
|
||||
"autovt@.service"
|
||||
|
||||
@@ -843,6 +843,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
withImportd
|
||||
withKmod
|
||||
withLocaled
|
||||
withLogind
|
||||
withMachined
|
||||
withNetworkd
|
||||
withNspawn
|
||||
|
||||
Reference in New Issue
Block a user