seatd: pull the service definition into my own repo

this will allow me to configure the package
This commit is contained in:
Colin 2024-05-29 16:34:32 +00:00
parent 2789868703
commit 635ca1e5d8

View File

@ -1,12 +1,26 @@
{ ... }:
{ config, lib, ... }:
let
cfg = config.sane.programs.seatd;
in
{
sane.programs.seatd = {};
lib.mkMerge [
{
sane.programs.seatd = {};
}
(lib.mkIf cfg.enabled {
users.groups.seat = {};
# TODO: sandbox seatd
# also consider any alternatives (ConsoleKit?).
# /run/seatd.sock location can be configured, but only via compile-time flag
services.seatd.enable = lib.mkIf cfg.enabled true;
}
# 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";
};
};
})
]