1 { config, lib, pkgs, ... }:
4 cfg = config.services.seatd;
5 inherit (lib) mkEnableOption mkOption types;
8 meta.maintainers = with lib.maintainers; [ sinanmohd ];
10 options.services.seatd = {
11 enable = mkEnableOption "seatd";
16 description = "User to own the seatd socket";
21 description = "Group to own the seatd socket";
24 type = types.enum [ "debug" "info" "error" "silent" ];
26 description = "Logging verbosity";
30 config = lib.mkIf cfg.enable {
31 environment.systemPackages = with pkgs; [ seatd sdnotify-wrapper ];
32 users.groups.seat = lib.mkIf (cfg.group == "seat") {};
34 systemd.services.seatd = {
35 description = "Seat management daemon";
36 documentation = [ "man:seatd(1)" ];
38 wantedBy = [ "multi-user.target" ];
39 restartIfChanged = false;
44 SyslogIdentifier = "seatd";
45 ExecStart = "${pkgs.sdnotify-wrapper}/bin/sdnotify-wrapper ${pkgs.seatd.bin}/bin/seatd -n 1 -u ${cfg.user} -g ${cfg.group} -l ${cfg.logLevel}";