-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
80 lines (69 loc) · 1.92 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
description = ''
A collection of various wallpapers, packed with a Nix Flake
for easier organization and curation.
'';
outputs = {
self,
nixpkgs,
}: let
inherit (nixpkgs) lib;
genSystems = lib.genAttrs [
# Add more systems if they are supported
"aarch64-linux"
"aarch64-darwin"
"x86_64-linux"
"x86_64-darwin"
];
pkgsFor = nixpkgs.legacyPackages;
version = props.version + "_" + (self.shortRev or "dirty");
props = builtins.fromJSON (builtins.readFile ./nix/props.json);
/*
mkDate = longDate: (lib.concatStringsSep "-" [
(builtins.substring 0 4 longDate)
(builtins.substring 4 2 longDate)
(builtins.substring 6 2 longDate)
]);
*/
in {
overlays.default = _: prev: let
stdenv = prev.stdenvNoCC;
in rec {
full = wallpkgs;
wallpkgs = prev.callPackage ./nix/default.nix {
inherit version stdenv;
style = null;
};
catppuccin = prev.callPackage ./nix/default.nix {
inherit version stdenv;
style = "catppuccin";
};
cities = prev.callPackage ./nix/default.nix {
inherit version stdenv;
style = "cities";
};
monochrome = prev.callPackage ./nix/default.nix {
inherit version stdenv;
style = "monochrome";
};
nature = prev.callPackage ./nix/default.nix {
inherit version stdenv;
style = "nature";
};
space = prev.callPackage ./nix/default.nix {
inherit version stdenv;
style = "space";
};
unorganized = prev.callPackage ./nix/default.nix {
inherit version stdenv;
style = "unorganized";
};
};
packages = genSystems (system:
(self.overlays.default null pkgsFor.${system})
// {
default = self.packages.${system}.wallpkgs;
});
formatter = genSystems (system: pkgsFor.${system}.alejandra);
};
}