From 957e5081c1bbf3ae0566a6dbd423b47e4e6e085d Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Fri, 7 Apr 2023 11:19:58 +0200 Subject: [PATCH] Split off starship configuration to it's own module --- home-manager/modules/fish/default.nix | 35 ----------------- home-manager/modules/starship/default.nix | 46 +++++++++++++++++++++++ users/erwin/home.nix | 1 + users/erwin/work.nix | 2 + 4 files changed, 49 insertions(+), 35 deletions(-) create mode 100644 home-manager/modules/starship/default.nix diff --git a/home-manager/modules/fish/default.nix b/home-manager/modules/fish/default.nix index 74ae6e4..66e8d15 100644 --- a/home-manager/modules/fish/default.nix +++ b/home-manager/modules/fish/default.nix @@ -40,41 +40,6 @@ in ''; }; - programs.starship = { - enable = true; - enableFishIntegration = true; - settings = { - aws.disabled = true; - character = { - success_symbol = "[λ](bold #f8f8f2)"; - error_symbol = "[λ](bold #ff5555)"; - }; - cmd_duration.style = "bold #f1fa8c"; - directory.read_only = " "; - directory.style = "bold #50fa7b"; - docker_context.symbol = " "; - elixir.symbol = " "; - git_branch.symbol = " "; - git_branch.style = "bold #ff79c6"; - git_status.style = "bold #ff5555"; - hostname.style = "bold #ff5555"; - nix_shell.symbol = " "; - memory_usage.symbol = " "; - package.symbol = " "; - python.symbol = " "; - rust.symbol = " "; - time.disabled = false; - username = { - format = "[$user]($style) on "; - style_user = "bold #bd93f9"; - }; - status = { - disabled = false; - format = "[$symbol $status]($style) "; - }; - }; - }; - programs.fzf = { enable = true; enableFishIntegration = true; diff --git a/home-manager/modules/starship/default.nix b/home-manager/modules/starship/default.nix new file mode 100644 index 0000000..63ab359 --- /dev/null +++ b/home-manager/modules/starship/default.nix @@ -0,0 +1,46 @@ +{ config, lib, ... }: +with lib; +let + cfg = config.eboskma.programs.starship; +in +{ + options.eboskma.programs.starship = { enable = mkEnableOption "starship"; }; + + config = mkIf cfg.enable { + programs.starship = { + enable = true; + enableFishIntegration = true; + enableNushellIntegration = false; # TODO: Remove when starship has been updated to the new nu config syntax + settings = { + aws.disabled = true; + character = { + success_symbol = "[λ](bold #f8f8f2)"; + error_symbol = "[λ](bold #ff5555)"; + }; + cmd_duration.style = "bold #f1fa8c"; + directory.read_only = " "; + directory.style = "bold #50fa7b"; + docker_context.symbol = " "; + elixir.symbol = " "; + git_branch.symbol = " "; + git_branch.style = "bold #ff79c6"; + git_status.style = "bold #ff5555"; + hostname.style = "bold #ff5555"; + nix_shell.symbol = " "; + memory_usage.symbol = " "; + package.symbol = " "; + python.symbol = " "; + rust.symbol = " "; + time.disabled = false; + username = { + format = "[$user]($style) on "; + style_user = "bold #bd93f9"; + }; + status = { + disabled = false; + format = "[$symbol $status]($style) "; + }; + }; + }; + }; +} diff --git a/users/erwin/home.nix b/users/erwin/home.nix index 96ceb1b..a0c53ee 100644 --- a/users/erwin/home.nix +++ b/users/erwin/home.nix @@ -108,6 +108,7 @@ in vscode.enable = true; solvespace.enable = true; ssh.enable = true; + starship.enable = true; sway.enable = true; swaynotificationcenter.enable = true; tea = { diff --git a/users/erwin/work.nix b/users/erwin/work.nix index f17f39a..aa5218b 100644 --- a/users/erwin/work.nix +++ b/users/erwin/work.nix @@ -55,6 +55,7 @@ in gpg.enable = true; i3.enable = true; mpd.enable = true; + nushell.enable = true; picom.enable = true; polybar.enable = true; neovim.enable = true; @@ -75,6 +76,7 @@ in }; rofi.enable = true; ssh.enable = true; + starship.enable = true; zellij = { enable = true; copyCommand = "${pkgs.xsel}/bin/xsel --clipboard";