refactor: make plymouth module

This commit is contained in:
matt1432 2023-10-15 17:40:57 -04:00
parent 7005fc441d
commit c8013671bc
5 changed files with 63 additions and 57 deletions

View file

@ -1,54 +0,0 @@
{ config, pkgs, ... }:
{
boot = {
kernelPackages = pkgs.linuxPackages_latest;
consoleLogLevel = 0;
initrd = {
verbose = false;
systemd.enable = true;
};
loader = {
efi.canTouchEfiVariables = true;
timeout = 2;
grub = {
enable = true;
device = "nodev";
efiSupport = true;
extraConfig = ''
set timeout_style=hidden
'';
# Because it still draws that image otherwise
splashImage = null;
};
};
extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
];
kernelParams = [
"quiet"
"splash"
"boot.shell_on_fail"
"i915.fastboot=1"
"loglevel=3"
"rd.systemd.show_status=false"
"rd.udev.log_level=3"
"udev.log_priority=3"
"cryptdevice=UUID=ab82b477-2477-453f-b95f-28e5553ad10d:root"
"root=/dev/mapper/root"
];
plymouth = {
enable = true;
themePackages = [ pkgs.dracula-theme ];
theme = "dracula";
};
# https://github.com/NixOS/nixpkgs/issues/254807#issuecomment-1722351771
swraid.enable = false;
};
}

View file

@ -2,7 +2,6 @@
{ {
imports = [ imports = [
./boot.nix
./security.nix ./security.nix
./packages.nix ./packages.nix
]; ];

View file

@ -6,6 +6,7 @@
../../modules/audio.nix ../../modules/audio.nix
../../modules/kmscon.nix ../../modules/kmscon.nix
../../modules/plymouth.nix
../../modules/printer.nix ../../modules/printer.nix
./cfg/main.nix ./cfg/main.nix

View file

@ -1,13 +1,48 @@
{ config, modulesPath, ... }: { { config, modulesPath, pkgs, ... }: {
nixpkgs.hostPlatform = "x86_64-linux"; nixpkgs.hostPlatform = "x86_64-linux";
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot = { boot = {
kernelPackages = pkgs.linuxPackages_latest;
consoleLogLevel = 0;
initrd = { initrd = {
verbose = false;
systemd.enable = true;
availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ]; availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ];
luks.devices."root".device = "/dev/disk/by-uuid/ab82b477-2477-453f-b95f-28e5553ad10d";
luks.devices."root" = {
device = "/dev/disk/by-uuid/ab82b477-2477-453f-b95f-28e5553ad10d";
};
}; };
kernelModules = [ "kvm-amd" ]; kernelModules = [ "kvm-amd" ];
extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
];
kernelParams = [
"cryptdevice=UUID=ab82b477-2477-453f-b95f-28e5553ad10d:root"
"root=/dev/mapper/root"
];
loader = {
efi.canTouchEfiVariables = true;
timeout = 2;
grub = {
enable = true;
device = "nodev";
efiSupport = true;
extraConfig = ''
set timeout_style=hidden
'';
# Because it still draws that image otherwise
splashImage = null;
};
};
# https://github.com/NixOS/nixpkgs/issues/254807#issuecomment-1722351771
swraid.enable = false;
}; };
fileSystems = { fileSystems = {

25
modules/plymouth.nix Normal file
View file

@ -0,0 +1,25 @@
{ pkgs, ... }: {
boot = {
initrd = {
verbose = false;
systemd.enable = true;
};
kernelParams = [
"quiet"
"splash"
"boot.shell_on_fail"
"i915.fastboot=1"
"loglevel=3"
"rd.systemd.show_status=false"
"rd.udev.log_level=3"
"udev.log_priority=3"
];
plymouth = {
enable = true;
themePackages = [ pkgs.dracula-theme ];
theme = "dracula";
};
};
}