···53 type = types.ints.u16;
54 description = "HKP port to listen on.";
55 };
56+57+ webroot = mkOption {
58+ type = types.path;
59+ default = "${sksPkg.webSamples}/OpenPKG";
60+ defaultText = "\${pkgs.sks.webSamples}/OpenPKG";
61+ description = ''
62+ Source directory (will be symlinked) for the files the built-in
63+ webserver should serve. SKS (''${pkgs.sks.webSamples}) provides the
64+ following examples: "HTML5", "OpenPKG", and "XHTML+ES". The index
65+ file can be named index.html, index.htm, index.xhtm, or index.xhtml.
66+ Files with the extensions .css, .es, .js, .jpg, .jpeg, .png, or .gif
67+ are supported. Subdirectories and filenames with anything other than
68+ alphanumeric characters and the '.' character will be ignored.
69+ '';
70+ };
71 };
72 };
73···93 after = [ "network.target" ];
94 wantedBy = [ "multi-user.target" ];
95 preStart = ''
96+ ln -sfT "${cfg.webroot}" web
97 mkdir -p ${home}/dump
98 ${sksPkg}/bin/sks build ${home}/dump/*.gpg -n 10 -cache 100 || true #*/
99 ${sksPkg}/bin/sks cleandb || true