Commit 913747b8 authored by Sam Pointon's avatar Sam Pointon
Browse files

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

parent 9d72eaf4
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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"