{ pkgs, lib, inputs, theme, ... }: with lib; let mkService = lib.recursiveUpdate { Unit.PartOf = ["graphical-session.target"]; Unit.After = ["graphical-session.target"]; Install.WantedBy = ["graphical-session.target"]; }; in { imports = [./config.nix ./binds.nix]; wayland.windowManager.hyprland = { enable = true; package = inputs.hyprland.packages.${pkgs.system}.default; systemd = { variables = ["--all"]; extraCommands = [ "systemctl --user stop graphical-session.target" "systemctl --user start hyprland-session.target" ]; }; }; systemd.user.services = { swaybg = mkService { Unit.Description = "Wallpaper chooser"; Service = { ExecStart = "${lib.getExe pkgs.swaybg} -i ${theme.wallpaper}"; Restart = "always"; }; }; }; }