Refactor boot configuration, not all machines share bootloader
This commit is contained in:
parent
da84d1ad9a
commit
f86f184345
5 changed files with 46 additions and 53 deletions
|
@ -90,24 +90,6 @@ in
|
||||||
enableIPv6 = false;
|
enableIPv6 = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
## Boot ##
|
|
||||||
boot = {
|
|
||||||
loader = {
|
|
||||||
systemd-boot = {
|
|
||||||
enable = true;
|
|
||||||
# When using plymouth, initrd can expand by a lot each time, so limit how many we keep around
|
|
||||||
configurationLimit = lib.mkDefault 10;
|
|
||||||
};
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
timeout = 3;
|
|
||||||
};
|
|
||||||
|
|
||||||
initrd = {
|
|
||||||
systemd.enable = true;
|
|
||||||
verbose = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
## System-wide packages ##
|
## System-wide packages ##
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
asdf-vm
|
asdf-vm
|
||||||
|
|
|
@ -12,8 +12,21 @@
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
|
## Boot ##
|
||||||
boot = {
|
boot = {
|
||||||
|
loader = {
|
||||||
|
systemd-boot = {
|
||||||
|
enable = true;
|
||||||
|
# When using plymouth, initrd can expand by a lot each time, so limit how many we keep around
|
||||||
|
configurationLimit = lib.mkDefault 10;
|
||||||
|
};
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
timeout = 3;
|
||||||
|
};
|
||||||
|
|
||||||
initrd = {
|
initrd = {
|
||||||
|
systemd.enable = true;
|
||||||
|
verbose = false;
|
||||||
availableKernelModules = [
|
availableKernelModules = [
|
||||||
"nvme"
|
"nvme"
|
||||||
"xhci_pci"
|
"xhci_pci"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
###############################################################
|
###############################################################
|
||||||
#
|
#
|
||||||
# Rune - Main Desktop
|
# VM - Testing Virtual Machine
|
||||||
# NixOS running on Ryzen 9 7900X3D , Radeon RX 6950 XT, 32GB RAM
|
# NixOS running in VM
|
||||||
#
|
#
|
||||||
###############################################################
|
###############################################################
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ in
|
||||||
## Misc Inputs ##
|
## Misc Inputs ##
|
||||||
|
|
||||||
## VM Specific ##
|
## VM Specific ##
|
||||||
"hosts/users/${username}" # # Not the best solution but I always have one user so ¯\_(ツ)_/¯
|
"hosts/users/${username}" # Not the best solution but I always have just one user so ¯\_(ツ)_/¯
|
||||||
])
|
])
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@ -54,19 +54,6 @@ in
|
||||||
enableIPv6 = false;
|
enableIPv6 = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
## Boot ##
|
|
||||||
boot = {
|
|
||||||
loader = {
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
timeout = 3;
|
|
||||||
};
|
|
||||||
|
|
||||||
initrd = {
|
|
||||||
systemd.enable = true;
|
|
||||||
verbose = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
## System-wide packages ##
|
## System-wide packages ##
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
openssh
|
openssh
|
||||||
|
|
|
@ -14,21 +14,32 @@
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloader.
|
## Boot ##
|
||||||
boot.loader.grub.enable = true;
|
boot = {
|
||||||
boot.loader.grub.device = "/dev/vda";
|
loader = {
|
||||||
boot.loader.grub.useOSProber = true;
|
grub = {
|
||||||
|
enable = true;
|
||||||
|
device = "/dev/vda";
|
||||||
|
useOSProber = true;
|
||||||
|
};
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
timeout = 3;
|
||||||
|
};
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [
|
initrd = {
|
||||||
"ahci"
|
availableKernelModules = [
|
||||||
"xhci_pci"
|
"ahci"
|
||||||
"virtio_pci"
|
"xhci_pci"
|
||||||
"sr_mod"
|
"virtio_pci"
|
||||||
"virtio_blk"
|
"sr_mod"
|
||||||
];
|
"virtio_blk"
|
||||||
boot.initrd.kernelModules = [ ];
|
];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
systemd.enable = true;
|
||||||
boot.extraModulePackages = [ ];
|
verbose = false;
|
||||||
|
};
|
||||||
|
kernelModules = [ "kvm-amd" ];
|
||||||
|
extraModulePackages = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/a0b82536-3087-410a-b283-60ea10811ef5";
|
device = "/dev/disk/by-uuid/a0b82536-3087-410a-b283-60ea10811ef5";
|
||||||
|
|
|
@ -37,11 +37,11 @@
|
||||||
systemd.emergencyAccess = true; # Don't need to enter password in emergency mode
|
systemd.emergencyAccess = true; # Don't need to enter password in emergency mode
|
||||||
};
|
};
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
# "systemd.setenv=SYSTEMD_SULOGIN_FORCE=1"
|
"systemd.setenv=SYSTEMD_SULOGIN_FORCE=1"
|
||||||
# "systemd.show_status=true"
|
"systemd.show_status=true"
|
||||||
#"systemd.log_level=debug"
|
"systemd.log_level=debug"
|
||||||
# "systemd.log_target=console"
|
"systemd.log_target=console"
|
||||||
# "systemd.journald.forward_to_console=1"
|
"systemd.journald.forward_to_console=1"
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = builtins.attrValues {
|
environment.systemPackages = builtins.attrValues {
|
||||||
|
|
Loading…
Add table
Reference in a new issue