sway: Include wallpaper

restic-rest-server
Simon Bruder 2020-12-02 21:39:42 +01:00
parent 10b9dd5a84
commit a04a0e1543
No known key found for this signature in database
GPG Key ID: 6F03E0000CC5B62F
1 changed files with 27 additions and 1 deletions

View File

@ -3,7 +3,33 @@ let
common = import ./common.nix;
solarized = common.colorschemes.solarized;
wallpaper = "${config.xdg.configHome}/sway/wallpaper"; # Symlink to the current wallpaper
wallpaper = pkgs.stdenv.mkDerivation {
name = "wallpaper";
src = pkgs.fetchurl {
url = "https://i.pximg.net/img-original/img/2013/10/22/04/25/37/39266182_p0.jpg";
sha256 = "053gc9jd4cbkkwgcirrhpzbn933dfh83l30p1sz55m5d8zx1lk65";
curlOpts = "--referer https://pixiv.net";
};
nativeBuildInputs = [
pkgs.unstable.waifu2x-converter-cpp
];
# -o $out does not work (why?)
buildPhase = ''
waifu2x-converter-cpp -i $src -o wallpaper.png
'';
installPhase = ''
cp wallpaper.png $out
'';
dontUnpack = true;
dontConfigure = true;
dontFixup = true;
};
cfg = config.wayland.windowManager.sway.config;
thinsp = "";
in