nixos/modules/snapclient.nix

24 lines
576 B
Nix

{
pkgs,
lib,
config,
...
}:
let cfg = config.services.snapclient; in
{
options.services.snapclient.enable = lib.mkEnableOption "a local snapclient service";
config.systemd.user.services.snapclient = lib.mkIf cfg.enable {
wantedBy = lib.warnIfNot config.services.pipewire.enable "Pipewire is not running, snapclient won't work" [
"pipewire.service"
];
after = [
"pipewire.service"
];
serviceConfig = {
ExecStart = "${pkgs.snapcast}/bin/snapclient --host snapserver --player pulse";
Slice="session.slice";
};
};
}