Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
require network connection for home-config clone
the general idea is described here: <https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/> note that all machines also need `network-manager` for this to work. otherwise the appropriate `systemd` unit `NetworkManager-wait-online.service` will be broken (even if it exists, which is really confusing). unfortunately waiting for the network to be up with `network-online.target` will not work because of inconsistent service names: <NixOS/nixpkgs#59603> it seems that NixOS 19.03 still is not fixed in that regard: <NixOS/nixpkgs#59603> on NixOS 18.09 it will only work after this commit: <NixOS/nixpkgs@022eb6a> as we want the service to run immediately after bootstrapping (which is the whole point of this project), you have to build your own image for that, as currently the latest 18.09 release binary does not incorporate above patch. here is how to build an image: <https://nixos.org/nixos/manual/index.html#sec-building-cd> even more unfortunately building `release-18.09` branch will fail due to a deprecated kernel API used by ZFS, used for the NixOS minimal image: <NixOS/nixpkgs#60907> git clone https://github.com/NixOS/nixpkgs \ # fix is on 18.09, and the repository is huge --single-branch --branch release-18.09 --depth 200 # commit 44c66417f4e05f0a211735f024b58bdb9770108f # Author: Tim Steinbach <[email protected]> # Date: Thu May 2 13:19:13 2019 -0400 # # linux: 4.19.37 -> 4.19.38 # # (cherry picked from commit e0bf73dbde74e66167bd9ccf385a1fbc228c4036) git checkout 44c66417f4e05f0a211735f024b58bdb9770108f~1 cd nixpkgs/nixos nix-build -A config.system.build.isoImage \ -I nixos-config=nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix \ nixpkgs/nixos/default.nix --max-jobs auto --cores $(nproc) in both cases you have to add these lines to the config: systemd.services.NetworkManager-wait-online = { wantedBy = [ "network-online.target" ]; }; which corresponds to a patch on `master`: <NixOS/nixpkgs@4588661> this is what you get if you want to use immature software...
- Loading branch information