55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
inputs,
|
|
theme,
|
|
...
|
|
}: 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 ./rules.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"
|
|
];
|
|
};
|
|
};
|
|
|
|
# fake a tray to let apps start
|
|
# https://github.com/nix-community/home-manager/issues/2064
|
|
systemd.user.targets.tray = {
|
|
Unit = {
|
|
Description = "Home Manager System Tray";
|
|
Requires = ["graphical-session-pre.target"];
|
|
};
|
|
};
|
|
|
|
# systemd.user.services = {
|
|
# swaybg = mkService {
|
|
# Unit.Description = "Wallpaper chooser";
|
|
# Service = {
|
|
# ExecStart = "${lib.getExe pkgs.swaybg} -i ${theme.wallpaper}";
|
|
# Restart = "always";
|
|
# };
|
|
# };
|
|
# };
|
|
|
|
systemd.user.services = {
|
|
swww = mkService {
|
|
Unit.Description = "Wallpaper Daemon";
|
|
Service = {
|
|
ExecStart = "${pkgs.swww}/bin/swww-daemon && ${pkgs.swww}/bin/swww img ${theme.wallpaper}";
|
|
};
|
|
};
|
|
};
|
|
}
|