hosts/default/configuration.nix -> modules/nixos/{bootloader,kernel}/.default.nix

This commit is contained in:
Aditya 2024-04-10 22:45:41 +05:30
parent 01131187b7
commit 8b07e190ed
Signed by: aditya
SSH key fingerprint: SHA256:jL1IvWsjjlPtw6HvDIHfXfhO9IkIokNEyIfuFhSdoyU
5 changed files with 26 additions and 15 deletions

View file

@ -35,23 +35,8 @@
};
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot";
boot.supportedFilesystems = ["ntfs"];
# Kernel modules
boot.kernelModules = ["kvm-intel" "snd-hda-intel" "i8042" "nf_nat_ftp"];
boot.extraModprobeConfig = ''
options snd-hda-intel model=alc255-acer,dell-headset-multi
options i8042 nopnp=1
'';
boot.kernelParams = ["allow-discards"];
boot.kernel.sysctl = {
"net.ipv4.conf.all.forwarding" = true;
"net.ipv4.conf.default.forwarding" = true;
};
# Setup keyfile
# boot.initrd.secrets = {

View file

@ -0,0 +1,12 @@
_: {
boot = {
loader = {
systemd-boot.enable = true;
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
};
supportedFilesystems = ["ntfs"];
};
}

View file

@ -0,0 +1,14 @@
_: {
boot = {
kernelModules = ["kvm-intel" "snd-hda-intel" "i8042" "nf_nat_ftp"];
extraModprobeConfig = ''
options snd-hda-intel model=alc255-acer,dell-headset-multi
options i8042 nopnp=1
'';
kernelParams = ["allow-discards"];
kernel.sysctl = {
"net.ipv4.conf.all.forwarding" = true;
"net.ipv4.conf.default.forwarding" = true;
};
};
}