Watch
0
1
Fork
You've already forked nixos-configuration
0

temporary fix for recursion, remove duplicate hostname in main config

This commit is contained in:
Vinzenz Schroeter 2023-09-09 19:22:11 +02:00
commit 00c2c2afef
3 changed files with 39 additions and 60 deletions

31
hardware/default.nix Normal file
View file

@ -0,0 +1,31 @@
hostName: {
modulesPath,
lib,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
(builtins.toString ./. + "/${hostName}.nix")
];
config = {
networking.hostName = hostName;
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
hardware.enableRedistributableFirmware = true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
};
}

View file

@ -1,12 +1,4 @@
{
lib,
config,
...
}: {
imports = [
./common.nix
];
{...}: {
config = {
boot = {
initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
@ -33,6 +25,6 @@
{device = "/dev/disk/by-uuid/f5932f70-60e4-4abe-b23d-2cab3c095c7d";}
];
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode = true;
};
}

View file

@ -1,12 +1,4 @@
{
lib,
config,
...
}: {
imports = [
./common.nix
];
{...}: {
config = {
boot = {
initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"]; # "usb_storage"
@ -57,5 +49,5 @@
swapDevices = [];
};
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.amd.updateMicrocode = true;
}