mirror of
https://github.com/RGBCube/ncc
synced 2025-07-31 12:07:48 +00:00
Add microbin
This commit is contained in:
parent
1e90277f19
commit
e216f6b16b
6 changed files with 53 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
{ ulib, modulesPath, ... }: with ulib;
|
{ ulib, modulesPath, ... }: with ulib;
|
||||||
|
|
||||||
systemConfiguration {
|
serverSystemConfiguration {
|
||||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||||
|
|
||||||
boot.loader.grub = enabled {
|
boot.loader.grub = enabled {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
let
|
let
|
||||||
inherit (config.networking) domain;
|
inherit (config.networking) domain;
|
||||||
|
|
||||||
fqdn = "mail.${domain}";
|
fqdn = "mail.${domain}";
|
||||||
in serverSystemConfiguration {
|
in serverSystemConfiguration {
|
||||||
mailserver = enabled {
|
mailserver = enabled {
|
||||||
inherit fqdn;
|
inherit fqdn;
|
||||||
|
|
43
hosts/cube/microbin.nix
Normal file
43
hosts/cube/microbin.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
clearDefaultKeybindings = true;
|
clearDefaultKeybindings = true;
|
||||||
|
|
||||||
keybindings = (lib.mapAttrs' (name: value: lib.nameValuePair "ctrl+shift+${name}" value) {
|
keybindings = (lib.mapAttrs' (name: lib.nameValuePair "ctrl+shift+${name}") {
|
||||||
c = "copy_to_clipboard";
|
c = "copy_to_clipboard";
|
||||||
v = "paste_from_clipboard";
|
v = "paste_from_clipboard";
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
"physical:eight" = "goto_tab:8";
|
"physical:eight" = "goto_tab:8";
|
||||||
"physical:nine" = "goto_tab:9";
|
"physical:nine" = "goto_tab:9";
|
||||||
"physical:zero" = "goto_tab:10";
|
"physical:zero" = "goto_tab:10";
|
||||||
}) // (lib.mapAttrs' (name: value: lib.nameValuePair "ctrl+${name}" value) {
|
}) // (lib.mapAttrs' (name: lib.nameValuePair "ctrl+${name}") {
|
||||||
"physical:tab" = "next_tab";
|
"physical:tab" = "next_tab";
|
||||||
"shift+physical:tab" = "previous_tab";
|
"shift+physical:tab" = "previous_tab";
|
||||||
});
|
});
|
||||||
|
|
5
secrets/cube.microbin.password.age
Normal file
5
secrets/cube.microbin.password.age
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 +rZ0Tw ermFdlm4jBfWILyxN7Mu07sheVp6Kg46ho9pAk9O73s
|
||||||
|
nF+GEyxxl8pNd5M/TKM05cbhIX2Wuyi0+o+qSRcqW1o
|
||||||
|
--- zPRSl0ZRMz2TTpy7MdIwzg/Q46sysY2MqTNihWycctY
|
||||||
|
’õz'}ÍÒ£—5“ãûEÇr'§Tí÷Àüg]÷¤¤Š7<C5A0><37>
|€Å¼î@Yu‘MJSVªŒÃ¹ëÜ´9À$N8ϼp
|
|
@ -7,6 +7,7 @@ rec {
|
||||||
"acme.age".publicKeys = [ keys.cube ];
|
"acme.age".publicKeys = [ keys.cube ];
|
||||||
"cube.password.hash.age".publicKeys = [ keys.cube ];
|
"cube.password.hash.age".publicKeys = [ keys.cube ];
|
||||||
"cube.mail.password.hash.age".publicKeys = [ keys.cube ];
|
"cube.mail.password.hash.age".publicKeys = [ keys.cube ];
|
||||||
|
"cube.microbin.password.age".publicKeys = [ keys.cube ];
|
||||||
"cube.id.age".publicKeys = [ keys.rgbcube ];
|
"cube.id.age".publicKeys = [ keys.rgbcube ];
|
||||||
"enka.said.password.hash.age".publicKeys = [ keys.rgbcube ];
|
"enka.said.password.hash.age".publicKeys = [ keys.rgbcube ];
|
||||||
"enka.orhan.password.hash.age".publicKeys = [ keys.rgbcube ];
|
"enka.orhan.password.hash.age".publicKeys = [ keys.rgbcube ];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue