refactor(wisdom): migrate app and browser modules to wisdomSimpleSlice

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.
This commit is contained in:
2026-07-17 11:31:35 -03:00
parent f424ab98c7
commit 0939766e3a
3 changed files with 43 additions and 80 deletions
+7 -22
View File
@@ -1,4 +1,4 @@
{ ... }: {
{ self, ... }: {
flake.nixosModules.systemLocalsend =
{ config, lib, ... }:
let
@@ -19,25 +19,10 @@
};
};
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 ];
};
};
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 ];
};
}
+7 -17
View File
@@ -1,18 +1,8 @@
{ ... }: {
flake.homeManagerModules.wisdomAppsPokeclicker =
{ config, lib, pkgs, ... }:
let
root = config.chiasson.home;
cfg = config.chiasson.home.apps.pokeclicker;
pokeclickerPkg = pkgs.callPackage ./package { };
in
{
options.chiasson.home.apps.pokeclicker.enable = lib.mkEnableOption "PokéClicker desktop (Farigh fork .deb nix)." // {
default = false;
};
config = lib.mkIf (root.enable && cfg.enable) {
home.packages = [ pokeclickerPkg ];
};
};
{ self, ... }: {
flake.homeManagerModules.wisdomAppsPokeclicker = self.lib.wisdomSimpleSlice {
path = "apps.pokeclicker";
default = false;
description = "PokéClicker desktop (Farigh fork .deb nix).";
packages = pkgs: [ (pkgs.callPackage ./package { }) ];
};
}