From 168dadf9e2e94be8f4a5a35bd07834e0fca605fd Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Fri, 5 Jul 2024 11:53:58 +0400 Subject: [PATCH] add localsend --- hosts/sakopc/configuration.nix | 1 + modules/desktop/apps/default.nix | 1 + modules/desktop/apps/localsend/default.nix | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 modules/desktop/apps/localsend/default.nix diff --git a/hosts/sakopc/configuration.nix b/hosts/sakopc/configuration.nix index a3dd5399..52d3cb05 100644 --- a/hosts/sakopc/configuration.nix +++ b/hosts/sakopc/configuration.nix @@ -29,6 +29,7 @@ rssguard.enable = true; obs.enable = true; pass.enable = true; + localsend.enable = true; }; browsers = { firefox.enable = true; diff --git a/modules/desktop/apps/default.nix b/modules/desktop/apps/default.nix index a171d858..d5a32256 100644 --- a/modules/desktop/apps/default.nix +++ b/modules/desktop/apps/default.nix @@ -13,5 +13,6 @@ ./obs ./nextcloud ./rssguard + ./localsend ]; } diff --git a/modules/desktop/apps/localsend/default.nix b/modules/desktop/apps/localsend/default.nix new file mode 100644 index 00000000..4509eb3e --- /dev/null +++ b/modules/desktop/apps/localsend/default.nix @@ -0,0 +1,20 @@ +{ outputs, options, config, lib, pkgs, ...}: +with lib; +let + cfg = config.modules.desktop.apps.localsend; +in +{ + options.modules.desktop.apps.localsend = { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + users.users.sako.packages = with pkgs; [ + localsend + ]; + networking.firewall = { + allowedTCPPorts = [ 53317 ]; + allowedUDPPorts = []; + }; + }; +}