5 ../../../modules/virtualisation/lxc-container.nix
8 virtualisation.lxc.templates.nix = {
10 target = "/etc/nixos/lxd.nix";
12 when = [ "create" "copy" ];
15 # copy the config for nixos-rebuild
16 system.activationScripts.config = let
17 config = pkgs.substituteAll {
18 src = ./lxd-container-image-inner.nix;
19 stateVersion = lib.trivial.release;
22 if [ ! -e /etc/nixos/configuration.nix ]; then
23 install -m 0644 -D ${config} /etc/nixos/configuration.nix
28 dhcpcd.enable = false;
30 useHostResolvConf = false;
35 networks."50-eth0" = {
36 matchConfig.Name = "eth0";
41 linkConfig.RequiredForOnline = "routable";