2024-05-29 16:34:32 +00:00
|
|
|
{ config, lib, ... }:
|
2024-05-29 16:22:52 +00:00
|
|
|
let
|
|
|
|
cfg = config.sane.programs.seatd;
|
|
|
|
in
|
2024-05-29 16:34:32 +00:00
|
|
|
lib.mkMerge [
|
|
|
|
{
|
|
|
|
sane.programs.seatd = {};
|
|
|
|
}
|
|
|
|
(lib.mkIf cfg.enabled {
|
|
|
|
users.groups.seat = {};
|
2024-05-29 16:22:52 +00:00
|
|
|
|
2024-05-29 16:34:32 +00:00
|
|
|
# TODO: /run/seatd.sock location can be configured, but only via compile-time flag
|
|
|
|
systemd.services.seatd = {
|
|
|
|
description = "Seat management daemon";
|
|
|
|
documentation = [ "man:seatd(1)" ];
|
|
|
|
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
restartIfChanged = false;
|
|
|
|
|
|
|
|
serviceConfig = {
|
|
|
|
Type = "simple";
|
|
|
|
ExecStart = "${cfg.package}/bin/seatd -g seat";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
})
|
|
|
|
]
|