mirror of
https://github.com/RGBCube/ncc
synced 2025-07-29 11:07:44 +00:00
fix: make cache serve s3
This commit is contained in:
parent
8aead69aba
commit
31bf6bc062
5 changed files with 20 additions and 39 deletions
18
hosts/best/cache.nix
Normal file
18
hosts/best/cache.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ self, config, lib, ... }: let
|
||||
inherit (config.networking) domain;
|
||||
inherit (lib) merge;
|
||||
|
||||
fqdn = "cache.${domain}";
|
||||
in {
|
||||
imports = [(self + /modules/nginx.nix)];
|
||||
|
||||
services.nginx.virtualHosts.${fqdn} = merge config.services.nginx.sslTemplate {
|
||||
locations."/" = {
|
||||
extraConfig = /* nginx */ ''
|
||||
proxy_set_header Host "hercules.${config.services.garage.settings.s3_api.root_domain}";
|
||||
'';
|
||||
|
||||
proxyPass = "http://${config.services.garage.settings.s3_api.api_bind_addr}";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -3,8 +3,8 @@
|
|||
inherit (lib) enabled merge;
|
||||
|
||||
fqdn = "s3.${domain}";
|
||||
portS3 = 8004;
|
||||
portRpc = 8005;
|
||||
portS3 = 8003;
|
||||
portRpc = 8004;
|
||||
in {
|
||||
imports = [(self + /modules/nginx.nix)];
|
||||
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
{ self, config, lib, pkgs, ... }: let
|
||||
inherit (config.networking) domain;
|
||||
inherit (lib) enabled merge;
|
||||
|
||||
fqdn = "cache.${domain}";
|
||||
port = 8003;
|
||||
in {
|
||||
imports = [(self + /modules/nginx.nix)];
|
||||
|
||||
secrets.nixServeKey = {
|
||||
file = ./key.age;
|
||||
owner = "nix-serve";
|
||||
};
|
||||
|
||||
services.nix-serve = enabled {
|
||||
package = pkgs.nix-serve-ng;
|
||||
secretKeyFile = config.secrets.nixServeKey.path;
|
||||
|
||||
# Not ::1 because nix-serve doesn't like that.
|
||||
bindAddress = "127.0.0.1";
|
||||
inherit port;
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts.${fqdn} = merge config.services.nginx.sslTemplate {
|
||||
locations."/".proxyPass = "http://127.0.0.1:${toString port}";
|
||||
};
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 8y3T6w +fPOWUbuD+JGfimuJnNa0wBpQyxC2nXGLGFdxAhfwns
|
||||
bonLQGaN8rp0KmZHW9efsPyCQ8eujuxEB9p7Ewdp4Bo
|
||||
-> ssh-ed25519 CzqbPQ 91liBCRmtq4YGG8Zz6+ObSEDlGVmA8Jn+NPQzTLQoGY
|
||||
Gurxg2Tp1sdpz7xESiZCVw5BAuMI5vYH/UtdrFH9vd0
|
||||
--- MJVivHhiqkVMke+mib2EZiFeZFX/BnFuEUctH+fdwd4
|
||||
8k
|
||||
Ôh}p©®lðz¾!I{xÃ
<0A>z@SíZy/‘ôC3JÞQ:t¯ñ»NS&<26>CXw<58>·`%ÕûE {£f'Oä<Äq‹<71>ï\‚;yù‚S—AöùÒ!‚Û_Ù<pñJ „@#‰Û·É(Õ63(«/G·ØgãIvÄ%ýºœ†
|
|
@ -12,8 +12,6 @@ in {
|
|||
"hosts/best/hercules/secrets.age".publicKeys = [ best ] ++ admins;
|
||||
"hosts/best/hercules/token.age".publicKeys = [ best ] ++ admins;
|
||||
|
||||
"hosts/best/nix-serve/key.age".publicKeys = [ best ] ++ admins;
|
||||
|
||||
# cube
|
||||
"hosts/cube/id.age".publicKeys = [ cube ] ++ admins;
|
||||
"hosts/cube/password.rgb.age".publicKeys = [ cube ] ++ admins;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue