Merge pull request #91 from Gurjaka/main

feat: add installation with nix flake
This commit is contained in:
AngelJumbo
2025-11-04 10:05:51 -05:00
committed by GitHub
2 changed files with 75 additions and 0 deletions
Generated
+27
View File
@@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1761907660,
"narHash": "sha256-kJ8lIZsiPOmbkJypG+B5sReDXSD1KGu2VEPNqhRa/ew=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2fb006b87f04c4d3bdf08cfdbc7fab9c13d94a15",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}
+48
View File
@@ -0,0 +1,48 @@
{
description = "Gruvbox-inspired wallpaper collection";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
outputs = {
self,
nixpkgs,
}: let
systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f (import nixpkgs {inherit system;}));
mkWallpapersPkg = pkgs: name: path:
pkgs.stdenv.mkDerivation {
pname = "gruvbox-wallpapers-${name}";
version = self.shortRev or "dev";
src = ./.;
installPhase = ''
mkdir -p $out
${
if name == "default"
then "find wallpapers -type f -exec cp {} $out/ \\;"
else "cp -r ${path}/* $out/"
}
'';
};
subdirs = {
default = "wallpapers";
anime = "wallpapers/anime";
brands = "wallpapers/brands";
game = "wallpapers/game";
minimalistic = "wallpapers/minimalistic";
mix = "wallpapers/mix";
painting = "wallpapers/painting";
photography = "wallpapers/photography";
pixelart = "wallpapers/pixelart";
renders = "wallpapers/renders";
};
in {
formatter = forAllSystems (pkgs: pkgs.alejandra);
packages = forAllSystems (
pkgs:
nixpkgs.lib.mapAttrs (name: path: mkWallpapersPkg pkgs name path) subdirs
);
};
}