nix-files/hosts/common/programs/seatd.nix

27 lines
582 B
Nix
Raw Normal View History

{ config, lib, ... }:
2024-05-29 16:22:52 +00:00
let
cfg = config.sane.programs.seatd;
in
lib.mkMerge [
{
sane.programs.seatd = {};
}
(lib.mkIf cfg.enabled {
users.groups.seat = {};
2024-05-29 16:22:52 +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";
};
};
})
]