diff --git a/home/dot_config/kitty/kitty.conf b/home/dot_config/kitty/kitty.conf index ed09dbd..daad5dc 100644 --- a/home/dot_config/kitty/kitty.conf +++ b/home/dot_config/kitty/kitty.conf @@ -81,4 +81,4 @@ map ctrl+shift+enter toggle_layout stack map f1 launch --type tab --cwd ~/.dotfiles nvim -shell fish +shell zsh diff --git a/home/dot_config/sway/config b/home/dot_config/sway/config index ae32953..034bf91 100644 --- a/home/dot_config/sway/config +++ b/home/dot_config/sway/config @@ -25,7 +25,7 @@ output * bg /run/current-system/sw/share/backgrounds/sway/Sway_Wallpaper_Blue_19 # -seat seat0 xcursor_theme breeze_cursors 30 +seat seat0 xcursor_theme BreezeX-RosePine-Linux 30 # # Floating rules diff --git a/nixcfgs/hosts/zephyrus/default.nix b/nixcfgs/hosts/zephyrus/default.nix index da7753c..b1cb197 100644 --- a/nixcfgs/hosts/zephyrus/default.nix +++ b/nixcfgs/hosts/zephyrus/default.nix @@ -14,7 +14,7 @@ ../../modules/nixos/desktop/laptop.nix # hardware drivers - ../../modules/nixos/hardware/nvidia-disable.nix + ../../modules/nixos/hardware/nvidia.nix # udev rules ../../modules/nixos/hardware/udev/basys3.nix diff --git a/nixcfgs/modules/nixos/core/configuration.nix b/nixcfgs/modules/nixos/core/configuration.nix index f3fb193..718f4cb 100644 --- a/nixcfgs/modules/nixos/core/configuration.nix +++ b/nixcfgs/modules/nixos/core/configuration.nix @@ -34,6 +34,7 @@ openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJToUo2jT3qt7eHIME9e1awabZZVmtKhbxwVz9BMSM2d js0ny@zephyrus" ]; + shell = pkgs.zsh; }; programs.command-not-found.enable = true; } diff --git a/nixcfgs/users/js0ny/programs/fzf.nix b/nixcfgs/users/js0ny/programs/fzf.nix index 75b63e0..d34d6be 100644 --- a/nixcfgs/users/js0ny/programs/fzf.nix +++ b/nixcfgs/users/js0ny/programs/fzf.nix @@ -5,10 +5,10 @@ local _file if command -v fd >/dev/null 2>&1; then - _file=$(fd --type f | fzf --height 40% --reverse) + _file=$(fd --type f | fzf --height 40% --reverse -1 -q "$1") else # Fallback to 'find' - _file=$(find . -type f | fzf --height 40% --reverse) + _file=$(find . -type f | fzf --height 40% --reverse -1 -q "$1") fi # In POSIX shell, if fzf is cancelled (Esc/Ctrl-C), @@ -34,9 +34,9 @@ in { set -l file if command -q fd - set file (fd --type f | fzf --height 40% --reverse) + set file (fd --type f | fzf --height 40% --reverse -1 -q "$argv[1]") else - set file (find . -type f | fzf --height 40% --reverse) + set file (find . -type f | fzf --height 40% --reverse -1 -q "$argv[1]") end set -l fzf_status $status diff --git a/nixcfgs/users/js0ny/programs/shell/aliases.nix b/nixcfgs/users/js0ny/programs/shell/aliases.nix index 9b48fa8..06e933d 100644 --- a/nixcfgs/users/js0ny/programs/shell/aliases.nix +++ b/nixcfgs/users/js0ny/programs/shell/aliases.nix @@ -24,15 +24,35 @@ ii = "xdg-open"; open = "xdg-open"; }; -in - commonAliases - // ( - if pkgs.stdenv.isLinux - then linuxAliases - else {} - ) - // ( - if pkgs.stdenv.isDarwin - then darwinAliases - else {} - ) + posixFx = '' + mt() { + mkdir -p $(dirname $1) && touch $1 + } + mtv() { + mkdir -p $(dirname $1) && touch $1 && nvim $1 + } + ''; + fishFx = '' + function mt + mkdir -p (dirname $argv[1]) && touch $argv[1] + end + + function mtv + mkdir -p (dirname $argv[1]) && touch $argv[1] && nvim $argv[1] + end + ''; +in { + aliases = + commonAliases + // ( + if pkgs.stdenv.isLinux + then linuxAliases + else {} + ) + // ( + if pkgs.stdenv.isDarwin + then darwinAliases + else {} + ); + inherit posixFx fishFx; +} diff --git a/nixcfgs/users/js0ny/programs/shell/bash.nix b/nixcfgs/users/js0ny/programs/shell/bash.nix index 76323f0..0d7985d 100644 --- a/nixcfgs/users/js0ny/programs/shell/bash.nix +++ b/nixcfgs/users/js0ny/programs/shell/bash.nix @@ -1,8 +1,11 @@ {pkgs, ...}: let - aliases = import ./aliases.nix {pkgs = pkgs;}; + aliasCfg = import ./aliases.nix {pkgs = pkgs;}; in { programs.bash = { enable = true; - shellAliases = aliases; + shellAliases = aliasCfg.aliases; + bashrcExtra = '' + ${aliasCfg.posixFx} + ''; }; } diff --git a/nixcfgs/users/js0ny/programs/shell/fish.nix b/nixcfgs/users/js0ny/programs/shell/fish.nix index 8ef4e9f..a8a3245 100644 --- a/nixcfgs/users/js0ny/programs/shell/fish.nix +++ b/nixcfgs/users/js0ny/programs/shell/fish.nix @@ -1,5 +1,5 @@ {pkgs, ...}: let - aliases = import ./aliases.nix {pkgs = pkgs;}; + aliasCfg = import ./aliases.nix {pkgs = pkgs;}; in { programs.fish = { enable = true; @@ -10,9 +10,7 @@ in { function tv touch $argv[1] && $EDITOR $argv[1] end - function mtv - mkdir -p (dirname $argv[1]) && touch $argv[1] && $EDITOR $argv[1] - end + ${aliasCfg.fishFx} fish_vi_key_bindings @@ -44,7 +42,7 @@ in { bind -M insert alt-delete kill-line ''; # preferAbbrs = true; - shellAbbrs = aliases; + shellAbbrs = aliasCfg.aliases; }; programs.zed-editor.extensions = ["fish"]; -} +} \ No newline at end of file diff --git a/nixcfgs/users/js0ny/programs/shell/zsh.nix b/nixcfgs/users/js0ny/programs/shell/zsh.nix index 4aa0431..16394d7 100644 --- a/nixcfgs/users/js0ny/programs/shell/zsh.nix +++ b/nixcfgs/users/js0ny/programs/shell/zsh.nix @@ -3,7 +3,7 @@ pkgs, ... }: let - aliases = import ./aliases.nix {pkgs = pkgs;}; + aliasCfg = import ./aliases.nix {pkgs = pkgs;}; in { home.packages = with pkgs; [ zsh-fzf-tab @@ -16,19 +16,19 @@ in { historySubstringSearch.enable = true; enableCompletion = true; dotDir = "${config.xdg.configHome}/zsh"; - # shellAliases = aliases; + shellAliases = aliasCfg.aliases; defaultKeymap = "emacs"; - zsh-abbr = { - enable = true; - abbreviations = aliases; - }; + # zsh-abbr = { + # enable = true; + # abbreviations = aliases; + # }; syntaxHighlighting = { enable = true; patterns = { "rm -rf *" = "fg=blue,bold,bg=red"; }; styles = { - path = "fg=cyan"; + path = "fg=cyan,underline"; }; highlighters = [ "main" @@ -38,11 +38,11 @@ in { ]; }; initContent = '' + ${aliasCfg.posixFx} # Options # ========== - # ! This breaks the nixos-rebuild --flake .#something - # setopt INTERACTIVE_COMMENTS # Allow comments in interactive mode + setopt INTERACTIVE_COMMENTS # Allow comments in interactive mode # Globbing setopt EXTENDED_GLOB # Extended globbing