diff --git a/home/atuin.nix b/home/atuin.nix index da65610..f93b6f6 100644 --- a/home/atuin.nix +++ b/home/atuin.nix @@ -1,8 +1,11 @@ -{ pkgs, ... }: - +{ + pkgs, + ... +}: { programs.atuin = { enable = true; + enableZshIntegration = true; settings = { # Data files db_path = "~/.history.db"; diff --git a/home/gunalx.nix b/home/gunalx.nix index a9d744b..59ea673 100644 --- a/home/gunalx.nix +++ b/home/gunalx.nix @@ -12,7 +12,7 @@ ./sshconfig.nix ./atuin.nix ./git.nix - ./bash.nix + ./zsh.nix #./xdg.nix # theming @@ -48,7 +48,7 @@ ]; programs.nix-index = { - enableBashIntegration = true; + enableZshIntegration = true; enable = true; }; diff --git a/home/niri.nix b/home/niri.nix index b2bd968..927dd6e 100644 --- a/home/niri.nix +++ b/home/niri.nix @@ -377,11 +377,12 @@ in clip-to-geometry = true; } - # Onboard keyboard { matches = [ { app-id = "onboard"; } { app-id = "Onboard"; } + { app-id = "wvkbd-mobintl"; } + { app-id = "wvkbd"; } ]; open-floating = true; default-window-height = { @@ -394,9 +395,7 @@ in } ]; - # Keybindings binds = { - # Hotkey overlay "Mod+Shift+Slash".action.show-hotkey-overlay = { }; "Mod+Slash".action.toggle-overview = { }; @@ -407,13 +406,13 @@ in "-c" "if pgrep -f '^foot -T dropdown$' >/dev/null; then pkill -f '^foot -T dropdown$'; else exec foot -T dropdown; fi" ]; - # Noctalia launcher #"Mod+D".action.spawn = noctalia "launcher toggle"; "Mod+D".action.spawn = "fuzzel"; "Mod+Space".action.spawn = noctalia "launcher toggle"; "Mod+O".action.toggle-window-rule-opacity = { }; # Noctalia lock screen "Mod+G".action.spawn = noctalia "lockScreen lock"; + "Mod+M".action.spawn = noctalia "lockScreen lock"; # Volume keys (using Noctalia) "XF86AudioRaiseVolume" = { @@ -650,11 +649,17 @@ in # Displays wdisplays + wl-mirror xwayland-satellite xwayland gtk3 + # Icon themes (fix missing app icons in trays/launchers) + papirus-icon-theme + hicolor-icon-theme + adwaita-icon-theme + # Network applet (Noctalia has built-in network/bluetooth controls) networkmanagerapplet networkmanager diff --git a/home/noctalia.nix b/home/noctalia.nix index 7e4e461..964404b 100644 --- a/home/noctalia.nix +++ b/home/noctalia.nix @@ -115,4 +115,14 @@ }; }; + + # Noctalia is started via a systemd user service, so it won't see variables + # set only in niri's `settings.environment`. Put theme-related env here. + systemd.user.services.noctalia-shell.Service.Environment = [ + "QT_QPA_PLATFORM=wayland;xcb" + "QT_QPA_PLATFORMTHEME=qt6ct" + "QT_AUTO_SCREEN_SCALE_FACTOR=1" + # Ensures Quickshell resolves app icons from a known icon theme. + "QS_ICON_THEME=Papirus-Dark" + ]; } diff --git a/home/opencode.nix b/home/opencode.nix index a652eda..f759997 100644 --- a/home/opencode.nix +++ b/home/opencode.nix @@ -12,8 +12,9 @@ enableMcpIntegration = true; settings = { - model = "github-copilot/gpt-5.2"; - small_model = "zai-coding-plan/glm-4.7"; + #model = "github-copilot/gpt-5.2"; + model = "zai-coding-plan/glm-4.7"; + small_model = "zai-coding-plan/glm-4.7-flash"; autoshare = false; autoupdate = false; }; @@ -89,6 +90,10 @@ rules = '' ### **General Project Guidelines** + Never do destructive actions, like git reverts, rm without asking for confirmation first. + Always ask the user if you are uncertain about what to do. + Whenever you need secrets to solve a problem, never look at them directly, but ask for what env vars or similar you need. + #### **Separation of Concerns** * Keep your code **loosely coupled** components/modules should only know about what they need. diff --git a/home/zsh.nix b/home/zsh.nix new file mode 100644 index 0000000..94b6ce9 --- /dev/null +++ b/home/zsh.nix @@ -0,0 +1,95 @@ +{ + pkgs, + lib, + config, + inputs, + ... +}: +{ + sops.secrets = { + "ai/openai" = { }; + "ai/openrouter" = { }; + "ai/fireworks" = { }; + "ai/cerebras" = { }; + "ai/groq" = { }; + "ai/mistral" = { }; + "ai/zai" = { }; + }; + programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + shellAliases = { + "rebuild" = + "sudo nixos-rebuild switch --no-write-lock-file --flake git+https://github.com/adrlau/nix-dotfiles.git -L --impure"; + + "," = "comma "; + + "gst" = "git status"; + "gsw" = "git switch"; + "gcm" = "git commit -m "; + "gca" = "git commit --amend"; + "gaa" = "git add -A"; + "gb" = "git branch"; + + "rm" = "rm -i"; + + "pyhton" = "python"; + + "cim" = "neovim"; + "sl" = "eza"; + "ls" = "eza"; + "lls" = "ls"; + "la" = "eza -la"; + "tree" = "eza -T"; + "neofetch" = "fastfetch"; + "htop" = "btm"; + }; + initExtra = '' + # Export AI API keys from decrypted sops-nix secrets + export OPENAI_API_KEY="$(cat ${config.sops.secrets."ai/openai".path})" + export OPENROUTER_API_KEY="$(cat ${config.sops.secrets."ai/openrouter".path})" + export FIREWORKS_API_KEY="$(cat ${config.sops.secrets."ai/fireworks".path})" + export CEREBRAS_API_KEY="$(cat ${config.sops.secrets."ai/cerebras".path})" + export GROQ_API_KEY="$(cat ${config.sops.secrets."ai/groq".path})" + export MISTRAL_API_KEY="$(cat ${config.sops.secrets."ai/mistral".path})" + export ZAI_API_KEY="$(cat ${config.sops.secrets."ai/zai".path})" + export ZAI_API_BASE="https://api.z.ai/api/coding/paas/v4" + + autoload -U colors && colors + setopt promptsubst + + # Git branch function + parse_git_branch() { + local branch + branch=$(git branch --show-current 2>/dev/null) + if [[ -n "$branch" ]]; then + echo " ($branch)" + fi + } + + # Remote label for SSH + if [[ -n "$SSH_CONNECTION" ]]; then + REMOTE_LABEL="%{%F{yellow}%} (ssh)%{%f%}" + else + REMOTE_LABEL="" + fi + + # Set prompt using promptsubst to evaluate $(...) at display time + if [[ $EUID -eq 0 ]]; then + PROMPT='%{%B%F{red}%}%n%{%f%}:%{%B%F{red}%}%m%{%f%}$REMOTE_LABEL:%{%B%F{green}%}%~%{%F{magenta}%}$(parse_git_branch) %{%F{blue}%}%T%{%f%}$ ' + else + PROMPT='%{%B%F{cyan}%}%n%{%f%}:%{%B%F{cyan}%}%m%{%f%}$REMOTE_LABEL:%{%B%F{green}%}%~%{%F{magenta}%}$(parse_git_branch) %{%F{blue}%}%T%{%f%}$ ' + fi + ''; + history = { + size = 10000; + save = 10000; + ignoreDups = true; + ignoreSpace = true; + share = true; + path = "$HOME/.zsh_history"; + }; + }; +} diff --git a/modules/basePackages.nix b/modules/basePackages.nix index e8522d4..0c50061 100644 --- a/modules/basePackages.nix +++ b/modules/basePackages.nix @@ -26,6 +26,8 @@ rsync screen + zsh + ]; } diff --git a/modules/gunalx.nix b/modules/gunalx.nix index b37f02c..d7f93d2 100644 --- a/modules/gunalx.nix +++ b/modules/gunalx.nix @@ -7,8 +7,10 @@ { imports = [ ]; + programs.zsh.enable = true; users.users.gunalx = { isNormalUser = true; + shell = pkgs.zsh; extraGroups = [ "wheel" "tss"