From eadd59ff21ec83e5dd65e42cd507b1a7aafba685 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Tue, 27 May 2025 13:43:59 +1000 Subject: [PATCH] docs: point users towards passing in `self` to `buildClan` --- docs/site/guides/getting-started/add-machines.md | 8 +++++--- templates/clan/minimal-flake-parts/clan.nix | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/site/guides/getting-started/add-machines.md b/docs/site/guides/getting-started/add-machines.md index 7d2fd9028..b491d1455 100644 --- a/docs/site/guides/getting-started/add-machines.md +++ b/docs/site/guides/getting-started/add-machines.md @@ -2,7 +2,7 @@ Managing machine configurations can be done in the following ways: - writing Nix expressions in a `flake.nix` file -- placing `autoincluded` files into your machine directory +- placing configuration files into your machine directory Clan currently offers the following methods to configure machines: @@ -33,8 +33,8 @@ In the `flake.nix` file: buildClan { # Set a unique name meta.name = "Lobsters"; - # Should usually point to the directory of flake.nix - directory = ./.; + # Necessary for importing external Clan services + inherit self; } ``` @@ -46,6 +46,8 @@ In the `flake.nix` file: clan = { # Set a unique name meta.name = "Lobsters"; + # Necessary for importing external Clan services + inherit self; }; ``` diff --git a/templates/clan/minimal-flake-parts/clan.nix b/templates/clan/minimal-flake-parts/clan.nix index 0a367c981..507900c94 100644 --- a/templates/clan/minimal-flake-parts/clan.nix +++ b/templates/clan/minimal-flake-parts/clan.nix @@ -1,10 +1,11 @@ -{ inputs, ... }: +{ self, inputs, ... }: { imports = [ inputs.clan.flakeModules.default ]; clan = { meta.name = "__CHANGE_ME__"; + inherit self; specialArgs = { inherit inputs; };