Working on reshuffling
This commit is contained in:
+31
-18
@@ -672,28 +672,41 @@ rotating_wallpaper.nix installs wpaperd and deploys your wallpaper files from th
|
|||||||
You can edit assets/hyprland/wallpaperstuff/wallpaper.toml to change settings
|
You can edit assets/hyprland/wallpaperstuff/wallpaper.toml to change settings
|
||||||
Finally, it creates a systemd user service (wpaperd.service) that automatically starts wpaperd at login and keeps it running, using your override config so wallpapers rotate according to your settings.
|
Finally, it creates a systemd user service (wpaperd.service) that automatically starts wpaperd at login and keeps it running, using your override config so wallpapers rotate according to your settings.
|
||||||
#+BEGIN_SRC nix :tangle generated/modules/desktop/rotating_wallpaper.nix :noweb tangle :mkdirp yes :eval never-html
|
#+BEGIN_SRC nix :tangle generated/modules/desktop/rotating_wallpaper.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
{ 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
|
flake.nixosModules.rotating-wallpaper = { config, pkgs, lib, ... }:
|
||||||
home.packages = [ pkgs.wpaperd ];
|
|
||||||
|
|
||||||
# Plaats wallpaper.toml automatisch in $HOME/.config/wpaperd
|
let
|
||||||
home.file.".config/wpaperd/wallpaper.toml".source = wallpaperConf;
|
wallpaperConf = ../../../assets/hyprland/wallpaperstuff/wallpaper.toml;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.mySystem.desktop.wallpaper.enable =
|
||||||
|
lib.mkEnableOption "Enable rotating wallpaper via wpaperd";
|
||||||
|
|
||||||
# Systemd user service
|
config = lib.mkIf (config.mySystem.desktop.wallpaper.enable or false) {
|
||||||
systemd.user.services.wpaperd = {
|
|
||||||
description = "wpaperd wallpaper daemon";
|
# Home Manager context
|
||||||
wantedBy = [ "default.target" ];
|
home-manager.users.henrov = {
|
||||||
serviceConfig = {
|
|
||||||
Type = "simple";
|
home.packages = [ pkgs.wpaperd ];
|
||||||
ExecStart = "${pkgs.wpaperd}/bin/wpaperd --config ${config.home.homeDirectory}/.config/wpaperd/wallpaper.toml";
|
|
||||||
Restart = "on-failure";
|
home.file.".config/wpaperd/wallpaper.toml".source =
|
||||||
RestartSec = 1;
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
flake.nixosModules.rotating-wallpaper = { config, pkgs, lib, ... }:
|
||||||
home.packages = [ pkgs.wpaperd ];
|
|
||||||
|
|
||||||
# Plaats wallpaper.toml automatisch in $HOME/.config/wpaperd
|
let
|
||||||
home.file.".config/wpaperd/wallpaper.toml".source = wallpaperConf;
|
wallpaperConf = ../../../assets/hyprland/wallpaperstuff/wallpaper.toml;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.mySystem.desktop.wallpaper.enable =
|
||||||
|
lib.mkEnableOption "Enable rotating wallpaper via wpaperd";
|
||||||
|
|
||||||
# Systemd user service
|
config = lib.mkIf (config.mySystem.desktop.wallpaper.enable or false) {
|
||||||
systemd.user.services.wpaperd = {
|
|
||||||
description = "wpaperd wallpaper daemon";
|
# Home Manager context
|
||||||
wantedBy = [ "default.target" ];
|
home-manager.users.henrov = {
|
||||||
serviceConfig = {
|
|
||||||
Type = "simple";
|
home.packages = [ pkgs.wpaperd ];
|
||||||
ExecStart = "${pkgs.wpaperd}/bin/wpaperd --config ${config.home.homeDirectory}/.config/wpaperd/wallpaper.toml";
|
|
||||||
Restart = "on-failure";
|
home.file.".config/wpaperd/wallpaper.toml".source =
|
||||||
RestartSec = 1;
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user