diff --git a/home/dot_config/ghostty/config b/home/dot_config/ghostty/config index 8a421e3..16089d7 100644 --- a/home/dot_config/ghostty/config +++ b/home/dot_config/ghostty/config @@ -21,7 +21,7 @@ window-decoration = auto ### Commands -command = fish +command = zsh env = EDITOR=nvim ### Keybindings diff --git a/home/dot_config/nvim/lsp/nixd.lua b/home/dot_config/nvim/lsp/nixd.lua index 00e3994..d5672f2 100644 --- a/home/dot_config/nvim/lsp/nixd.lua +++ b/home/dot_config/nvim/lsp/nixd.lua @@ -12,10 +12,10 @@ return { }, options = { nixos = { - expr = '(builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations.k-on.options', + expr = '(builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations.zephyrus.options', }, home_manager = { - expr = '(builtins.getFlake ("git+file://" + toString ./.)).homeConfigurations."ruixi@k-on".options', + expr = '(builtins.getFlake ("git+file://" + toString ./.)).homeConfigurations."js0ny@zephyrus".options', }, }, }, diff --git a/home/dot_config/nvim/lua/plugins/mod/bufferline.lua b/home/dot_config/nvim/lua/plugins/mod/bufferline.lua index 99787d7..7174493 100644 --- a/home/dot_config/nvim/lua/plugins/mod/bufferline.lua +++ b/home/dot_config/nvim/lua/plugins/mod/bufferline.lua @@ -26,7 +26,7 @@ return { { "bD", "BufferLineCloseOthers", desc = "Delete Other Buffers" }, { "bxx", "BufferLineCloseOthers", desc = "Delete Other Buffers" }, { "bxh", "BufferLineCloseLeft", desc = "Delete Buffers Left" }, - { "bxi", "BufferLineCloseRight", desc = "Delete Buffers Right" }, + { "bxl", "BufferLineCloseRight", desc = "Delete Buffers Right" }, { "bX", "BufferLineCloseOthers", desc = "Delete Other Buffers" }, { "bt", "BufferLineTogglePin", desc = "Pin Buffer" }, }, diff --git a/home/dot_config/nvim/lua/plugins/mod/conform-nvim.lua b/home/dot_config/nvim/lua/plugins/mod/conform-nvim.lua index 41a4d51..84a1ac2 100644 --- a/home/dot_config/nvim/lua/plugins/mod/conform-nvim.lua +++ b/home/dot_config/nvim/lua/plugins/mod/conform-nvim.lua @@ -11,6 +11,7 @@ return { lua = { "stylua" }, python = { "isort", "black" }, javascript = { "prettierd", "prettier", stop_after_first = true }, + nix = { "alejandra" }, }, -- Set default options diff --git a/home/dot_config/zsh/mod/keymap.zsh b/home/dot_config/zsh/mod/keymap.zsh index a146e09..c9b683d 100644 --- a/home/dot_config/zsh/mod/keymap.zsh +++ b/home/dot_config/zsh/mod/keymap.zsh @@ -43,6 +43,7 @@ bindkey '^K' kill-line # Zsh will parse to C-h bindkey '^H' backward-kill-word +bindkey -M viins '^?' backward-delete-char # LEADER CONVENTION # ^X defines as a prefix key in shell # ^A defines as a prefix key in tmux diff --git a/nixcfgs/hosts/zephyrus/default.nix b/nixcfgs/hosts/zephyrus/default.nix index 45e9c8f..4c39feb 100644 --- a/nixcfgs/hosts/zephyrus/default.nix +++ b/nixcfgs/hosts/zephyrus/default.nix @@ -24,6 +24,7 @@ ../../modules/nixos/desktop/de/kde.nix # desktop programs + ../../modules/nixos/programs/zsh.nix ../../modules/nixos/programs/chromium.nix ../../modules/nixos/programs/firefox.nix ../../modules/nixos/programs/libvirt.nix diff --git a/nixcfgs/hosts/zephyrus/hardware-configuration.nix b/nixcfgs/hosts/zephyrus/hardware-configuration.nix index 6feef78..cfa53aa 100644 --- a/nixcfgs/hosts/zephyrus/hardware-configuration.nix +++ b/nixcfgs/hosts/zephyrus/hardware-configuration.nix @@ -47,7 +47,9 @@ options = ["fmask=0022" "dmask=0022"]; }; - swapDevices = []; + swapDevices = [ + {device = "/swap/swapfile";} + ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's diff --git a/nixcfgs/modules/common/default.nix b/nixcfgs/modules/common/default.nix deleted file mode 100644 index e69de29..0000000 diff --git a/nixcfgs/modules/home/gnome.nix b/nixcfgs/modules/home/gnome.nix deleted file mode 100644 index e69de29..0000000 diff --git a/nixcfgs/modules/nixos/hardware/udev/basys3.nix b/nixcfgs/modules/nixos/hardware/udev/basys3.nix index 118cd58..cf24c6e 100644 --- a/nixcfgs/modules/nixos/hardware/udev/basys3.nix +++ b/nixcfgs/modules/nixos/hardware/udev/basys3.nix @@ -3,7 +3,7 @@ services.udev.extraRules = '' ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0660", GROUP="dialout", SYMLINK+="basys3" ''; - users.users.${config.var.username} = { + users.users.js0ny = { extraGroups = ["dialout"]; }; } diff --git a/nixcfgs/modules/nixos/programs/libvirt.nix b/nixcfgs/modules/nixos/programs/libvirt.nix index f66fc27..6dbf6ab 100644 --- a/nixcfgs/modules/nixos/programs/libvirt.nix +++ b/nixcfgs/modules/nixos/programs/libvirt.nix @@ -17,7 +17,7 @@ swtpm.enable = true; }; }; - users.users.${config.var.username} = { + users.users.js0ny = { extraGroups = ["libvirtd"]; }; networking.firewall.trustedInterfaces = ["virbr0"]; diff --git a/nixcfgs/modules/nixos/programs/zsh.nix b/nixcfgs/modules/nixos/programs/zsh.nix new file mode 100644 index 0000000..c27898f --- /dev/null +++ b/nixcfgs/modules/nixos/programs/zsh.nix @@ -0,0 +1,10 @@ +{...}: { + programs.zsh = { + enable = true; + histFile = "$XDG_DATA_HOME/zsh/history"; + enableCompletion = true; + zsh-autoenv.enable = true; + autosuggestions.enable = true; + }; + environment.pathsToLink = ["/share/zsh"]; +} diff --git a/nixcfgs/modules/nixos/services/docker.nix b/nixcfgs/modules/nixos/services/docker.nix index 144d98c..79372cd 100644 --- a/nixcfgs/modules/nixos/services/docker.nix +++ b/nixcfgs/modules/nixos/services/docker.nix @@ -3,7 +3,7 @@ docker.enable = true; podman.enable = true; }; - users.users.${config.var.username} = { + users.users.js0ny = { extraGroups = ["docker" "podman"]; }; diff --git a/nixcfgs/users/js0ny/programs/fzf.nix b/nixcfgs/users/js0ny/programs/fzf.nix index 3efdccf..75b63e0 100644 --- a/nixcfgs/users/js0ny/programs/fzf.nix +++ b/nixcfgs/users/js0ny/programs/fzf.nix @@ -49,7 +49,6 @@ in { end abbr --add ef edit-fzf ''; - # TODO: Add integraiton for bash, zsh programs.bash.bashrcExtra = editFzfPosix; programs.zsh.initContent = editFzfPosix; } diff --git a/nixcfgs/users/js0ny/programs/shell/zsh.nix b/nixcfgs/users/js0ny/programs/shell/zsh.nix index 5f7ccae..ddad2a2 100644 --- a/nixcfgs/users/js0ny/programs/shell/zsh.nix +++ b/nixcfgs/users/js0ny/programs/shell/zsh.nix @@ -1,12 +1,47 @@ -{config, pkgs, ...}: let - aliases = import ./aliases.nix { pkgs = pkgs; }; +{ + config, + pkgs, + ... +}: let + aliases = import ./aliases.nix {pkgs = pkgs;}; in { + home.packages = with pkgs; [ + zsh-fzf-tab + ]; programs.zsh = { enable = true; autocd = true; autosuggestion.enable = true; - syntaxHighlighting.enable = true; + historySubstringSearch.enable = true; + enableCompletion = true; dotDir = "${config.xdg.configHome}/zsh"; shellAliases = aliases; + syntaxHighlighting = { + enable = true; + patterns = { + "rm -rf *" = "fg=blue,bold,bg=red"; + }; + highlighters = [ + "main" + "pattern" + "brackets" + "root" + ]; + }; + initContent = '' + # Emacs Hybrid + bindkey '^A' beginning-of-line + bindkey '^E' end-of-line + bindkey '^F' forward-char + bindkey '^B' backward-char + bindkey '^P' up-line-or-history + bindkey '^N' down-line-or-history + # bindkey '^R' history-incremental-search-backward # Use fzf + bindkey '^K' kill-line + + bindkey -M viins '^?' backward-delete-char + bindkey -M viins '^H' backward-kill-word + source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh + ''; }; -} \ No newline at end of file +} diff --git a/nixcfgs/users/js0ny/zephyrus.nix b/nixcfgs/users/js0ny/zephyrus.nix index f8db836..789d8c0 100644 --- a/nixcfgs/users/js0ny/zephyrus.nix +++ b/nixcfgs/users/js0ny/zephyrus.nix @@ -14,6 +14,11 @@ ./packages/fonts.nix ./packages/catppuccin.nix + # Shell + ./programs/shell/bash.nix + ./programs/shell/zsh.nix + ./programs/shell/fish.nix + # Personal Program ./programs/chromium.nix ./programs/firefox.nix @@ -28,10 +33,6 @@ ./programs/libreoffice.nix ./programs/nvim.nix - # Shell - ./programs/shell/bash.nix - ./programs/shell/zsh.nix - ./programs/shell/fish.nix # Desktop Linux ./programs/plasma.nix