nixos/logind: only enable if systemd-logind was built

This commit is contained in:
Sam Pointon
2026-04-11 20:03:44 +01:00
parent 9d72eaf421
commit 913747b843
+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"