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