nix-conf/system/modules/airplay.nix
danny 9c9acc3494 daily configuration optimization
Fix
- airplay: systemd wantedBy target
- fcitx5: remove redundant systemd service

Remove
- move scripts into configuration

Style
- ghostty: add more transparency to background

Add
- zellij
2025-08-27 22:38:40 +08:00

49 lines
818 B
Nix

{
hostname ? null,
}:
{ pkgs, lib, ... }:
let
inherit (lib) optionalString;
in
{
networking.firewall = {
allowedTCPPorts = [
7000
7001
7100
];
allowedUDPPorts = [
5353
6000
6001
7011
];
};
environment.systemPackages = with pkgs; [
uxplay
];
systemd.user.services.uxplay = {
wantedBy = [ "default.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.uxplay}/bin/uxplay ${
optionalString (hostname != null) "-n ${hostname} -fs -fps 60 -nh"
} -p";
};
};
services.avahi = {
enable = true;
openFirewall = true;
nssmdns4 = true;
publish = {
enable = true;
addresses = true;
workstation = true;
userServices = true;
domain = true;
};
};
}