From f162dfe47c2df955cd1fe4ab0279ce26b1989a11 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Wed, 17 Apr 2024 20:00:39 -0400 Subject: [PATCH] nixos: added nicotine-plus module --- nixosModules/apps/default.nix | 2 +- nixosModules/apps/nicotine-plus/default.nix | 31 +++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 nixosModules/apps/nicotine-plus/default.nix diff --git a/nixosModules/apps/default.nix b/nixosModules/apps/default.nix index 46c233f3..3f35130d 100644 --- a/nixosModules/apps/default.nix +++ b/nixosModules/apps/default.nix @@ -4,5 +4,5 @@ config, ... }: { - imports = [./flatpak ./steam ./podman ./virt-manager]; + imports = [./flatpak ./nicotine-plus ./steam ./podman ./virt-manager]; } diff --git a/nixosModules/apps/nicotine-plus/default.nix b/nixosModules/apps/nicotine-plus/default.nix new file mode 100644 index 00000000..3f33f983 --- /dev/null +++ b/nixosModules/apps/nicotine-plus/default.nix @@ -0,0 +1,31 @@ +{ + pkgs, + lib, + config, + ... +}: { + options = { + apps.nicotine-plus.enable = + lib.mkEnableOption "Enable Nicotine+ soulseek client."; + }; + + config = lib.mkIf config.apps.nicotine-plus.enable { + environment.systemPackages = [ pkgs.nicotine-plus ]; + networking = { + firewall.allowedTCPPortRanges = [ + # Soulseek + { + from = 2234; + to = 2239; + } + ]; + firewall.allowedUDPPortRanges = [ + # Soulseek + { + from = 2234; + to = 2239; + } + ]; + }; + }; +}