diff --git a/ci/release.nix b/ci/release.nix new file mode 100644 index 0000000..a1bc098 --- /dev/null +++ b/ci/release.nix @@ -0,0 +1,12 @@ +{ + linkFarmFromDrvs, + lib, + grubshin-bootpact, +}: let + collect = lib.flip lib.mapAttrsToList; + + resolutionsList = _: builtins.attrValues; + layoutsList = _: layout: lib.flatten (collect layout resolutionsList); + colorschemesList = colorschemes: lib.flatten (collect colorschemes layoutsList); +in + linkFarmFromDrvs "release" (colorschemesList grubshin-bootpact) diff --git a/flake.lock b/flake.lock index 0bbb778..1a5d80d 100644 --- a/flake.lock +++ b/flake.lock @@ -7,18 +7,17 @@ ] }, "locked": { - "lastModified": 1732750192, - "narHash": "sha256-Dd17p65wUmA6QCGiPqxw0BCdWpsVdSGRznNXIaKQu/A=", - "owner": "max-ishere", - "repo": "grub-theme.nix", - "rev": "7274df40b1658d7f575888f06ce64a35e17dcfc9", - "type": "github" + "lastModified": 1733163819, + "narHash": "sha256-fC+v0YIcU/lY0Hu9qCZIhT6Pc9uJUclC31kQ0Gg2vjo=", + "ref": "refs/heads/main", + "rev": "9e0c57a412d72e97487f40d8569d3910d41cbc74", + "revCount": 2, + "type": "git", + "url": "file:///home/max_ishere/Projects/grub-theme.nix" }, "original": { - "owner": "max-ishere", - "ref": "main", - "repo": "grub-theme.nix", - "type": "github" + "type": "git", + "url": "file:///home/max_ishere/Projects/grub-theme.nix" } }, "hywenhei-extended-font": { diff --git a/flake.nix b/flake.nix index cbdccb6..4ce373f 100644 --- a/flake.nix +++ b/flake.nix @@ -39,6 +39,11 @@ grubTheme = grubTheme.lib; }; + # Internal CI build stuff + _ci = { + release = pkgs.callPackage ./ci/release.nix {grubshin-bootpact = lib.filterAttrs (name: _: !(name == "override" || name == "overrideDerivation")) self.packages.${system};}; + }; + devShells.${system} = { default = pkgs.mkShell { buildInputs = with pkgs; [ diff --git a/nix/layout/classic/default.nix b/nix/layout/classic/default.nix index e305674..1bf53ba 100644 --- a/nix/layout/classic/default.nix +++ b/nix/layout/classic/default.nix @@ -4,6 +4,7 @@ component, grubTheme, colors, + colorscheme, }: let inherit (grubTheme) mkComponent; resoltions = import ./resolutions {inherit hywenhei-extended-font;}; @@ -17,7 +18,7 @@ in }: let layout = import ./layout.nix {inherit grubTheme lib logo line elements fonts;}; in - component.bundleThemeTxtAssets "classic-${resolution}" + component.bundleThemeTxtAssets "classic-${colorscheme}-${resolution}" ({ image, font, diff --git a/nix/layout/default.nix b/nix/layout/default.nix index a925be0..60c51a2 100644 --- a/nix/layout/default.nix +++ b/nix/layout/default.nix @@ -1,11 +1,12 @@ { + hywenhei-extended-font, lib, - component, grubTheme, + component, colors, - hywenhei-extended-font, + colorscheme, }: let in { - classic = import ./classic {inherit lib hywenhei-extended-font component grubTheme colors;}; - teleport = import ./teleport {inherit lib hywenhei-extended-font component grubTheme colors;}; + classic = import ./classic {inherit lib hywenhei-extended-font component grubTheme colors colorscheme;}; + teleport = import ./teleport {inherit lib hywenhei-extended-font component grubTheme colors colorscheme;}; } diff --git a/nix/layout/teleport/default.nix b/nix/layout/teleport/default.nix index cd23cd3..80aecb0 100644 --- a/nix/layout/teleport/default.nix +++ b/nix/layout/teleport/default.nix @@ -4,6 +4,7 @@ grubTheme, component, colors, + colorscheme, }: let inherit (grubTheme) mkComponent irel; resoltions = import ./resolutions {inherit hywenhei-extended-font;}; @@ -16,7 +17,7 @@ in }: let layout = import ./layout.nix {inherit grubTheme lib line menu elements fonts;}; in - component.bundleThemeTxtAssets "teleport-${resolution}" + component.bundleThemeTxtAssets "teleport-${colorscheme}-${resolution}" ({ image, font, diff --git a/nix/theme.nix b/nix/theme.nix index 528f753..c16c6ab 100644 --- a/nix/theme.nix +++ b/nix/theme.nix @@ -8,7 +8,7 @@ grubTheme, hywenhei-extended-font, }: -builtins.mapAttrs (_: colors: let +builtins.mapAttrs (colorscheme: colors: let svg = import ./svg {inherit stdenv runCommand lib resvg colors writeText;}; component = import ./component { inherit stdenv runCommand lib grub2 colors svg grubTheme; @@ -16,7 +16,7 @@ builtins.mapAttrs (_: colors: let in { inherit svg component; layout = import ./layout { - inherit lib component grubTheme colors hywenhei-extended-font; + inherit lib component grubTheme colors hywenhei-extended-font colorscheme; }; }) (import ./colorschemes.nix)