Merge pull request #277752 from philiptaron/regression-fix/pr-271326

nixos/lxd-agent: fix evaluation regression
This commit is contained in:
Adam C. Stephens 2023-12-30 12:23:56 -05:00 committed by GitHub
commit 7d97faa166
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,9 @@ in {
systemd.services.lxd-agent = {
enable = true;
wantedBy = [ "multi-user.target" ];
before = [ "shutdown.target" ];
before = [ "shutdown.target" ] ++ lib.optionals config.services.cloud-init.enable [
"cloud-init.target" "cloud-init.service" "cloud-init-local.service"
];
conflicts = [ "shutdown.target" ];
path = [
pkgs.kmod
@ -78,7 +80,6 @@ in {
Description = "LXD - agent";
Documentation = "https://documentation.ubuntu.com/lxd/en/latest";
ConditionPathExists = "/dev/virtio-ports/org.linuxcontainers.lxd";
Before = lib.optionals config.services.cloud-init.enable [ "cloud-init.target" "cloud-init.service" "cloud-init-local.service" ];
DefaultDependencies = "no";
StartLimitInterval = "60";
StartLimitBurst = "10";