From 30a851a7c1365ec5e31e92381bfed557560b0cb2 Mon Sep 17 00:00:00 2001 From: oddlama Date: Wed, 12 Jun 2024 23:41:44 +0200 Subject: [PATCH] feat: enable swww for wallpapers --- users/myuser/graphical/default.nix | 1 + users/myuser/graphical/swww.nix | 39 ++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 users/myuser/graphical/swww.nix diff --git a/users/myuser/graphical/default.nix b/users/myuser/graphical/default.nix index 4eba17c..8378f5d 100644 --- a/users/myuser/graphical/default.nix +++ b/users/myuser/graphical/default.nix @@ -23,6 +23,7 @@ ./waybar.nix ./rofi.nix ./swaync.nix + ./swww.nix ] ++ lib.optionals nixosConfig.graphical.gaming.enable [ ./games diff --git a/users/myuser/graphical/swww.nix b/users/myuser/graphical/swww.nix new file mode 100644 index 0000000..1c24d19 --- /dev/null +++ b/users/myuser/graphical/swww.nix @@ -0,0 +1,39 @@ +{pkgs, ...}: { + systemd.user = { + services = { + swww = { + Unit = { + Description = "Wayland wallpaper daemon"; + PartOf = ["graphical-session.target"]; + }; + Service = { + ExecStart = "${pkgs.swww}/bin/swww-daemon"; + Restart = "on-failure"; + }; + Install.WantedBy = ["graphical-session.target"]; + }; + #swww-random = { + # Unit = { + # Description = "switch random wallpaper powered by swww"; + # }; + # Service = { + # Type = "oneshot"; + # ExecStart = "${pkgs.swww-switch}/bin/swww-switch random"; + # }; + # Install = { + # WantedBy = ["default.target"]; + # }; + #}; + }; + #timers.swww-random = { + # Unit = { + # Description = "switch random wallpaper powered by swww timer"; + # }; + # Timer = { + # OnUnitActiveSec = "60min"; + # OnBootSec = "60min"; + # }; + # Install = {WantedBy = ["timers.target"];}; + #}; + }; +}