nixos-config/machines/renge/hardware-configuration.nix
Simon Bruder 10b8d432d5
Relicense
This applies the REUSE specification to the repository, so the licensing
information can be tracked for every file individually.
2024-01-13 14:39:22 +01:00

76 lines
1.6 KiB
Nix

# SPDX-FileCopyrightText: 2022-2024 Simon Bruder <simon@sbruder.de>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
{ lib, modulesPath, ... }:
{
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
sbruder.machine.isVm = true;
boot = {
kernelModules = [ ];
extraModulePackages = [ ];
kernelParams = [ "ip=dhcp" ];
initrd = {
availableKernelModules = [
"aes_neon_blk"
"aes_neon_bs"
"ahci"
"sr_mod"
"usbhid"
"virtio_pci"
"virtio_scsi"
"xhci_pci"
];
kernelModules = [ ];
network.enable = true; # remote unlocking
luks.devices."root".device = "/dev/disk/by-uuid/dd131862-29a2-4464-8c7c-5a3fd1bab8ff";
};
loader = {
grub.enable = false;
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/31412044-8ef5-4f02-bbda-55af44e344cc";
fsType = "btrfs";
options = [ "compress=zstd" "discard" "noatime" "ssd" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/40F5-721A";
fsType = "vfat";
};
};
swapDevices = [
{
device = "/dev/disk/by-partuuid/3143e511-3247-475c-b7c8-52880140bd7b";
randomEncryption.enable = true;
}
];
networking = {
useDHCP = false;
usePredictableInterfaceNames = false;
};
systemd.network = {
enable = true;
networks = {
eth0 = {
name = "eth0";
DHCP = "yes";
domains = [ "sbruder.de" ];
address = [ "2a03:4000:6b:d2::1/64" ];
gateway = [ "fe80::1" ];
};
};
};
}