Rebase to flake parts #7

This commit is contained in:
2026-05-08 19:12:16 -03:00
parent 1015cf4577
commit f98606dcce
23 changed files with 1060 additions and 11 deletions
+41
View File
@@ -0,0 +1,41 @@
{ ... }: {
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 =
{ config, lib, pkgs, ... }:
let
root = config.chiasson.home;
cfg = config.chiasson.home.apps.localsend;
in
{
options.chiasson.home.apps.localsend = {
enable = lib.mkEnableOption ''
LocalSend client; open the firewall on NixOS with `system.localsend` if you want inbound.
'';
package = lib.mkPackageOption pkgs "localsend" { };
};
config = lib.mkIf (root.enable && cfg.enable) {
home.packages = [ cfg.package ];
};
};
}