feat(hyprland): add random wallpaper service
This commit is contained in:
parent
f02b3ae0ea
commit
f9fd542206
4 changed files with 70 additions and 42 deletions
|
|
@ -4,21 +4,27 @@
|
|||
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";
|
||||
options.my.programs.wallpaper = {
|
||||
enable = mkEnableOption "wallpaper";
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = script;
|
||||
};
|
||||
};
|
||||
|
||||
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
|
||||
cfg.package
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue