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

55 lines
1.3 KiB
Nix
Raw Permalink Normal View History

# SPDX-FileCopyrightText: 2021-2024 Simon Bruder <simon@sbruder.de>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
sbruder.machine.isVm = true;
boot = {
kernelParams = [ "ip=dhcp" ];
initrd = {
2023-04-27 21:08:38 +02:00
availableKernelModules = [ "aes_neon_bs" "aes_neon_blk" "xhci_pci" "virtio_pci" "usbhid" "sr_mod" ];
network.enable = true; # remote unlocking
2023-04-27 21:08:38 +02:00
luks.devices."root".device = "/dev/disk/by-uuid/98d0762c-4a87-45e5-8e99-5147f929fa1b";
};
loader = {
grub.enable = false;
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
fileSystems = {
"/" = {
2023-04-27 21:08:38 +02:00
device = "/dev/disk/by-uuid/330f15f5-84f9-446a-a77d-c788fd4b898b";
fsType = "btrfs";
options = [ "compress=zstd" ];
};
"/boot" = {
2023-04-27 21:08:38 +02:00
device = "/dev/disk/by-uuid/7F59-E838";
fsType = "vfat";
};
};
networking.useDHCP = false;
networking.usePredictableInterfaceNames = false;
systemd.network = {
enable = true;
networks = {
eth0 = {
name = "eth0";
DHCP = "yes";
domains = [ "sbruder.de" ];
address = [ "2a01:4f8:c012:2f4::1/64" ];
gateway = [ "fe80::1" ];
};
};
};
}