templates: unify specialArgs across examples
This commit is contained in:
@@ -7,11 +7,10 @@
|
|||||||
outputs =
|
outputs =
|
||||||
inputs@{
|
inputs@{
|
||||||
self,
|
self,
|
||||||
clan-core,
|
|
||||||
flake-parts,
|
flake-parts,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } ({
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
systems = [
|
systems = [
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
"aarch64-linux"
|
"aarch64-linux"
|
||||||
@@ -23,10 +22,12 @@
|
|||||||
clan = {
|
clan = {
|
||||||
meta.name = "__CHANGE_ME__"; # Ensure this is unique among all clans you want to use.
|
meta.name = "__CHANGE_ME__"; # Ensure this is unique among all clans you want to use.
|
||||||
|
|
||||||
# Make flake available in modules
|
# This makes flake inputs available in NixOS modules.
|
||||||
specialArgs.self = {
|
specialArgs = {
|
||||||
inherit (self) inputs nixosModules packages;
|
self = self;
|
||||||
|
inputs = self.inputs;
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit self;
|
inherit self;
|
||||||
machines = {
|
machines = {
|
||||||
# "jon" will be the hostname of the machine
|
# "jon" will be the hostname of the machine
|
||||||
@@ -109,5 +110,5 @@
|
|||||||
{
|
{
|
||||||
devShells.default = pkgs.mkShell { packages = [ inputs'.clan-core.packages.clan-cli ]; };
|
devShells.default = pkgs.mkShell { packages = [ inputs'.clan-core.packages.clan-cli ]; };
|
||||||
};
|
};
|
||||||
});
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
inputs.nixpkgs.follows = "clan-core/nixpkgs";
|
inputs.nixpkgs.follows = "clan-core/nixpkgs";
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{ self, clan-core, ... }:
|
{ self, clan-core, ... } @ inputs:
|
||||||
let
|
let
|
||||||
# Usage see: https://docs.clan.lol
|
# Usage see: https://docs.clan.lol
|
||||||
clan = clan-core.clanLib.buildClan {
|
clan = clan-core.clanLib.buildClan {
|
||||||
@@ -11,6 +11,12 @@
|
|||||||
# Ensure this is unique among all clans you want to use.
|
# Ensure this is unique among all clans you want to use.
|
||||||
meta.name = "__CHANGE_ME__";
|
meta.name = "__CHANGE_ME__";
|
||||||
|
|
||||||
|
# This makes flake inputs available in NixOS modules.
|
||||||
|
specialArgs = {
|
||||||
|
self = self;
|
||||||
|
inputs = inputs;
|
||||||
|
};
|
||||||
|
|
||||||
# All machines in ./machines will be imported.
|
# All machines in ./machines will be imported.
|
||||||
|
|
||||||
# Prerequisite: boot into the installer.
|
# Prerequisite: boot into the installer.
|
||||||
|
|||||||
Reference in New Issue
Block a user