nixcfg/homeManagerModules/services/randomWallpaper/default.nix
Aly Raffauf c7581ba6e1
Some checks are pending
git-mirror / gitlab-sync (push) Waiting to run
nix-build / clean-install-build (push) Waiting to run
nix-build / rofi-bluetooth-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / petalburg-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-build / slateport-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run
tree-wide: drop sway (#194)
2024-12-08 22:16:10 -05:00

43 lines
1.2 KiB
Nix

{
config,
lib,
pkgs,
...
}: let
wallpaperD = pkgs.writers.writeRuby "randomWallpaperD" {} (builtins.readFile ./script.rb);
in {
config = lib.mkIf config.ar.home.services.randomWallpaper.enable {
services.hyprpaper.enable = lib.mkForce false;
# stylix.targets.hyprpaper.enable = lib.mkForce false;
wayland.windowManager.sway.config.output."*" = lib.mkForce {}; # Dirty. TODO: make more elegant.
systemd.user.services.randomWallpaper = {
Unit = {
After = "graphical-session.target";
BindsTo = lib.optional (config.ar.home.desktop.hyprland.enable) "hyprland-session.target";
Description = "Lightweight swaybg-based random wallpaper daemon.";
PartOf = "graphical-session.target";
};
Service = {
Environment = [
"PATH=${
lib.makeBinPath [
config.wayland.windowManager.hyprland.package
config.wayland.windowManager.sway.package
pkgs.procps
pkgs.swaybg
]
}"
];
ExecStart = "${wallpaperD}";
Restart = "no";
TasksMax = "infinity";
};
Install.WantedBy = lib.optional (config.ar.home.desktop.hyprland.enable) "hyprland-session.target";
};
};
}