Setting up rotating wallpapers

This commit is contained in:
2026-03-17 15:35:35 +00:00
parent 7957cccb8c
commit 1c7f74348c
115 changed files with 165 additions and 2036 deletions
+73 -34
View File
@@ -760,7 +760,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -770,9 +770,48 @@ This is top file of this level which contains just an import statement for all r
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
./rotating_wallpaper
];
# .. put any code here
}
#+END_SRC
** =generated/hyprland/decorations/rotating_wallpaper.nix=
rotating_wallpaper.nix installs wpaperd and deploys your wallpaper files from the repo (./assets/copy_2_root/wallpaperstuff/) into ~/wallpaperstuff/.
You can edit assets/copy_2_root/wallpaperstuff/wallpaper.conf 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.
#+BEGIN_SRC nix :tangle generated/hyprland/decorations/rotating_wallpaper.nix :noweb tangle :mkdirp yes :eval never-html
{ lib, config, pkgs, ... }:
let
# Define source and destination paths
source_path = "${flakeRoot}/assets/hyprland/wallpaperstuff";
destination_path = "${config.home.username}/Droidnix/wallpaperstuff";
wallpaper_conf = "${destination_path}/wallpaper.conf";
# wallpaper_conf = "${flakeRoot}/assets/hyprland/wallpaperstuff/wallpaper.conf";
in {
options = {
wallpaper.enable = lib.mkEnableOption "Wallpaper setup";
};
config = lib.mkIf config.wallpaper.enable {
# Ensure the destination directory exists
home-manager.users.${config.home.username}.home.file."${destination_path}".createDir = true;
# Copy all files from source to destination
home-manager.users.${config.home.username}.home.file."${destination_path}".source = lib.genAttrs (builtins.attrNames (builtins.readDir source_path)) (name: {
source = "${source_path}/${name}";
target = "${destination_path}/${name}";
recursive = true;
onChange = "copy";
});
# Install wpaperd
home-manager.users.${config.home.username}.home.packages = [ pkgs.wpaperd ];
# Configure wpaperd
home-manager.users.${config.home.username}.home.file."${config.home.homeDirectory}/.config/wpaperd/config.toml".text = wallpaper_conf
];
};
}
#+END_SRC
@@ -784,7 +823,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -796,7 +835,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -808,7 +847,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -820,7 +859,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -836,7 +875,7 @@ This is top file of this level which contains just an import statement for all r
./development/top.nix
./system_management/top.nix
];
# .. put any code here
}
#+END_SRC
@@ -1226,7 +1265,7 @@ This is top file of this level which contains just an import statement for all r
./virtualization/top.nix
./web_development/top.nix
];
# .. put any code here
}
#+END_SRC
@@ -1250,7 +1289,7 @@ This is top file of this level which contains just an import statement for all r
./security/top.nix
./system_updates/top.nix
];
# .. put any code here
}
#+END_SRC
@@ -1263,7 +1302,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -1324,7 +1363,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -1336,7 +1375,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -1348,7 +1387,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -1363,7 +1402,7 @@ This is top file of this level which contains just an import statement for all r
./zsh.nix
./emacs.nix
];
# .. put any code here
}
#+END_SRC
@@ -2115,7 +2154,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -2127,7 +2166,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -2139,7 +2178,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -2151,7 +2190,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -2163,7 +2202,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -2175,7 +2214,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -2187,7 +2226,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -2199,7 +2238,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -2211,7 +2250,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -2223,7 +2262,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -2235,7 +2274,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -2247,7 +2286,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -2259,7 +2298,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -2271,7 +2310,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -2283,7 +2322,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -2295,7 +2334,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -2307,7 +2346,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -2319,7 +2358,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
# No subfolders to import
];
# .. put any code here
}
#+END_SRC
@@ -2331,7 +2370,7 @@ This is top file of this level which contains just an import statement for all r
imports = [
./wofi.nix
];
# .. put any code here
}
#+END_SRC