feat(nimbolus): init a http terraform backend
Some checks failed
Check meta / check_meta (pull_request) Successful in 14s
Check meta / check_dns (pull_request) Successful in 16s
Check workflows / check_workflows (pull_request) Successful in 19s
Build all the nodes / Jaccess01 (pull_request) Successful in 23s
Build all the nodes / Jaccess04 (pull_request) Successful in 26s
Run pre-commit on all files / pre-commit (push) Successful in 29s
Build all the nodes / compute01 (pull_request) Failing after 28s
Run pre-commit on all files / pre-commit (pull_request) Successful in 32s
Build all the nodes / ap01 (pull_request) Successful in 40s
Build all the nodes / netcore01 (pull_request) Successful in 23s
Build all the nodes / hypervisor01 (pull_request) Successful in 54s
Build all the nodes / cof02 (pull_request) Successful in 57s
Build all the nodes / bridge01 (pull_request) Successful in 59s
Build all the nodes / geo01 (pull_request) Successful in 57s
Build all the nodes / geo02 (pull_request) Successful in 58s
Build all the nodes / build01 (pull_request) Successful in 1m2s
Build all the nodes / hypervisor02 (pull_request) Successful in 49s
Build all the nodes / hypervisor03 (pull_request) Successful in 49s
Build all the nodes / netcore02 (pull_request) Successful in 27s
Build all the nodes / lab-router01 (pull_request) Successful in 46s
Build all the nodes / iso (pull_request) Successful in 57s
Build the shell / build-shell (pull_request) Successful in 22s
Build all the nodes / tower01 (pull_request) Successful in 45s
Build all the nodes / web02 (pull_request) Successful in 54s
Build all the nodes / web03 (pull_request) Successful in 1m5s
Build all the nodes / krz01 (pull_request) Successful in 1m45s
Build all the nodes / zulip01 (pull_request) Successful in 1m4s
Build all the nodes / vault01 (pull_request) Successful in 1m14s
Build all the nodes / rescue01 (pull_request) Successful in 1m21s
Build all the nodes / web01 (pull_request) Successful in 1m14s
Build all the nodes / storage01 (pull_request) Successful in 1m21s
Some checks failed
Check meta / check_meta (pull_request) Successful in 14s
Check meta / check_dns (pull_request) Successful in 16s
Check workflows / check_workflows (pull_request) Successful in 19s
Build all the nodes / Jaccess01 (pull_request) Successful in 23s
Build all the nodes / Jaccess04 (pull_request) Successful in 26s
Run pre-commit on all files / pre-commit (push) Successful in 29s
Build all the nodes / compute01 (pull_request) Failing after 28s
Run pre-commit on all files / pre-commit (pull_request) Successful in 32s
Build all the nodes / ap01 (pull_request) Successful in 40s
Build all the nodes / netcore01 (pull_request) Successful in 23s
Build all the nodes / hypervisor01 (pull_request) Successful in 54s
Build all the nodes / cof02 (pull_request) Successful in 57s
Build all the nodes / bridge01 (pull_request) Successful in 59s
Build all the nodes / geo01 (pull_request) Successful in 57s
Build all the nodes / geo02 (pull_request) Successful in 58s
Build all the nodes / build01 (pull_request) Successful in 1m2s
Build all the nodes / hypervisor02 (pull_request) Successful in 49s
Build all the nodes / hypervisor03 (pull_request) Successful in 49s
Build all the nodes / netcore02 (pull_request) Successful in 27s
Build all the nodes / lab-router01 (pull_request) Successful in 46s
Build all the nodes / iso (pull_request) Successful in 57s
Build the shell / build-shell (pull_request) Successful in 22s
Build all the nodes / tower01 (pull_request) Successful in 45s
Build all the nodes / web02 (pull_request) Successful in 54s
Build all the nodes / web03 (pull_request) Successful in 1m5s
Build all the nodes / krz01 (pull_request) Successful in 1m45s
Build all the nodes / zulip01 (pull_request) Successful in 1m4s
Build all the nodes / vault01 (pull_request) Successful in 1m14s
Build all the nodes / rescue01 (pull_request) Successful in 1m21s
Build all the nodes / web01 (pull_request) Successful in 1m14s
Build all the nodes / storage01 (pull_request) Successful in 1m21s
This commit is contained in:
parent
e1699ba735
commit
5514618d21
7 changed files with 142 additions and 1 deletions
|
@ -28,6 +28,7 @@ lib.extra.mkConfig {
|
||||||
"mastodon"
|
"mastodon"
|
||||||
# "netbox"
|
# "netbox"
|
||||||
"nextcloud"
|
"nextcloud"
|
||||||
|
"nimbolus"
|
||||||
"ollama-proxy"
|
"ollama-proxy"
|
||||||
"opengist"
|
"opengist"
|
||||||
"outline"
|
"outline"
|
||||||
|
|
42
machines/nixos/compute01/nimbolus/default.nix
Normal file
42
machines/nixos/compute01/nimbolus/default.nix
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
# SPDX-FileCopyrightText: 2025 Lubin Bailly <lubin@dgnum.eu>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: EUPL-1.2
|
||||||
|
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
sources,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
host = "nimbolus.dgnum.eu";
|
||||||
|
port = 9008;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
import = [ ./module.nix ];
|
||||||
|
services.nimbolus-tf = {
|
||||||
|
enable = true;
|
||||||
|
package = (import sources.kat-pkgs { inherit pkgs; }).nimbolus-tf-backend;
|
||||||
|
settings = {
|
||||||
|
LISTEN_ADDR = "127.0.0.1:${toString port}";
|
||||||
|
KMS_KEY_PATH = config.age.secrets."nimbolus-kms_key".path;
|
||||||
|
|
||||||
|
STORAGE_BACKEND = "s3";
|
||||||
|
STORAGE_S3_ENDPOINT = "s3.dgnum.eu";
|
||||||
|
STORAGE_S3_USE_SSL = "true";
|
||||||
|
STORAGE_S3_BUCKET = "nimbolus-dgnum";
|
||||||
|
STORAGE_S3_ACCESS_KEY = "GKefa111701f349de3988f0010";
|
||||||
|
STORAGE_S3_SECRET_KEY_FILE = config.age.secrets."nimbolus-s3_secret".path;
|
||||||
|
|
||||||
|
# TODO: configure openBAO
|
||||||
|
# AUTH_BASIC_ENABLED = "false";
|
||||||
|
# AUTH_JWT_OIDC_ISSUER_URL = "https://vault.dgnum.eu/v1/identity/oidc";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
age-secrets.autoMatch = [ "nimbolus" ];
|
||||||
|
|
||||||
|
dgn-web.simpleProxies.nimbolus = {
|
||||||
|
inherit host port;
|
||||||
|
};
|
||||||
|
}
|
96
machines/nixos/compute01/nimbolus/module.nix
Normal file
96
machines/nixos/compute01/nimbolus/module.nix
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
# SPDX-FileCopyrightText: 2025 Lubin Bailly <lubin@dgnum.eu>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: EUPL-1.2
|
||||||
|
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
sources,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (lib)
|
||||||
|
getExe
|
||||||
|
mapAttrsToList
|
||||||
|
mkEnableOption
|
||||||
|
mkIf
|
||||||
|
mkPackageOption
|
||||||
|
mkOption
|
||||||
|
;
|
||||||
|
inherit (lib.types)
|
||||||
|
attrsOf
|
||||||
|
str
|
||||||
|
;
|
||||||
|
|
||||||
|
cfg = config.services.nimbolus-tf;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.services.nimbolus-tf = {
|
||||||
|
enable = mkEnableOption "the nimbolus terraform http backend" { pkgsText = "kat-pkgs"; };
|
||||||
|
package = mkPackageOption (import sources.kat-pkgs { inherit pkgs; }) "nimbolus-tf-backend";
|
||||||
|
user = mkOption {
|
||||||
|
type = str;
|
||||||
|
description = ''
|
||||||
|
User used by the nimbolus server.
|
||||||
|
'';
|
||||||
|
default = "nimbolus";
|
||||||
|
};
|
||||||
|
group = mkOption {
|
||||||
|
type = str;
|
||||||
|
description = ''
|
||||||
|
Group used by the nimbolus server.
|
||||||
|
'';
|
||||||
|
default = "nimbolus";
|
||||||
|
};
|
||||||
|
settings = mkOption {
|
||||||
|
type = attrsOf str;
|
||||||
|
default = { };
|
||||||
|
description = ''
|
||||||
|
Environment variables for nimbolus configuration.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
users = {
|
||||||
|
users.${cfg.user}.isSystemUser = true;
|
||||||
|
groups.${cfg.group} = { };
|
||||||
|
};
|
||||||
|
systemd.services."nimbolus-tf" = {
|
||||||
|
description = "Nimbolus terraform http backend";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = getExe cfg.package;
|
||||||
|
Environment = mapAttrsToList (name: value: "${name}=${value}") cfg.settings;
|
||||||
|
User = cfg.user;
|
||||||
|
Group = cfg.group;
|
||||||
|
|
||||||
|
StateDirectory = "nimbolus-tf";
|
||||||
|
StateDirectoryMode = "0700";
|
||||||
|
WorkingDirectory = "/var/lib/nimbolus-tf";
|
||||||
|
|
||||||
|
# Hardening
|
||||||
|
CapabilityBoundingSet = "";
|
||||||
|
PrivateDevices = true;
|
||||||
|
ProtectClock = true;
|
||||||
|
ProtectKernelLogs = true;
|
||||||
|
ProtectControlGroups = true;
|
||||||
|
ProtectKernelModules = true;
|
||||||
|
RestrictNamespaces = true;
|
||||||
|
ProtectHostname = true;
|
||||||
|
LockPersonality = true;
|
||||||
|
RestrictRealtime = true;
|
||||||
|
ProtectHome = true;
|
||||||
|
ProtectProc = "noaccess";
|
||||||
|
ProcSubset = "pid";
|
||||||
|
PrivateUsers = true;
|
||||||
|
UMask = "0077";
|
||||||
|
ProtectKernelTunables = true;
|
||||||
|
RestrictAddressFamilies = "AF_INET AF_INET6";
|
||||||
|
SystemCallFilter = "~@clock @cpu-emulation @debug @module @mount @obsolete @privileged @raw-io @reboot @resources @swap";
|
||||||
|
MemoryDenyWriteExecute = true;
|
||||||
|
SystemCallArchitectures = "native";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
BIN
machines/nixos/compute01/secrets/nimbolus-kms_key
Normal file
BIN
machines/nixos/compute01/secrets/nimbolus-kms_key
Normal file
Binary file not shown.
BIN
machines/nixos/compute01/secrets/nimbolus-s3_secret
Normal file
BIN
machines/nixos/compute01/secrets/nimbolus-s3_secret
Normal file
Binary file not shown.
|
@ -25,6 +25,8 @@
|
||||||
"netbox-environment_file"
|
"netbox-environment_file"
|
||||||
"nextcloud-adminpass_file"
|
"nextcloud-adminpass_file"
|
||||||
"nextcloud-s3_secret_file"
|
"nextcloud-s3_secret_file"
|
||||||
|
"nimbolus-kms_key"
|
||||||
|
"nimbolus-s3_secret"
|
||||||
"opengist-environment_file"
|
"opengist-environment_file"
|
||||||
"outline-oidc_client_secret_file"
|
"outline-oidc_client_secret_file"
|
||||||
"outline-smtp_password_file"
|
"outline-smtp_password_file"
|
||||||
|
|
|
@ -37,8 +37,8 @@
|
||||||
"dgn-web"
|
"dgn-web"
|
||||||
"django-apps"
|
"django-apps"
|
||||||
"extranix"
|
"extranix"
|
||||||
"openbao"
|
|
||||||
"forgejo-multiuser-nix-runners"
|
"forgejo-multiuser-nix-runners"
|
||||||
|
"openbao"
|
||||||
])
|
])
|
||||||
++ [
|
++ [
|
||||||
"${sources.agenix}/modules/age.nix"
|
"${sources.agenix}/modules/age.nix"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue