me like nix
1{ inputs, ... }:
2
3{
4 flake.modules.nixos.apps =
5 { ... }:
6 {
7 virtualisation.libvirtd.enable = true;
8 programs.virt-manager.enable = true;
9
10 users.users.sean.extraGroups = [
11 "libvirtd"
12 "kvm"
13 ];
14 };
15
16 flake.modules.homeManager.apps =
17 { pkgs, ... }:
18 {
19 home.packages = with pkgs; [
20 # Browsers
21 chromium
22
23 # Communication
24 (element-desktop.override {
25 commandLineArgs = "--password-store=gnome-libsecret";
26 })
27 signal-desktop
28 discord
29
30 # Media
31 immich-cli
32 darktable
33 loupe
34 glycin-loaders
35
36 # Dev tools
37 git
38 jujutsu
39 htop
40 iotop
41 ncdu
42 atac
43 trippy
44 just
45 docker-compose
46 flyctl
47 rainfrog
48 sqlitebrowser
49 cachix
50
51 # System tools
52 nautilus
53 gnome-characters
54 sendme
55 desktop-file-utils
56 gnome-network-displays
57 fastfetch
58 mangohud
59 prismlauncher
60 libnotify
61 sox
62
63 # Claude Code
64 pi-coding-agent
65 claude-code
66 (pkgs.writeShellScriptBin "claude-notify" ''
67 PANE_ID="$ZELLIJ_PANE_ID"
68 SESSION="$ZELLIJ_SESSION_NAME"
69 ID_FILE="/tmp/claude-notify-''${PANE_ID}"
70 (
71 {
72 read -r NOTIFY_ID
73 echo "$NOTIFY_ID" > "$ID_FILE"
74 while read -r line; do
75 if [ "$line" = "default" ]; then
76 WIN_ID=$(niri msg windows | ${pkgs.gnugrep}/bin/grep -B1 "$SESSION" | ${pkgs.gnugrep}/bin/grep -oP '(?<=Window ID )\d+')
77 if [ -n "$WIN_ID" ]; then
78 niri msg action focus-window --id "$WIN_ID"
79 fi
80 zjctl pane focus --pane "id:terminal:$PANE_ID"
81 fi
82 done
83 } < <(${pkgs.libnotify}/bin/notify-send "Claude Code" "Waiting for your approval" \
84 --app-name=claude-code \
85 --action=default=Open \
86 --print-id \
87 --wait)
88 rm -f "$ID_FILE"
89 ) &
90 '')
91 (pkgs.writeShellScriptBin "claude-notify-clear" ''
92 PANE_ID="$ZELLIJ_PANE_ID"
93 ID_FILE="/tmp/claude-notify-''${PANE_ID}"
94 if [ -f "$ID_FILE" ]; then
95 NOTIFY_ID=$(cat "$ID_FILE")
96 ${pkgs.dbus}/bin/dbus-send --session \
97 --print-reply \
98 --dest=org.freedesktop.Notifications \
99 --type=method_call \
100 /org/freedesktop/Notifications \
101 org.freedesktop.Notifications.CloseNotification \
102 "uint32:$NOTIFY_ID" >/dev/null 2>&1
103 rm -f "$ID_FILE"
104 fi
105 '')
106 ];
107
108 # Pi coding agent config
109 home.file.".pi/agent/AGENTS.md".source = ./_config/pi/AGENTS.md;
110 home.file.".pi/agent/skills/caveman".source = ./_config/pi/skills/caveman;
111 home.file.".pi/agent/extensions/permission-pi".source = ./_config/pi/extensions/permission-pi;
112
113 # Claude Code config
114 home.file.".claude/settings.json".text = builtins.toJSON {
115 preferences = {
116 thinking = "high";
117 };
118 enabledPlugins = {
119 "caveman@caveman" = true;
120 };
121 hooks = {
122 Notification = [
123 {
124 matcher = "permission_prompt";
125 hooks = [
126 {
127 type = "command";
128 command = "claude-notify";
129 }
130 ];
131 }
132 ];
133 Stop = [
134 {
135 hooks = [
136 {
137 type = "command";
138 command = "claude-notify-clear";
139 }
140 ];
141 }
142 ];
143 };
144 };
145
146 programs.zen-browser.enable = true;
147
148 programs.obs-studio = {
149 enable = true;
150 plugins = with pkgs.obs-studio-plugins; [
151 obs-backgroundremoval
152 ];
153 };
154
155 };
156}