nixos-config/machines/dolomite/bandwagon.nix

62 lines
1.2 KiB
Nix
Raw Permalink Normal View History

2024-08-25 09:45:58 +00:00
{
config,
lib,
pkgs,
modulesPath,
...
}:
2024-04-16 08:48:56 +00:00
let
cfg = config.isBandwagon;
in
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
options = {
isBandwagon = lib.mkEnableOption "Bandwagon instance";
};
config = lib.mkIf cfg {
2024-08-25 09:45:58 +00:00
boot.initrd.availableKernelModules = [
"ata_piix"
"xhci_pci"
"virtio_pci"
"virtio_scsi"
"sd_mod"
"sr_mod"
];
2024-04-16 08:48:56 +00:00
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
2024-08-25 09:45:58 +00:00
fileSystems."/" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "xfs";
};
2024-04-16 08:48:56 +00:00
2024-08-25 09:45:58 +00:00
fileSystems."/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
};
2024-04-16 08:48:56 +00:00
swapDevices = [ ];
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
2024-09-23 12:17:57 +00:00
networking.useNetworkd = true;
systemd.network.networks."10-wan" = {
matchConfig.MACAddress = "ens18";
networkConfig.DHCP = "ipv4";
dhcpV4Config = {
UseDNS = false;
};
};
systemd.network.networks."20-lan" = {
matchConfig.MACAddress = "ens19";
networkConfig.DHCP = "ipv4";
};
services.resolved.enable = true;
2024-09-05 01:19:16 +00:00
services.sing-box.settings.dns.strategy = "ipv4_only";
2024-04-16 08:48:56 +00:00
};
}