Skip to content

Commit

Permalink
don't pull wallpaper from flake, use fetchGit
Browse files Browse the repository at this point in the history
  • Loading branch information
alyraffauf committed Jul 9, 2024
1 parent b58d22e commit 46b62b6
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
5 changes: 0 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@
inputs.nixpkgs.follows = "nixpkgs";
url = "github:alyraffauf/raffauflabs";
};

wallpapers = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:alyraffauf/wallpapers";
};
};

nixConfig = {
Expand Down
6 changes: 6 additions & 0 deletions homeManagerModules/desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
) "file://${config.home.homeDirectory}/sync";

xdg = {
dataFile."backgrounds".source = builtins.fetchGit {
url = "https://github.com/alyraffauf/wallpapers.git";
rev = "7603a8aa36b0d8d76bd9fd80d19e8b601e4839aa";
ref = "master";
};

userDirs = {
enable = true;
createDirectories = true;
Expand Down
2 changes: 1 addition & 1 deletion homeManagerModules/desktop/hyprland/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
pkgs.writers.writeRuby "hyprland-randomWallpaper" {} ''
require 'fileutils'
directory = "${self.inputs.wallpapers.packages.${pkgs.system}.default}/share/backgrounds"
directory = "${config.xdg.dataHome}/backgrounds/"
hyprctl = "${lib.getExe' config.wayland.windowManager.hyprland.package "hyprctl"}"
old_pids = []
Expand Down
2 changes: 1 addition & 1 deletion homeManagerModules/desktop/sway/randomWallpaper.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
kill `pidof swaybg`
OLD_PIDS=()
directory=${self.inputs.wallpapers.packages.${pkgs.system}.default}/share/backgrounds
directory=${config.xdg.dataHome}/backgrounds
if [ -d "$directory" ]; then
while true; do
Expand Down
4 changes: 2 additions & 2 deletions homeManagerModules/options.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
config,
inputs,
lib,
osConfig,
pkgs,
self,
...
}: let
cfg = config.ar.home;
Expand Down Expand Up @@ -284,7 +284,7 @@ in {

wallpaper = lib.mkOption {
description = "Default wallpaper.";
default = "${inputs.wallpapers.packages.${pkgs.system}.defaults}/share/backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg";
default = "${config.xdg.dataHome}/backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg";
type = lib.types.str;
};
};
Expand Down
2 changes: 1 addition & 1 deletion homes/aly/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ self: {

theme = {
enable = true;
wallpaper = "${self.inputs.wallpapers.packages.${pkgs.system}.default}/share/backgrounds/wallhaven-3led2d.jpg";
wallpaper = "${config.xdg.dataHome}/backgrounds/wallhaven-3led2d.jpg";
};
};
}
2 changes: 1 addition & 1 deletion homes/dustin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ self: {

theme = {
enable = true;
wallpaper = "${self.inputs.wallpapers.packages.${pkgs.system}.default}/share/backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg";
wallpaper = "${config.xdg.dataHome}/backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg";
};
};
}

0 comments on commit 46b62b6

Please sign in to comment.