forked from CCCHH/nix-infra
Use new spaceapid version and configure temp. and humid. sensors
This commit is contained in:
parent
ec5430ee34
commit
5b61a31904
3 changed files with 128 additions and 7 deletions
|
@ -2,9 +2,9 @@
|
|||
|
||||
let
|
||||
spaceapidSrc = builtins.fetchGit {
|
||||
url = "https://gitlab.hamburg.ccc.de/ccchh/spaceapid.git";
|
||||
url = "https://git.hamburg.ccc.de/CCCHH/spaceapid.git";
|
||||
ref = "main";
|
||||
rev = "baf73f33e7e8ef763869a1677ebf5cd2f334d897";
|
||||
rev = "42a012239fc7004c120a74c555a48202f5775bac";
|
||||
};
|
||||
spaceapid = pkgs.buildGoModule {
|
||||
pname = "spaceapid";
|
||||
|
@ -16,6 +16,8 @@ let
|
|||
# use the nonexistend vendored dependencies.
|
||||
vendorHash = null;
|
||||
};
|
||||
spaceapidConfigResponse = pkgs.writeText "spaceapid-config-ccchh-response.json" (builtins.readFile spaceapid-config/ccchh-response.json);
|
||||
spaceapidConfigDynamic = pkgs.writeText "spaceapid-config-ccchh-dynamic.json" (builtins.readFile spaceapid-config/ccchh-dynamic.json);
|
||||
in
|
||||
{
|
||||
users.users.spaceapi = {
|
||||
|
@ -32,20 +34,18 @@ in
|
|||
After = [ "network.target" "network-online.target" ];
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${spaceapid}/bin/spaceapid";
|
||||
ExecStart = "${spaceapid}/bin/spaceapid -c ${spaceapidConfigResponse},${spaceapidConfigDynamic},/secrets/spaceapid-config-ccchh-credentials.secret";
|
||||
User = "spaceapi";
|
||||
Group = "spaceapi";
|
||||
Restart = "on-failure";
|
||||
Environment = "BA_USERNAME=dooris JSON_TEMPLATE_PATH=${spaceapidSrc}/ccchh-template.json";
|
||||
EnvironmentFile = "/secrets/spaceapid-environment-secrets.secret";
|
||||
StateDirectory = "spaceapid";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
deployment.keys = {
|
||||
"spaceapid-environment-secrets.secret" = {
|
||||
keyCommand = [ "pass" "noc/vm-secrets/chaosknoten/public-web-static/spaceapid-environment-secrets" ];
|
||||
"spaceapid-config-ccchh-credentials.secret" = {
|
||||
keyCommand = [ "pass" "noc/vm-secrets/chaosknoten/public-web-static/spaceapid-config-ccchh-credentials" ];
|
||||
destDir = "/secrets";
|
||||
user = "spaceapi";
|
||||
group = "spaceapi";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue