mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 23:23:55 -05:00
Aly Raffauf
7aa16a4005
Some checks are pending
nix-build / default-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
43 lines
1.5 KiB
Nix
43 lines
1.5 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" ++ lib.optional (config.ar.home.desktop.sway.enable) "sway-session.target" ++ lib.optional (config.ar.home.desktop.river.enable) "river-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" ++ lib.optional (config.ar.home.desktop.sway.enable) "sway-session.target" ++ lib.optional (config.ar.home.desktop.river.enable) "river-session.target";
|
|
};
|
|
};
|
|
}
|