improve
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user