From 8b70d84f4141072816a2708a4aa503a2765f316d Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Sun, 21 May 2023 00:06:25 +0200 Subject: [PATCH] bekkalokk: hardware-config for baremetal --- hosts/bekkalokk/configuration.nix | 10 +++++----- hosts/bekkalokk/hardware-configuration.nix | 19 +++++++++++-------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/hosts/bekkalokk/configuration.nix b/hosts/bekkalokk/configuration.nix index 65c825d..30badde 100644 --- a/hosts/bekkalokk/configuration.nix +++ b/hosts/bekkalokk/configuration.nix @@ -5,13 +5,13 @@ ../../base.nix - ./services/keycloak.nix + #./services/keycloak.nix # TODO: set up authentication for the following: # ./services/website/website.nix - ./services/website/nginx.nix + #./services/website/nginx.nix # ./services/website/gitea.nix - ./services/website/mediawiki.nix + #./services/website/mediawiki.nix ]; sops.defaultSopsFile = ../../secrets/bekkalokk/bekkalokk.yaml; @@ -24,8 +24,8 @@ networking.hostName = "bekkalokk"; - systemd.network.networks."30-ens33" = values.defaultNetworkConfig // { - matchConfig.Name = "ens33"; + systemd.network.networks."30-enp2s0" = values.defaultNetworkConfig // { + matchConfig.Name = "enp2s0"; address = with values.hosts.bekkalokk; [ (ipv4 + "/25") (ipv6 + "/64") ]; }; diff --git a/hosts/bekkalokk/hardware-configuration.nix b/hosts/bekkalokk/hardware-configuration.nix index 0653c98..45fcf20 100644 --- a/hosts/bekkalokk/hardware-configuration.nix +++ b/hosts/bekkalokk/hardware-configuration.nix @@ -4,25 +4,27 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = [ ]; + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "ata_piix" "mptspi" "uhci_hcd" "ehci_pci" "sd_mod" "sr_mod" ]; + boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/cdcafe3a-01d8-4bdf-9a3d-78705b581090"; - fsType = "ext4"; + { device = "/dev/sda1"; + fsType = "btrfs"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/1CB4-280D"; + { device = "/dev/disk/by-uuid/CE63-3B9B"; fsType = "vfat"; }; swapDevices = - [ { device = "/dev/disk/by-uuid/3eaace48-91ec-4d46-be86-fd26877d8b86"; } + [ { device = "/dev/disk/by-uuid/2df10c7b-0dec-45c6-a728-533f7da7f4b9"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking @@ -30,7 +32,8 @@ # still possible to use this option, but it's recommended to use it in conjunction # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.ens33.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;