Rebase to flake parts #9
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
{ ... }: {
|
||||
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.";
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user