too lazy to think of a message, so enjoy this pointless text. Good luck future me...

This commit is contained in:
Chris Kruining 2025-09-23 22:01:52 +02:00
parent 36629f6d02
commit ad2b96180f
Signed by: chris
SSH key fingerprint: SHA256:nG82MUfuVdRVyCKKWqhY+pCrbz9nbX6uzUns4RKa1Pg
6 changed files with 49 additions and 6 deletions

View file

@ -0,0 +1,22 @@
{
pkgs,
nixosLib,
clan-core,
...
}:
nixosLib.runTest (
{ ... }:
{
imports = [
clan-core.modules.nixosTest.clanTest
];
hostPkgs = pkgs;
name = "service-customer-portal";
testScript = ''
start_all()
'';
}
)

15
checks/flake-module.nix Normal file
View file

@ -0,0 +1,15 @@
{ self, ... }:
let
nixosLib = import (self.inputs.nixpkgs + "/nixos/lib") { };
in
{
perSystem = { pkgs, lib, ... }:
{
checks = {
service-customer-portal-test = import ./customer-portal {
inherit pkgs lib nixosLib self;
inherit (self.inputs) clan-core;
};
};
};
}

View file

@ -1,4 +1,4 @@
{ ... }:
{ self, ... }:
let
inherit (builtins) readFile;
in
@ -26,6 +26,8 @@ in
perInstance = { instanceName, settings, machine, roles, ... }: {
nixosModule = { config, pkgs, ... }: {
imports = [ self.inputs.amarth-customer-portal.nixosModules.default ];
services.amarth-customer-portal = {
enable = true;
};

View file

@ -1,13 +1,15 @@
{ ... }:
{ self, lib, ... }:
let
module = ./default.nix;
module = lib.modules.importApply ./default.nix { inherit self; };
in
{
clan.modules.customer-portal = module;
perSystem = { ... }: {
clan.nixosTests.customer-portal = {
imports = [ ./tests/vm/default.nix ];
imports = [
./tests/vm/default.nix
];
clan.modules."@amarth/customer-portal" = module;
};

View file

@ -4,9 +4,10 @@
packages = with pkgs; [
bash
sops
just
inputs'.clan-core.packages.clan-cli
];
};
};
}
}

View file

@ -34,6 +34,7 @@
clan-core.flakeModules.default
clan-core.flakeModules.testModule
# ./checks/flake-module.nix
./devShells/flake-module.nix
./clanServices/flake-module.nix
];