{ config, lib, modulesPath, ... }: let cfg = config.isClaw; in { imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; options = { isClaw = lib.mkEnableOption "Lightsail instance"; }; config = lib.mkIf cfg { boot.initrd.availableKernelModules = [ "uhci_hcd" "virtio_blk" "ahci" "ata_piix" "virtio_pci" "xen_blkfront" "vmw_pvscsi" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; boot.loader.grub = { enable = true; device = "/dev/vda"; }; fileSystems."/" = { device = "/dev/disk/by-uuid/fe563e38-9a57-447a-ba57-c3e53ddd84ee"; fsType = "ext4"; }; swapDevices = [ ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction # with explicit per-interface declarations with `networking.interfaces..useDHCP`. # networking.useNetworkd = false; systemd.network.enable = true; systemd.network.networks."10-wan" = { matchConfig.MACAddress = "00:16:3e:0a:ec:45"; networkConfig.DHCP = "ipv4"; dhcpV4Config = { UseDNS = true; }; }; # networking.interfaces.eth0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; }; }