merge normal and hardware configuration

This commit is contained in:
Pim Kunis 2023-11-22 18:54:05 +01:00
parent e19e738b04
commit 0d316fe7d2
3 changed files with 39 additions and 30 deletions

View file

@ -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;
}

View file

@ -51,9 +51,7 @@
disko.nixosModules.disko
agenix.nixosModules.default
./configuration.nix
{
networking.hostName = machine.name;
}
{ networking.hostName = machine.name; }
];
});

View file

@ -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;
}