From 06ee5c04836c0ede5a87b9df72740d140b88ef69 Mon Sep 17 00:00:00 2001 From: Jasper Ras Date: Sat, 25 Jan 2025 11:41:20 +0100 Subject: stuff --- hosts/tarrel.nix | 19 ++++++------------- services/sunshine.nix | 13 +++++++++++++ services/unifi.nix | 7 +++++++ 3 files changed, 26 insertions(+), 13 deletions(-) create mode 100644 services/sunshine.nix create mode 100644 services/unifi.nix diff --git a/hosts/tarrel.nix b/hosts/tarrel.nix index 96dd693..59ecf4c 100644 --- a/hosts/tarrel.nix +++ b/hosts/tarrel.nix @@ -1,6 +1,11 @@ { pkgs, inputs, config, ... }: { - imports = [ ./hardware-configuration/tarrel.nix ]; + imports = [ + ./hardware-configuration/tarrel.nix + + # Services + ../services/sunshine.nix + ]; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; @@ -59,20 +64,8 @@ environment.pathsToLink = [ "/libexec" ]; - services.sunshine = { - enable = true; - autoStart = true; - capSysAdmin = true; - openFirewall = true; - }; - - # from: https://help.ui.com/hc/en-us/articles/218506997-Required-Ports-Reference - # best put it in a var somewhere networking.hostName = "tarrel"; networking.networkmanager.enable = true; - networking.firewall.allowedTCPPorts = [ 53 8080 8000 443 8443 8880 8843 6789 27117 ]; - networking.firewall.allowedUDPPorts = [ 53 3478 5514 10001 1900 123]; - networking.firewall.allowedUDPPortRanges = [ { from = 5656; to = 5699; } ]; home-manager = { useGlobalPkgs = true; diff --git a/services/sunshine.nix b/services/sunshine.nix new file mode 100644 index 0000000..4e09aa8 --- /dev/null +++ b/services/sunshine.nix @@ -0,0 +1,13 @@ +{ ... }: +{ + services.sunshine = { + enable = true; + autoStart = true; + capSysAdmin = true; + openFirewall = true; + }; + + networking.firewall.allowedTCPPorts = [ 47984 47989 48010 ]; + networking.firewall.allowedUDPPorts = [ 48010 ]; + networking.firewall.allowedUDPPortRanges = [ { from = 47998; to = 48000; } ]; +} diff --git a/services/unifi.nix b/services/unifi.nix new file mode 100644 index 0000000..7d351d4 --- /dev/null +++ b/services/unifi.nix @@ -0,0 +1,7 @@ +{ ... }: +{ + # https://help.ui.com/hc/en-us/articles/218506997-Required-Ports-Reference + networking.firewall.allowedTCPPorts = [ 8080 8000 8443 8880 8843 6789 27117 ]; + networking.firewall.allowedUDPPorts = [ 3478 5514 10001 1900 123 ]; + networking.firewall.allowedUDPPortRanges = [ { from = 5656; to = 5699; } ]; +} -- cgit v1.2.3