From 63f76712f5c94d9f696a7315aafa261ef303e01f Mon Sep 17 00:00:00 2001 From: xbazzi Date: Tue, 4 Feb 2025 00:21:43 -0700 Subject: [PATCH] Update some configs --- .gitignore | 1 + home/kitty.nix | 48 ++++++++++++++++++++-------------------- home/zsh.nix | 11 +++++++++ system/configuration.nix | 15 ------------- system/default.nix | 2 ++ system/fonts.nix | 19 ++++++++++++++++ system/ssh.nix | 9 ++++++++ 7 files changed, 66 insertions(+), 39 deletions(-) create mode 100644 system/fonts.nix create mode 100644 system/ssh.nix diff --git a/.gitignore b/.gitignore index 36969a3..b1a3c4c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ config-nixvim result hardware-configuration.nix *.swp +# ssh.nix \ No newline at end of file diff --git a/home/kitty.nix b/home/kitty.nix index 64d9145..8302186 100755 --- a/home/kitty.nix +++ b/home/kitty.nix @@ -15,30 +15,30 @@ background = "#17041c"; hide_window_decorations = true; # themeFile = "Alucard"; - # symbol_map = - # let - # mappings = [ - # "U+23FB-U+23FE" - # "U+2B58" - # "U+E200-U+E2A9" - # "U+E0A0-U+E0A3" - # "U+E0B0-U+E0BF" - # "U+E0C0-U+E0C8" - # "U+E0CC-U+E0CF" - # "U+E0D0-U+E0D2" - # "U+E0D4" - # "U+E700-U+E7C5" - # "U+F000-U+F2E0" - # "U+2665" - # "U+26A1" - # "U+F400-U+F4A8" - # "U+F67C" - # "U+E000-U+E00A" - # "U+F300-U+F313" - # "U+E5FA-U+E62B" - # ]; - # in - # (builtins.concatStringsSep "," mappings) + " Symbols Nerd Font"; + symbol_map = + let + mappings = [ + "U+23FB-U+23FE" + "U+2B58" + "U+E200-U+E2A9" + "U+E0A0-U+E0A3" + "U+E0B0-U+E0BF" + "U+E0C0-U+E0C8" + "U+E0CC-U+E0CF" + "U+E0D0-U+E0D2" + "U+E0D4" + "U+E700-U+E7C5" + "U+F000-U+F2E0" + "U+2665" + "U+26A1" + "U+F400-U+F4A8" + "U+F67C" + "U+E000-U+E00A" + "U+F300-U+F313" + "U+E5FA-U+E62B" + ]; + in + (builtins.concatStringsSep "," mappings) + " Symbols Nerd Font"; }; }; } diff --git a/home/zsh.nix b/home/zsh.nix index cd653e7..287e8ac 100755 --- a/home/zsh.nix +++ b/home/zsh.nix @@ -1,4 +1,5 @@ + { inputs, pkgs, lib, config, ... }: { @@ -9,6 +10,14 @@ syntaxHighlighting.enable = true; initExtra = '' bindkey -e + function y() { + local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd + yazi "$@" --cwd-file="$tmp" + if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then + builtin cd -- "$cwd" + fi + rm -f -- "$tmp" + } ''; history.size = 10000; history.ignoreAllDups = true; @@ -28,6 +37,8 @@ hms = "home-manager switch --flake ${flakePath}"; config = "nvim ~/nix/configuration.nix"; homecfg = "nvim ~/nix/home.nix"; + vi = "vim "; + sudo = "sudo "; }; # plugins = [ diff --git a/system/configuration.nix b/system/configuration.nix index accbb46..dde0c72 100755 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -54,21 +54,6 @@ # Enable CUPS to print documents. services.printing.enable = true; - fonts.packages = with pkgs; [ - nerd-fonts.fira-code - nerd-fonts.sauce-code-pro - # nerd-fonts._Oxproto - nerd-fonts.space-mono - nerd-fonts.droid-sans-mono - noto-fonts-cjk-sans - noto-fonts-emoji - liberation_ttf - fira-code-symbols - mplus-outline-fonts.githubRelease - dina-font - proggyfonts - ] ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); - # Zsh enable for all users programs.zsh = { enable = true; diff --git a/system/default.nix b/system/default.nix index 0e9a2e7..a02de8b 100755 --- a/system/default.nix +++ b/system/default.nix @@ -4,6 +4,8 @@ imports = [ ./configuration.nix + ./fonts.nix + ./ssh.nix # ./stylix.nix ./gnome.nix ./yazi.nix diff --git a/system/fonts.nix b/system/fonts.nix new file mode 100644 index 0000000..610f98e --- /dev/null +++ b/system/fonts.nix @@ -0,0 +1,19 @@ +{ config, pkgs, ... }: + +{ + fonts.packages = with pkgs; [ + nerd-fonts.fira-code + nerd-fonts.sauce-code-pro + # nerd-fonts._Oxproto + nerd-fonts.space-mono + nerd-fonts.droid-sans-mono + noto-fonts-cjk-sans + noto-fonts-emoji + liberation_ttf + fira-code-symbols + mplus-outline-fonts.githubRelease + dina-font + proggyfonts + monaspace + ] ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); +} \ No newline at end of file diff --git a/system/ssh.nix b/system/ssh.nix new file mode 100644 index 0000000..1e47b86 --- /dev/null +++ b/system/ssh.nix @@ -0,0 +1,9 @@ +{ config, pkgs, ... }: + +{ + programs.ssh.extraConfig = '' + Host school + HostName school + IdentityFile ~/.ssh/lan_ed25519 + ''; +} \ No newline at end of file