Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions modules/hyprlock/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ mkTarget {
(
{ cfg, image }:
{
programs.hyprlock.settings.background.path = lib.mkIf cfg.useWallpaper "${
image
}";
programs.hyprlock.settings.background.path = lib.mkIf cfg.useWallpaper image;
}
)
(
Expand Down
2 changes: 1 addition & 1 deletion modules/hyprpaper/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mkTarget {
{ image }:
{
services.hyprpaper.settings = {
preload = [ "${image}" ];
preload = [ image ];
wallpaper = [ ",${image}" ];
};
};
Expand Down
14 changes: 5 additions & 9 deletions stylix/palette.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ in
};

image = lib.mkOption {
type = lib.types.nullOr lib.types.path;
# Ensure the path is copied to the store
apply =
value: if value == null || lib.isDerivation value then value else "${value}";
type = with lib.types; nullOr (coercedTo path (src: "${src}") pathInStore);
description = ''
Wallpaper image.

Expand Down Expand Up @@ -80,12 +78,10 @@ in
# and not anything indirect such as filling a template, otherwise
# the output of the palette generator will not be protected from
# garbage collection.
default = pkgs.runCommand "palette.json" { } ''
${lib.getExe cfg.paletteGenerator} \
"${cfg.polarity}" \
${lib.escapeShellArg cfg.image} \
"$out"
'';
default = pkgs.runCommand "palette.json" {
inherit (cfg) image polarity;
nativeBuildInputs = [ cfg.paletteGenerator ];
} ''palette-generator "$polarity" "$image" "$out"'';
};

palette = lib.mkOption {
Expand Down