diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2022-11-29 01:45:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-29 01:45:25 -0500 |
commit | 22c4865309cda8df340f81d24e9e7750f37fb61c (patch) | |
tree | 5c517c680e56c33fc724ab6f44542f67029653e0 /nixos/modules/virtualisation | |
parent | 280b4b8279563836c8ff978605492eed6c782392 (diff) | |
parent | 96424ddf55485130af9565701db78fc9429f8aad (diff) |
Merge pull request #203484 from asbachb/lxd/check-for-lxcfs
lxd: Check if `lxcfs` is enabled before adding it as service dependency
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r-- | nixos/modules/virtualisation/lxd.nix | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/nixos/modules/virtualisation/lxd.nix b/nixos/modules/virtualisation/lxd.nix index 764bb5e3b40ed..e3eb519b7dddf 100644 --- a/nixos/modules/virtualisation/lxd.nix +++ b/nixos/modules/virtualisation/lxd.nix @@ -129,8 +129,15 @@ in { description = "LXD Container Management Daemon"; wantedBy = [ "multi-user.target" ]; - after = [ "network-online.target" "lxcfs.service" ]; - requires = [ "network-online.target" "lxd.socket" "lxcfs.service" ]; + after = [ + "network-online.target" + (mkIf config.virtualisation.lxc.lxcfs.enable "lxcfs.service") + ]; + requires = [ + "network-online.target" + "lxd.socket" + (mkIf config.virtualisation.lxc.lxcfs.enable "lxcfs.service") + ]; documentation = [ "man:lxd(1)" ]; path = optional cfg.zfsSupport config.boot.zfs.package; |