1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 11:37:44 +00:00

Add microbin

This commit is contained in:
RGBCube 2024-01-12 16:13:46 +03:00
parent 1e90277f19
commit e216f6b16b
No known key found for this signature in database
6 changed files with 53 additions and 4 deletions

View file

@ -1,6 +1,6 @@
{ ulib, modulesPath, ... }: with ulib;
systemConfiguration {
serverSystemConfiguration {
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot.loader.grub = enabled {

View file

@ -3,7 +3,7 @@
let
inherit (config.networking) domain;
fqdn = "mail.${domain}";
fqdn = "mail.${domain}";
in serverSystemConfiguration {
mailserver = enabled {
inherit fqdn;

43
hosts/cube/microbin.nix Normal file
View file

@ -0,0 +1,43 @@
{ config, lib, ulib, ... }: with ulib;
let
inherit (config.networking) domain;
fqdn = "paste.${domain}";
port = 4778;
in serverSystemConfiguration {
services.nginx.virtualHosts.${fqdn} = {
forceSSL = true;
useACMEHost = domain;
locations."/".proxyPass = "http://[::1]:${toString port}/";
};
services.microbin = enabled {
passwordFile = config.age.secrets."cube.microbin.password".path;
settings = lib.mapAttrs' (name: value: lib.nameValuePair "MICROBIN_${lib.toUpper name}" (toString value)) {
inherit port;
bind = "::1";
title = "Paste - RGBCube";
hide_footer = true;
hide_header = true;
hide_logo = true;
no_file_upload = true;
no_listing = true;
hash_ids = true;
public_path = "https://${fqdn}/";
qr = true;
enable_burn_after = true;
disable_telemetry = true;
disable_update_checking = true;
};
};
}