mirror of
https://github.com/RGBCube/ncc
synced 2025-07-29 19:17:45 +00:00
Update rebuild script and fix grafana
This commit is contained in:
parent
afa708fa8d
commit
621812d645
2 changed files with 17 additions and 3 deletions
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
|
16
rebuild.nu
16
rebuild.nu
|
@ -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'
|
||||
"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue