diff --git a/flake.lock b/flake.lock index 933c93cd..10ee24c6 100644 --- a/flake.lock +++ b/flake.lock @@ -309,11 +309,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1720092067, - "narHash": "sha256-ebMlTz4wm+Md5BkCk6uGcRUvOvyjtc4bENvVSO5jrBI=", + "lastModified": 1720213509, + "narHash": "sha256-aPYf8Jnu1fMgMYMgQnH433/Fcqfky1Z5ZuzCkNKcR1U=", "ref": "refs/heads/main", - "rev": "0a6e83005f1910b5c1ec78476fcffc05af47833a", - "revCount": 4906, + "rev": "cc98594c3aed0b542e03818371a4636f549f80e1", + "revCount": 4908, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -506,11 +506,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1719956923, - "narHash": "sha256-nNJHJ9kfPdzYsCOlHOnbiiyKjZUW5sWbwx3cakg3/C4=", + "lastModified": 1720110830, + "narHash": "sha256-E5dN9GDV4LwMEduhBLSkyEz51zM17XkWZ3/9luvNOPs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "706eef542dec88cc0ed25b9075d3037564b2d164", + "rev": "c0d0be00d4ecc4b51d2d6948e37466194c1e6c51", "type": "github" }, "original": { @@ -550,11 +550,11 @@ }, "nur": { "locked": { - "lastModified": 1720159001, - "narHash": "sha256-odlNfxYg1cQXYqGdJMNb6NFJp0wGwxbRl/rXqwWyatE=", + "lastModified": 1720238698, + "narHash": "sha256-9RhDCWVmR85eUWUWEJXUxGD/lVow9kQAghNkWEedbmk=", "owner": "nix-community", "repo": "NUR", - "rev": "df5671c64b8c0978f6083e11f36b0d802d0c9aea", + "rev": "f0636c1832d48659b0afff89a168cc1a76b871f4", "type": "github" }, "original": { @@ -570,11 +570,11 @@ ] }, "locked": { - "lastModified": 1720224769, - "narHash": "sha256-n2wxe8CDZCMRmA7PXN/+OAoqvoDu+hbqmVNKNMyDX8Q=", + "lastModified": 1720232163, + "narHash": "sha256-zcIC0qsSnr8xZIgdUm2bzfQOZaFYmaYU0vOFqpGhzXg=", "owner": "alyraffauf", "repo": "raffauflabs", - "rev": "912f73b0d0891ac272721c60ae2da43dbf06778b", + "rev": "60074d939e3ad23ccca4082c052a2ece5cc60c8e", "type": "github" }, "original": { @@ -594,7 +594,8 @@ "nixpkgsUnstable": "nixpkgsUnstable", "nixvim": "nixvim", "nur": "nur", - "raffauflabs": "raffauflabs" + "raffauflabs": "raffauflabs", + "wallpapers": "wallpapers" } }, "systems": { @@ -678,6 +679,26 @@ "type": "github" } }, + "wallpapers": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1720239911, + "narHash": "sha256-5jo6v4d4y0dcxdBHqlSOKhvQszvLomANgE1rRYN9/D0=", + "owner": "alyraffauf", + "repo": "wallpapers", + "rev": "91b46bd86441e3c1c07c48b641a15b3203d6d971", + "type": "github" + }, + "original": { + "owner": "alyraffauf", + "repo": "wallpapers", + "type": "github" + } + }, "xdph": { "inputs": { "hyprland-protocols": "hyprland-protocols", diff --git a/flake.nix b/flake.nix index f514a278..d4be5d4e 100644 --- a/flake.nix +++ b/flake.nix @@ -43,6 +43,12 @@ }; nur.url = github:nix-community/NUR; + + # My wallpapers + wallpapers = { + url = "github:alyraffauf/wallpapers"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; nixConfig = { @@ -127,6 +133,7 @@ { home-manager = { backupFileExtension = "backup"; + extraSpecialArgs = {inherit inputs self;}; sharedModules = [ inputs.agenix.homeManagerModules.default diff --git a/homeManagerModules/desktop/default.nix b/homeManagerModules/desktop/default.nix index 6a134e2d..d0aa658b 100644 --- a/homeManagerModules/desktop/default.nix +++ b/homeManagerModules/desktop/default.nix @@ -49,12 +49,6 @@ ) "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; diff --git a/homeManagerModules/desktop/hyprland/default.nix b/homeManagerModules/desktop/hyprland/default.nix index 009a9fef..fed48466 100644 --- a/homeManagerModules/desktop/hyprland/default.nix +++ b/homeManagerModules/desktop/hyprland/default.nix @@ -33,7 +33,7 @@ pkgs.writers.writeRuby "hyprland-randomWallpaper" {} '' require 'fileutils' - directory = "${config.xdg.dataHome}/backgrounds" + directory = "${pkgs.alyraffauf-wallpapers}/share/backgrounds" hyprctl = "${lib.getExe' config.wayland.windowManager.hyprland.package "hyprctl"}" old_pids = [] diff --git a/homeManagerModules/desktop/sway/randomWallpaper.nix b/homeManagerModules/desktop/sway/randomWallpaper.nix index 68c92e71..65f27a20 100644 --- a/homeManagerModules/desktop/sway/randomWallpaper.nix +++ b/homeManagerModules/desktop/sway/randomWallpaper.nix @@ -8,7 +8,7 @@ kill `pidof swaybg` OLD_PIDS=() - directory=${config.home.homeDirectory}/.local/share/backgrounds + directory=${pkgs.alyraffauf-wallpapers}/share/backgrounds if [ -d "$directory" ]; then while true; do diff --git a/homeManagerModules/options.nix b/homeManagerModules/options.nix index a22d2d38..cf3c011a 100644 --- a/homeManagerModules/options.nix +++ b/homeManagerModules/options.nix @@ -287,7 +287,7 @@ wallpaper = lib.mkOption { description = "Default wallpaper."; - default = "${config.xdg.dataHome}/backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg"; + default = "${pkgs.alyraffauf-wallpapers}/share/backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg"; type = lib.types.str; }; }; diff --git a/homes/aly/default.nix b/homes/aly/default.nix index bcd70d37..88771886 100644 --- a/homes/aly/default.nix +++ b/homes/aly/default.nix @@ -67,7 +67,7 @@ theme = { enable = true; - wallpaper = "${config.xdg.dataHome}/backgrounds/wallhaven-3led2d.jpg"; + wallpaper = "${pkgs.alyraffauf-wallpapers}/share/backgrounds/wallhaven-3led2d.jpg"; }; }; } diff --git a/homes/dustin/default.nix b/homes/dustin/default.nix index a010fd49..19bce063 100644 --- a/homes/dustin/default.nix +++ b/homes/dustin/default.nix @@ -43,7 +43,7 @@ theme = { enable = true; - wallpaper = "${config.xdg.dataHome}/backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg"; + wallpaper = "${pkgs.alyraffauf-wallpapers}/share/backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg"; }; }; } diff --git a/homes/morgan/default.nix b/homes/morgan/default.nix index 8a3514f0..c327293a 100644 --- a/homes/morgan/default.nix +++ b/homes/morgan/default.nix @@ -40,7 +40,7 @@ theme = { enable = true; - wallpaper = "${config.xdg.dataHome}/backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg"; + wallpaper = "${pkgs.alyraffauf-wallpapers}/share//backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg"; }; }; } diff --git a/nixosModules/apps/default.nix b/nixosModules/apps/default.nix index 23b15d44..0f91f74c 100644 --- a/nixosModules/apps/default.nix +++ b/nixosModules/apps/default.nix @@ -1,5 +1,6 @@ { pkgs, + inputs, lib, config, ... diff --git a/nixosModules/base/nixpkgs/default.nix b/nixosModules/base/nixpkgs/default.nix index 2d80d6f7..1f8e7ff4 100644 --- a/nixosModules/base/nixpkgs/default.nix +++ b/nixosModules/base/nixpkgs/default.nix @@ -46,6 +46,7 @@ }); xdg-desktop-portal-hyprland = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland; + alyraffauf-wallpapers = inputs.wallpapers.packages.${pkgs.system}.default; }) ]; }; diff --git a/nixosModules/desktop/default.nix b/nixosModules/desktop/default.nix index 71c2ea47..4e212e00 100644 --- a/nixosModules/desktop/default.nix +++ b/nixosModules/desktop/default.nix @@ -24,7 +24,10 @@ || config.ar.desktop.steam.enable || config.ar.desktop.sway.enable ) { - environment.sessionVariables.NIXOS_OZONE_WL = "1"; + environment = { + sessionVariables.NIXOS_OZONE_WL = "1"; + systemPackages = [pkgs.alyraffauf-wallpapers]; + }; fonts.packages = with pkgs; [ liberation_ttf