dot

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

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