templates(flake-parts-minimal): Fix erroneous removal
This commit is contained in:
@@ -43,6 +43,7 @@ def test_clan_core_templates(
|
||||
assert list(templates.builtins.get("clan", {}).keys()) == [
|
||||
"default",
|
||||
"flake-parts",
|
||||
"flake-parts-minimal",
|
||||
"minimal",
|
||||
]
|
||||
|
||||
|
||||
2
templates/clan/flake-parts-minimal/.envrc
Normal file
2
templates/clan/flake-parts-minimal/.envrc
Normal file
@@ -0,0 +1,2 @@
|
||||
# shellcheck shell=bash
|
||||
use flake
|
||||
2
templates/clan/flake-parts-minimal/.gitignore
vendored
Normal file
2
templates/clan/flake-parts-minimal/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
result
|
||||
.direnv/
|
||||
22
templates/clan/flake-parts-minimal/checks.nix
Normal file
22
templates/clan/flake-parts-minimal/checks.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
9
templates/clan/flake-parts-minimal/clan.nix
Normal file
9
templates/clan/flake-parts-minimal/clan.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.clan.flakeModules.default
|
||||
];
|
||||
clan = {
|
||||
meta.name = "__CHANGE_ME__";
|
||||
};
|
||||
}
|
||||
17
templates/clan/flake-parts-minimal/devshells.nix
Normal file
17
templates/clan/flake-parts-minimal/devshells.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
_: {
|
||||
perSystem =
|
||||
{
|
||||
pkgs,
|
||||
inputs',
|
||||
...
|
||||
}:
|
||||
{
|
||||
devShells = {
|
||||
default = pkgs.mkShellNoCC {
|
||||
packages = [
|
||||
inputs'.clan.packages.default
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
31
templates/clan/flake-parts-minimal/flake.nix
Normal file
31
templates/clan/flake-parts-minimal/flake.nix
Normal 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
|
||||
];
|
||||
}
|
||||
);
|
||||
}
|
||||
10
templates/clan/flake-parts-minimal/formatter.nix
Normal file
10
templates/clan/flake-parts-minimal/formatter.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
_: {
|
||||
perSystem =
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
formatter = pkgs.nixfmt;
|
||||
};
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user