Compare commits
4 Commits
010c5bfa4c
...
3b1505075c
Author | SHA1 | Date |
---|---|---|
Jill | 3b1505075c | |
Jill | e2e1c33006 | |
Jill | 346655d584 | |
Jill | eaa7083100 |
|
@ -22,6 +22,7 @@ in {
|
|||
};
|
||||
|
||||
users.groups.dotfiles = {};
|
||||
users.groups.yugoslavia = {};
|
||||
|
||||
normalUsers = {
|
||||
aether = {
|
||||
|
@ -46,7 +47,7 @@ in {
|
|||
conf = {
|
||||
packages = with pkgs; [ bat tmux micro direnv nix-direnv ripgrep ];
|
||||
shell = pkgs.unstable.fish;
|
||||
extraGroups = [ "wheel" "nix-users" "dotfiles" ];
|
||||
extraGroups = [ "wheel" "nix-users" "dotfiles" "yugoslavia" ];
|
||||
initialHashedPassword = "!";
|
||||
openssh.authorizedKeys.keys = [ keys."oatmealine@void-defragmented".ssh keys."oatmealine@beppy-phone".ssh ];
|
||||
};
|
||||
|
@ -75,10 +76,12 @@ in {
|
|||
"ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAoV7ymOtfC8SYvv31/GGso8DoHKE/KOfoEZ0hjmYtaQg7dyi5ijfDikLZUux8aWivvRofa7SqyaK0Ea+s9KuTX/dreJKz/RKG+QHLjw6U0FSoJ765q56pUy0j0TZoVy4PjSb38of56urg1UmHkK13WQXrvjwdHUjAcVx6PurHAxsbmxhYkJO9Jmvr8CB+PZFKIHjewkgBWkBxD97WFNwDfmBmvh1F5xRn8WhgT+2DVdQ2coN4Eqwc4NWzBUSfrro0gARsJsUvQxdx8f1kJDQKy2lQWCnlgRiD+pK5ocf1wCZfJMs0NQ6xqCZDKDJTcyGNLWH/L57Pg5U5t7BWRTTPmQ== yugoslavia"
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCX2uRTaL1Nu4KzsSJSVc7R2yCIa4Mw3KuJAMluQO746eXBFeTmRN6Pqc+H0Rpz9nkQ/fB8tYl70FfrYy4suM0QCY1IDbPWaUBmLQYCt6nzCfFY8PTpLoJ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HrlqH2OShvXdzq1sV5IDuWQzeC9OHBVvwj0+Y0XXwi7 mayflower-thinkpad"
|
||||
keys."oatmealine@void-defragmented".ssh
|
||||
keys."oatmealine@beppy-phone".ssh
|
||||
];
|
||||
packages = with pkgs; [ tmux ];
|
||||
packages = with pkgs; [ tmux micro ];
|
||||
shell = pkgs.unstable.fish;
|
||||
};
|
||||
services = {
|
||||
|
@ -177,6 +180,9 @@ in {
|
|||
"oat.zone".php = true;
|
||||
"yugoslavia.fishing".dataDir = "/var/www/yugoslavia.fishing";
|
||||
"yugoslavia.fishing".php = true;
|
||||
"educationmath.oat.zone".dataDir = "/var/www/proxy.oat.zone";
|
||||
"educationmath.oat.zone".php = true;
|
||||
"educationmath.oat.zone".auth = { twh = builtins.readFile /etc/proxy_twh; };
|
||||
};
|
||||
|
||||
nitter = {
|
||||
|
@ -212,6 +218,15 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
systemd.services.minecraft-server-dark-firepit.serviceConfig = {
|
||||
# packwiz workaround
|
||||
# https://github.com/Infinidoge/nix-minecraft/issues/12#issuecomment-1235999072
|
||||
# TODO: this doesn't work!!! it just goes "error code 1" and refuses to elaborate
|
||||
#ExecStartPre = [
|
||||
# ''cd "/srv/minecraft/dark-firepit"; nix-shell -p adoptopenjdk-hotspot-bin-16 --run "java -jar /srv/minecraft/dark-firepit/packwiz-installer-bootstrap.jar -g 'https://dark-firepit.oat.zone/Fire Pit 1.19.2/pack.toml'"''
|
||||
#];
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."oat.zone" = {
|
||||
locations."/f/".extraConfig = ''
|
||||
add_header Access-Control-Allow-Origin "*";
|
||||
|
|
|
@ -13,6 +13,12 @@ in {
|
|||
|
||||
services = {
|
||||
nginx.virtualHosts.${domain} = {
|
||||
locations."/" = {
|
||||
extraConfig = ''
|
||||
error_page 404 /error.php;
|
||||
'';
|
||||
};
|
||||
|
||||
locations."/modding-txts/" = {
|
||||
extraConfig = ''
|
||||
autoindex on;
|
||||
|
|
|
@ -30,7 +30,7 @@ in {
|
|||
#isSystemUser = true;
|
||||
isNormalUser = true;
|
||||
group = "remote";
|
||||
extraGroups = [ "nix-users" ];
|
||||
extraGroups = [ "nix-users" "yugoslavia" ];
|
||||
initialHashedPassword = "!";
|
||||
openssh.authorizedKeys.keys = cfg.keys;
|
||||
packages = cfg.packages;
|
||||
|
|
|
@ -1,132 +0,0 @@
|
|||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.services.yugoslavia-best;
|
||||
in {
|
||||
options.modules.services.yugoslavia-best = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
domain = mkOption {
|
||||
type = types.str;
|
||||
default = "yugoslavia.best";
|
||||
};
|
||||
root = mkOption {
|
||||
type = types.str;
|
||||
default = "/var/www/yugoslavia.best";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
modules.services.staticSites."${cfg.domain}" = {
|
||||
dataDir = cfg.root;
|
||||
php = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
nginx.virtualHosts."${cfg.domain}" = {
|
||||
locations."/modding-txts/" = {
|
||||
extraConfig = ''
|
||||
autoindex on;
|
||||
sub_filter </head>
|
||||
'<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.css"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/milligram/1.4.1/milligram.css"><style>body {background: #34373c;border-bottom: 0.1rem solid #1b1c1d;padding:20px;} .header {background-color: #141518;} pre {background: #141518;} .prettyprint {color: #f2f2f2;} .prettyprint.lang-md * {color: #f2f2f2 !important;} code {background: #141518;} .prettyprint .atv { color: rgba(73, 158, 223, 1);} .poop {display: flex; width: 100%; flex-direction: row; justify-content: space-between}</style><!-- Matomo --><script>var _paq = window._paq = window._paq || [];/* tracker methods like "setCustomDimension" should be called before "trackPageView" */_paq.push(["trackPageView"]);_paq.push(["enableLinkTracking"]);(function() {var u="//analytics.oat.zone/";_paq.push(["setTrackerUrl", u+"matomo.php"]);_paq.push(["setSiteId", "2"]);var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0];g.async=true; g.src=u+"matomo.js"; s.parentNode.insertBefore(g,s);})();</script><!-- End Matomo Code --></head>';
|
||||
sub_filter <pre> ' ';
|
||||
sub_filter </pre> ' ';
|
||||
sub_filter '<a ' '</span><span class="poop"><a ';
|
||||
sub_filter '</a>' '</a>';
|
||||
sub_filter '<body bgcolor="white">' '<body><div class="container box" style="margin:5rem auto; padding:4rem">';
|
||||
sub_filter </body> '</div></body>';
|
||||
sub_filter <hr> '</span><hr>';
|
||||
sub_filter_once off;
|
||||
'';
|
||||
};
|
||||
|
||||
locations."/srb2kaddons/" = {
|
||||
extraConfig = ''
|
||||
autoindex on;
|
||||
alias /home/oatmealine/.srb2kart/firepit/;
|
||||
sub_filter </head>
|
||||
'<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.css"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/milligram/1.4.1/milligram.css"><style>body {background: #34373c;border-bottom: 0.1rem solid #1b1c1d;padding:20px;} .header {background-color: #141518;} pre {background: #141518;} .prettyprint {color: #f2f2f2;} .prettyprint.lang-md * {color: #f2f2f2 !important;} code {background: #141518;} .prettyprint .atv { color: rgba(73, 158, 223, 1);} .poop {display: flex; width: 100%; flex-direction: row; justify-content: space-between}</style><!-- Matomo --><script>var _paq = window._paq = window._paq || [];/* tracker methods like "setCustomDimension" should be called before "trackPageView" */_paq.push(["trackPageView"]);_paq.push(["enableLinkTracking"]);(function() {var u="//analytics.oat.zone/";_paq.push(["setTrackerUrl", u+"matomo.php"]);_paq.push(["setSiteId", "2"]);var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0];g.async=true; g.src=u+"matomo.js"; s.parentNode.insertBefore(g,s);})();</script><!-- End Matomo Code --></head>';
|
||||
sub_filter <pre> ' ';
|
||||
sub_filter </pre> ' ';
|
||||
sub_filter '<a ' '</span><span class="poop"><a ';
|
||||
sub_filter '</a>' '</a>';
|
||||
sub_filter '<body bgcolor="white">' '<body><div class="container box" style="margin:5rem auto; padding:4rem">';
|
||||
sub_filter </body> '</div></body>';
|
||||
sub_filter <hr> '</span><hr>';
|
||||
sub_filter_once off;
|
||||
'';
|
||||
};
|
||||
|
||||
locations."/__special" = {
|
||||
extraConfig = ''
|
||||
internal;
|
||||
allow all;
|
||||
root ${cfg.root}/nginx/html/__special;
|
||||
'';
|
||||
};
|
||||
|
||||
locations."= /__md_file" = {
|
||||
extraConfig = ''
|
||||
internal;
|
||||
allow all;
|
||||
|
||||
add_header 'Vary' 'Accept';
|
||||
|
||||
# redefining
|
||||
add_header Strict-Transport-Security $hsts_header;
|
||||
add_header Referrer-Policy origin-when-cross-origin;
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
|
||||
sub_filter </head>
|
||||
'<title>$request_filename - yugoslavia.best</title><meta name="description" content="$request_filename - Modding TXTs"><meta name="og:title" content="$request_filename"><meta property="og:type" content="article"><meta property="og:site_name" content="yugoslavia.best"></head>';
|
||||
sub_filter_once on;
|
||||
|
||||
default_type text/html;
|
||||
alias ${cfg.root}/nginx/html/__special/md-renderer.html;
|
||||
'';
|
||||
};
|
||||
|
||||
locations."~* \\.md" = {
|
||||
extraConfig = ''
|
||||
error_page 418 = /__md_file;
|
||||
|
||||
add_header 'Vary' 'Accept';
|
||||
|
||||
# redefining
|
||||
add_header Strict-Transport-Security $hsts_header;
|
||||
add_header Referrer-Policy origin-when-cross-origin;
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
|
||||
if (!-f $request_filename) {
|
||||
break;
|
||||
}
|
||||
|
||||
# if no "text/markdown" in "accept" header:
|
||||
# redirect to /__md_file to serve html renderer
|
||||
if ($http_accept !~* "text/markdown") {
|
||||
return 418;
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
types {
|
||||
text/plain md;
|
||||
text/html html;
|
||||
text/plain txt;
|
||||
text/css css;
|
||||
application/javascript js;
|
||||
image/x-icon ico;
|
||||
image/png png;
|
||||
image/gif gif;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue