add common config

This commit is contained in:
Vivian 2021-10-13 18:17:45 +02:00
parent 62c69a28a6
commit e11aac3f0b
10 changed files with 729 additions and 110 deletions

14
common/generic-vm.nix Normal file
View file

@ -0,0 +1,14 @@
{ lib, ... }: {
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
networking.interfaces.ens18.useDHCP = lib.mkDefault true;
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.openssh.permitRootLogin = lib.mkDefault "yes";
# Enable qemu guest agent
services.qemuGuest.enable = true;
}