Use modulesPath so we don't have to magically rewrite paths in activation script, set stateVersion to the one this was built with (which should approximate "first install")
···22# your system. Help is available in the configuration.nix(5) man page
33# and in the NixOS manual (accessible by running ‘nixos-help’).
4455-{ config, pkgs, lib, ... }:
55+{ config, pkgs, lib, modulesPath, ... }:
6677{
88 imports =
99 [
1010 # Include the default lxd configuration.
1111- ../../../modules/virtualisation/lxc-container.nix
1111+ "${modulesPath}/modules/virtualisation/lxc-container.nix"
1212 # Include the container-specific autogenerated configuration.
1313 ./lxd.nix
1414 ];
···1616 networking.useDHCP = false;
1717 networking.interfaces.eth0.useDHCP = true;
18181919- system.stateVersion = "21.05"; # Did you read the comment?
1919+ system.stateVersion = "@stateVersion@"; # Did you read the comment?
2020}
···22# your system. Help is available in the configuration.nix(5) man page
33# and in the NixOS manual (accessible by running ‘nixos-help’).
4455-{ config, pkgs, lib, ... }:
55+{ config, pkgs, lib, modulesPath, ... }:
6677{
88 imports =
99 [
1010 # Include the default lxd configuration.
1111- ../../../modules/virtualisation/lxd-virtual-machine.nix
1111+ "${modulesPath}/virtualisation/lxd-virtual-machine.nix"
1212 # Include the container-specific autogenerated configuration.
1313 ./lxd.nix
1414 ];
···1616 networking.useDHCP = false;
1717 networking.interfaces.eth0.useDHCP = true;
18181919- system.stateVersion = "23.05"; # Did you read the comment?
1919+ system.stateVersion = "@stateVersion@"; # Did you read the comment?
2020}