Files
nix-dotfiles-v2/home/wallpapers.nix
T
2025-08-29 02:23:00 +02:00

22 lines
516 B
Nix

{ lib, config, ... }:
let
# Path to your source folder of wallpapers
wallpaperSrc = ./Wallpapers;
# Read all file names in that directory
names = lib.attrNames (builtins.readDir wallpaperSrc);
# For each name, produce an attrset mapping
wallpaperFiles = map (name: {
# quoted string keys are valid attribute names
"Pictures/wallpapers/${name}" = {
source = "${wallpaperSrc}/${name}";
};
}) names;
in
{
# Merge them all under home.file
home.file = lib.mkMerge wallpaperFiles;
}