Compare commits

..

No commits in common. "master" and "v3.2" have entirely different histories.
master ... v3.2

90 changed files with 7 additions and 319 deletions

View file

@ -1,57 +0,0 @@
name: Check nix packages
on:
pull_request:
paths:
- "./*.nix"
- ".github/workflows/nix.yml"
- "assets/**"
- "customize/**"
push:
branches: [master]
paths:
- "./*.nix"
- ".github/workflows/nix.yml"
- "assets/**"
- "customize/**"
jobs:
flake:
name: Check flake
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Nix flake inputs
uses: DeterminateSystems/flake-checker-action@v5
with:
send-statistics: false
fail-mode: true
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v9
- name: Check repository
run: nix flake check
matrix:
name: Generate build matrix
runs-on: ubuntu-latest
outputs:
themes: ${{ steps.generate-matrix.outputs.themes }}
steps:
- uses: actions/checkout@v4
- name: Generate matrix
id: generate-matrix
run: |
THEMES=$(ls assets/backgrounds/ | sed 's/\.png$//g' | jq --raw-input | jq --slurp -c)
echo "themes=$THEMES" >> $GITHUB_OUTPUT
build:
name: Check nix build for theme ${{ matrix.theme }}
runs-on: ubuntu-latest
needs:
- matrix
strategy:
matrix:
theme: ${{ fromJSON(needs.matrix.outputs.themes) }}
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v9
- name: Build package
run: nix build .#${{ matrix.theme }}-grub-theme

4
.gitignore vendored
View file

@ -1,4 +0,0 @@
.envrc
.direnv
.vscode
result

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

View file

@ -1,28 +0,0 @@
{ stdenvNoCC, lib, theme }:
let
themes = builtins.map (theme: (builtins.head (lib.strings.splitString "." theme))) (builtins.attrNames (builtins.readDir ./../assets/backgrounds));
in
assert builtins.any (x: x == theme) themes;
stdenvNoCC.mkDerivation {
name = "distro-grub-themes";
src = ./../.;
installPhase = ''
mkdir -p $out
cp ./assets/backgrounds/${theme}.png $out/background.png
cp ./assets/splash_image.jpg $out/splash_image.jpg
cp -r ./assets/icons $out
cp -r ./assets/fonts/. $out
cp -r ./assets/menu/. $out
cp -r ./assets/theme.txt $out
'';
meta = with lib; {
homepage = "https://github.com/AdisonCavani/distro-grub-themes";
description = "A pack of GRUB2 themes for each Linux distribution";
license = licenses.gpl3;
maintainers = with maintainers; [ zakuciael ];
platforms = platforms.linux;
};
}

View file

@ -1,28 +0,0 @@
{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.distro-grub-themes;
themes = builtins.map (theme: (builtins.head (lib.strings.splitString "." theme))) (builtins.attrNames (builtins.readDir ./../assets/backgrounds));
in
{
options.distro-grub-themes = {
enable = mkEnableOption "Enable Distro Grub Theme";
theme = mkOption {
type = types.enum themes;
default = "nixos";
example = "arch-linux";
description = ''
Selected theme name.
IMPORTANT! Theme name must be the same as in assert/backgrounds directory without the extension
'';
};
};
config = mkIf (cfg.enable)
{
boot.loader.grub = {
theme = pkgs.callPackage ./default.nix { theme = cfg.theme; };
splashImage = ./../assets/splash_image.jpg;
};
};
}

View file

@ -84,84 +84,6 @@ sudo eopkg install grub-customizer
To revert back to the orignal KDE Neon theme, open GRUB Customizer, and in the Appearance settings tab, change the theme dropdown back to breeze.
</Callout>
## Installation via Nix Flakes
### Prerequisites
- Nix 2.4 or later
- Experimental features `nix-command` and `flakes` enabled.
- You can achive that by setting the following options and rebuilding your system.
```nix:configuration.nix
nix = {
package = pkgs.nixFlakes;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
```
### NixOS module
To use this theme as a NixOS module, a bare-minimum configuration would be as follows:
```nix:flake.nix
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
distro-grub-themes.url = "github:AdisonCavani/distro-grub-themes";
};
outputs = { self, nixpkgs, ... }@inputs: {
nixosConfigurations."default" = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
./configuration.nix
inputs.distro-grub-themes.nixosModules.${system}.default
];
};
};
}
```
```nix:configuration.nix
{ config, pkgs, lib, ... }: {
distro-grub-themes = {
enable = true;
theme = "<theme_name>";
};
}
```
### Standalone setup
To use this theme in a standalone setup, a bare-minimum configuration would be as follows:
```nix:flake.nix
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
distro-grub-themes.url = "github:AdisonCavani/distro-grub-themes";
};
outputs = { self, nixpkgs, ... }@inputs: {
nixosConfigurations."default" = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = {
# Pass system and inputs to the configuration.nix file
inherit system inputs;
};
modules = [
./configuration.nix
];
};
};
}
```
```nix:configuration.nix
{ config, pkgs, lib, inputs, system, ... }: {
boot.loader.grub = rec {
theme = inputs.distro-grub-themes.packages.${system}.<theme_name>-grub-theme;
splashImage = "${theme}/splash_image.jpg";
};
}
```
## Manual Installation
In order to clone the repository from GitHub, you have to install Git, via the `git` package.
@ -186,15 +108,15 @@ sudo mkdir BOOT_GRUB_LOCATION/themes
#### Edit or use a pre-made theme
```shell
cd distro-grub-themes/themes
cd distro-grub-themes/customize
```
#### Copy theme
The theme must be unpacked inside a folder before you can install it.
The theme must be unpacked inside a folder before you can copy it.
```
sudo tar -C BOOT_GRUB_LOCATION/themes/<theme_name> -xf <theme_name>.tar
sudo cp -r <theme_name>/ BOOT_GRUB_LOCATION/themes
```
#### Edit GRUB config

61
flake.lock generated
View file

@ -1,61 +0,0 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1731676054,
"narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View file

@ -1,40 +0,0 @@
{
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;
}
);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

View file

@ -12,6 +12,9 @@
{
"name": "Bedrock Linux"
},
{
"name": "CentOS"
},
{
"name": "Debian"
},
@ -133,10 +136,6 @@
{
"name": "Vanilla OS",
"versionAdded": "v3.2"
},
{
"name": "CentOS",
"versionAdded": "v3.3"
}
],
"vendors": [
@ -161,9 +160,6 @@
{
"name": "Framework"
},
{
"name": "Framework 13"
},
{
"name": "Gigabyte"
},
@ -224,18 +220,6 @@
{
"name": "Medion",
"versionAdded": "v3.2"
},
{
"name": "Supermicro",
"versionAdded": "v3.3"
},
{
"name": "Fujitsu",
"versionAdded": "v3.3"
},
{
"name": "HP Omen",
"versionAdded": "v3.3"
}
]
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.