Format everything with alejandra
This commit is contained in:
parent
82bbd7ce87
commit
7888103b1e
100 changed files with 2827 additions and 2756 deletions
|
|
@ -1,53 +1,52 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
with builtins;
|
||||
|
||||
let
|
||||
catppuccinFlavour = "mocha";
|
||||
catppuccinStarship = pkgs.catppuccin + /starship/${catppuccinFlavour}.toml;
|
||||
|
||||
presets = {
|
||||
nerdFontSymbols = pkgs.fetchurl {
|
||||
url = "https://starship.rs/presets/toml/nerd-font-symbols.toml";
|
||||
hash = "sha256-BVe5JMSIa3CoY2Wf9pvcF1EUtDVCWCLhW3IyKuwfHug=";
|
||||
};
|
||||
};
|
||||
# -------------------------------- 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 = {
|
||||
enable = true;
|
||||
settings = mergeAllAttrSets [
|
||||
(readTomlPreset presets.nerdFontSymbols)
|
||||
(readTomlPreset catppuccinStarship)
|
||||
{
|
||||
nix_shell = {
|
||||
disabled = false;
|
||||
heuristic = true;
|
||||
};
|
||||
os = {
|
||||
disabled = false;
|
||||
};
|
||||
directory = {
|
||||
disabled = false;
|
||||
truncation_length = 6;
|
||||
truncation_symbol = ".../";
|
||||
};
|
||||
palette = "catppuccin_${catppuccinFlavour}";
|
||||
}
|
||||
];
|
||||
};
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
catppuccinFlavour = "mocha";
|
||||
catppuccinStarship = pkgs.catppuccin + /starship/${catppuccinFlavour}.toml;
|
||||
|
||||
presets = {
|
||||
nerdFontSymbols = pkgs.fetchurl {
|
||||
url = "https://starship.rs/presets/toml/nerd-font-symbols.toml";
|
||||
hash = "sha256-BVe5JMSIa3CoY2Wf9pvcF1EUtDVCWCLhW3IyKuwfHug=";
|
||||
};
|
||||
};
|
||||
# -------------------------------- 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 = {
|
||||
enable = true;
|
||||
settings = mergeAllAttrSets [
|
||||
(readTomlPreset presets.nerdFontSymbols)
|
||||
(readTomlPreset catppuccinStarship)
|
||||
{
|
||||
nix_shell = {
|
||||
disabled = false;
|
||||
heuristic = true;
|
||||
};
|
||||
os = {
|
||||
disabled = false;
|
||||
};
|
||||
directory = {
|
||||
disabled = false;
|
||||
truncation_length = 6;
|
||||
truncation_symbol = ".../";
|
||||
};
|
||||
palette = "catppuccin_${catppuccinFlavour}";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue