Flakes: Difference between revisions

imported>SjLambda
m typo
imported>Jonah
m Updated the note and workaround for cross-platform remote nixos-rebuild
Line 281: Line 281:


To switch a remote configuration, use:
To switch a remote configuration, use:
<syntaxHighlight lang=console>
<syntaxHighlight lang=bash>
$ nixos-rebuild --flake .#mymachine \
$ nixos-rebuild --flake .#mymachine \
   --target-host mymachine-hostname --build-host localhost \
   --target-host mymachine-hostname --build-host mymachine-hostname --fast \
   switch
   switch
</syntaxHighlight>
</syntaxHighlight>


{{warning|Remote building seems to be broken at the moment, which is why the build host is set to “localhost”.}}
{{warning|Remote building seems to have an issue that's [https://github.com/NixOS/nixpkgs/issues/134952#issuecomment-1367056358 resolved by setting the <code>--fast</code> flag].}}


== Pinning the registry to the system pkgs on NixOS ==
== Pinning the registry to the system pkgs on NixOS ==