nixos/logind: only enable if systemd-logind was built (#508968)

This commit is contained in:
nikstur
2026-04-11 19:41:37 +00:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -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