{ config, lib, pkgs, ... }: { imports = [ ../template2/hardware-configuration.nix ../../system ../../common/vm ]; nixpkgs.config.allowUnfree = true; boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/vda"; networking.hostName = "{{ hostname }}"; networking.domain = "{{ domain }}"; networking.useNetworkd = true; networking.useDHCP = false; services.resolved.enable = false; networking.nameservers = [ {% for ns in nameservers %} "{{ ns }}" {% endfor %} ]; systemd.network.enable = true; systemd.network.networks."ens18" = { matchConfig.Name = "ens18"; {% if is_static_ip %} address = [ "{{ ip }}" ]; routes = [ { Gateway = "{{ gateway }}"; } ]; {% else %} networkConfig.DHCP = "ipv4"; {% endif %} linkConfig.RequiredForOnline = "routable"; }; time.timeZone = "Europe/Oslo"; nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.tarball-ttl = 0; environment.systemPackages = with pkgs; [ vim wget git ]; # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; # Or disable the firewall altogether. networking.firewall.enable = false; system.stateVersion = "{{ state_version }}"; # Did you read the comment? }