- Wyłączono `systemd-boot`, włączono `grub` z obsługą EFI. - Dodano własny motyw GRUB z grafiką `jablon.png` i plikiem `theme.txt`. - Motyw zawiera spersonalizowane kolory, czcionki i układ menu GRUB-a. - Dodano dodatkowy wpis menu GRUB-a zatytułowany „Mój system”. - Motyw kompilowany jest jako niestandardowe źródło w `pkgs.stdenv.mkDerivation`.
63 lines
1.5 KiB
Nix
63 lines
1.5 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
boot = {
|
|
# Kernel
|
|
kernelPackages = pkgs.linuxPackages_zen;
|
|
# This is for OBS Virtual Cam Support
|
|
kernelModules = ["v4l2loopback"];
|
|
extraModulePackages = [config.boot.kernelPackages.v4l2loopback];
|
|
# Needed For Some Steam Games
|
|
kernel.sysctl = {
|
|
"vm.max_map_count" = 2147483642;
|
|
};
|
|
# Bootloader.
|
|
loader = {
|
|
systemd-boot.enable = false;
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
grub = {
|
|
enable = true;
|
|
efiSupport = true;
|
|
device = "nodev";
|
|
theme = pkgs.stdenv.mkDerivation {
|
|
name = "garand-grub-theme";
|
|
src = ../../../config/garand-grub-theme;
|
|
|
|
buildPhase = ''
|
|
mkdir -p $out/grub/themes/garand-grub-theme
|
|
cp -r * $out/grub/themes/garand-grub-theme/
|
|
'';
|
|
|
|
installPhase = "true";
|
|
};
|
|
|
|
extraEntries = ''
|
|
menuentry "Mój system" {
|
|
# konfiguracja wpisu menu
|
|
}
|
|
'';
|
|
|
|
gfxmodeEfi = "1920x1080";
|
|
};
|
|
};
|
|
# Make /tmp a tmpfs
|
|
tmp = {
|
|
useTmpfs = false;
|
|
tmpfsSize = "30%";
|
|
};
|
|
# Appimage Support
|
|
binfmt.registrations.appimage = {
|
|
wrapInterpreterInShell = false;
|
|
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
|
|
recognitionType = "magic";
|
|
offset = 0;
|
|
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
|
|
magicOrExtension = ''\x7fELF....AI\x02'';
|
|
};
|
|
plymouth.enable = true;
|
|
};
|
|
}
|