init repo

update nvidia driver, install ghostty and other things

before refactor the arch of configuration.

move some nixos configuration to ./nixos/modules and ./nixos/configurations. try to find a good arch to conbine home-manager and nixos modules.

fix callPackage firefox-addons missing key immersive-translate.

wrap niri and spotx overlays into overlay.modifications.

build a brandnew architecture for configurations.

change the import method of homeManagerModules."${unixName}" to use outputs.

add ghostty overlay to replace ghostty.

add nix config in home/modules/nix.nix when not nixos

fix call nixpkgs.foldr. modify to call nixpkgs.lib.foldr.

modify firefox config, to use flake packages as extension

modify i18n config, to use flake packages as addons

remove ssh private key and add it to sops.

update partial flake inputs

update partial flake inputs, add some package to user config

move helix as home module, provide option youthlic.programs.helix.

change fcitx5 config to pkg, use rime-ice default config.

move spotify installation to default.nix neither spotify.nix

change gpg encrypt key

add gpg option to home-manager module

add fd as user level package

remove gpg option in system level

add git option

update flake inputs, and install all gpg pinentry

add gh to git module

change shell config to module, and ghostty also.

change gpg pinentry from pinentry-all to pinentry-qt.

change gh config, use ssh as git protocol

remove zed editor

move foot to module, and disable it.

add store as git credential helper

rename sops.secrets.gitea to sops.secrets.git-credential

add git delta config

move starship configuration to home/modules.

update flake inputs

add ssh config to sops encrypt file `secrets/ssh-config.yaml`

change niri to niri-unstable and update flake inputs

change encypt key from gnupg to age. And encrypt dae url

move home sops config to module

update flake inputs

add duf and doggo to home packages
This commit is contained in:
ulic-youthlic 2024-12-25 10:59:37 +08:00
parent 8f9953d42f
commit dd77858199
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
50 changed files with 3848 additions and 0 deletions

35
home/modules/default.nix Normal file
View file

@ -0,0 +1,35 @@
{ inputs, lib, ... }:
{
imports =
(with inputs; [
sops-nix.homeManagerModules.sops
])
++ [
./nix.nix
./helix
./gpg
./git.nix
./shell
./ghostty.nix
./foot
./starship
./sops.nix
];
options = {
youthlic.nixos.enable = lib.mkOption {
type = lib.types.bool;
default = false;
example = true;
description = ''
whether the os is nixos
'';
};
};
config = {
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
};
}

View file

@ -0,0 +1,25 @@
{ config, lib, ... }:
let
cfg = config.youthlic.programs.foot;
in
{
options = {
youthlic.programs.foot = {
enable = lib.mkOption {
type = lib.types.bool;
default = true;
example = false;
description = ''
whether use foot terminal
'';
};
};
};
config = lib.mkIf cfg.enable {
programs.foot = {
enable = true;
server.enable = true;
settings = builtins.fromINI (builtins.readFile ./foot.ini);
};
};
}

256
home/modules/foot/foot.ini Normal file
View file

@ -0,0 +1,256 @@
# -*- conf -*-
# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd)
term=foot
# login-shell=no
# app-id=foot # globally set wayland app-id. Default values are "foot" and "footclient" for desktop and server mode
# title=foot
# locked-title=no
font=FiraCode Nerd Font:size=15:lang=en-US
# font-bold=<bold variant of regular font>
# font-italic=<italic variant of regular font>
# font-bold-italic=<bold+italic variant of regular font>
# font-size-adjustment=0.5
# line-height=<font metrics>
# letter-spacing=0
horizontal-letter-offset=0
vertical-letter-offset=0
# underline-offset=<font metrics>
# underline-thickness=<font underline thickness>
# strikeout-thickness=<font strikeout thickness>
# box-drawings-uses-font-glyphs=no
dpi-aware=yes
# initial-window-size-pixels=700x500 # Or,
# initial-window-size-chars=<COLSxROWS>
# initial-window-mode=windowed
# pad=0x0
# resize-by-cells=yes
# resize-keep-grid=yes
# resize-delay-ms=100
# bold-text-in-bright=no
# word-delimiters=,│`|:"'()[]{}<>
selection-target=clipboard
# workers=<number of logical CPUs>
# utmp-helper=/usr/lib/utempter/utempter # When utmp backend is libutempter (Linux)
# utmp-helper=/usr/libexec/ulog-helper # When utmp backend is ulog (FreeBSD)
[environment]
# name=value
[bell]
# urgent=no
# notify=no
# visual=no
# command=
# command-focused=no
[desktop-notifications]
# command=notify-send --wait --app-name ${app-id} --icon ${app-id} --category ${category} --urgency ${urgency} --expire-time ${expire-time} --hint STRING:image-path:${icon} --hint BOOLEAN:suppress-sound:${muted} --hint STRING:sound-name:${sound-name} --replace-id ${replace-id} ${action-argument} --print-id -- ${title} ${body}
# command-action-argument=--action ${action-name}=${action-label}
# close=""
# inhibit-when-focused=yes
[scrollback]
# lines=1000
# multiplier=3.0
# indicator-position=relative
# indicator-format=""
[url]
# launch=xdg-open ${url}
# label-letters=sadfjklewcmpgh
# osc8-underline=url-mode
# protocols=http, https, ftp, ftps, file, gemini, gopher
# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]
[cursor]
style=beam # block
# color=<inverse foreground/background>
# blink=no
# blink-rate=500
# beam-thickness=1.5
# underline-thickness=<font underline thickness>
[mouse]
hide-when-typing=yes
# alternate-scroll-mode=yes
[touch]
# long-press-delay=400
[colors]
# alpha=1.0
# background=242424
# foreground=ffffff
# flash=7f7f00
# flash-alpha=0.5
## Normal/regular colors (color palette 0-7)
# regular0=242424 # black
# regular1=f62b5a # red
# regular2=47b413 # green
# regular3=e3c401 # yellow
# regular4=24acd4 # blue
# regular5=f2affd # magenta
# regular6=13c299 # cyan
# regular7=e6e6e6 # white
## Bright colors (color palette 8-15)
# bright0=616161 # bright black
# bright1=ff4d51 # bright red
# bright2=35d450 # bright green
# bright3=e9e836 # bright yellow
# bright4=5dc5f8 # bright blue
# bright5=feabf2 # bright magenta
# bright6=24dfc4 # bright cyan
# bright7=ffffff # bright white
## dimmed colors (see foot.ini(5) man page)
# dim0=<not set>
# ...
# dim7=<not-set>
## The remaining 256-color palette
# 16 = <256-color palette #16>
# ...
# 255 = <256-color palette #255>
## Sixel colors
# sixel0 = 000000
# sixel1 = 3333cc
# sixel2 = cc2121
# sixel3 = 33cc33
# sixel4 = cc33cc
# sixel5 = 33cccc
# sixel6 = cccc33
# sixel7 = 878787
# sixel8 = 424242
# sixel9 = 545499
# sixel10 = 994242
# sixel11 = 549954
# sixel12 = 995499
# sixel13 = 549999
# sixel14 = 999954
# sixel15 = cccccc
## Misc colors
# selection-foreground=<inverse foreground/background>
# selection-background=<inverse foreground/background>
# jump-labels=<regular0> <regular3> # black-on-yellow
# scrollback-indicator=<regular0> <bright4> # black-on-bright-blue
# search-box-no-match=<regular0> <regular1> # black-on-red
# search-box-match=<regular0> <regular3> # black-on-yellow
# urls=<regular3>
[csd]
# preferred=server
# size=26
# font=<primary font>
# color=<foreground color>
# hide-when-maximized=no
# double-click-to-maximize=yes
# border-width=0
# border-color=<csd.color>
# button-width=26
# button-color=<background color>
# button-minimize-color=<regular4>
# button-maximize-color=<regular2>
# button-close-color=<regular1>
[key-bindings]
# scrollback-up-page=Shift+Page_Up
# scrollback-up-half-page=none
# scrollback-up-line=none
# scrollback-down-page=Shift+Page_Down
# scrollback-down-half-page=none
# scrollback-down-line=none
# scrollback-home=none
# scrollback-end=none
# clipboard-copy=Control+Shift+c XF86Copy
# clipboard-paste=Control+Shift+v XF86Paste
# primary-paste=Shift+Insert
# search-start=Control+Shift+r
# font-increase=Control+plus Control+equal Control+KP_Add
# font-decrease=Control+minus Control+KP_Subtract
# font-reset=Control+0 Control+KP_0
# spawn-terminal=Control+Shift+n
# minimize=none
# maximize=none
# fullscreen=none
# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-selected=[xargs -r firefox] none
# pipe-command-output=[wl-copy] none # Copy last command's output to the clipboard
# show-urls-launch=Control+Shift+o
# show-urls-copy=none
# show-urls-persistent=none
# prompt-prev=Control+Shift+z
# prompt-next=Control+Shift+x
# unicode-input=Control+Shift+u
# noop=none
# quit=none
[search-bindings]
# cancel=Control+g Control+c Escape
# commit=Return
# find-prev=Control+r
# find-next=Control+s
# cursor-left=Left Control+b
# cursor-left-word=Control+Left Mod1+b
# cursor-right=Right Control+f
# cursor-right-word=Control+Right Mod1+f
# cursor-home=Home Control+a
# cursor-end=End Control+e
# delete-prev=BackSpace
# delete-prev-word=Mod1+BackSpace Control+BackSpace
# delete-next=Delete
# delete-next-word=Mod1+d Control+Delete
# extend-char=Shift+Right
# extend-to-word-boundary=Control+w Control+Shift+Right
# extend-to-next-whitespace=Control+Shift+w
# extend-line-down=Shift+Down
# extend-backward-char=Shift+Left
# extend-backward-to-word-boundary=Control+Shift+Left
# extend-backward-to-next-whitespace=none
# extend-line-up=Shift+Up
# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste
# primary-paste=Shift+Insert
# unicode-input=none
# scrollback-up-page=Shift+Page_Up
# scrollback-up-half-page=none
# scrollback-up-line=none
# scrollback-down-page=Shift+Page_Down
# scrollback-down-half-page=none
# scrollback-down-line=none
# scrollback-home=none
# scrollback-end=none
[url-bindings]
# cancel=Control+g Control+c Control+d Escape
# toggle-url-visible=t
[text-bindings]
# \x03=Mod4+c # Map Super+c -> Ctrl+c
[mouse-bindings]
# scrollback-up-mouse=BTN_WHEEL_BACK
# scrollback-down-mouse=BTN_WHEEL_FORWARD
# font-increase=Control+BTN_WHEEL_BACK
# font-decrease=Control+BTN_WHEEL_FORWARD
# selection-override-modifiers=Shift
# primary-paste=BTN_MIDDLE
# select-begin=BTN_LEFT
# select-begin-block=Control+BTN_LEFT
# select-extend=BTN_RIGHT
# select-extend-character-wise=Control+BTN_RIGHT
# select-word=BTN_LEFT-2
# select-word-whitespace=Control+BTN_LEFT-2
# select-quote = BTN_LEFT-3
# select-row=BTN_LEFT-4
# vim: ft=dosini

61
home/modules/ghostty.nix Normal file
View file

@ -0,0 +1,61 @@
{
pkgs,
config,
lib,
...
}:
{
options = {
youthlic.programs.ghostty = {
enable = lib.mkOption {
type = lib.types.bool;
example = false;
default = true;
description = ''
whether enable ghostty
'';
};
};
};
config =
let
cfg = config.youthlic.programs.ghostty;
in
(lib.mkIf cfg.enable {
programs.ghostty = lib.mkMerge [
{
enable = true;
package = pkgs.ghostty;
settings = {
font-family = "FiraCode Nerd Font";
font-feature = [
"calt=1"
"clig=1"
"liga=1"
"cv01"
"cv02"
"cv06"
"zero"
"onum"
"cv17"
"ss05"
"ss03"
"cv16"
"cv31"
"cv29"
"cv30"
];
font-size = 17;
theme = "ayu";
background-opacity = 0.8;
};
}
(lib.mkIf config.youthlic.programs.fish.enable {
enableFishIntegration = true;
})
(lib.mkIf config.youthlic.programs.bash.enable {
enableBashIntegration = true;
})
];
});
}

78
home/modules/git.nix Normal file
View file

@ -0,0 +1,78 @@
{
config,
lib,
...
}:
{
options = {
youthlic.programs.git = {
email = lib.mkOption {
type = lib.types.str;
description = ''
git email
'';
};
name = lib.mkOption {
type = lib.types.str;
example = ''youthlic'';
description = ''
git name
'';
};
signKey = lib.mkOption {
type = lib.types.addCheck (lib.types.nullOr lib.types.str) (
x: (x == null || config.youthlic.programs.gpg.enable)
);
default = null;
description = ''
key fingerprint for sign commit
'';
};
};
};
config =
let
cfg = config.youthlic.programs.git;
in
{
programs.lazygit = {
enable = true;
};
programs.gh = {
enable = true;
gitCredentialHelper.enable = true;
settings = {
git_protocol = "ssh";
};
};
sops.secrets."git-credential" = {
mode = "0640";
};
programs.git = lib.mkMerge [
{
enable = true;
userEmail = cfg.email;
userName = cfg.name;
delta = {
enable = true;
options = {
line-number = true;
hyperlinks = true;
side-by-side = true;
};
};
extraConfig = {
credential = {
helper = "store --file=${config.sops.secrets."git-credential".path}";
};
};
}
(lib.mkIf (cfg.signKey != null) {
signing = {
signByDefault = true;
key = cfg.signKey;
};
})
];
};
}

View file

@ -0,0 +1,50 @@
{
pkgs,
config,
lib,
...
}:
{
options = {
youthlic.programs.gpg = {
enable = lib.mkOption {
type = lib.types.bool;
default = true;
example = false;
description = ''
whether enable gpg
'';
};
};
};
config =
let
cfg = config.youthlic.programs.gpg;
in
lib.mkIf cfg.enable {
services.gpg-agent = lib.mkMerge [
{
enable = true;
enableSshSupport = true;
pinentryPackage = pkgs.pinentry-qt;
}
(lib.mkIf config.youthlic.programs.fish.enable {
enableFishIntegration = true;
})
(lib.mkIf config.youthlic.programs.bash.enable {
enableBashIntegration = true;
})
];
programs.gpg = {
enable = true;
mutableKeys = true;
mutableTrust = true;
publicKeys = [
{
source = ./public-key.txt;
trust = "ultimate";
}
];
};
};
}

View file

@ -0,0 +1,23 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mDMEZ4EP8BYJKwYBBAHaRw8BAQdAKGtsoTz2OMi6ZaUyE2IuGFuOniKDLX7WI5OH
iPoaH+K0LXlvdXRobGljIChtYWluIGtleSkgPHVsaWMueW91dGhsaWNAZ21haWwu
Y29tPoiTBBMWCgA7FiEExvy9f0nhy7q9ZmH3/AIGPwQzGpUFAmeBD/ACGwEFCwkI
BwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQ/AIGPwQzGpUEWwD+IMXd5CYtwkJD
GWv7w4LB8SkmMkzSAtCfn0rsLk5AAsUBAIHZGP869EO+MsiyzzbYzKEYeoULECc5
RSu4kvcTIAoDuDMEZ4EQHRYJKwYBBAHaRw8BAQdAnmKX2VX5V1XJyI5J91KiqAk+
bgssUJ5LUq+4RtJBguWI7wQYFgoAIBYhBMb8vX9J4cu6vWZh9/wCBj8EMxqVBQJn
gRAdAhsCAIEJEPwCBj8EMxqVdiAEGRYKAB0WIQQYMd5Sc/DTvN/HQadj6Gw8FKDX
IQUCZ4EQHQAKCRBj6Gw8FKDXISn7AP9CF4qs4EtwOqE/ghFrF4LxloGvIz9iPssI
5g1GrFE2awD/QM7ltH6lPgMNfa6/+fQeERWiz5jXCks/Cl/Sb+ydIAr0dQD/dQQH
MpFGntmx0vkhoZnx34sGHyjTwPM2lHHJMYwrmRcBAKqSa5mVb/wpDcR0CNyfusjC
HxQM6MgBQouDLP+ANtsMuDgEZ4EQORIKKwYBBAGXVQEFAQEHQCqKIhwfA/Jf5pNl
KZ60KG1rMwuE2jBM/buKmVK51xczAwEIB4h4BBgWCgAgFiEExvy9f0nhy7q9ZmH3
/AIGPwQzGpUFAmeBEDkCGwwACgkQ/AIGPwQzGpXbiQEAwRhX1oMVLzsruiKVqNL+
rMq+U6kTuadbh9fJAjCQ9QEA/AjFXS7hNvrsxzv3O+8P1nOZOMKB9p1aM2EDgpF7
q0QNuDMEZ4EZ/xYJKwYBBAHaRw8BAQdAsw7WxrMq/qv2tvLRsGhCdauGAoL8L91b
TJQmvqWADjCIeAQYFgoAIBYhBMb8vX9J4cu6vWZh9/wCBj8EMxqVBQJngRn/Ahsg
AAoJEPwCBj8EMxqVSe0A/0vlCUek4APS09osNpUyLWcboq9x7Jw4ycChcqDTfweP
AQCRDLL8wMjSlwONCLmERl8KoXnQhaEz/f3TiInUYbdkCw==
=Rq0o
-----END PGP PUBLIC KEY BLOCK-----

View file

@ -0,0 +1,84 @@
theme = "ayu_evolve"
[editor]
line-number = "relative"
cursorline = true
cursorcolumn = false
true-color = true
undercurl = true
bufferline = "multiple"
color-modes = true
default-line-ending = "lf"
popup-border = "all"
[editor.statusline]
left = [
"mode",
"spacer",
"version-control",
"file-type",
"separator",
"read-only-indicator",
"file-name",
"file-modification-indicator",
"spacer",
"spinner",
]
center = ["diagnostics"]
right = [
"register",
"file-line-ending",
"file-encoding",
"separator",
"total-line-numbers",
"position",
"position-percentage",
]
separator = "|"
mode.normal = "NORMAL"
mode.insert = "INSERT"
mode.select = "SELECT"
[editor.lsp]
display-messages = true
display-inlay-hints = true
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
[editor.file-picker]
hidden = false
[editor.auto-save]
focus-lost = true
after-delay.enable = true
[editor.whitespace.render]
space = "all"
tab = "all"
newline = "none"
[editor.whitespace.characters]
space = "·"
nbsp = "⍽"
tab = "→"
newline = "⏎"
tabpad = "·"
[editor.indent-guides]
render = true
[editor.gutters]
layout = ["diagnostics", "spacer", "line-numbers", "spacer", "diff"]
line-numbers.min-width = 1
[editor.soft-wrap]
enable = true
wrap-at-text-width = true
[editor.inline-diagnostics]
cursor-line = "hint"
other-lines = "error"
prefix-len = 2

View file

@ -0,0 +1,56 @@
{
lib,
pkgs,
config,
...
}:
{
options = {
youthlic.programs.helix = {
enable = lib.mkOption {
type = lib.types.bool;
default = true;
example = false;
description = ''
enable helix editor
'';
};
extraPackages = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = with pkgs; [
taplo
markdown-oxide
nixd
deno
nixfmt-rfc-style
];
example = (
with pkgs;
[
deno
]
);
description = ''
extra packages for helix lsp and formatter
'';
};
};
};
config =
let
cfg = config.youthlic.programs.helix;
in
{
programs.helix = lib.mkIf cfg.enable {
enable = true;
defaultEditor = true;
settings =
let
config-file = builtins.readFile ./config.toml;
config = builtins.fromTOML config-file;
in
config;
};
home.packages = cfg.extraPackages;
};
}

51
home/modules/nix.nix Normal file
View file

@ -0,0 +1,51 @@
{
inputs,
lib,
config,
pkgs,
outputs,
...
}:
{
config =
let
cfg = config.youthlic.nixos;
in
(lib.mkIf (!cfg.enable) {
nixpkgs = {
config = {
allowUnfree = true;
allowUnfreePredicate = (_: true);
};
overlays = [
outputs.overlays.modifications
outputs.overlays.additions
];
};
nix = {
package = pkgs.nix;
settings = {
inherit (outputs.nix.settings) substituters;
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
];
auto-optimise-store = lib.mkDefault true;
experimental-features = [
"nix-command"
"flakes"
];
warn-dirty = false;
use-xdg-base-directories = true;
};
registry.home = lib.mkDefault {
from = {
type = "indirect";
id = "home";
};
flake = inputs.nixpkgs;
};
};
});
}

View file

@ -0,0 +1,88 @@
{ config, lib, ... }:
let
inherit (lib) mkOption mkIf mkMerge;
inherit (lib.types) bool;
fish-cfg = config.youthlic.programs.fish;
bash-cfg = config.youthlic.programs.bash;
cfg-helper =
conf:
mkMerge [
conf
(mkIf fish-cfg.enable {
enableFishIntegration = true;
})
(mkIf bash-cfg.enable {
enableBashIntegration = true;
})
];
in
{
options = {
youthlic.programs = {
fish = {
enable = mkOption {
type = bool;
default = true;
description = ''
whether to use fish shell
'';
example = false;
};
};
bash = {
enable = mkOption {
type = bool;
default = true;
description = ''
whether to use bash shell
'';
example = false;
};
};
};
};
config = mkMerge [
{
programs = {
zoxide = cfg-helper {
enable = true;
};
yazi = cfg-helper {
enable = true;
};
fzf = cfg-helper {
enable = true;
};
eza = cfg-helper {
enable = true;
};
};
}
(mkIf fish-cfg.enable {
programs = {
fish = {
enable = true;
functions = {
__fish_command_not_found_handler = {
body = "__fish_default_command_not_found_handler $argv[1]";
onEvent = "fish_command_not_found";
};
fish_greeting = {
body = ''
fastfetch
'';
};
};
};
fastfetch.enable = true;
};
})
(mkIf bash-cfg.enable {
programs = {
bash = {
enable = true;
};
};
})
];
}

48
home/modules/sops.nix Normal file
View file

@ -0,0 +1,48 @@
{
lib,
config,
pkgs,
rootPath,
...
}:
{
options = {
youthlic.programs.sops = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
example = true;
description = ''
whether enable sops-nix or not
'';
};
keyFile = lib.mkOption {
type = lib.types.nonEmptyStr;
default = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
description = ''
path to age key file
'';
};
};
};
config =
let
cfg = config.youthlic.programs.sops;
in
lib.mkIf cfg.enable {
home.packages = (
with pkgs;
[
sops
age
]
);
sops = {
age = {
keyFile = cfg.keyFile;
generateKey = false;
};
defaultSopsFile = rootPath + "/secrets/general.yaml";
};
};
}

View file

@ -0,0 +1,213 @@
"$schema" = 'https://starship.rs/config-schema.json'
[character]
success_symbol = '[λ](bold blue)'
error_symbol = '[λ](bold red)'
vimcmd_symbol = '[Λ](bold blue)'
vimcmd_replace_one_symbol = '[Λ](bold purple)'
vimcmd_replace_symbol = '[Λ](bold purple)'
vimcmd_visual_symbol = '[Λ](bold yellow)'
[[battery.display]]
threshold = 10
style = 'bold red'
[[battery.display]]
threshold = 30
style = 'bold yellow'
discharging_symbol = '💦'
[[battery.display]]
threshold = 100
style = 'green'
[git_branch]
format = 'on [$symbol$branch(:$remote_branch)]($style) '
symbol = " "
[git_status]
diverged = '⇕⇡${ahead_count}⇣${behind_count}'
conflicted = "[⚔️${count}](red)"
ahead = '[⇡${count}](bold green)'
behind = '[⇣${count}](bold yellow)'
untracked = '[!${count}](red)'
stashed = "[📦${count}](purple)"
modified = '[M${count}](bold yellow)'
staged = "[+${count}](green)"
renamed = "[»${count}](bold yellow)"
deleted = '[-${count}](blue)'
up_to_date = '[✓](green)'
format = '([(\[$all_status\])(\[$ahead_behind\])]($style) ) '
[git_commit]
format = '([\($hash$tag\)]($style) )'
only_detached = false
[directory]
fish_style_pwd_dir_length = 2
truncation_length = 2
truncate_to_repo = false
repo_root_style = "bold green"
use_os_path_sep = false
read_only = " 󰌾"
[aws]
symbol = " "
[buf]
symbol = " "
[c]
symbol = " "
[conda]
symbol = " "
[crystal]
symbol = " "
[dart]
symbol = " "
[docker_context]
symbol = " "
[elixir]
symbol = " "
[elm]
symbol = " "
[fennel]
symbol = " "
[fossil_branch]
symbol = " "
[golang]
symbol = " "
[guix_shell]
symbol = " "
[haskell]
symbol = " "
[haxe]
symbol = " "
[hg_branch]
symbol = " "
[hostname]
ssh_symbol = " "
[java]
symbol = " "
[julia]
symbol = " "
[kotlin]
symbol = " "
[lua]
symbol = " "
[memory_usage]
symbol = "󰍛 "
[meson]
symbol = "󰔷 "
[nim]
symbol = "󰆥 "
[nix_shell]
symbol = " "
[nodejs]
symbol = " "
[ocaml]
symbol = " "
[os.symbols]
Alpaquita = " "
Alpine = " "
AlmaLinux = " "
Amazon = " "
Android = " "
Arch = " "
Artix = " "
CentOS = " "
Debian = " "
DragonFly = " "
Emscripten = " "
EndeavourOS = " "
Fedora = " "
FreeBSD = " "
Garuda = "󰛓 "
Gentoo = " "
HardenedBSD = "󰞌 "
Illumos = "󰈸 "
Kali = " "
Linux = " "
Mabox = " "
Macos = " "
Manjaro = " "
Mariner = " "
MidnightBSD = " "
Mint = " "
NetBSD = " "
NixOS = " "
OpenBSD = "󰈺 "
openSUSE = " "
OracleLinux = "󰌷 "
Pop = " "
Raspbian = " "
Redhat = " "
RedHatEnterprise = " "
RockyLinux = " "
Redox = "󰀘 "
Solus = "󰠳 "
SUSE = " "
Ubuntu = " "
Unknown = " "
Void = " "
Windows = "󰍲 "
[package]
symbol = "󰏗 "
[perl]
symbol = " "
[php]
symbol = " "
[pijul_channel]
symbol = " "
[python]
symbol = " "
[rlang]
symbol = "󰟔 "
[ruby]
symbol = " "
[rust]
symbol = "󱘗 "
[scala]
symbol = " "
[swift]
symbol = " "
[zig]
symbol = " "

View file

@ -0,0 +1,36 @@
{ lib, config, ... }:
let
cfg = config.youthlic.programs.starship;
in
{
options = {
youthlic.programs.starship = {
enable = lib.mkOption {
type = lib.types.bool;
default = true;
example = false;
description = ''
whether enable starship
'';
};
};
};
config = lib.mkIf cfg.enable {
programs.starship = lib.mkMerge [
{
enable = true;
settings =
let
config-file = builtins.readFile ./config.toml;
in
builtins.fromTOML config-file;
}
(lib.mkIf config.youthlic.programs.fish.enable {
enableFishIntegration = true;
})
(lib.mkIf config.youthlic.programs.bash.enable {
enableBashIntegration = true;
})
];
};
}