dotfiles/modules/programs/wallpaper/default.nix

25 lines
507 B
Nix

{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.my.programs.wallpaper;
in
{
options.my.programs.wallpaper.enable = mkEnableOption "wallpaper";
config = mkIf cfg.enable {
environment.systemPackages =
let
wallpaper = pkgs.writeShellApplication {
name = "wallpaper";
runtimeInputs = with pkgs; [ findutils coreutils feh hyprland jq fzf viu ];
text = builtins.readFile ./wallpaper.sh;
};
in
[
wallpaper
];
};
}