Merge branch 'main' of ssh://git.amarth.cloud/amarth/services
This commit is contained in:
commit
72c0dbe541
10 changed files with 138 additions and 7 deletions
22
checks/customer-portal/default.nix
Normal file
22
checks/customer-portal/default.nix
Normal 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
15
checks/flake-module.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -78,6 +78,45 @@ in
|
|||
role = "server";
|
||||
tokenFile = config.clan.core.vars.generators.k3s.files.token.path;
|
||||
clusterInit = true;
|
||||
|
||||
autoDeployCharts = {
|
||||
harbor = {
|
||||
name = "harbor";
|
||||
repo = "https://helm.goharbor.io";
|
||||
version = "1.14.0";
|
||||
hash = "sha256-fMP7q1MIbvzPGS9My91vbQ1d3OJMjwc+o8YE/BXZaYU=";
|
||||
values = {
|
||||
existingSecretAdminPassword = "harbor-admin";
|
||||
expose = {
|
||||
tls = {
|
||||
enabled = true;
|
||||
certSource = "secret";
|
||||
secret.secretName = "my-tls-secret";
|
||||
};
|
||||
ingress = {
|
||||
hosts.core = "example.com";
|
||||
className = "nginx";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
crossplane = {
|
||||
name = "crossplane";
|
||||
repo = "https://charts.crossplane.io/stable";
|
||||
version = "2.0.2";
|
||||
hash = "sha256-5gk/dvOJAy5O++QkrnS0oVZaanDgNmF0107qKyri3Js=";
|
||||
|
||||
targetNamespace = "crossplane-system";
|
||||
createNamespace = true;
|
||||
|
||||
values = {
|
||||
replicas = 1;
|
||||
|
||||
deploymentStrategy = "RollingUpdate";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
packages = with pkgs; [
|
||||
bash
|
||||
sops
|
||||
just
|
||||
|
||||
inputs'.clan-core.packages.clan-cli
|
||||
];
|
||||
|
|
|
|||
|
|
@ -34,8 +34,10 @@
|
|||
clan-core.flakeModules.default
|
||||
clan-core.flakeModules.testModule
|
||||
|
||||
./devShells/flake-module.nix
|
||||
# ./checks/flake-module.nix
|
||||
./clanServices/flake-module.nix
|
||||
./devShells/flake-module.nix
|
||||
./pkgs/flake-module.nix
|
||||
];
|
||||
|
||||
flake = {
|
||||
|
|
|
|||
15
pkgs/crossplane-cli/default.nix
Normal file
15
pkgs/crossplane-cli/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
pkgs.buildGoModule rec {
|
||||
pname = "crossplane";
|
||||
version = "2.0.2";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "crossplane";
|
||||
repo = "crossplane";
|
||||
tag = "v2.0.2";
|
||||
sha256 = "sha256-EIDrBQmtMaHlapVNUYABKejIj1I02g5R5h4cADZvtAg=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-8VqKtWbnDGbmgxT13v2d4+nXHouZ4hi2c2m66SAd1KM=";
|
||||
}
|
||||
19
pkgs/crossplane/default.nix
Normal file
19
pkgs/crossplane/default.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
pkgs.buildGoModule rec {
|
||||
pname = "crossplane-cli";
|
||||
version = "2.0.2";
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
earthly
|
||||
];
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "crossplane";
|
||||
repo = "crossplane";
|
||||
tag = "v2.0.2";
|
||||
sha256 = "sha256-EIDrBQmtMaHlapVNUYABKejIj1I02g5R5h4cADZvtAg=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-8VqKtWbnDGbmgxT13v2d4+nXHouZ4hi2c2m66SAd1KM=";
|
||||
}
|
||||
14
pkgs/flake-module.nix
Normal file
14
pkgs/flake-module.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [];
|
||||
|
||||
perSystem =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
packages = {
|
||||
# crossplane = pkgs.callPackage ./crossplane { };
|
||||
crossplane-cli = pkgs.callPackage ./crossplane-cli { };
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue