module(garage,awscli): Add garage and awscli module

- Add garage module.
- Enable garage module on Tytonidae.
- Add awscli module.
- Enable awscli module on Tytonidae.
This commit is contained in:
ulic-youthlic 2025-06-02 19:34:47 +08:00
parent e65183b4a4
commit bebfd63f40
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
10 changed files with 121 additions and 2 deletions

View file

@ -36,6 +36,10 @@
baseDomain = "youthlic.social";
radicle-explorer.enable = true;
outer-wilds-text-adventure.enable = true;
garage = {
enable = true;
target = "100.73.250.25";
};
};
juicity.server.enable = true;
};

View file

@ -55,6 +55,7 @@
owncast.enable = true;
wshowkeys.enable = true;
obs.enable = true;
garage.enable = true;
};
};

View file

@ -8,6 +8,7 @@ in {
imports = [
./radicle-explorer.nix
./OuterWildsTextAdventure.nix
./garage.nix
];
options = {
youthlic.programs.caddy = {

View file

@ -0,0 +1,32 @@
{
config,
lib,
...
}: let
cfg = config.youthlic.programs.caddy.garage;
caddy-cfg = config.youthlic.programs.caddy;
in {
options = {
youthlic.programs.caddy.garage = {
enable = lib.mkEnableOption "caddy.garage";
target = lib.mkOption {
type = lib.types.str;
example = "127.0.0.1";
};
};
};
config = lib.mkIf (cfg.enable && caddy-cfg.enable) {
services.caddy.virtualHosts = {
"wallpaper.${caddy-cfg.baseDomain}" = {
extraConfig = ''
reverse_proxy ${cfg.target}:8494
'';
};
"s3.${caddy-cfg.baseDomain}" = {
extraConfig = ''
reverse_proxy ${cfg.target}:8491
'';
};
};
};
}

View file

@ -28,5 +28,6 @@
./bash.nix
./obs.nix
./sudo-rs.nix
./garage.nix
];
}

View file

@ -0,0 +1,45 @@
{
pkgs,
lib,
config,
...
}: let
cfg = config.youthlic.programs.garage;
in {
options = {
youthlic.programs.garage = {
enable = lib.mkEnableOption "garage";
};
};
config = lib.mkIf cfg.enable {
sops.secrets."garage" = {
};
services.garage = {
enable = true;
package = pkgs.garage_2;
environmentFile = config.sops.secrets."garage".path;
settings = {
replication_factor = 1;
db_engine = "sqlite";
rpc_bind_addr = "[::]:8490";
use_local_tz = true;
allow_punycode = true;
s3_api = {
s3_region = "garage";
api_bind_addr = "[::]:8491";
root_domain = ".s3.youthlic.social";
};
s3_web = {
root_domain = ".youthlic.social";
bind_addr = "[::]:8494";
};
k2v_api = {
api_bind_addr = "[::]:8493";
};
admin = {
api_bind_addr = "127.0.0.1:8492";
};
};
};
};
}