dot

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

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