nixos-config/machines/renge/hardware-configuration.nix

72 lines
1.5 KiB
Nix
Raw Normal View History

2022-03-23 15:03:08 +01:00
{ lib, modulesPath, ... }:
{
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
sbruder.machine.isVm = true;
2022-03-23 15:03:08 +01:00
boot = {
kernelModules = [ ];
extraModulePackages = [ ];
kernelParams = [ "ip=dhcp" ];
initrd = {
2023-12-31 12:54:51 +01:00
availableKernelModules = [
"aes_neon_blk"
"aes_neon_bs"
"ahci"
"sr_mod"
"usbhid"
"virtio_pci"
"virtio_scsi"
"xhci_pci"
];
2022-03-23 15:03:08 +01:00
kernelModules = [ ];
network.enable = true; # remote unlocking
2023-12-31 12:54:51 +01:00
luks.devices."root".device = "/dev/disk/by-uuid/dd131862-29a2-4464-8c7c-5a3fd1bab8ff";
2022-03-23 15:03:08 +01:00
};
2023-12-31 12:54:51 +01:00
loader = {
grub.enable = false;
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
2022-03-23 15:03:08 +01:00
};
};
fileSystems = {
"/" = {
2023-12-31 12:54:51 +01:00
device = "/dev/disk/by-uuid/31412044-8ef5-4f02-bbda-55af44e344cc";
2022-03-23 15:03:08 +01:00
fsType = "btrfs";
2023-12-31 12:54:51 +01:00
options = [ "compress=zstd" "discard" "noatime" "ssd" ];
2022-03-23 15:03:08 +01:00
};
"/boot" = {
2023-12-31 12:54:51 +01:00
device = "/dev/disk/by-uuid/40F5-721A";
fsType = "vfat";
2022-03-23 15:03:08 +01:00
};
};
swapDevices = [
{
2023-12-31 12:54:51 +01:00
device = "/dev/disk/by-partuuid/3143e511-3247-475c-b7c8-52880140bd7b";
2022-03-23 15:03:08 +01:00
randomEncryption.enable = true;
}
];
networking = {
useDHCP = false;
usePredictableInterfaceNames = false;
2023-04-11 11:44:59 +02:00
};
systemd.network = {
enable = true;
networks = {
eth0 = {
name = "eth0";
DHCP = "yes";
domains = [ "sbruder.de" ];
2023-12-31 12:54:51 +01:00
address = [ "2a03:4000:6b:d2::1/64" ];
2023-04-11 11:44:59 +02:00
gateway = [ "fe80::1" ];
2022-03-23 15:03:08 +01:00
};
};
};
}