diff options
author | Adam Stephens | 2024-08-10 12:40:16 -0400 |
---|---|---|
committer | Adam Stephens | 2024-08-10 13:23:36 -0400 |
commit | 094f2b6c9d87da6348e2517936a3ad907c82d1cf (patch) | |
tree | db02a5f7ef5c5891c2f346ccfd5981fb145de21f /nixos/maintainers/scripts/incus/incus-virtual-machine-image-inner.nix | |
parent | 293c17926d47fb66e8a01267c2e698ab40dc53a6 (diff) |
nixos/incus: add incus-only vm and container images
Diffstat (limited to 'nixos/maintainers/scripts/incus/incus-virtual-machine-image-inner.nix')
-rw-r--r-- | nixos/maintainers/scripts/incus/incus-virtual-machine-image-inner.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/nixos/maintainers/scripts/incus/incus-virtual-machine-image-inner.nix b/nixos/maintainers/scripts/incus/incus-virtual-machine-image-inner.nix new file mode 100644 index 000000000000..cd176a38988f --- /dev/null +++ b/nixos/maintainers/scripts/incus/incus-virtual-machine-image-inner.nix @@ -0,0 +1,34 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ modulesPath, ... }: + +{ + imports = [ + # Include the default incus configuration. + "${modulesPath}/virtualisation/incus-virtual-machine.nix" + # Include the container-specific autogenerated configuration. + ./incus.nix + ]; + + networking = { + dhcpcd.enable = false; + useDHCP = false; + useHostResolvConf = false; + }; + + systemd.network = { + enable = true; + networks."50-enp5s0" = { + matchConfig.Name = "enp5s0"; + networkConfig = { + DHCP = "ipv4"; + IPv6AcceptRA = true; + }; + linkConfig.RequiredForOnline = "routable"; + }; + }; + + system.stateVersion = "@stateVersion@"; # Did you read the comment? +} |