diff --git a/m/module/shared-nix-store.nix b/m/module/shared-nix-store.nix index 0b17fea..af9c147 100644 --- a/m/module/shared-nix-store.nix +++ b/m/module/shared-nix-store.nix @@ -4,6 +4,17 @@ # from being able to mount it. boot.readOnlyNixStore = false; + # The nix-daemon.socket has an unnecessary dependency over the /nix/store + # mount point. But that mount point won't be provided until the network is + # ready. However, the network-address-eno1.service, has a dependency over + # sockets.target, causing a cycle. + # One solution is to make the nix-daemon.socket depend only on the socket + # patch (which is already covered by ConditionPathIsReadWrite = + # /nix/var/nix/daemon-socket), instead on the /nix/store. + systemd.sockets.nix-daemon.unitConfig = { + RequiresMountsFor = "/nix/var/nix/daemon-socket"; + }; + # Mount the hut nix store via NFS in read-only mode. fileSystems."/mnt/hut-nix-store" = { device = "hut:/nix/store";