dotfiles/modules/programs/wallpaper/default.nix

38 lines
624 B
Nix
Raw Normal View History

{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.my.programs.wallpaper;
script = pkgs.writeShellApplication {
name = "wallpaper";
2024-04-22 09:35:04 +02:00
runtimeInputs = with pkgs; [
findutils
coreutils
feh
swaybg
fzf
(viu.override { withSixel = true; })
];
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
];
};
}