nixos/hosts/vps/hardware.nix

45 lines
1.5 KiB
Nix
Raw Normal View History

2025-06-20 11:59:24 -07:00
# 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 = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
2025-08-12 11:53:58 -07:00
{ device = "/dev/disk/by-uuid/f22c3def-a743-4861-a98d-569cab10b34c";
2025-06-20 11:59:24 -07:00
fsType = "ext4";
};
2025-08-12 11:53:58 -07:00
# Setup keyfile
boot.initrd = {
secrets."/boot/crypto_keyfile.bin" = null;
luks.devices."luks-d05cd87b-ba29-4daf-ad6a-c58b857026a9" = {
keyFile = "/boot/crypto_keyfile.bin";
device = "/dev/disk/by-uuid/d05cd87b-ba29-4daf-ad6a-c58b857026a9";
};
};
2025-06-20 11:59:24 -07:00
swapDevices =
2025-08-12 11:53:58 -07:00
[{
device = "/var/lib/swapfile";
size = 4*1024;
}];
2025-06-20 11:59:24 -07:00
# 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.ens3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}