forked from AdisonCavani/distro-grub-themes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
40 lines (35 loc) · 1.16 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
{
description = "A pack of GRUB2 themes for each Linux distribution";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{ self, nixpkgs, flake-utils }:
let
systems = [ "aarch64-linux" "i686-linux" "x86_64-linux" ];
in
flake-utils.lib.eachSystem systems (
system:
let
pkgs = import nixpkgs { inherit system; };
themeNames = builtins.attrNames (builtins.readDir ./assets/backgrounds);
themePackages = builtins.listToAttrs (builtins.map
(theme:
let name = (builtins.head (pkgs.lib.strings.splitString "." theme)); in {
name = name + "-grub-theme";
value = pkgs.callPackage ./build/default.nix { theme = name; };
})
themeNames);
in
{
packages = {
default = pkgs.callPackage ./build/default.nix { theme = "nixos"; };
} // themePackages;
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ nixd nixpkgs-fmt act jq ];
};
nixosModules.default = ./build/module.nix;
}
);
}