feat: tidy shell config

This commit is contained in:
2026-01-01 20:57:54 +08:00
parent a56e9bdaf2
commit df0a21913e
6 changed files with 28 additions and 10 deletions

View File

@@ -1,7 +1,12 @@
{ lib, username, ... }:
{
my.hm.programs.zsh.shellAliases = {
localproxy_on = "export http_proxy=http://192.168.128.1:7890 https_proxy=http://192.168.128.1:7890 all_proxy=socks://192.168.128.1:7890";
my.hm = {
programs.zsh.shellAliases = {
localproxy_on = "export http_proxy=http://192.168.128.1:7890 https_proxy=http://192.168.128.1:7890 all_proxy=socks://192.168.128.1:7890";
};
programs.fish.shellAliases = {
localproxy_on = "export http_proxy=http://192.168.128.1:7890 https_proxy=http://192.168.128.1:7890 all_proxy=socks://192.168.128.1:7890";
};
};
my = {
sops.sshKeyFile = "/home/${username}/.ssh/id_ed25519";

View File

@@ -30,6 +30,9 @@
PATH = "/home/${username}/bin:$PATH";
};
};
programs.fish.interactiveShellInit = ''
set -gp PATH $HOME/bin
'';
programs.niri.settings = {
environment.STEAM_FORCE_DESKTOPUI_SCALING = "1.25";

View File

@@ -35,10 +35,16 @@
no_proxy = "192.168.3.0/24";
PATH = "/home/${username}/bin:$PATH";
};
profileExtra = ''
if [ `tty` = "/dev/tty6" ]; then
clear
fi
};
programs.fish = {
shellAliases = {
cageterm = "cage -m DP-1 -s -- alacritty -o font.size=20";
cagefoot = "cage -m DP-1 -s -- foot --font=monospace:size=20";
cagekitty = "cage -m DP-1 -s -- kitty -o font_size=20";
};
interactiveShellInit = ''
set -g no_proxy "192.168.3.0/24"
set -gp PATH $HOME/bin
'';
};

View File

@@ -27,7 +27,10 @@ in
registry = https://registry.npmmirror.com
'';
programs.zsh.initContent = lib.mkAfter ''
export PATH=$PATH:$HOME/.npm-global/bin
export PATH=$HOME/.npm-global/bin:$PATH
'';
programs.fish.interactiveShellInit = ''
set -gp PATH $HOME/.npm-global/bin
'';
};
my.persist.homeDirs = [

View File

@@ -38,7 +38,10 @@ in
git-fetch-with-cli = true
'';
programs.zsh.initContent = lib.mkAfter ''
export PATH=$PATH:$HOME/.cargo/bin
export PATH=$HOME/.cargo/bin:$PATH
'';
programs.fish.interactiveShellInit = ''
set -gp PATH $HOME/.cargo/bin
'';
};
my.persist.homeDirs = [

View File

@@ -18,8 +18,6 @@ in
};
config = lib.mkIf cfg.enable {
programs.zsh.enable = true;
sops.secrets.imxyy-nix-hashed-password = {
sopsFile = secrets.imxyy-nix-hashed-password;
format = "binary";