Compare commits
3 Commits
bb4c77208d
...
nixos
| Author | SHA1 | Date | |
|---|---|---|---|
|
b86cc94d23
|
|||
|
95825c6ff1
|
|||
|
3e7e404d4c
|
@@ -16,6 +16,7 @@
|
||||
domain = {
|
||||
natto = "weirdnatto.in";
|
||||
amneesh = "amneesh.com";
|
||||
chutiya = "chutiya.online";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
851
flake.lock
generated
851
flake.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -52,7 +52,7 @@
|
||||
};
|
||||
|
||||
filehost = {
|
||||
url = "github:natto1784/simpler-filehost";
|
||||
url = "github:natto1784/yamaf";
|
||||
};
|
||||
|
||||
nix-gaming.url = "github:fufexan/nix-gaming";
|
||||
|
||||
@@ -203,8 +203,8 @@ To undo and redo easily like vi
|
||||
(use-package lsp-mode
|
||||
:defer t
|
||||
:commands lsp
|
||||
:init
|
||||
(setq lsp-enable-on-type-formatting nil))
|
||||
:init (setq lsp-enable-on-type-formatting nil)
|
||||
:hook (prog-mode . lsp-deferred))
|
||||
#+end_src
|
||||
|
||||
*** Configure lsp-ui
|
||||
|
||||
@@ -1,25 +1,39 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
conf,
|
||||
...
|
||||
}:
|
||||
{
|
||||
systemd.services.filehost = {
|
||||
systemd.services = rec {
|
||||
filehost = {
|
||||
enable = true;
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
Environment = [
|
||||
"TITLE=nattofiles"
|
||||
"USER_URL=https://f.${conf.network.addresses.domain.natto}"
|
||||
"ROCKET_LIMITS={file=\"512MB\",data-form=\"512MB\"}"
|
||||
"ROCKET_LOG_LEVEL=debug"
|
||||
"ROCKET_ADDRESS=0.0.0.0"
|
||||
"INTERNAL_HOST=0.0.0.0"
|
||||
"INTERNAL_PORT=8000"
|
||||
"MAX_FILESIZE_MB=500"
|
||||
"EXTERNAL_HAS_TLS=1"
|
||||
"EXTERNAL_HOST=f.${conf.network.addresses.domain.natto}"
|
||||
];
|
||||
Restart = "on-failure";
|
||||
ExecStart = "${inputs.filehost.packages.${pkgs.system}.simpler-filehost}/bin/simpler-filehost";
|
||||
ExecStart = "${inputs.filehost.packages.${pkgs.system}.yamaf}/bin/yamaf";
|
||||
};
|
||||
};
|
||||
|
||||
filehost-chutiya = lib.recursiveUpdate filehost {
|
||||
serviceConfig.Environment = [
|
||||
"TITLE=chutiyafiles"
|
||||
"INTERNAL_HOST=0.0.0.0"
|
||||
"INTERNAL_PORT=8001"
|
||||
"MAX_FILESIZE_MB=500"
|
||||
"EXTERNAL_HAS_TLS=1"
|
||||
"EXTERNAL_HOST=f.${conf.network.addresses.domain.chutiya}"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
conf,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
@@ -36,6 +35,18 @@
|
||||
USER = FROM;
|
||||
REGISTER_MAIL_CONFIRM = true;
|
||||
};
|
||||
service = {
|
||||
ENABLE_CAPTCHA = true;
|
||||
EMAIL_DOMAIN_ALLOWLIST = lib.strings.concatStringsSep "," [
|
||||
"gmail.com"
|
||||
"outlook.com"
|
||||
"proton.me"
|
||||
"protonmail.com"
|
||||
conf.network.addresses.domain.natto
|
||||
conf.network.addresses.domain.amneesh
|
||||
conf.network.addresses.domain.chutiya
|
||||
];
|
||||
};
|
||||
oauth2_client.REGISTER_MAIL_CONFIRM = true;
|
||||
actions.ENABLED = false;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{ conf, ... }:
|
||||
let
|
||||
domain = conf.network.addresses.domain.natto;
|
||||
chutiya = conf.network.addresses.domain.chutiya;
|
||||
in
|
||||
{
|
||||
services.nginx = {
|
||||
@@ -35,6 +36,17 @@ in
|
||||
in
|
||||
with conf.network.addresses.wireguard.ips;
|
||||
{
|
||||
|
||||
"${chutiya}" = {
|
||||
addSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
root = "/var/lib/chutiya";
|
||||
index = "index.html";
|
||||
};
|
||||
serverAliases = [ "www.${chutiya}" ];
|
||||
};
|
||||
|
||||
"moj.${domain}" = genericHttpRProxy { addr = "https://${suwako}:25565"; };
|
||||
|
||||
"puffer.${domain}" = genericHttpRProxy {
|
||||
@@ -59,7 +71,15 @@ in
|
||||
};
|
||||
|
||||
# Personal filehost
|
||||
"f.${domain}" = genericHttpRProxy { addr = "http://${suwako}:8000"; };
|
||||
"f.${chutiya}" = genericHttpRProxy {
|
||||
addr = "http://${suwako}:8001";
|
||||
conf = "client_max_body_size 512M;";
|
||||
};
|
||||
|
||||
"f.${domain}" = genericHttpRProxy {
|
||||
addr = "http://${suwako}:8000";
|
||||
conf = "client_max_body_size 512M;";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user