nixos/seatd: init
This commit is contained in:
@@ -65,6 +65,8 @@
|
|||||||
|
|
||||||
- [hddfancontrol](https://github.com/desbma/hddfancontrol), a service to regulate fan speeds based on hard drive temperature. Available as [services.hddfancontrol](#opt-services.hddfancontrol.enable).
|
- [hddfancontrol](https://github.com/desbma/hddfancontrol), a service to regulate fan speeds based on hard drive temperature. Available as [services.hddfancontrol](#opt-services.hddfancontrol.enable).
|
||||||
|
|
||||||
|
- [seatd](https://sr.ht/~kennylevinsen/seatd/), A minimal seat management daemon. Available as [services.seatd](#opt-services.seatd.enable).
|
||||||
|
|
||||||
- [GoToSocial](https://gotosocial.org/), an ActivityPub social network server, written in Golang. Available as [services.gotosocial](#opt-services.gotosocial.enable).
|
- [GoToSocial](https://gotosocial.org/), an ActivityPub social network server, written in Golang. Available as [services.gotosocial](#opt-services.gotosocial.enable).
|
||||||
|
|
||||||
- [Castopod](https://castopod.org/), an open-source hosting platform made for podcasters who want to engage and interact with their audience. Available as [services.castopod](#opt-services.castopod.enable).
|
- [Castopod](https://castopod.org/), an open-source hosting platform made for podcasters who want to engage and interact with their audience. Available as [services.castopod](#opt-services.castopod.enable).
|
||||||
|
|||||||
@@ -474,6 +474,7 @@
|
|||||||
./services/desktops/pipewire/pipewire.nix
|
./services/desktops/pipewire/pipewire.nix
|
||||||
./services/desktops/pipewire/wireplumber.nix
|
./services/desktops/pipewire/wireplumber.nix
|
||||||
./services/desktops/profile-sync-daemon.nix
|
./services/desktops/profile-sync-daemon.nix
|
||||||
|
./services/desktops/seatd.nix
|
||||||
./services/desktops/system-config-printer.nix
|
./services/desktops/system-config-printer.nix
|
||||||
./services/desktops/system76-scheduler.nix
|
./services/desktops/system76-scheduler.nix
|
||||||
./services/desktops/telepathy.nix
|
./services/desktops/telepathy.nix
|
||||||
|
|||||||
49
nixos/modules/services/desktops/seatd.nix
Normal file
49
nixos/modules/services/desktops/seatd.nix
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.seatd;
|
||||||
|
inherit (lib) mkEnableOption mkOption mdDoc types;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
meta.maintainers = with lib.maintainers; [ sinanmohd ];
|
||||||
|
|
||||||
|
options.services.seatd = {
|
||||||
|
enable = mkEnableOption (mdDoc "seatd");
|
||||||
|
|
||||||
|
user = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "root";
|
||||||
|
description = mdDoc "User to own the seatd socket";
|
||||||
|
};
|
||||||
|
group = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "seat";
|
||||||
|
description = mdDoc "Group to own the seatd socket";
|
||||||
|
};
|
||||||
|
logLevel = mkOption {
|
||||||
|
type = types.enum [ "debug" "info" "error" "silent" ];
|
||||||
|
default = "info";
|
||||||
|
description = mdDoc "Logging verbosity";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [ seatd ];
|
||||||
|
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 = "simple";
|
||||||
|
ExecStart = "${pkgs.seatd.bin}/bin/seatd -u ${cfg.user} -g ${cfg.group} -l ${cfg.logLevel}";
|
||||||
|
RestartSec = 1;
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user