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.3 KiB
Nix
44 lines
1.3 KiB
Nix
{ ... }: {
|
|
flake.homeManagerModules.wisdomShellOhMyPosh =
|
|
{ config, lib, ... }:
|
|
let
|
|
root = config.chiasson.home;
|
|
cfg = config.chiasson.home.shell.ohMyPosh;
|
|
in
|
|
{
|
|
options.chiasson.home.shell.ohMyPosh = {
|
|
enable = lib.mkEnableOption "[Oh My Posh](https://ohmyposh.dev/) prompt." // {
|
|
default = true;
|
|
};
|
|
|
|
builtinTheme = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "jandedobbeleer";
|
|
description = ''
|
|
Stock theme when DMS is not overriding `configFile` (DMS replaces this with matugen output).
|
|
'';
|
|
};
|
|
|
|
enableFishIntegration = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = true;
|
|
description = "Run `oh-my-posh init fish` in Fish `shellInit` (Home Manager).";
|
|
};
|
|
|
|
enableBashIntegration = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
description = "Run `oh-my-posh init bash` in bash `initExtra`.";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf (root.enable && cfg.enable) {
|
|
programs.oh-my-posh = {
|
|
enable = true;
|
|
inherit (cfg) enableFishIntegration enableBashIntegration;
|
|
useTheme = lib.mkDefault cfg.builtinTheme;
|
|
};
|
|
};
|
|
};
|
|
}
|