mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
feat: add starship module that allows 3-nested maps and use my starship patch
This commit is contained in:
parent
bac1f9e07a
commit
365736b42a
3 changed files with 193 additions and 11 deletions
|
@ -1,6 +1,28 @@
|
|||
{lib, ...}: {
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
disabledModules = ["programs/starship.nix"];
|
||||
imports = [./starship-module.nix];
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
package = let
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "oddlama";
|
||||
repo = "starship";
|
||||
rev = "feat-more-dynamic-username-and-hostname";
|
||||
hash = "sha256-me6GC1NTSEfdTdSbhwbmwMlzIhSmcs1PSUFCWu+2LG0=";
|
||||
};
|
||||
in
|
||||
pkgs.starship.overrideAttrs (_finalAttrs: previousAttrs: {
|
||||
inherit src;
|
||||
cargoDeps = previousAttrs.cargoDeps.overrideAttrs (_: {
|
||||
inherit src;
|
||||
outputHash = "sha256-L4N55ghbPsBrESRK0vHGDSDytFCnib7ghoMKnWFIZvw=";
|
||||
});
|
||||
});
|
||||
settings = {
|
||||
add_newline = false;
|
||||
format = lib.concatStrings [
|
||||
|
@ -21,18 +43,18 @@
|
|||
"($rust )"
|
||||
"$time"
|
||||
];
|
||||
|
||||
username = {
|
||||
format = "[$user]($style)";
|
||||
style_root = "red";
|
||||
style_user = "cyan";
|
||||
show_always = true;
|
||||
format = "[$user]($style) ";
|
||||
show_if_root = false;
|
||||
show_if_ssh = false;
|
||||
style = "yellow";
|
||||
};
|
||||
hostname = {
|
||||
format = "[$hostname]($style)[$ssh_symbol](green)";
|
||||
ssh_only = false;
|
||||
ssh_symbol = "";
|
||||
style = "cyan";
|
||||
ssh_symbol = " ";
|
||||
style = "bold purple";
|
||||
user_overrides.root.style = "bold red";
|
||||
};
|
||||
directory = {
|
||||
format = "[$path]($style)[$read_only]($read_only_style)";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue