Files
chiasson-nix/modules/desktop/wallpapers.nix
T
Olivier 2bdb173ac7 Refactor NixOS configurations to replace "NixOS-V2" with "chiasson-nix" across multiple modules
- Updated wallpaper module to reflect new naming convention for wallpapers.
- Changed author name in rbw-lock-toggle and wvkbd-toggle plugins to "chiasson.cloud".
- Modified ideapad configuration to use the new flake path.
- Adjusted yt-dlp-telequebec-overlay documentation to match new module structure.
- Corrected documentation reference in wisdom module to point to updated conventions.
2026-06-06 03:26:58 -03:00

53 lines
1.6 KiB
Nix

{ inputs, ... }: {
flake.nixosModules.desktopWallpapers =
{ config, lib, pkgs, ... }:
let
cfg = config.chiasson.desktop.wallpapers;
d = config.chiasson.desktop;
guiEnabled = d.hyprland.enable || d.niri.enable || d.plasma.enable;
wallpaperDir = pkgs.stdenvNoCC.mkDerivation {
pname = "chiasson-nix-wallpapers";
version = "0.1";
src = builtins.path {
path = cfg.source;
name = "wallpapers-src";
};
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p "$out/share/wallpapers"
find "$src" -mindepth 1 -maxdepth 1 ! -name .git -exec cp -a {} "$out/share/wallpapers/" \;
'';
};
installPath = "${wallpaperDir}/share/wallpapers";
in
{
options.chiasson.desktop.wallpapers = {
enable = lib.mkEnableOption ''
Copy `source` into the store; sets `CHIASSON_NIX_WALLPAPERS` and `/etc/wallpapers`.
'' // {
default = true;
};
source = lib.mkOption {
type = lib.types.path;
default = inputs.wallpapers;
description = ''
Directory copied into the store. Default: `inputs.wallpapers`
(`git+https://git.chiasson.cloud/Olivier/wallpapers`, pinned in `flake.lock`).
'';
};
};
config = lib.mkIf (guiEnabled && cfg.enable) {
environment = {
variables.CHIASSON_NIX_WALLPAPERS = installPath;
sessionVariables.CHIASSON_NIX_WALLPAPERS = installPath;
etc."wallpapers".source = installPath;
};
};
};
}