From 66150f715e7ce9a5ffc211d26a94ae203c63da8a Mon Sep 17 00:00:00 2001 From: marshmallow Date: Fri, 21 Nov 2025 12:21:24 +1100 Subject: [PATCH] more doc updates --- doc/.vitepress/config.ts | 5 ++--- doc/guides/installation.md | 2 +- doc/guides/migrate.md | 31 +++++++++++++++++++++++++++++-- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/doc/.vitepress/config.ts b/doc/.vitepress/config.ts index be95663..a98f16a 100644 --- a/doc/.vitepress/config.ts +++ b/doc/.vitepress/config.ts @@ -93,8 +93,9 @@ export default withMermaid( text: "Write a Hive", link: "/guides/writing-a-hive", }, + { text: "Migrate to wire", link: "/guides/migrate" }, { - text: "With Flakes", + text: "Use Flakes", link: "/guides/flakes/overview", items: [ { @@ -103,9 +104,7 @@ export default withMermaid( }, ], }, - { text: "Migrate to wire", link: "/guides/migrate" }, { text: "Apply your Config", link: "/guides/apply" }, - { text: "Use a non-root user", link: "/guides/non-root-user" }, { text: "Target Nodes", link: "/guides/targeting" }, { text: "Features", diff --git a/doc/guides/installation.md b/doc/guides/installation.md index e4daf51..b025cf0 100644 --- a/doc/guides/installation.md +++ b/doc/guides/installation.md @@ -29,7 +29,7 @@ When using flakes, you should install wire through the same input you create your hive from, sourced from the `stable` branch. ::: code-group -<<< @/snippets/guides/installation/flake.nix{38} [flake.nix] +<<< @/snippets/guides/installation/flake.nix [flake.nix] ::: ## Installation through npins diff --git a/doc/guides/migrate.md b/doc/guides/migrate.md index f263657..2b677fe 100644 --- a/doc/guides/migrate.md +++ b/doc/guides/migrate.md @@ -8,14 +8,35 @@ description: How-to migrate from other tools to wire tool. {{ $frontmatter.description }} +Migrate from... + +- [Colmena](#from-colmena) +- [`nixos-rebuild`](#from-nixos-rebuild) + ## From Colmena +If you're familiar with colmena, wire will hopefully come quickly to you! (or, +atleast that was the intention when writing it!). There are a few changes you +should know: + +- Wire pushes a real binary file to apply keys. You'll need to _atleast_ add garnix's + public key for your remote server otherwise it will refuse the binary. +- [You don't have to use a root user](/guides/non-root-user.html) +- `apply-local` does not exist, `apply` will apply locally when appropriate +- [Many options have been aliased to nicer names](/reference/module.html) + (ie, `deployment.targetUser` <=> `deployment.target.user`) +- You may pass a list of hosts to `deployment.targetHost` (no more fiddling with + your hive whenever DNS is down, for example) +- `--path` optionally takes a flakeref! You can pass `--path github:foo/bar`, + `--path git+file:///...`, `--path https://.../main.tar.gz`, etc. + (plain paths like `--path ~/my-hive` still work as always) + ::: tip You should also follow [installation](/guides/installation) to install the binary. ::: -### As a Flake +### Convert a Hive as a Flake ```nix [flake.nix] { @@ -35,7 +56,7 @@ binary. } ``` -### Non-flake +### Convert a Hive with npins ::: tip You should also follow [installation](/guides/installation) to setup @@ -61,3 +82,9 @@ wire.makeHive { # [!code ++] Replacing `` with a pinned source is optional, but you should probably use one if you ask me \:) + +## From `nixos-rebuild` + +You can keep using `nixos-rebuild` alongside wire! + +Follow the instructions in [the relevant page](/guides/flakes/nixos-rebuild.html). -- 2.51.2