move caddy config to own file; swap nil_ls with nixd

This commit is contained in:
xqtc 2024-10-25 13:59:33 +02:00
parent bbd4cdca3b
commit b9def52bff
Signed by: xqtc
GPG key ID: 2C064D095926D9D1
3 changed files with 121 additions and 164 deletions

View file

@ -204,7 +204,7 @@
typing.autoClosingAngleBrackets.enable = true;
};
};
nil-ls.enable = true;
nixd.enable = true;
};
};
dap = {

View file

@ -0,0 +1,119 @@
{config, lib, pkgs, ...}: {
services.caddy = {
enable = true;
email = "xqtc@tutanota.com";
virtualHosts = {
"heroin.trade" = {
extraConfig = ''
root * /var/www/website/public/
handle_errors {
rewrite * /404.html
file_server
}
file_server
'';
};
# "matrix.heroin.trade" = {
# extraConfig = ''
# reverse_proxy /_matrix/* 127.0.0.1:${builtins.toString config.services.matrix-conduit.settings.global.port}
# '';
# };
"hydra.heroin.trade" = {
extraConfig = ''
reverse_proxy http://localhost:${builtins.toString config.services.hydra.port}
'';
};
"cheats-rs.heroin.trade" = {
extraConfig = ''
root * /var/www/cheats-rs/public/
handle_errors {
rewrite * /404.html
file_server
}
file_server
'';
};
"syncthing.heroin.trade" = {
extraConfig = ''
reverse_proxy http://localhost:8384 {
header_up Host {upstream_hostport}
}
'';
};
"demos.heroin.trade" = {
extraConfig = ''
root * /var/www/demos/
file_server browse
'';
};
"git.heroin.trade" = {
extraConfig = ''
reverse_proxy http://localhost:3002
'';
};
"jellyfin.heroin.trade" = {
extraConfig = ''
reverse_proxy http://127.0.0.1:8096
redir /metrics* /
'';
};
"calibre.heroin.trade" = {
extraConfig = ''
reverse_proxy http://localhost:3000
'';
};
"grafana.heroin.trade" = {
extraConfig = ''
reverse_proxy http://127.0.0.1:2342
'';
};
"uptime.heroin.trade" = {
extraConfig = ''
reverse_proxy http://127.0.0.1:3001
'';
};
"paperless.heroin.trade" = {
extraConfig = ''
reverse_proxy http://127.0.0.1:28981
'';
};
"radarr.heroin.trade" = {
extraConfig = ''
reverse_proxy http://127.0.0.1:7878
'';
};
"sonarr.heroin.trade" = {
extraConfig = ''
reverse_proxy http://127.0.0.1:8989
'';
};
"prowlarr.heroin.trade" = {
extraConfig = ''
reverse_proxy http://127.0.0.1:9696
'';
};
"qbit.heroin.trade" = {
extraConfig = ''
reverse_proxy http://127.0.0.1:8085
'';
};
"marie.software" = {
extraConfig = ''
root * /var/www/marie-website/
file_server
'';
};
"juvi.likes.graphics" = {
extraConfig = ''
root * /var/www/juvi-website/
file_server
'';
};
"servers" = {
extraConfig = ''
metrics
'';
};
};
};
}

View file

@ -6,9 +6,9 @@
}:
with lib; {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
./monitoring.nix
./caddy.nix
./jellyfin.nix
./calibre-web.nix
./transmission.nix
@ -32,124 +32,6 @@ with lib; {
services.btrfs.autoScrub.enable = true;
services.btrfs.autoScrub.interval = "weekly";
services.caddy = {
enable = true;
email = "xqtc@tutanota.com";
virtualHosts = {
"heroin.trade" = {
extraConfig = ''
root * /var/www/website/public/
handle_errors {
rewrite * /404.html
file_server
}
file_server
'';
};
# "matrix.heroin.trade" = {
# extraConfig = ''
# reverse_proxy /_matrix/* 127.0.0.1:${builtins.toString config.services.matrix-conduit.settings.global.port}
# '';
# };
"hydra.heroin.trade" = {
extraConfig = ''
reverse_proxy http://localhost:${builtins.toString config.services.hydra.port}
'';
};
"cheats-rs.heroin.trade" = {
extraConfig = ''
root * /var/www/cheats-rs/public/
handle_errors {
rewrite * /404.html
file_server
}
file_server
'';
};
"syncthing.heroin.trade" = {
extraConfig = ''
reverse_proxy http://localhost:8384 {
header_up Host {upstream_hostport}
}
'';
};
"demos.heroin.trade" = {
extraConfig = ''
root * /var/www/demos/
file_server browse
'';
};
"git.heroin.trade" = {
extraConfig = ''
reverse_proxy http://localhost:3002
'';
};
"jellyfin.heroin.trade" = {
extraConfig = ''
reverse_proxy http://127.0.0.1:8096
redir /metrics* /
'';
};
"calibre.heroin.trade" = {
extraConfig = ''
reverse_proxy http://localhost:3000
'';
};
"grafana.heroin.trade" = {
extraConfig = ''
reverse_proxy http://127.0.0.1:2342
'';
};
"uptime.heroin.trade" = {
extraConfig = ''
reverse_proxy http://127.0.0.1:3001
'';
};
"paperless.heroin.trade" = {
extraConfig = ''
reverse_proxy http://127.0.0.1:28981
'';
};
"radarr.heroin.trade" = {
extraConfig = ''
reverse_proxy http://127.0.0.1:7878
'';
};
"sonarr.heroin.trade" = {
extraConfig = ''
reverse_proxy http://127.0.0.1:8989
'';
};
"prowlarr.heroin.trade" = {
extraConfig = ''
reverse_proxy http://127.0.0.1:9696
'';
};
"qbit.heroin.trade" = {
extraConfig = ''
reverse_proxy http://127.0.0.1:8085
'';
};
"marie.software" = {
extraConfig = ''
root * /var/www/marie-website/
file_server
'';
};
"juvi.likes.graphics" = {
extraConfig = ''
root * /var/www/juvi-website/
file_server
'';
};
"servers" = {
extraConfig = ''
metrics
'';
};
};
};
services.syncthing.settings.gui.insecureSkipHostcheck = true;
nix.settings.experimental-features = ["nix-command" "flakes"];
@ -189,50 +71,6 @@ with lib; {
];
};
# users.users.marie = {
# isNormalUser = true;
# packages = with pkgs; [
# git
# wget
# ];
# openssh.authorizedKeys.keys = [
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN0mGd4YS4f3Wy+a4PBXbie42C5Qo4H0uWsN7joaK27h marie@titania"
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFckmWImlMVsCbu5M1lsLtzxhBxrQhTQHYrKWJYDOHr5 marie@oberon"
# ];
# };
# users.users.mo = {
# isNormalUser = true;
# packages = with pkgs; [
# git
# wget
# ];
# openssh.authorizedKeys.keys = [
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFjRrLI5mBnoIMcjq2WGPCGuKYLwS7uhgI6F0T5ojp6n moe@martini.moe"
# ];
# };
#
# users.users.ellie = {
# isNormalUser = true;
# packages = with pkgs; [
# git
# wget
# ];
# openssh.authorizedKeys.keys = [
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKA4+3PkFptATzrWncxdj63SqZ747cDb8TqmdQFugvW7 ellie@card"
# ];
# };
#
# users.users.brodo = {
# isNormalUser = true;
# packages = with pkgs; [
# git
# wget
# ];
# openssh.authorizedKeys.keys = [
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAZqFlE49ln4iAcVNzUaTXbFW6SA8Wwxl1hiwUkegUfy julian@example.com"
# ];
# };
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJTLJqIVwnqFO64rnc66d234TFOdFXpDS9fJUA4/f4in xqtc@alastor"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN7UkcmSVo+SeB5Obevz3mf3UHruYxn0UHUzoOs2gDBy xqtc@asmodeus"