nixconf/modules/features/layers/wallpapers.nix
2026-03-28 20:32:24 -05:00

29 lines
671 B
Nix

{ self, inputs, ... }:
{
flake.nixosModules.wallpapers =
{
pkgs,
lib,
config,
...
}:
{
options.wallpaper-destinations = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [];
description = "Destination paths for wallpapers";
};
config = {
hjem.users."${config.username}" = {
enable = true;
files = lib.genAttrs config.wallpaper-destinations (_: {
source = pkgs.runCommand "wallpapers" { } ''
mkdir -p $out
cp -r ${../../../assets/wallpapers}/* $out/
'';
});
};
};
};
}