Skip to content

Commit

Permalink
feat(home-manager): init oh-my-posh
Browse files Browse the repository at this point in the history
  • Loading branch information
PerchunPak committed Dec 18, 2024
1 parent 21310cd commit bbbe2e7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/home-manager/all-modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
./tmux.nix
./tofi.nix
./obs-studio.nix
./oh-my-posh.nix
./waybar.nix
./yazi.nix
./zathura.nix
Expand Down
19 changes: 19 additions & 0 deletions modules/home-manager/oh-my-posh.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{ catppuccinLib }:
{ config, lib, ... }:

let
inherit (config.catppuccin) sources;

cfg = config.programs.oh-my-posh.catppuccin;
palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavor}.colors;
in

{
options.programs.oh-my-posh.catppuccin = catppuccinLib.mkCatppuccinOption { name = "oh-my-posh"; };

config = lib.mkIf cfg.enable {
programs.oh-my-posh = {
settings.palette = lib.mapAttrs (colorName: colorInfo: colorInfo.hex) palette;
};
};
}
1 change: 1 addition & 0 deletions tests/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
tmux.enable = true;
tofi.enable = true;
obs-studio.enable = true;
oh-my-posh.enable = true;
waybar.enable = true;
yazi.enable = true;
zathura.enable = true;
Expand Down

0 comments on commit bbbe2e7

Please sign in to comment.