2024-06-08 22:19:36 +00:00
|
|
|
{ self, inputs, ... }:
|
2024-03-17 18:48:49 +00:00
|
|
|
{
|
2023-07-21 13:13:26 +00:00
|
|
|
flake.templates = {
|
|
|
|
new-clan = {
|
|
|
|
description = "Initialize a new clan flake";
|
|
|
|
path = ./new-clan;
|
|
|
|
};
|
2024-05-31 15:22:38 +00:00
|
|
|
empty = {
|
|
|
|
description = "A empty clan template. Primarily for usage with the clan ui";
|
|
|
|
path = ./empty;
|
|
|
|
};
|
2023-08-30 11:28:21 +00:00
|
|
|
default = self.templates.new-clan;
|
2024-06-08 22:19:36 +00:00
|
|
|
minimal = {
|
|
|
|
description = "for clans managed via (G)UI";
|
|
|
|
path = ./minimal;
|
|
|
|
};
|
2023-07-21 13:13:26 +00:00
|
|
|
};
|
2024-06-08 22:19:36 +00:00
|
|
|
flake.checks.x86_64-linux.template-minimal =
|
|
|
|
let
|
|
|
|
path = self.templates.minimal.path;
|
|
|
|
initialized = inputs.nixpkgs.legacyPackages.x86_64-linux.runCommand "minimal-clan-flake" { } ''
|
|
|
|
mkdir $out
|
|
|
|
cp -r ${path}/* $out
|
|
|
|
mkdir -p $out/machines/foo
|
|
|
|
echo '{ "nixpkgs": { "hostPlatform": "x86_64-linux" } }' > $out/machines/foo/settings.json
|
|
|
|
'';
|
|
|
|
evaled = (import "${initialized}/flake.nix").outputs {
|
|
|
|
self = evaled // {
|
|
|
|
outPath = initialized;
|
|
|
|
};
|
|
|
|
clan-core = self;
|
|
|
|
};
|
|
|
|
in
|
2024-06-17 07:34:04 +00:00
|
|
|
{
|
|
|
|
type = "derivation";
|
|
|
|
name = "minimal-clan-flake-check";
|
|
|
|
inherit (evaled.nixosConfigurations.foo.config.system.build.vm) drvPath outPath;
|
|
|
|
};
|
2023-07-21 13:13:26 +00:00
|
|
|
}
|