Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c26a1fde31 | ||
|
|
e5e4ac5e7f |
@@ -38,7 +38,7 @@ in
|
|||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
repoOwner = lib.mkOption {
|
repoOwner = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "User that owns the configuration checkout";
|
description = "User that owns the configuration checkout";
|
||||||
|
|||||||
@@ -48,9 +48,11 @@ runas git tag -v "$latest" || {
|
|||||||
sha=$(runas git rev-list -1 "$latest")
|
sha=$(runas git rev-list -1 "$latest")
|
||||||
report_status "pending" "deploying $latest" "$sha"
|
report_status "pending" "deploying $latest" "$sha"
|
||||||
|
|
||||||
flake_url="git+${GITEA_URL}/${GITEA_REPO}?ref=refs/tags/${latest}&rev=${sha}#$HOSTNAME"
|
runas git checkout "$latest"
|
||||||
|
runas tee .nixos-label <<< "$latest" >/dev/null
|
||||||
|
runas git add .nixos-label
|
||||||
|
|
||||||
if nixos-rebuild switch --flake "$flake_url"; then
|
if nixos-rebuild switch --flake ".#$HOSTNAME"; then
|
||||||
echo "$latest" > "$STATE_DIR/tag"
|
echo "$latest" > "$STATE_DIR/tag"
|
||||||
report_status "success" "deployed $latest" "$sha"
|
report_status "success" "deployed $latest" "$sha"
|
||||||
echo "deployed $latest"
|
echo "deployed $latest"
|
||||||
|
|||||||
Reference in New Issue
Block a user