WIP: test: Set up service tests
This commit is contained in:
parent
767a14ab6e
commit
3b03689d19
4 changed files with 29 additions and 2 deletions
|
|
@ -6,6 +6,8 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
x86_64-linux = lib.mergeAttrsList [
|
x86_64-linux = lib.mergeAttrsList [
|
||||||
|
flake-inputs.self.nixosConfigurations.hetzner-1.config.serviceTests
|
||||||
|
|
||||||
{
|
{
|
||||||
nix = checkLib.mkLint {
|
nix = checkLib.mkLint {
|
||||||
name = "nix-lints";
|
name = "nix-lints";
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
flake-inputs.tlaternet-webserver.nixosModules.default
|
flake-inputs.tlaternet-webserver.nixosModules.default
|
||||||
|
|
||||||
"${modulesPath}/profiles/minimal.nix"
|
"${modulesPath}/profiles/minimal.nix"
|
||||||
(import ../modules)
|
../modules
|
||||||
|
|
||||||
./services/backups.nix
|
./services/backups.nix
|
||||||
./services/battery-manager.nix
|
./services/battery-manager.nix
|
||||||
|
|
|
||||||
|
|
@ -1 +1,6 @@
|
||||||
{ imports = [ ./crowdsec ]; }
|
{
|
||||||
|
imports = [
|
||||||
|
./crowdsec
|
||||||
|
./serviceTests.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
|
||||||
20
modules/serviceTests.nix
Normal file
20
modules/serviceTests.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
/**
|
||||||
|
Module to make writing service-specific tests easy.
|
||||||
|
*/
|
||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkOption types;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
serviceTests = mkOption {
|
||||||
|
type = types.attrsOf types.package;
|
||||||
|
|
||||||
|
description = ''
|
||||||
|
NixOS tests to run.
|
||||||
|
'';
|
||||||
|
|
||||||
|
default = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue