1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 11:37:44 +00:00

Update rebuild script and fix grafana

This commit is contained in:
RGBCube 2024-01-16 12:42:07 +03:00
parent afa708fa8d
commit 621812d645
No known key found for this signature in database
2 changed files with 17 additions and 3 deletions

View file

@ -35,7 +35,7 @@ in serverSystemConfiguration {
server.domain = fqdn;
server.http_addr = "::";
server.port = 8999;
server.http_port = 8999;
users.default_theme = "system";
};
@ -69,7 +69,7 @@ in serverSystemConfiguration {
useACMEHost = domain;
locations."/" = {
proxyPass = "http://[::]:${toString config.services.grafana.settings.server.port}";
proxyPass = "http://[::]:${toString config.services.grafana.settings.server.http_port}";
proxyWebsockets = true;
};
};

View file

@ -14,5 +14,19 @@ def main --wrapped [
"--log-format internal-json"
] | append $arguments
sudo sh -c $"nixos-rebuild switch ($flags | str join ' ') |& nom --json"
if host == (hostname) {
sudo sh -c $"nixos-rebuild switch ($flags | str join ' ') |& nom --json"
} else {
git ls-files | tar -cf - --files-from - | zstd -c3 | save --force /tmp/config.tar.zst
scp -q /tmp/config.tar.zst ($host + ':/tmp/')
ssh -q $host $"
rm -rf /tmp/config
mkdir /tmp/config
cd /tmp/config
tar -xf /tmp/config.tar.zst
sh -c 'sudo nixos-rebuild switch ($flags | str join ' ') |& nom --json'
"
}
}