Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

65 lines
1.4 KiB
Nix

{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.seatd;
inherit (lib) mkEnableOption mkOption types;
in
{
meta.maintainers = with lib.maintainers; [ sinanmohd ];
options.services.seatd = {
enable = mkEnableOption "seatd";
user = mkOption {
type = types.str;
default = "root";
description = "User to own the seatd socket";
};
group = mkOption {
type = types.str;
default = "seat";
description = "Group to own the seatd socket";
};
logLevel = mkOption {
type = types.enum [
"debug"
"info"
"error"
"silent"
];
default = "info";
description = "Logging verbosity";
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
seatd
sdnotify-wrapper
];
users.groups.seat = lib.mkIf (cfg.group == "seat") { };
systemd.services.seatd = {
description = "Seat management daemon";
documentation = [ "man:seatd(1)" ];
wantedBy = [ "multi-user.target" ];
restartIfChanged = false;
serviceConfig = {
Type = "notify";
NotifyAccess = "all";
SyslogIdentifier = "seatd";
ExecStart = "${pkgs.sdnotify-wrapper}/bin/sdnotify-wrapper ${pkgs.seatd.bin}/bin/seatd -n 1 -u ${cfg.user} -g ${cfg.group} -l ${cfg.logLevel}";
RestartSec = 1;
Restart = "always";
};
};
};
}