67 lines
1.7 KiB
Nix
67 lines
1.7 KiB
Nix
{ lib, modulesPath, ... }:
|
|
|
|
{
|
|
imports = [
|
|
"${modulesPath}/virtualisation/qemu-vm.nix"
|
|
"${modulesPath}/testing/test-instrumentation.nix"
|
|
];
|
|
|
|
boot.loader.grub = {
|
|
enable = true;
|
|
device = "/dev/vda";
|
|
forceInstall = true;
|
|
};
|
|
|
|
fileSystems."/" = {
|
|
device = "/dev/disk/by-label/nixos";
|
|
fsType = "ext4";
|
|
};
|
|
|
|
networking.hostName = "worker";
|
|
networking.firewall.enable = false;
|
|
networking.useDHCP = lib.mkForce false;
|
|
networking.dhcpcd.enable = lib.mkForce false;
|
|
systemd.network = {
|
|
enable = true;
|
|
networks."10-eth0" = {
|
|
matchConfig.Name = "eth0";
|
|
networkConfig.DHCP = "yes";
|
|
linkConfig.RequiredForOnline = "routable";
|
|
};
|
|
networks."20-eth1" = {
|
|
matchConfig.Name = "eth1";
|
|
address = [ "192.168.1.2/24" ];
|
|
linkConfig.RequiredForOnline = "routable";
|
|
};
|
|
};
|
|
|
|
nix.registry = lib.mkForce { };
|
|
nix.nixPath = lib.mkForce [ ];
|
|
nix.channel.enable = false;
|
|
nix.settings = {
|
|
experimental-features = [
|
|
"nix-command"
|
|
"flakes"
|
|
];
|
|
flake-registry = "";
|
|
};
|
|
nixpkgs.flake = {
|
|
source = lib.mkForce null;
|
|
setFlakeRegistry = lib.mkForce false;
|
|
setNixPath = lib.mkForce false;
|
|
};
|
|
|
|
system.switch.enable = lib.mkForce true;
|
|
system.nixos.label = lib.mkForce "vm-smoke-target";
|
|
system.nixos.version = lib.mkForce "vm-smoke-target";
|
|
system.nixos.versionSuffix = lib.mkForce "-vm-smoke-target";
|
|
environment.etc."photon-vm-smoke-target".text = "vm-smoke-target\n";
|
|
|
|
documentation.enable = false;
|
|
documentation.nixos.enable = false;
|
|
documentation.man.enable = false;
|
|
documentation.info.enable = false;
|
|
documentation.doc.enable = false;
|
|
|
|
system.stateVersion = "24.11";
|
|
}
|