From fa905d2cb612810171776e3269c5d0fa4bc36d20 Mon Sep 17 00:00:00 2001 From: LunarAkai Date: Sat, 15 Mar 2025 18:24:06 +0100 Subject: [PATCH] ohmyposh --- home-manager/luna/categories/cli/default.nix | 3 +-- home-manager/luna/categories/cli/oh-my-posh.nix | 6 ++++++ home-manager/luna/categories/cli/zsh/default.nix | 9 +++------ home-manager/luna/categories/desktop/common/fonts.nix | 10 ++++------ hosts/common/global/default.nix | 1 + hosts/common/global/zsh.nix | 5 +++++ hosts/common/users/luna/default.nix | 1 + 7 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 home-manager/luna/categories/cli/oh-my-posh.nix create mode 100644 hosts/common/global/zsh.nix diff --git a/home-manager/luna/categories/cli/default.nix b/home-manager/luna/categories/cli/default.nix index 7e186ec..5bb386d 100644 --- a/home-manager/luna/categories/cli/default.nix +++ b/home-manager/luna/categories/cli/default.nix @@ -1,6 +1,7 @@ {pkgs, ...}: { imports = [ ./zsh + ./oh-my-posh.nix ]; home.packages = with pkgs; [ @@ -9,7 +10,5 @@ nixd # nix lsp alejandra # formatter - - oh-my-posh ]; } diff --git a/home-manager/luna/categories/cli/oh-my-posh.nix b/home-manager/luna/categories/cli/oh-my-posh.nix new file mode 100644 index 0000000..801ad6e --- /dev/null +++ b/home-manager/luna/categories/cli/oh-my-posh.nix @@ -0,0 +1,6 @@ +{ + programs.oh-my-posh = { + enable = true; + useTheme = "catppuccin"; + }; +} diff --git a/home-manager/luna/categories/cli/zsh/default.nix b/home-manager/luna/categories/cli/zsh/default.nix index 89891ae..ab522a6 100644 --- a/home-manager/luna/categories/cli/zsh/default.nix +++ b/home-manager/luna/categories/cli/zsh/default.nix @@ -1,16 +1,13 @@ {...}: { programs.zsh = { enable = true; + enableCompletion = true; + enableAutosuggestions = true; + enableSyntaxHighlighting = true; oh-my-zsh = { enable = true; }; history.size = 10000; - - initContent = { - _type = "order"; - content = ''eval "$(oh-my-posh init zsh)"''; - priority = 0; - }; }; } diff --git a/home-manager/luna/categories/desktop/common/fonts.nix b/home-manager/luna/categories/desktop/common/fonts.nix index 76192f9..f27d632 100644 --- a/home-manager/luna/categories/desktop/common/fonts.nix +++ b/home-manager/luna/categories/desktop/common/fonts.nix @@ -1,8 +1,6 @@ {pkgs, ...}: { - fonts = { - packages = with pkgs; [ - (nerd-fonts.override {fonts = ["JetBrains Mono"];}) - jetbrains-mono - ]; - }; + home.packages = with pkgs; [ + nerd-fonts.jetbrains-mono + ]; + fonts.fontconfig.enable = true; } diff --git a/hosts/common/global/default.nix b/hosts/common/global/default.nix index dc3bb7c..a443dc9 100644 --- a/hosts/common/global/default.nix +++ b/hosts/common/global/default.nix @@ -8,6 +8,7 @@ ./locales.nix ./nix.nix ./nix-ld.nix + ./zsh.nix ]; home-manager.useGlobalPkgs = true; diff --git a/hosts/common/global/zsh.nix b/hosts/common/global/zsh.nix new file mode 100644 index 0000000..f5821ff --- /dev/null +++ b/hosts/common/global/zsh.nix @@ -0,0 +1,5 @@ +{ + programs.zsh = { + enable = true; + }; +} diff --git a/hosts/common/users/luna/default.nix b/hosts/common/users/luna/default.nix index b786e1a..851f999 100644 --- a/hosts/common/users/luna/default.nix +++ b/hosts/common/users/luna/default.nix @@ -7,6 +7,7 @@ users.users.luna = { isNormalUser = true; description = "luna"; + shell = pkgs.zsh; extraGroups = [ "networkmanager" "wheel"