WIP: add customer-portal module
This commit is contained in:
parent
25024f7fbd
commit
36629f6d02
6 changed files with 242 additions and 5 deletions
0
clanServices/customer-portal/README.md
Normal file
0
clanServices/customer-portal/README.md
Normal file
35
clanServices/customer-portal/default.nix
Normal file
35
clanServices/customer-portal/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ ... }:
|
||||
let
|
||||
inherit (builtins) readFile;
|
||||
in
|
||||
{
|
||||
_class = "clan.service";
|
||||
|
||||
manifest = {
|
||||
name = "amarth-services/customer-portal";
|
||||
description = "Service to host Amarth Cloud's customer-portal";
|
||||
categories = [ "System" "Network" "Containers" "Virtualisation" ];
|
||||
readme = readFile ./README.md;
|
||||
};
|
||||
|
||||
#==============================================================================================================
|
||||
# Server configuration
|
||||
#==============================================================================================================
|
||||
roles.server = {
|
||||
interface = { lib, ... }:
|
||||
let
|
||||
inherit (lib) mkOption types toString;
|
||||
in
|
||||
{
|
||||
options = {};
|
||||
};
|
||||
|
||||
perInstance = { instanceName, settings, machine, roles, ... }: {
|
||||
nixosModule = { config, pkgs, ... }: {
|
||||
services.amarth-customer-portal = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
15
clanServices/customer-portal/flake-module.nix
Normal file
15
clanServices/customer-portal/flake-module.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ ... }:
|
||||
let
|
||||
module = ./default.nix;
|
||||
in
|
||||
{
|
||||
clan.modules.customer-portal = module;
|
||||
|
||||
perSystem = { ... }: {
|
||||
clan.nixosTests.customer-portal = {
|
||||
imports = [ ./tests/vm/default.nix ];
|
||||
|
||||
clan.modules."@amarth/customer-portal" = module;
|
||||
};
|
||||
};
|
||||
}
|
||||
37
clanServices/customer-portal/tests/vm/default.nix
Normal file
37
clanServices/customer-portal/tests/vm/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
name = "service-customer-portal";
|
||||
|
||||
clan = {
|
||||
directory = ./.;
|
||||
|
||||
inventory = {
|
||||
machines = {
|
||||
node1 = {};
|
||||
};
|
||||
|
||||
instances = {
|
||||
customer-portal = {
|
||||
module = {
|
||||
name = "@amarth/customer-portal";
|
||||
input = "self";
|
||||
};
|
||||
|
||||
roles.server.machines."node1" = {};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
machines = {
|
||||
node1 = {};
|
||||
};
|
||||
};
|
||||
|
||||
nodes = {
|
||||
node1 = {};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue