From 4ce7b95d1bb2d211d39f2697a0884d5eb12d716d Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sat, 2 Nov 2024 19:39:55 -0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(starship):=20Starship=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Justfile | 2 +- modules/home-manager/starship.nix | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Justfile b/Justfile index 5c9d0ab..c197fd3 100644 --- a/Justfile +++ b/Justfile @@ -2,4 +2,4 @@ test: nix run \ --inputs-from "./dev" "github:Mic92/nix-fast-build" -- \ --no-nom \ - --flake "./dev#checks$(nix eval --raw --impure --expr builtins.currentSystem)" + --flake "./dev#checks.$(nix eval --raw --impure --expr builtins.currentSystem)" diff --git a/modules/home-manager/starship.nix b/modules/home-manager/starship.nix index 99957a1..bc3c99e 100644 --- a/modules/home-manager/starship.nix +++ b/modules/home-manager/starship.nix @@ -2,20 +2,19 @@ config, lib, ... -}: let +}: +let inherit (config.rose-pine) sources; cfg = config.programs.starship.rose-pine; enable = cfg.enable && config.programs.starship.enable; - themeName = - if (cfg.flavor == "main") - then "rose-pine" - else "rose-pine-${cfg.flavor}"; -in { - options.programs.starship.rose-pine = lib.rp.mkRosePineOpt {name = "starship";}; + themeName = if (cfg.flavor == "main") then "rose-pine" else "rose-pine-${cfg.flavor}"; +in +{ + options.programs.starship.rose-pine = lib.rp.mkRosePineOpt { name = "starship"; }; config.programs.starship.settings = lib.mkIf enable ( - lib.importTOML "${sources.starship}/${themeName}.toml" + lib.mkDefault (lib.importTOML "${sources.starship}/${themeName}.toml") ); }