chore: resonite, storage and forgejo setup
This commit is contained in:
parent
d79fe97b7e
commit
279e95a1ec
18 changed files with 203 additions and 167 deletions
31
systems/rena/impl/forgejo.nix
Normal file
31
systems/rena/impl/forgejo.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
database.type = "postgres";
|
||||
lfs.enable = true;
|
||||
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = "git.avali.network";
|
||||
ROOT_URL = "https://git.avali.network/";
|
||||
HTTP_ADDR = "127.0.0.1";
|
||||
HTTP_PORT = 3000;
|
||||
};
|
||||
|
||||
service = {
|
||||
DISABLE_REGISTRATION = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."git.avali.network" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:3000";
|
||||
};
|
||||
extraConfig = ''
|
||||
client_max_body_size 512M;
|
||||
'';
|
||||
};
|
||||
}
|
||||
35
systems/rena/impl/resonite.nix
Normal file
35
systems/rena/impl/resonite.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
sops = {
|
||||
secrets = {
|
||||
"resonite/steam/username" = { };
|
||||
"resonite/steam/password" = { };
|
||||
"resonite/steam/branch-password" = { };
|
||||
"resonite/username" = { };
|
||||
"resonite/password" = { };
|
||||
};
|
||||
|
||||
templates = {
|
||||
"resonite/.env".content = ''
|
||||
STEAM_USER=${config.sops.placeholder."resonite/steam/username"}
|
||||
STEAM_PASS=${config.sops.placeholder."resonite/steam/password"}
|
||||
BETA_CODE=${config.sops.placeholder."resonite/steam/branch-password"}
|
||||
'';
|
||||
"resonite/config.json".content = builtins.toJSON {
|
||||
universeId = null;
|
||||
tickRate = 60.0;
|
||||
maxConcurrentAssetTransfers = 8;
|
||||
|
||||
loginCredential = config.sops.placeholder."resonite/username";
|
||||
loginPassword = config.sops.placeholder."resonite/password";
|
||||
loginRequired = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.resonite-server = {
|
||||
enable = false;
|
||||
environmentFiles = [ config.sops.templates."resonite/.env".path ];
|
||||
settingsFile = config.sops.templates."resonite/config.json".path;
|
||||
};
|
||||
}
|
||||
17
systems/rena/impl/storage.nix
Normal file
17
systems/rena/impl/storage.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /srv/storage 0775 root wheel -"
|
||||
];
|
||||
|
||||
services.nginx.virtualHosts."storage.avali.network" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
||||
root = "/srv/storage";
|
||||
|
||||
extraConfig = ''
|
||||
autoindex on;
|
||||
autoindex_localtime on;
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue