nixos-config/machines/ci-runner/hardware-configuration.nix

53 lines
1.2 KiB
Nix
Raw Normal View History

2024-07-19 11:50:11 +02:00
# SPDX-FileCopyrightText: 2024 Simon Bruder <simon@sbruder.de>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
2024-07-19 11:56:54 +02:00
{ modulesPath, ... }:
2024-07-19 11:50:11 +02:00
{
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
sbruder.machine.isVm = true;
boot = {
2024-07-19 11:56:54 +02:00
kernelModules = [ "kvm-intel" ];
2024-07-19 11:50:11 +02:00
extraModulePackages = [ ];
2024-07-19 11:56:54 +02:00
kernelParams = [ ];
2024-07-19 11:50:11 +02:00
initrd = {
2024-07-19 11:56:54 +02:00
availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk" ];
2024-07-19 11:50:11 +02:00
kernelModules = [ ];
};
2024-07-19 11:56:54 +02:00
loader = {
grub.enable = false;
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
2024-07-19 11:50:11 +02:00
};
fileSystems = {
"/" = {
2024-07-19 11:56:54 +02:00
device = "/dev/disk/by-uuid/e1a9b0bb-9f04-498c-ac2f-aad9da4639f3";
2024-07-19 11:50:11 +02:00
fsType = "btrfs";
options = [ "compress=zstd" "discard" "noatime" "ssd" ]; # for some reason, the kernel assumes rotational
};
"/boot" = {
2024-07-19 11:56:54 +02:00
device = "/dev/disk/by-uuid/7A51-7897";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
2024-07-19 11:50:11 +02:00
};
};
systemd.network = {
enable = true;
networks = {
eth0 = {
name = "eth0";
DHCP = "yes";
domains = [ "sbruder.de" ];
};
};
};
}