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";
}