Working on reshuffling

This commit is contained in:
2026-03-19 06:52:10 +00:00
parent 12557c5a30
commit 4907087ff4
2 changed files with 62 additions and 36 deletions
@@ -1,25 +1,38 @@
{ config, pkgs, lib, flakeRoot, ... }:
{ lib, ... }:
let
# Pad naar de wallpaper config in de flake
wallpaperConf = "${flakeRoot}/assets/hyprland/wallpaperstuff/wallpaper.toml";
in
{
# Installeer wpaperd voor de gebruiker
home.packages = [ pkgs.wpaperd ];
flake.nixosModules.rotating-wallpaper = { config, pkgs, lib, ... }:
# Plaats wallpaper.toml automatisch in $HOME/.config/wpaperd
home.file.".config/wpaperd/wallpaper.toml".source = wallpaperConf;
let
wallpaperConf = ../../../assets/hyprland/wallpaperstuff/wallpaper.toml;
in
{
options.mySystem.desktop.wallpaper.enable =
lib.mkEnableOption "Enable rotating wallpaper via wpaperd";
# Systemd user service
systemd.user.services.wpaperd = {
description = "wpaperd wallpaper daemon";
wantedBy = [ "default.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.wpaperd}/bin/wpaperd --config ${config.home.homeDirectory}/.config/wpaperd/wallpaper.toml";
Restart = "on-failure";
RestartSec = 1;
config = lib.mkIf (config.mySystem.desktop.wallpaper.enable or false) {
# Home Manager context
home-manager.users.henrov = {
home.packages = [ pkgs.wpaperd ];
home.file.".config/wpaperd/wallpaper.toml".source =
wallpaperConf;
systemd.user.services.wpaperd = {
description = "wpaperd wallpaper daemon";
wantedBy = [ "default.target" ];
serviceConfig = {
Type = "simple";
ExecStart =
"${pkgs.wpaperd}/bin/wpaperd --config ~/.config/wpaperd/wallpaper.toml";
Restart = "on-failure";
RestartSec = 1;
};
};
};
};
};
}