nix/os: tidy up hw/boot handling
This commit is contained in:
parent
40fd476f0b
commit
8baa3cf42d
13 changed files with 63 additions and 62 deletions
|
@ -11,7 +11,14 @@
|
|||
version = 2;
|
||||
};
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.tmpOnTmpfs = true;
|
||||
|
||||
# Workaround for nm-pptp to enforce module load
|
||||
boot.kernelModules = [
|
||||
"nf_conntrack_proto_gre"
|
||||
"nf_conntrack_pptp"
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -6,5 +6,6 @@
|
|||
./pkg.nix
|
||||
./user.nix
|
||||
./system.nix
|
||||
./hw.nix
|
||||
];
|
||||
}
|
||||
|
|
14
nix/os/profiles/common/hw.nix
Normal file
14
nix/os/profiles/common/hw.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
hardware.trackpoint.emulateWheel = true;
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"rtsx_pci_sdmmc"
|
||||
"cryptd"
|
||||
];
|
||||
}
|
7
nix/os/profiles/graphical/boot.nix
Normal file
7
nix/os/profiles/graphical/boot.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
|
||||
{ lib
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
}
|
|
@ -1,9 +1,11 @@
|
|||
{ pkgs
|
||||
, ...
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
imports = [
|
||||
./boot.nix
|
||||
./system.nix
|
||||
./hw.nix
|
||||
];
|
||||
}
|
||||
|
|
7
nix/os/profiles/graphical/hw.nix
Normal file
7
nix/os/profiles/graphical/hw.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
hardware.enableAllFirmware = true;
|
||||
}
|
|
@ -5,33 +5,5 @@
|
|||
{
|
||||
boot.loader.grub.efiInstallAsRemovable = lib.mkForce true;
|
||||
boot.loader.efi.canTouchEfiVariables = lib.mkForce false;
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"rtsx_pci_sdmmc"
|
||||
"aes_x86_64"
|
||||
"aesni_intel"
|
||||
"cryptd"
|
||||
];
|
||||
|
||||
boot.kernelModules = [
|
||||
"kvm-intel"
|
||||
|
||||
# Workaround for nm-pptp to enforce module load
|
||||
"nf_conntrack_proto_gre"
|
||||
"nf_conntrack_pptp"
|
||||
];
|
||||
|
||||
boot.extraModprobeConfig = ''
|
||||
options kvm-intel nested=1
|
||||
options kvm-intel enable_shadow_vmcs=1
|
||||
options kvm-intel enable_apicv=1
|
||||
options kvm-intel ept=1
|
||||
'';
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
}
|
||||
|
|
|
@ -3,5 +3,4 @@
|
|||
{
|
||||
hardware.encryptedDisk.enable = true;
|
||||
hardware.enableAllFirmware = true;
|
||||
hardware.trackpoint.emulateWheel = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue