templates(flake-parts-minimal): Fix erroneous removal

This commit is contained in:
a-kenji
2025-08-09 00:35:02 +02:00
parent 110d1d4921
commit b6bccd218a
9 changed files with 98 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ def test_clan_core_templates(
assert list(templates.builtins.get("clan", {}).keys()) == [
"default",
"flake-parts",
"flake-parts-minimal",
"minimal",
]

View File

@@ -0,0 +1,2 @@
# shellcheck shell=bash
use flake

View File

@@ -0,0 +1,2 @@
result
.direnv/

View File

@@ -0,0 +1,22 @@
{ self, ... }:
{
perSystem =
{
self',
lib,
system,
...
}:
{
checks =
let
nixosMachines = lib.mapAttrs' (
name: config: lib.nameValuePair "nixos-${name}" config.config.system.build.toplevel
) ((lib.filterAttrs (_: config: config.pkgs.system == system)) self.nixosConfigurations);
packages = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") self'.packages;
devShells = lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells;
in
nixosMachines // packages // devShells;
};
}

View File

@@ -0,0 +1,9 @@
{ inputs, ... }:
{
imports = [
inputs.clan.flakeModules.default
];
clan = {
meta.name = "__CHANGE_ME__";
};
}

View File

@@ -0,0 +1,17 @@
_: {
perSystem =
{
pkgs,
inputs',
...
}:
{
devShells = {
default = pkgs.mkShellNoCC {
packages = [
inputs'.clan.packages.default
];
};
};
};
}

View File

@@ -0,0 +1,31 @@
{
inputs = {
clan.url = "https://git.clan.lol/clan/clan-core/archive/main.tar.gz";
nixpkgs.follows = "clan/nixpkgs";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "clan/nixpkgs";
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } (
{ ... }:
{
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
imports = [
./checks.nix
./clan.nix
./devshells.nix
./formatter.nix
];
}
);
}

View File

@@ -0,0 +1,10 @@
_: {
perSystem =
{
pkgs,
...
}:
{
formatter = pkgs.nixfmt;
};
}

View File

@@ -35,6 +35,10 @@
description = "Flake-parts";
path = ./clan/flake-parts;
};
flake-parts-minimal = {
description = "Minimal flake-parts clan template";
path = ./clan/flake-parts-minimal;
};
};
};
in