fix: Error installing file '.config/mako/config' outside $HOME

This commit is contained in:
Ryan Yin
2025-07-12 14:04:44 +08:00
parent fcbbfefedc
commit c8a790f2cf
22 changed files with 204 additions and 495 deletions

View File

@@ -1,16 +1,8 @@
{
pkgs,
nur-ryan4yin,
...
}: {
# https://github.com/catppuccin/btop/blob/main/themes/catppuccin_mocha.theme
xdg.configFile."btop/themes".source = "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-btop}/themes";
# replacement of htop/nmon
programs.btop = {
enable = true;
settings = {
color_theme = "catppuccin_mocha";
theme_background = false; # make btop transparent
};
};

View File

@@ -1,8 +1,4 @@
{
pkgs,
nur-ryan4yin,
...
}: {
{pkgs, ...}: {
home.packages = with pkgs; [
# Misc
cowsay
@@ -25,8 +21,6 @@
sad # CLI search and replace, just like sed, but with diff preview.
yq-go # yaml processor https://github.com/mikefarah/yq
just # a command runner like make, but simpler
delta # A viewer for git and diff output
lazygit # Git terminal UI.
hyperfine # command-line benchmarking tool
gping # ping, but with a graph(TUI)
doggo # DNS client for humans
@@ -53,103 +47,75 @@
ncdu # analyzer your disk usage Interactively, via TUI(replacement of `du`)
];
programs = {
# A modern replacement for ls
# useful in bash/zsh prompt, not in nushell.
eza = {
enable = true;
# do not enable aliases in nushell!
enableNushellIntegration = false;
git = true;
icons = "auto";
};
# A modern replacement for ls
# useful in bash/zsh prompt, not in nushell.
programs.eza = {
enable = true;
# do not enable aliases in nushell!
enableNushellIntegration = false;
git = true;
icons = "auto";
};
# a cat(1) clone with syntax highlighting and Git integration.
bat = {
enable = true;
config = {
pager = "less -FR";
theme = "catppuccin-mocha";
};
themes = {
# https://raw.githubusercontent.com/catppuccin/bat/main/Catppuccin-mocha.tmTheme
catppuccin-mocha = {
src = nur-ryan4yin.packages.${pkgs.system}.catppuccin-bat;
file = "Catppuccin-mocha.tmTheme";
};
};
};
# A command-line fuzzy finder
fzf = {
enable = true;
# https://github.com/catppuccin/fzf
# catppuccin-mocha
colors = {
"bg+" = "#313244";
"bg" = "#1e1e2e";
"spinner" = "#f5e0dc";
"hl" = "#f38ba8";
"fg" = "#cdd6f4";
"header" = "#f38ba8";
"info" = "#cba6f7";
"pointer" = "#f5e0dc";
"marker" = "#f5e0dc";
"fg+" = "#cdd6f4";
"prompt" = "#cba6f7";
"hl+" = "#f38ba8";
};
};
# very fast version of tldr in Rust
tealdeer = {
enable = true;
enableAutoUpdates = true;
settings = {
display = {
compact = false;
use_pager = true;
};
updates = {
auto_update = false;
auto_update_interval_hours = 720;
};
};
};
# zoxide is a smarter cd command, inspired by z and autojump.
# It remembers which directories you use most frequently,
# so you can "jump" to them in just a few keystrokes.
# zoxide works on all major shells.
#
# z foo # cd into highest ranked directory matching foo
# z foo bar # cd into highest ranked directory matching foo and bar
# z foo / # cd into a subdirectory starting with foo
#
# z ~/foo # z also works like a regular cd command
# z foo/ # cd into relative path
# z .. # cd one level up
# z - # cd into previous directory
#
# zi foo # cd with interactive selection (using fzf)
#
# z foo<SPACE><TAB> # show interactive completions (zoxide v0.8.0+, bash 4.4+/fish/zsh only)
zoxide = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
enableNushellIntegration = true;
};
# Atuin replaces your existing shell history with a SQLite database,
# and records additional context for your commands.
# Additionally, it provides optional and fully encrypted
# synchronisation of your history between machines, via an Atuin server.
atuin = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
enableNushellIntegration = true;
# a cat(1) clone with syntax highlighting and Git integration.
programs.bat = {
enable = true;
config = {
pager = "less -FR";
};
};
# A command-line fuzzy finder
programs.fzf.enable = true;
# very fast version of tldr in Rust
programs.tealdeer = {
enable = true;
enableAutoUpdates = true;
settings = {
display = {
compact = false;
use_pager = true;
};
updates = {
auto_update = false;
auto_update_interval_hours = 720;
};
};
};
# zoxide is a smarter cd command, inspired by z and autojump.
# It remembers which directories you use most frequently,
# so you can "jump" to them in just a few keystrokes.
# zoxide works on all major shells.
#
# z foo # cd into highest ranked directory matching foo
# z foo bar # cd into highest ranked directory matching foo and bar
# z foo / # cd into a subdirectory starting with foo
#
# z ~/foo # z also works like a regular cd command
# z foo/ # cd into relative path
# z .. # cd one level up
# z - # cd into previous directory
#
# zi foo # cd with interactive selection (using fzf)
#
# z foo<SPACE><TAB> # show interactive completions (zoxide v0.8.0+, bash 4.4+/fish/zsh only)
programs.zoxide = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
enableNushellIntegration = true;
};
# Atuin replaces your existing shell history with a SQLite database,
# and records additional context for your commands.
# Additionally, it provides optional and fully encrypted
# synchronisation of your history between machines, via an Atuin server.
programs.atuin = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
enableNushellIntegration = true;
};
}

View File

@@ -76,7 +76,7 @@
# signByDefault = true;
# };
# A syntax-highlighting pager in Rust(2019 ~ Now)
# A syntax-highlighting pager for git, diff, grep, and blame output
delta = {
enable = true;
options = {
@@ -116,4 +116,10 @@
foreach = "submodule foreach";
};
};
# Git terminal UI (written in go).
programs.lazygit.enable = true;
# Yet another Git TUI (written in rust).
programs.gitui.enable = true;
}

View File

@@ -1,8 +1,4 @@
{
pkgs,
nur-ryan4yin,
...
}: {
programs.starship = {
enable = true;
@@ -10,24 +6,20 @@
enableZshIntegration = true;
enableNushellIntegration = true;
settings =
{
character = {
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
};
aws = {
symbol = "🅰 ";
};
gcloud = {
# do not show the account/project's info
# to avoid the leak of sensitive information when sharing the terminal
format = "on [$symbol$active(\($region\))]($style) ";
symbol = "🅶 ";
};
palette = "catppuccin_mocha";
}
// builtins.fromTOML (builtins.readFile "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-starship}/palettes/mocha.toml");
settings = {
character = {
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
};
aws = {
symbol = "🅰 ";
};
gcloud = {
# do not show the account/project's info
# to avoid the leak of sensitive information when sharing the terminal
format = "on [$symbol$active(\($region\))]($style) ";
symbol = "🅶 ";
};
};
};
}

15
home/base/core/theme.nix Normal file
View File

@@ -0,0 +1,15 @@
{catppuccin, ...}: {
# https://github.com/catppuccin/nix
imports = [
catppuccin.homeModules.catppuccin
];
catppuccin = {
# The default `enable` value for all available programs.
enable = true;
# one of "latte", "frappe", "macchiato", "mocha"
flavor = "mocha";
# one of "blue", "flamingo", "green", "lavender", "maroon", "mauve", "peach", "pink", "red", "rosewater", "sapphire", "sky", "teal", "yellow"
accent = "pink";
};
}

View File

@@ -1,13 +1,8 @@
{
pkgs,
pkgs-unstable,
nur-ryan4yin,
...
}: {
{pkgs, ...}: {
# terminal file manager
programs.yazi = {
enable = true;
package = pkgs-unstable.yazi;
package = pkgs.yazi;
# Changing working directory when exiting Yazi
enableBashIntegration = true;
enableNushellIntegration = true;
@@ -18,6 +13,4 @@
};
};
};
xdg.configFile."yazi/theme.toml".source = "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-yazi}/mocha.toml";
}

View File

@@ -1,65 +0,0 @@
[colors.primary]
background = "#1e1e2e"
foreground = "#cdd6f4"
dim_foreground = "#7f849c"
bright_foreground = "#cdd6f4"
[colors.cursor]
text = "#1e1e2e"
cursor = "#f5e0dc"
[colors.vi_mode_cursor]
text = "#1e1e2e"
cursor = "#b4befe"
[colors.search.matches]
foreground = "#1e1e2e"
background = "#a6adc8"
[colors.search.focused_match]
foreground = "#1e1e2e"
background = "#a6e3a1"
[colors.footer_bar]
foreground = "#1e1e2e"
background = "#a6adc8"
[colors.hints.start]
foreground = "#1e1e2e"
background = "#f9e2af"
[colors.hints.end]
foreground = "#1e1e2e"
background = "#a6adc8"
[colors.selection]
text = "#1e1e2e"
background = "#f5e0dc"
[colors.normal]
black = "#45475a"
red = "#f38ba8"
green = "#a6e3a1"
yellow = "#f9e2af"
blue = "#89b4fa"
magenta = "#f5c2e7"
cyan = "#94e2d5"
white = "#bac2de"
[colors.bright]
black = "#585b70"
red = "#f38ba8"
green = "#a6e3a1"
yellow = "#f9e2af"
blue = "#89b4fa"
magenta = "#f5c2e7"
cyan = "#94e2d5"
white = "#a6adc8"
[[colors.indexed_colors]]
index = 16
color = "#fab387"
[[colors.indexed_colors]]
index = 17
color = "#f5e0dc"

View File

@@ -29,9 +29,6 @@
package = pkgs-unstable.alacritty;
# https://alacritty.org/config-alacritty.html
settings = {
general.import = [
./catppuccin-mocha.toml
];
window = {
opacity = 0.93;
startup_mode = "Maximized"; # Maximized window
@@ -43,10 +40,18 @@
history = 10000;
};
font = {
bold = {family = "Maple Mono NF CN";};
italic = {family = "Maple Mono NF CN";};
normal = {family = "Maple Mono NF CN";};
bold_italic = {family = "Maple Mono NF CN";};
bold = {
family = "Maple Mono NF CN";
};
italic = {
family = "Maple Mono NF CN";
};
normal = {
family = "Maple Mono NF CN";
};
bold_italic = {
family = "Maple Mono NF CN";
};
size =
if pkgs.stdenv.isDarwin
then 14
@@ -56,7 +61,11 @@
# Spawn a nushell in login mode via `bash`
shell = {
program = "${pkgs.bash}/bin/bash";
args = ["--login" "-c" "nu --login --interactive"];
args = [
"--login"
"-c"
"nu --login --interactive"
];
};
# Controls the ability to write to the system clipboard with the OSC 52 escape sequence.
# It's used by zellij to copy text to the system clipboard.

View File

@@ -26,47 +26,6 @@
mouse = {
hide-when-typing = "yes";
};
# https://github.com/catppuccin/foot/blob/main/themes/catppuccin-mocha.ini
cursor = {
color = "11111b f5e0dc";
};
colors = {
alpha = "0.93"; # background opacity
foreground = "cdd6f4";
background = "1e1e2e";
regular0 = "45475a";
regular1 = "f38ba8";
regular2 = "a6e3a1";
regular3 = "f9e2af";
regular4 = "89b4fa";
regular5 = "f5c2e7";
regular6 = "94e2d5";
regular7 = "bac2de";
bright0 = "585b70";
bright1 = "f38ba8";
bright2 = "a6e3a1";
bright3 = "f9e2af";
bright4 = "89b4fa";
bright5 = "f5c2e7";
bright6 = "94e2d5";
bright7 = "a6adc8";
"16" = "fab387";
"17" = "f5e0dc";
"selection-foreground" = "cdd6f4";
"selection-background" = "414356";
"search-box-no-match" = "11111b f38ba8";
"search-box-match" = "cdd6f4 313244";
"jump-labels" = "11111b fab387";
urls = "89b4fa";
};
};
};
}

View File

@@ -20,8 +20,6 @@
installBatSyntax = false;
# installVimSyntax = true;
settings = {
theme = "catppuccin-mocha";
font-family = "Maple Mono NF CN";
font-size = 13;

View File

@@ -16,10 +16,6 @@
{
programs.kitty = {
enable = true;
# kitty has catppuccin theme built-in,
# all the built-in themes are packaged into an extra package named `kitty-themes`
# and it's installed by home-manager if `theme` is specified.
themeFile = "Catppuccin-Mocha";
font = {
name = "Maple Mono NF CN";
# use different font size on macOS

View File

@@ -29,32 +29,11 @@
ko # build go project to container image
];
programs = {
k9s = {
enable = true;
# https://k9scli.io/topics/aliases/
# aliases = {};
settings = {
skin = "catppuccino-mocha";
};
skins.catppuccin-mocha = let
skin_file = "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-k9s}/dist/mocha.yml"; # theme - catppuccin mocha
skin_attr = builtins.fromJSON (
builtins.readFile
# replace 'base: &base "#1e1e2e"' with 'base: &base "default"'
# to make fg/bg color transparent. "default" means transparent in k9s skin.
(pkgs.runCommandNoCC "get-skin-json" {} ''
cat ${skin_file} \
| sed -E 's@(base: &base ).+@\1 "default"@g' \
| ${pkgs.yj}/bin/yj > $out
'')
);
in
skin_attr;
};
kubecolor = {
enable = true;
enableAlias = true;
};
programs.k9s.enable = true;
catppuccin.k9s.transparent = true;
programs.kubecolor = {
enable = true;
enableAlias = true;
};
}

View File

@@ -1,16 +1,8 @@
{
pkgs,
nur-ryan4yin,
...
}: {
# https://github.com/catppuccin/helix
xdg.configFile."helix/themes".source = "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-helix}/themes/default";
{pkgs, ...}: {
programs.helix = {
enable = true;
package = pkgs.helix;
settings = {
theme = "catppuccin_mocha";
editor = {
line-number = "relative";
cursorline = true;
@@ -29,7 +21,10 @@
w = ":w";
q = ":q";
};
esc = ["collapse_selection" "keep_primary_selection"];
esc = [
"collapse_selection"
"keep_primary_selection"
];
};
};
};

View File

@@ -303,75 +303,6 @@ default_shell "nu"
//
// scrollback_lines_to_serialize 10000
// Define color themes for Zellij
// For more examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes
// Once these themes are defined, one of them should to be selected in the "theme" section of this file
//
themes {
// https://github.com/zellij-org/zellij/blob/main/zellij-utils/assets/themes/catppuccin.kdl
catppuccin-latte {
bg "#acb0be" // Surface2
fg "#acb0be" // Surface2
red "#d20f39"
green "#40a02b"
blue "#1e66f5"
yellow "#df8e1d"
magenta "#ea76cb" // Pink
orange "#fe640b" // Peach
cyan "#04a5e5" // Sky
black "#dce0e8" // Crust
white "#4c4f69" // Text
}
catppuccin-frappe {
bg "#626880" // Surface2
fg "#c6d0f5"
red "#e78284"
green "#a6d189"
blue "#8caaee"
yellow "#e5c890"
magenta "#f4b8e4" // Pink
orange "#ef9f76" // Peach
cyan "#99d1db" // Sky
black "#292c3c" // Mantle
white "#c6d0f5"
}
catppuccin-macchiato {
bg "#5b6078" // Surface2
fg "#cad3f5"
red "#ed8796"
green "#a6da95"
blue "#8aadf4"
yellow "#eed49f"
magenta "#f5bde6" // Pink
orange "#f5a97f" // Peach
cyan "#91d7e3" // Sky
black "#1e2030" // Mantle
white "#cad3f5"
}
catppuccin-mocha {
bg "#585b70" // Surface2
fg "#cdd6f4"
red "#f38ba8"
green "#a6e3a1"
blue "#89b4fa"
yellow "#f9e2af"
magenta "#f5c2e7" // Pink
orange "#fab387" // Peach
cyan "#89dceb" // Sky
black "#181825" // Mantle
white "#cdd6f4"
}
}
// Choose the theme that is specified in the themes section.
// Default: default
//
theme "catppuccin-mocha"
// The name of the default layout to load on startup
// Default: "default"
// (Requires restart)

View File

@@ -7,6 +7,7 @@ in {
enable = true;
package = pkgs.zellij;
};
# auto start zellij in nushell
programs.nushell.extraConfig = ''
# auto start zellij