This commit is contained in:
Floweynt
2026-09-13 14:33:29 -05:00
parent f1eb050ed6
commit 5888038c32
3 changed files with 17 additions and 12 deletions
+10 -1
View File
@@ -13,7 +13,16 @@ in
{
imports = [ ./modules/autodeploy.nix ];
services.server-autodeploy.enable = true;
services.server-autodeploy = {
enable = true;
giteaUrl = "https://git.floweytf.com/";
giteaRepo = "server/server-config";
tokenFile = "${hostInfo.paths.secrets}/gitea-autodeploy-token";
allowedSigners = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPaGpTX3EzfezVc2nl3MgsKVamYYP2h2VJaRny8pZkvi flowey@arch"
];
stateDir = hostInfo.paths.config;
};
assertions =
let
+3 -2
View File
@@ -47,9 +47,10 @@
mainGateway = "10.0.0.1";
isVm = false;
paths = {
server = "/persist/@containers";
data = "/persist/@containers/data";
server = "/persist/@containers/";
data = "/persist/@containers/data/";
secrets = "/persist/@secrets/";
config = "/persist/@config/";
};
};
+4 -9
View File
@@ -2,7 +2,6 @@
config,
lib,
pkgs,
hostInfo,
customPkgs,
...
}:
@@ -25,27 +24,23 @@ in
giteaUrl = lib.mkOption {
type = lib.types.str;
default = "https://git.floweytf.com";
};
giteaRepo = lib.mkOption {
type = lib.types.str;
default = "server/server-config";
};
tokenFile = lib.mkOption {
type = lib.types.str;
default = "${hostInfo.paths.secrets}/gitea-autodeploy-token";
};
allowedSignersFile = lib.mkOption {
type = lib.types.str;
default = "${hostInfo.paths.secrets}/autodeploy-allowed-signers";
allowedSigners = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
};
stateDir = lib.mkOption {
type = lib.types.str;
default = "/persist/@autodeploy";
};
};
@@ -59,7 +54,7 @@ in
GITEA_URL = cfg.giteaUrl;
GITEA_REPO = cfg.giteaRepo;
TOKEN_FILE = cfg.tokenFile;
ALLOWED_SIGNERS = cfg.allowedSignersFile;
ALLOWED_SIGNERS = builtins.toFile "signers" (lib.join "\n" cfg.allowedSigners);
DEPLOY_BRANCH = cfg.branch;
STATE_DIR = cfg.stateDir;
REPO_DIR = "/persist/@configuration";