30 lines
556 B
Nix
30 lines
556 B
Nix
{ lib, config, pkgs, ... }:
|
|
|
|
|
|
with lib;
|
|
let
|
|
cfg = config.my.programs.wallpaper;
|
|
|
|
|
|
script = pkgs.writeShellApplication {
|
|
name = "wallpaper";
|
|
runtimeInputs = with pkgs; [ findutils coreutils feh hyprland jq fzf viu ];
|
|
text = builtins.readFile ./wallpaper.sh;
|
|
};
|
|
in
|
|
{
|
|
options.my.programs.wallpaper = {
|
|
enable = mkEnableOption "wallpaper";
|
|
package = mkOption {
|
|
type = types.package;
|
|
default = script;
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
environment.systemPackages =
|
|
[
|
|
cfg.package
|
|
];
|
|
};
|
|
}
|