13f35677be
Move Home Manager module defaults from a centralized `desktop-home-defaults.nix` file into their respective `wisdom` slices. This change aligns with the updated documentation regarding module ownership, where defaults live with the option that owns them rather than in a shared defaults file. Additionally, update `docs/conventions.md` to reflect this new pattern for defining `mkEnableOption` defaults and move base git/encryption configurations into the core `wisdom` module. - Delete `modules/hosts/desktop-home-defaults.nix` - Update `modules/wisdom/default.nix` to include shared git and package defaults - Add `default = ...` to `mkEnableOption` in various `wisdom` modules - Update `docs/conventions.md` with new HM slice guidelines
44 lines
1.2 KiB
Nix
44 lines
1.2 KiB
Nix
{ ... }: {
|
|
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.
|
|
'' // {
|
|
default = true;
|
|
};
|
|
|
|
package = lib.mkPackageOption pkgs "localsend" { };
|
|
};
|
|
|
|
config = lib.mkIf (root.enable && cfg.enable) {
|
|
home.packages = [ cfg.package ];
|
|
};
|
|
};
|
|
}
|