chore(starship): mkDefault caused entire config to be overridden
Revert "✨ feat(starship): Starship fixes"
This reverts commit 4ce7b95d1bb2d211d39f2697a0884d5eb12d716d.
This commit is contained in:
parent
3456fea6f1
commit
91374e5df4
2 changed files with 9 additions and 8 deletions
2
Justfile
2
Justfile
|
@ -2,4 +2,4 @@ test:
|
||||||
nix run \
|
nix run \
|
||||||
--inputs-from "./dev" "github:Mic92/nix-fast-build" -- \
|
--inputs-from "./dev" "github:Mic92/nix-fast-build" -- \
|
||||||
--no-nom \
|
--no-nom \
|
||||||
--flake "./dev#checks.$(nix eval --raw --impure --expr builtins.currentSystem)"
|
--flake "./dev#checks$(nix eval --raw --impure --expr builtins.currentSystem)"
|
||||||
|
|
|
@ -2,19 +2,20 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
inherit (config.rose-pine) sources;
|
inherit (config.rose-pine) sources;
|
||||||
|
|
||||||
cfg = config.programs.starship.rose-pine;
|
cfg = config.programs.starship.rose-pine;
|
||||||
enable = cfg.enable && config.programs.starship.enable;
|
enable = cfg.enable && config.programs.starship.enable;
|
||||||
|
|
||||||
themeName = if (cfg.flavor == "main") then "rose-pine" else "rose-pine-${cfg.flavor}";
|
themeName =
|
||||||
in
|
if (cfg.flavor == "main")
|
||||||
{
|
then "rose-pine"
|
||||||
options.programs.starship.rose-pine = lib.rp.mkRosePineOpt { name = "starship"; };
|
else "rose-pine-${cfg.flavor}";
|
||||||
|
in {
|
||||||
|
options.programs.starship.rose-pine = lib.rp.mkRosePineOpt {name = "starship";};
|
||||||
|
|
||||||
config.programs.starship.settings = lib.mkIf enable (
|
config.programs.starship.settings = lib.mkIf enable (
|
||||||
lib.mkDefault (lib.importTOML "${sources.starship}/${themeName}.toml")
|
lib.importTOML "${sources.starship}/${themeName}.toml"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue