This commit is contained in:
2026-02-04 11:18:38 +01:00
parent c9ec662395
commit 6aa9133a34
8 changed files with 132 additions and 10 deletions

View File

@@ -1,8 +1,11 @@
{ pkgs, ... }:
{
pkgs,
...
}:
{
programs.atuin = {
enable = true;
enableZshIntegration = true;
settings = {
# Data files
db_path = "~/.history.db";

View File

@@ -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;
};

View File

@@ -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

View File

@@ -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"
];
}

View File

@@ -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.

95
home/zsh.nix Normal file
View File

@@ -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";
};
};
}

View File

@@ -26,6 +26,8 @@
rsync
screen
zsh
];
}

View File

@@ -7,8 +7,10 @@
{
imports = [ ];
programs.zsh.enable = true;
users.users.gunalx = {
isNormalUser = true;
shell = pkgs.zsh;
extraGroups = [
"wheel"
"tss"