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