dot

vizie's NixOS desktop: Hyprland, CachyOS kernel and gaming tweaks

86 lines2766 bytesNix
1# Programs your configs and scripts call, and your own tools.
2{
3 config,
4 inputs,
5 pkgs,
6 ...
7}:
8let
9 system = pkgs.stdenv.hostPlatform.system;
10
11 # The "Desktop" half of the control centre's update tile (tools/nixos-update).
12 nixos-update = pkgs.writeShellApplication {
13 name = "nixos-update";
14 runtimeInputs = with pkgs; [
15 git
16 jq
17 nvd
18 ];
19 runtimeEnv.DOT_REPO = config.dot.repoPath;
20 text = builtins.readFile ../../tools/nixos-update;
21 };
22
23 # The same tile's "Server" half (tools/server-update): updates and deploys ~/git/srv.
24 server-update = pkgs.writeShellApplication {
25 name = "server-update";
26 runtimeInputs = with pkgs; [
27 git
28 nvd
29 openssh
30 ];
31 text = builtins.readFile ../../tools/server-update;
32 };
33
34 # The Network tile's settings window, on its own: the networkmanagerapplet
35 # package also has an autostart entry that would bring nm-applet back to the tray.
36 nm-connection-editor = pkgs.runCommand "nm-connection-editor" { } ''
37 mkdir -p $out/bin $out/share/applications
38 ln -s ${pkgs.networkmanagerapplet}/bin/nm-connection-editor $out/bin/
39 ln -s ${pkgs.networkmanagerapplet}/share/applications/nm-connection-editor.desktop $out/share/applications/
40 '';
41
42 # Philly's webview (WebKitGTK) closes at once on the NVIDIA driver under
43 # Wayland, with "Error 71 (Protocol error) dispatching to Wayland display",
44 # unless its DMA-BUF renderer is off. Set on the program itself, so it holds
45 # however Philly is started (terminal, fuzzel, or as the folder handler from
46 # an app running as a systemd service, which doesn't get hyprland.lua's env).
47 philly = pkgs.symlinkJoin {
48 name = "philly";
49 paths = [ inputs.philly.packages.${system}.default ];
50 nativeBuildInputs = [ pkgs.makeBinaryWrapper ];
51 postBuild = ''
52 rm $out/bin/philly
53 makeWrapper ${inputs.philly.packages.${system}.default}/bin/philly $out/bin/philly \
54 --set-default WEBKIT_DISABLE_DMABUF_RENDERER 1
55 '';
56 };
57in
58{
59 home.packages = with pkgs; [
60 # The Hyprland desktop: launcher, bar flyouts, notifications, idle/lock.
61 fuzzel
62 eww
63 dunst
64 libnotify
65 hyprpaper
66 hypridle
67 wl-clipboard
68 playerctl
69
70 # python3 with PyGObject and python-xlib, for the Waybar/Eww scripts.
71 python3-desktop
72
73 # Called by the control centre and tray scripts.
74 pulseaudio # pactl
75 bluez # bluetoothctl
76 nm-connection-editor
77 nixos-update
78 server-update
79 solaar # mouse battery fallback (mouse-battery.sh)
80
81 # Screenshots and screen recording (imsh-shot, imsh-cast; Super+Shift+S/F/R).
82 inputs.imsh-clients.packages.${system}.default
83 # Philly, the file browser (also the handler for folders, in mimeapps.list).
84 philly
85 ];
86}