add basic about me
This commit is contained in:
parent
b6c5cb7151
commit
91a8daa4ef
3 changed files with 34 additions and 0 deletions
|
@ -32,6 +32,7 @@ in {
|
||||||
domain = {
|
domain = {
|
||||||
full = web-domain;
|
full = web-domain;
|
||||||
base = web-domain;
|
base = web-domain;
|
||||||
|
me = "me.${web-domain}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
29
modules/me/default.nix
Normal file
29
modules/me/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
cfg = config.conf.website;
|
||||||
|
me = {
|
||||||
|
name = "mira";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
mkIf cfg.enable {
|
||||||
|
services.nginx.virtualHosts = {
|
||||||
|
${cfg.domain.me} = {
|
||||||
|
default = true;
|
||||||
|
serverName = cfg.domain.me;
|
||||||
|
useACMEHost = cfg.domain.base;
|
||||||
|
forceSSL = true;
|
||||||
|
locations = {
|
||||||
|
"/about.json" = {
|
||||||
|
return = builtins.toJson me;
|
||||||
|
extraConfig = ''
|
||||||
|
default_type application/json;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -184,6 +184,10 @@ in {
|
||||||
type = nullOr str;
|
type = nullOr str;
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
me = mkOption {
|
||||||
|
type = nullOr str;
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue