refactor(wisdom): decentralize module defaults and update conventions
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
This commit is contained in:
@@ -8,7 +8,9 @@
|
||||
{
|
||||
options.chiasson.home.browsers.chrome.enable = lib.mkEnableOption ''
|
||||
Chrome (unfree, needs `allowUnfree`); skipped if nixpkgs has no build for this platform.
|
||||
'';
|
||||
'' // {
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf (root.enable && cfg.enable) {
|
||||
home.packages = lib.optional (
|
||||
|
||||
@@ -155,13 +155,15 @@
|
||||
`failed Initialize()ing the frame pool` in Jellyfin.
|
||||
|
||||
Requires `chiasson.system.chromiumHevc.enable` on NixOS.
|
||||
'';
|
||||
'' // {
|
||||
default = true;
|
||||
};
|
||||
|
||||
packages = lib.mkOption {
|
||||
type = lib.types.listOf (
|
||||
lib.types.enum (lib.attrNames browserCatalog)
|
||||
);
|
||||
default = [ "google-chrome" ];
|
||||
default = if pkgs.stdenv.hostPlatform.isAarch64 then [ "chromium" ] else [ "google-chrome" ];
|
||||
description = "Chromium-based browsers to wrap.";
|
||||
};
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
cfg = config.chiasson.home.browsers.edge;
|
||||
in
|
||||
{
|
||||
options.chiasson.home.browsers.edge.enable = lib.mkEnableOption "Edge (unfree); skipped if unavailable on this platform.";
|
||||
options.chiasson.home.browsers.edge.enable = lib.mkEnableOption "Edge (unfree); skipped if unavailable on this platform." // {
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf (root.enable && cfg.enable) {
|
||||
home.packages = lib.optional (
|
||||
|
||||
@@ -56,7 +56,9 @@
|
||||
{
|
||||
options.chiasson.home.browsers.flow.enable = lib.mkEnableOption ''
|
||||
[Flow](https://github.com/MultiboxLabs/flow-browser) — upstream AppImage wrapped for NixOS.
|
||||
'';
|
||||
'' // {
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf (root.enable && cfg.enable) {
|
||||
home.packages = lib.optional (
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
{
|
||||
options.chiasson.home.browsers.orion.enable = lib.mkEnableOption ''
|
||||
[Orion](https://orionbrowser.com/) (Kagi) — installs the upstream Flatpak bundle and provides `oriongtk`.
|
||||
'';
|
||||
'' // {
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf (root.enable && cfg.enable) {
|
||||
home.packages = [ oriongtk ];
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
{
|
||||
imports = [ inputs.zen-browser.homeModules.beta ];
|
||||
|
||||
options.chiasson.home.browsers.zen.enable = lib.mkEnableOption "Zen Browser + locked-down policies / extensions.";
|
||||
options.chiasson.home.browsers.zen.enable = lib.mkEnableOption "Zen Browser + locked-down policies / extensions." // {
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf (root.enable && cfg.enable) {
|
||||
programs.zen-browser = {
|
||||
|
||||
Reference in New Issue
Block a user