feat(wallpaper): add better wallpaper module

This commit is contained in:
Moritz Böhme 2023-05-07 13:53:31 +02:00
parent 326b14d39a
commit 3e9468d872
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
8 changed files with 99 additions and 23 deletions

View file

@ -0,0 +1,24 @@
{ 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
];
};
}