splashy and the fixed yule configs and stuff

This commit is contained in:
kat witch 2021-08-12 06:00:47 +01:00
parent 744ce9124c
commit 9d8dbe896d
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
6 changed files with 33 additions and 6 deletions

View file

@ -16,6 +16,7 @@ in {
users.kat.guiFull
services.netdata
services.nginx
services.katsplash
services.node-exporter
services.promtail
services.restic

View file

@ -57,10 +57,6 @@ with lib;
useDHCP = false;
wireless.interfaces = singleton "wlp2s0";
interfaces = {
enp1s0.ipv4.addresses = singleton {
inherit (config.network.addresses.private.ipv4) address;
prefixLength = 24;
};
wlp2s0.ipv4.addresses = singleton {
inherit (config.network.addresses.private.ipv4) address;
prefixLength = 24;

View file

@ -0,0 +1,8 @@
{ config, pkgs, kw, ... }:
let splashy = pkgs.kat-splash config.networking.hostName; in {
services.nginx.virtualHosts = kw.virtualHostGen {
networkFilter = ["private"];
block.locations."/" = { root = splashy; };
};
}

View file

@ -4,8 +4,6 @@
services.nginx.virtualHosts = {
"${config.network.dns.domain}" = {
root = pkgs.kat-website;
enableACME = true;
forceSSL = true;
};
};
}

View file

@ -78,6 +78,8 @@ let
withBackends = [ "freeimage" "libjpeg" "libpng" "librsvg" "libnsgif" "libheif" "libtiff" ];
};
kat-splash = self.callPackage ./kat-splash { };
kat-glauca-dns = self.callPackage ./kat-glauca-dns { };
kat-gpg-status = self.callPackage ./kat-gpg-status { };

View file

@ -0,0 +1,22 @@
{ writeTextFile, linkFarm }: hostname:
let mewp = writeTextFile {
name = "index.html";
text = ''
<html>
<head>
<title>kat's ${hostname}</title>
</head>
<body>
<h1>mew! welcome to ${hostname} ><</h1>
<img src="splash.jpg">
<p>stop snooping, it's mean! o:</p>
</body>
</html>
''; }; mewy = "${./splash.jpg}";
in linkFarm "index" [
{ name = "index.html"; path = mewp; }
{ name = "splash.jpg"; path = mewy; }
]