Common/starship: configure only with nixos, remove old profile workaround
This commit is contained in:
parent
6f82fb26bd
commit
7a5219af7c
1 changed files with 24 additions and 49 deletions
|
|
@ -1,56 +1,31 @@
|
||||||
{
|
{...}: {
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib;
|
|
||||||
with builtins; let
|
|
||||||
presets = {
|
|
||||||
nerdFontSymbols = pkgs.fetchurl {
|
|
||||||
url = "https://starship.rs/presets/toml/nerd-font-symbols.toml";
|
|
||||||
hash = "sha256-JKX+DKY4IPQwNj3znkhMUReNqbKBxdJyBZW+WCdKwuU=";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# -------------------------------- F U N C T I O N S --------------------------------
|
|
||||||
|
|
||||||
/*
|
|
||||||
Gonna be honest, I have no idea how this works, although it seems to work
|
|
||||||
Stolen from https://gist.github.com/pdalpra/daf339f59288201a6c8ba7dc84e9060e
|
|
||||||
*/
|
|
||||||
# Takes a list of attrSets and merges them
|
|
||||||
mergeAllAttrSets = attrsSets:
|
|
||||||
foldl' recursiveUpdate {} attrsSets;
|
|
||||||
|
|
||||||
# Reads a TOML file and parses it
|
|
||||||
readTomlPreset = file: (fromTOML (readFile file));
|
|
||||||
in {
|
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = mergeAllAttrSets [
|
presets = [
|
||||||
(readTomlPreset presets.nerdFontSymbols)
|
"nerd-font-symbols"
|
||||||
{
|
|
||||||
nix_shell = {
|
|
||||||
disabled = false;
|
|
||||||
heuristic = true;
|
|
||||||
};
|
|
||||||
os = {
|
|
||||||
disabled = false;
|
|
||||||
};
|
|
||||||
directory = {
|
|
||||||
disabled = false;
|
|
||||||
truncation_length = 6;
|
|
||||||
truncation_symbol = ".../";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
settings = {
|
||||||
|
nix_shell = {
|
||||||
|
disabled = false;
|
||||||
|
heuristic = true;
|
||||||
|
};
|
||||||
|
os = {
|
||||||
|
disabled = false;
|
||||||
|
};
|
||||||
|
directory = {
|
||||||
|
disabled = false;
|
||||||
|
truncation_length = 6;
|
||||||
|
truncation_symbol = ".../";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
# The catppuccin module only works for home-manager, so this
|
# The catppuccin module only works for home-manager, so this
|
||||||
# sets up starship with home-manager using the system config
|
# sets up starship with home-manager using the system config
|
||||||
home-manager.users.toast = {osConfig, ...}: {
|
# home-manager.users.toast = {osConfig, ...}: {
|
||||||
programs.starship = {
|
# programs.starship = {
|
||||||
enable = true;
|
# enable = false;
|
||||||
catppuccin.enable = true;
|
# catppuccin.enable = true;
|
||||||
settings = osConfig.programs.starship.settings;
|
# settings = osConfig.programs.starship.settings;
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue