86 lines
2.8 KiB
Nix
86 lines
2.8 KiB
Nix
{self, ...}: {
|
|
# Hyprland desktop. The compositor config itself (hyprland.lua + ahmza/*.lua,
|
|
# hyprlock, hypridle, hyprsunset) is managed via stow (dotfiles: hypr package).
|
|
# Here we enable Hyprland and install the runtime tools that config + the
|
|
# helper scripts in the `bin` package expect on PATH.
|
|
flake.nixosModules.hyprland = {pkgs, ...}: let
|
|
modules = with self.nixosModules; [
|
|
audio
|
|
systemTheme
|
|
fuzzel
|
|
ghostty
|
|
waybar
|
|
quickshell
|
|
];
|
|
in {
|
|
imports = modules;
|
|
|
|
programs.hyprland = {
|
|
enable = true;
|
|
withUWSM = true;
|
|
};
|
|
|
|
# hypr = compositor config, dunst = notifications, wal = pywal templates,
|
|
# bin = helper scripts (swp/launch-waybar/passmenu) referenced by keybinds.
|
|
ahmza.stow.packages = ["hypr" "dunst" "wal" "bin"];
|
|
|
|
services.displayManager.defaultSession = "hyprland-uwsm";
|
|
services.xserver.enable = true;
|
|
security.polkit.enable = true;
|
|
|
|
# Removable-media automounting.
|
|
#
|
|
# udiskie is only a tray frontend to the udisks2 D-Bus daemon, so the daemon
|
|
# has to be enabled or udiskie runs but can never mount anything. Note this
|
|
# covers removable media *only*: udisks2 reports the internal SATA disks as
|
|
# HintSystem=true, so udiskie leaves them alone. Permanently attached drives
|
|
# are declared in the host's disks.nix instead.
|
|
services.udisks2.enable = true;
|
|
|
|
# Run udiskie as a user unit rather than from the hypr autostart — it was
|
|
# previously only installed, never actually launched. Binding it to
|
|
# graphical-session.target (which UWSM manages properly) means it starts and
|
|
# stops with the session instead of leaking across logins.
|
|
systemd.user.services.udiskie = {
|
|
description = "udiskie removable media automounter";
|
|
partOf = ["graphical-session.target"];
|
|
after = ["graphical-session.target"];
|
|
wantedBy = ["graphical-session.target"];
|
|
serviceConfig = {
|
|
Type = "simple";
|
|
# -s = smart tray: the icon appears only while removable media is present.
|
|
ExecStart = "${pkgs.udiskie}/bin/udiskie -s";
|
|
Restart = "on-failure";
|
|
};
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
# hypr* ecosystem (keybinds / hypridle / autostart)
|
|
hyprlock
|
|
hypridle
|
|
hyprsunset
|
|
hyprpicker
|
|
# launcher / file manager / browser (vars.lua: Picker/FileManager/Browser)
|
|
kdePackages.dolphin
|
|
firefox
|
|
# wallpaper daemon used by the `swp` script + autostart (awww-daemon)
|
|
awww
|
|
# scripting deps for bin/ helpers (swp uses jq + hyprctl)
|
|
jq
|
|
# display / applets referenced by autostart
|
|
xrandr
|
|
networkmanagerapplet
|
|
blueman
|
|
udiskie
|
|
brightnessctl
|
|
# clipboard
|
|
wl-clipboard
|
|
cliphist
|
|
# theming
|
|
gsettings-desktop-schemas
|
|
dunst
|
|
pywal16
|
|
];
|
|
};
|
|
}
|