merge normal and hardware configuration
This commit is contained in:
parent
e19e738b04
commit
0d316fe7d2
3 changed files with 39 additions and 30 deletions
|
@ -1,14 +1,32 @@
|
|||
{ pkgs, config, ... }: {
|
||||
{ pkgs, config, lib, modulesPath, ... }: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
./modules/disk-config.nix
|
||||
./modules/agenix.nix
|
||||
./modules/custom.nix
|
||||
];
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
boot = {
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
extraModulePackages = [ ];
|
||||
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"ahci"
|
||||
"xhci_pci"
|
||||
"nvme"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"sdhci_pci"
|
||||
];
|
||||
kernelModules = [ ];
|
||||
};
|
||||
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
@ -88,7 +106,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs = {
|
||||
config.allowUnfree = true;
|
||||
hostPlatform = "x86_64-linux";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
neofetch
|
||||
|
@ -102,12 +123,15 @@
|
|||
file
|
||||
];
|
||||
|
||||
networking.firewall.enable = false;
|
||||
networking = {
|
||||
firewall.enable = false;
|
||||
useDHCP = false;
|
||||
|
||||
networking.nftables = {
|
||||
enable = true;
|
||||
checkRuleset = true;
|
||||
ruleset = builtins.readFile ./nftables.conf;
|
||||
nftables = {
|
||||
enable = true;
|
||||
checkRuleset = true;
|
||||
ruleset = builtins.readFile ./nftables.conf;
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
|
@ -158,4 +182,7 @@
|
|||
};
|
||||
|
||||
virtualisation.libvirtd.enable = true;
|
||||
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
|
|
@ -51,9 +51,7 @@
|
|||
disko.nixosModules.disko
|
||||
agenix.nixosModules.default
|
||||
./configuration.nix
|
||||
{
|
||||
networking.hostName = machine.name;
|
||||
}
|
||||
{ networking.hostName = machine.name; }
|
||||
];
|
||||
});
|
||||
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
# TODO: merge with configuration.nix
|
||||
{ config, lib, modulesPath, ... }: {
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "ahci" "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
networking.useDHCP = false;
|
||||
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
Loading…
Reference in a new issue