more rice stuff
This commit is contained in:
1 parent
3a345929b9
commit
e2d34c6d1e
7 files changed
+156
-45
No files matched your search
@@ -0,0 +1,26 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.my.wallpapers;
|
||||
args = lib.concatStringsSep " " (lib.mapAttrsToList
|
||||
(monitor: img: "--output ${monitor} --zoom ${lib.escapeShellArg img}") cfg);
|
||||
in
|
||||
{
|
||||
options.my.wallpapers = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.path;
|
||||
default = { };
|
||||
description = "Wallpaper image per monitor output name.";
|
||||
};
|
||||
|
||||
config = lib.mkIf (cfg != { }) {
|
||||
home.packages = [ pkgs.xwallpaper ];
|
||||
|
||||
xdg.configFile."wallpaper/set.sh" = {
|
||||
executable = true;
|
||||
text = ''
|
||||
#!/bin/sh
|
||||
${pkgs.xwallpaper}/bin/xwallpaper ${args}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user