Files
NixOS-Configs/home/hypr/default.nix
Anish Govind fb743d7353 hypr: move session daemons from exec-once to systemd user services
Replace the hl.exec_cmd autostart block with declarative home-manager
services so the desktop shell has proper ordering and lifecycle:

- services.hyprpaper (with settings) for hyprpaper
- services.cliphist for the text/image clipboard watchers
- services.hyprpolkitagent for the polkit agent
- programs.quickshell.systemd for the quickshell shell
- a hand-written systemd.user.services.mako (home-manager has no unit)

All are tied to config.wayland.systemd.target (graphical-session.target),
which start-hyprland already activates. No UWSM required.
2026-09-19 00:31:18 -07:00

87 lines
2.0 KiB
Nix

{
pkgs,
lib,
config,
...
}:
let
# Deterministic Silicon Volt wallpaper: rendered from SVG at build time,
# so the same source always produces a byte-identical image.
wallpaper = pkgs.runCommand "silicon-volt-wallpaper.png" { } ''
${pkgs.librsvg}/bin/rsvg-convert -w 3840 -h 2160 ${./wallpaper.svg} > $out
'';
in
{
imports = [
./hyprland.nix
./hyprlock.nix
./hypridle.nix
./quickshell.nix
./services.nix
];
home.packages = with pkgs; [
# Utilities & Tools
grim
slurp
wl-clipboard
brightnessctl
jq
# Desktop Environment / Hyprland ecosystem
hyprpaper
];
# Build-time rendered wallpaper
xdg.dataFile."backgrounds/silicon-volt.png".source = wallpaper;
# hyprpaper: load the Silicon Volt wallpaper on every output. The
# home-manager module writes hypr/hyprpaper.conf and runs the daemon as a
# systemd user service tied to the Wayland session.
services.hyprpaper = {
enable = true;
settings = {
splash = false;
preload = "${config.home.homeDirectory}/.local/share/backgrounds/silicon-volt.png";
wallpaper = [
{
monitor = "";
path = "${config.home.homeDirectory}/.local/share/backgrounds/silicon-volt.png";
}
];
};
};
# Notifications: flat brutalist-glass cards with volt accents
services.mako = {
enable = true;
settings = {
background-color = "#1c1b1bee";
text-color = "#e5e2e1";
border-color = "#cffc00";
border-size = 1;
border-radius = 0;
width = 420;
margin = "12";
padding = "14";
default-timeout = 6000;
font = "JetBrainsMono Nerd Font 11";
format = "<b>%s</b>\\n%b";
"icon-location" = "left";
max-icon-size = 48;
"urgency=critical" = {
border-color = "#ff7a59";
text-color = "#ffffff";
default-timeout = 0;
};
"urgency=low" = {
border-color = "#2a2929";
text-color = "#adaaaa";
};
};
};
}