0939766e3a
Replace manual Home Manager module definitions in `localsend`, `pokeclicker`, and `flow-browser` with the `wisdomSimpleSlice` helper. This reduces boilerplate by centralizing the option declaration and configuration logic.
29 lines
878 B
Nix
29 lines
878 B
Nix
{ self, ... }: {
|
|
flake.nixosModules.systemLocalsend =
|
|
{ config, lib, ... }:
|
|
let
|
|
cfg = config.chiasson.system.localsend;
|
|
in
|
|
{
|
|
options.chiasson.system.localsend.openFirewall = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = true;
|
|
description = ''
|
|
Open TCP/UDP **53317** for LocalSend. Use with `wisdomAppsLocalsend` on the user side.
|
|
'';
|
|
};
|
|
|
|
config = lib.mkIf cfg.openFirewall {
|
|
networking.firewall.allowedTCPPorts = [ 53317 ];
|
|
networking.firewall.allowedUDPPorts = [ 53317 ];
|
|
};
|
|
};
|
|
|
|
flake.homeManagerModules.wisdomAppsLocalsend = self.lib.wisdomSimpleSlice {
|
|
path = "apps.localsend";
|
|
default = true;
|
|
description = "LocalSend client; open the firewall on NixOS with `system.localsend` if you want inbound.";
|
|
packages = pkgs: [ pkgs.localsend ];
|
|
};
|
|
}
|