2022-03-23 15:03:08 +01:00
|
|
|
{ lib, modulesPath, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
(modulesPath + "/profiles/qemu-guest.nix")
|
|
|
|
];
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
kernelModules = [ ];
|
|
|
|
extraModulePackages = [ ];
|
|
|
|
kernelParams = [ "ip=dhcp" ];
|
|
|
|
initrd = {
|
|
|
|
availableKernelModules = [ "aesni_intel" "ahci" "sd_mod" "sr_mod" "virtio_pci" "xhci_pci" ];
|
|
|
|
kernelModules = [ ];
|
|
|
|
network.enable = true; # remote unlocking
|
|
|
|
luks.devices."root".device = "/dev/disk/by-uuid/75f9aa9f-bb40-4d83-9f81-18e4f2ce8d57";
|
|
|
|
};
|
2023-12-02 18:54:23 +01:00
|
|
|
loader.grub.device = "/dev/sda";
|
2022-03-23 15:03:08 +01:00
|
|
|
kernel = {
|
|
|
|
sysctl = {
|
|
|
|
# Swap should never be used unless the system runs ouf of memory.
|
|
|
|
"vm.swappiness" = 0;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
|
|
|
device = "/dev/disk/by-uuid/5905aaff-e4aa-4abd-a1cc-f93acb0762ac";
|
|
|
|
fsType = "btrfs";
|
|
|
|
options = [ "compress=zstd" "discard" "noatime" ];
|
|
|
|
};
|
|
|
|
"/boot" = {
|
|
|
|
device = "/dev/disk/by-uuid/07908c38-d35a-4b25-9934-31dd8da9959b";
|
|
|
|
fsType = "ext2";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
swapDevices = [
|
|
|
|
{
|
|
|
|
device = "/dev/disk/by-partuuid/552e77a9-40d1-48e0-9439-0a3c2b506a80";
|
|
|
|
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-08-12 01:00:37 +02:00
|
|
|
address = [ "2a01:4f8:1c1e:88cd::1/64" ];
|
2023-04-11 11:44:59 +02:00
|
|
|
gateway = [ "fe80::1" ];
|
2022-03-23 15:03:08 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# no smart on qemu disk
|
|
|
|
services.smartd.enable = false;
|
|
|
|
}
|