From b055f2fb7428577936f2c6533c4a59e5eed205fd Mon Sep 17 00:00:00 2001 From: thiloho <123883702+thiloho@users.noreply.github.com> Date: Sun, 8 Dec 2024 17:46:41 +0000 Subject: [PATCH] Set prod server hardware configuration --- nix/deploy/prod/hardware-configuration.nix | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 nix/deploy/prod/hardware-configuration.nix diff --git a/nix/deploy/prod/hardware-configuration.nix b/nix/deploy/prod/hardware-configuration.nix new file mode 100644 index 0000000..2ded190 --- /dev/null +++ b/nix/deploy/prod/hardware-configuration.nix @@ -0,0 +1,39 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_scsi" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/ee176add-b854-4434-94f9-59ba519bbdc1"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/A692-993B"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/d54c93ba-e644-47a9-974d-ed825b88ab8b"; } + ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; +}