From 65fd1c26f3991dab28ba77f28d9378a34bd7420b Mon Sep 17 00:00:00 2001 From: sajenim Date: Thu, 9 May 2024 11:40:42 +0800 Subject: [PATCH] setup microbin --- nixos/viridian/containers/default.nix | 2 ++ .../viridian/containers/microbin/default.nix | 28 ++++++++++++++++++ .../containers/microbin/environment.age | Bin 0 -> 8442 bytes nixos/viridian/services/traefik/routers.nix | 11 +++++++ nixos/viridian/services/traefik/services.nix | 3 ++ 5 files changed, 44 insertions(+) create mode 100644 nixos/viridian/containers/microbin/default.nix create mode 100644 nixos/viridian/containers/microbin/environment.age diff --git a/nixos/viridian/containers/default.nix b/nixos/viridian/containers/default.nix index 4476721..95b4290 100644 --- a/nixos/viridian/containers/default.nix +++ b/nixos/viridian/containers/default.nix @@ -13,6 +13,8 @@ ./radarr.nix ./recyclarr.nix ./sonarr.nix + + ./microbin ]; virtualisation.oci-containers.backend = "docker"; } diff --git a/nixos/viridian/containers/microbin/default.nix b/nixos/viridian/containers/microbin/default.nix new file mode 100644 index 0000000..312b98f --- /dev/null +++ b/nixos/viridian/containers/microbin/default.nix @@ -0,0 +1,28 @@ +{ config, ... }: + +{ + age.secrets.microbin = { + # Environment variables for microbin + rekeyFile = ./environment.age; + owner = "root"; + group = "root"; + }; + + virtualisation.oci-containers.containers = { + # Self-hosted, open-source pastbin + microbin = { + autoStart = true; + image = "danielszabo99/microbin:2.0"; + ports = [ + "8181:8080/tcp" # WebUI + ]; + volumes = [ + # Container data + "/srv/containers/microbin:/app/microbin_data:rw" + ]; + environmentFiles = [ + config.age.secrets.microbin.path + ]; + }; + }; +} diff --git a/nixos/viridian/containers/microbin/environment.age b/nixos/viridian/containers/microbin/environment.age new file mode 100644 index 0000000000000000000000000000000000000000..476dea474c61a29556ac3d90c40f9a58a0538d7c GIT binary patch literal 8442 zcmV9u^XiIW1R76;LW-n!8LTGw$QExXzT3Jm`YE?67Sx-=A3S>7oFiu8iL~~Pi zK{Q8jSu{~IHD)q&F?o1!YBym>ct$HVXKqh-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(odh)6DnC;K3f zgfeb!&&+tQGRFW$brmZqnUgmr|KntQkBwy@G)Pf^LA;a2%5semmU%=lwa+er_lj*v zlKj!Q>-%f9UOwJ7xl{x-Uh!k-6s;; z4jxlY?j4zy_TCBMv|4s3j#8Q3%GM+MVQfXH^6SUU&ss9dcYx2Nzrs6aX-0mlF-xmE zFyPMx|BCp?;g`GvWw{Bat>RJ$IZDjZpnKsKNTB*>%bdftUTF!@x}vb6NNbYDGt_p< z#xay6=8SI zwX?Y#vyRDNqgg0=YoXLKBukQSUhGG%cvrH^>Sutmh=GNW|7v8fi?$VgD`6s}!{CAl znWr|COiah^;*3dvoHP>F1nh`k`UR{=un;OvW(zTfAi!&KL1mk@w6jES9Q%ZfMkMG0 zn3ZcmHny<*RG)mIr7rspbgeA)n{bIZ}{8(l% zd?5+@fO38cWj(I>ap|20&R~jTHn6k<=2{{K45l5vbNE*8tyy;|+S=tjK93j%HAX*3 zY-+~*$D8DS4xZ1m+^)cW~^nNExuX%51sNbxfsxj+6OwdDHlMr6>y0As^ zI-Ber03e>tGmOGvh_yxU($lWMxp{wsg zDRTvF+PaHmD(ulMO)1q%Ieukh0>@|yn}qT0$;<_%Vd}i}!Z5p3{v_J8`}T4O(nDmLvv2a);`<0|q4peNP}2g%uuY(~MA)qrBvhWu z6z{n81jZGthb5?hG+>gL%Zj$F~o(ZoB-c%?i zzpb6SA`5pZtDAd3xJ=A5jDF;7M$R-bhXdRyEB`uz6V*^co~9jGUrdT8w5F1#+n8q` cdhb*~zXz`6F-nr(Jc%|_7dKNeg-LW>0amU{<^TWy literal 0 HcmV?d00001 diff --git a/nixos/viridian/services/traefik/routers.nix b/nixos/viridian/services/traefik/routers.nix index 190064c..e1e20c9 100644 --- a/nixos/viridian/services/traefik/routers.nix +++ b/nixos/viridian/services/traefik/routers.nix @@ -122,6 +122,17 @@ ]; service = "jellyseerr"; }; + + microbin = { + rule = "Host(`bin.kanto.dev`)"; + entryPoints = [ + "websecure" + ]; + middlewares = [ + "internal" + ]; + service = "microbin"; + }; }; } diff --git a/nixos/viridian/services/traefik/services.nix b/nixos/viridian/services/traefik/services.nix index c61da94..43b9a29 100644 --- a/nixos/viridian/services/traefik/services.nix +++ b/nixos/viridian/services/traefik/services.nix @@ -32,6 +32,9 @@ jellyseerr.loadBalancer.servers = [ { url = "http://192.168.1.102:5055"; } ]; + microbin.loadBalancer.servers = [ + { url = "http://192.168.1.102:8181"; } + ]; }; }