From 83ca27fe2ded6575f08ffb64c3e72383f1d99138 Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 22 Sep 2023 10:28:42 +0200 Subject: [PATCH] quickstart: use all buildClan outputs --- docs/quickstart.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/quickstart.md b/docs/quickstart.md index afe99555f..1076ed9f4 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -73,19 +73,21 @@ Absolutely, let's break down the migration step by step, explaining each action Previous configuration: ```nix - nixosConfigurations.example-desktop = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - ./configuration.nix - ]; - [...] - }; + { + nixosConfigurations.example-desktop = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./configuration.nix + ]; + [...] + }; + } ``` After change: ```nix - nixosConfigurations = clan-core.lib.buildClan { + let clan = clan-core.lib.buildClan { # this needs to point at the repository root directory = self; specialArgs = {}; @@ -98,11 +100,13 @@ Absolutely, let's break down the migration step by step, explaining each action }; }; }; + in { inherit (clan) nixosConfigurations clanInternal; } ``` - `nixosConfigurations`: Defines NixOS configurations, using Clan Core’s `buildClan` function to manage the machines. - Inside `machines`, a new machine configuration is defined (in this case, `example-desktop`). - Inside `example-desktop` which is the target machine hostname, `nixpkgs.hostPlatform` specifies the host platform as `x86_64-linux`. + - `clanInternals`: Is required to enable evaluation of the secret generation/upload script on every architecture 4. **Rebuild and Switch**: Rebuild your NixOS configuration using the updated flake: