mirror of
https://git.adityakumar.xyz/nix-conf.git
synced 2024-11-09 15:39:44 +00:00
hosts/default/configuration.nix -> modules/nixos/{bootloader,kernel}/.default.nix
This commit is contained in:
parent
01131187b7
commit
8b07e190ed
5 changed files with 26 additions and 15 deletions
|
@ -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 = {
|
12
modules/nixos/bootloader/default.nix
Normal file
12
modules/nixos/bootloader/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
_: {
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot";
|
||||
};
|
||||
};
|
||||
supportedFilesystems = ["ntfs"];
|
||||
};
|
||||
}
|
14
modules/nixos/kernel/default.nix
Normal file
14
modules/nixos/kernel/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue