Template: fix flake-parts template

This commit is contained in:
Johannes Kirschbauer
2024-08-27 10:45:28 +02:00
parent faf20dc197
commit 732ba9d176
4 changed files with 17 additions and 11 deletions

View File

@@ -163,7 +163,7 @@ let
);
##################################################
allMachines = inventory.machines or { } // config.machines or { } // testMachines;
allMachines = inventory.machines or { } // machines // testMachines;
supportedSystems = [
"x86_64-linux"

View File

@@ -102,7 +102,7 @@ def register_create_parser(parser: argparse.ArgumentParser) -> None:
parser.add_argument(
"--template",
type=str,
choices=["default", "minimal"],
choices=["default", "minimal", "flake-parts"],
help="Clan template name",
default="default",
)

View File

@@ -2,7 +2,7 @@
description = "<Put your description here>";
inputs.clan-core.url = "https://git.clan.lol/clan/clan-core/archive/main.tar.gz";
inputs.nixpkgs.url = "clan/nixpkgs";
inputs.nixpkgs.follows = "clan-core/nixpkgs";
inputs.flake-parts.url = "github:hercules-ci/flake-parts";
inputs.flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
@@ -30,11 +30,11 @@
inherit (self) inputs nixosModules packages;
};
directory = self;
machines =
{ pkgs, ... }:
{
# "jon" will be the hostname of the machine
jon = {
machines = {
# "jon" will be the hostname of the machine
jon =
{ pkgs, ... }:
{
imports = [
./modules/shared.nix
./modules/disko.nix
@@ -66,8 +66,10 @@
# the controller can be offline and routing still works.
clan.core.networking.zerotier.controller.enable = true;
};
# "sara" will be the hostname of the machine
sara = {
# "sara" will be the hostname of the machine
sara =
{ pkgs, ... }:
{
imports = [
./modules/shared.nix
./modules/disko.nix
@@ -102,7 +104,7 @@
*/
# clan.core.networking.zerotier.networkId = builtins.readFile ../jon/facts/zerotier-network-id;
};
};
};
};
perSystem =
{ pkgs, inputs', ... }:

View File

@@ -11,6 +11,10 @@
description = "for clans managed via (G)UI";
path = ./minimal;
};
flake-parts = {
description = "Flake-parts";
path = ./flake-parts;
};
};
};
}