From dd47efc591d634c310830b8f0f33aa02bb150826 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Wed, 26 Mar 2025 22:09:03 +0100 Subject: usecases/wpaperd: init with new set of wallpapers --- flake.lock | 19 ++++++++++++++++++- flake.nix | 4 ++++ usecases/desktop/graphical.nix | 1 + usecases/desktop/graphical/wpaperd.nix | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 usecases/desktop/graphical/wpaperd.nix diff --git a/flake.lock b/flake.lock index 1a35612..30f4ebe 100644 --- a/flake.lock +++ b/flake.lock @@ -208,7 +208,8 @@ "nixpkgs-unstable": "nixpkgs-unstable", "nixvim": "nixvim", "rycee-nur": "rycee-nur", - "shmart-prompt-dir": "shmart-prompt-dir" + "shmart-prompt-dir": "shmart-prompt-dir", + "wallpapers": "wallpapers" } }, "rycee-nur": { @@ -272,6 +273,22 @@ "repo": "default", "type": "github" } + }, + "wallpapers": { + "flake": false, + "locked": { + "lastModified": 1743021271, + "narHash": "sha256-S6wpeIS1QoMwQDc+K2whYUrgEO0zt/tNbCklhTTXs+Y=", + "ref": "refs/heads/main", + "rev": "3c18fcea2017fc1ed7f1877413c9dbe486e6a051", + "revCount": 1, + "type": "git", + "url": "https://git.huh.gdn/wallpapers" + }, + "original": { + "type": "git", + "url": "https://git.huh.gdn/wallpapers" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index c963005..b12f60c 100644 --- a/flake.nix +++ b/flake.nix @@ -25,6 +25,10 @@ url = "github:minijackson/shmart-prompt-dir"; flake = false; }; + wallpapers = { + url = "git+https://git.huh.gdn/wallpapers"; + flake = false; + }; }; outputs = inputs @ { self, nixpkgs, home-manager, ... }: { diff --git a/usecases/desktop/graphical.nix b/usecases/desktop/graphical.nix index 7289af3..7c262f6 100644 --- a/usecases/desktop/graphical.nix +++ b/usecases/desktop/graphical.nix @@ -18,6 +18,7 @@ inputs: { ./graphical/swaync.nix ./graphical/waybar.nix ./graphical/wlsunset.nix + (import ./graphical/wpaperd.nix inputs) (import ./graphical/zathura.nix inputs) ]; diff --git a/usecases/desktop/graphical/wpaperd.nix b/usecases/desktop/graphical/wpaperd.nix new file mode 100644 index 0000000..0fe7b1a --- /dev/null +++ b/usecases/desktop/graphical/wpaperd.nix @@ -0,0 +1,32 @@ +inputs: +{ lib, pkgs, ... }: +{ + # TODO: migrate to services.wpaperd when upgrading from 24.11 to 25.05 + home-manager.users.minijackson.programs.wpaperd = { + enable = true; + + settings.default = { + path = "${inputs.wallpapers}"; + duration = "30m"; + transition.directional-wipe = { }; + }; + }; + + # TODO: remove when upgrading from 24.11 to 25.05 + systemd.user.services.wpaperd = { + wantedBy = [ "graphical-session.target" ]; + + unitConfig = { + ConditionEnvironment = "WAYLAND_DISPLAY"; + Description = "wpaperd"; + PartOf = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + }; + + serviceConfig = { + ExecStart = "${lib.getExe pkgs.wpaperd}"; + Restart = "always"; + RestartSec = "10"; + }; + }; +} -- cgit v1.2.3