tvl-depot/users/sterni/machines/ingeborg/http/sterni.lv.nix
sterni d47c7fa12b feat(sterni/nix/html): make <html> also emit doctype
This makes the awkward withDoctype utility obsolete which is much nicer.
Technically, this is a BREAKING CHANGE since it was possible to create
valid documents without an <html> tag before:

    withDoctype (lib.concatStrings [ (<head> { } …) (<body> { } …) ])

I don't think this usecase is worth preserving since this can just be
written as

    <html> { } [ (<head> { } …) (<body> { } …) ]

and omitting the <html> tag is not recommended since it should be used
to set the language of the document (which we didn't in the example
above).

Change-Id: Idc5104ce88fe8bee965c076229b79387915c3605
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12907
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-12-31 09:03:37 +00:00

33 lines
653 B
Nix

{ pkgs, depot, ... }:
let
inherit (depot.users.sterni.nix.html)
__findFile
;
in
{
imports = [
./nginx.nix
];
config = {
services.nginx.virtualHosts."sterni.lv" = {
enableACME = true;
forceSSL = true;
root = pkgs.writeTextFile {
name = "sterni.lv-http-root";
destination = "/index.html";
text = <html> { } [
(<head> { } [
(<meta> { charset = "utf-8"; } null)
(<title> { } "no thoughts")
])
(<body> { } "🦩")
];
};
# TODO(sterni): tmp.sterni.lv
locations."/tmp/".root = toString /srv/http;
};
};
}