79 lines
1.8 KiB
Nix
79 lines
1.8 KiB
Nix
{ pkgs, ... }:
|
|
|
|
let
|
|
PROJECT_ROOT = "/workspace/deployed-nixos-server-and-apps/nixos-apps/fancyTypist.dev";
|
|
PORT = "12513";
|
|
HOST = "localhost";
|
|
in
|
|
{
|
|
services.caddy = {
|
|
enable = true;
|
|
virtualHosts = {
|
|
"fancytypist.com" = {
|
|
serverAliases = [ "www.fancytypist.com" ];
|
|
extraConfig = ''
|
|
respond "Hello, world! fancytypist.com"
|
|
'';
|
|
};
|
|
|
|
"fancytypist.ca" = {
|
|
serverAliases = [ "www.fancytypist.ca" ];
|
|
extraConfig = ''
|
|
respond "Hello, world! fancytypist.ca"
|
|
'';
|
|
};
|
|
|
|
"osds.fancytypist.ca" = {
|
|
extraConfig = ''
|
|
respond "Welcome to the Ottawa Swing Dance Society"
|
|
'';
|
|
};
|
|
|
|
"helpme.fancytypist.ca" = {
|
|
extraConfig = ''
|
|
respond "Welcome to only other subdomain...helpme!"
|
|
'';
|
|
};
|
|
|
|
"fancytypist.dev" = {
|
|
serverAliases = [ "www.fancytypist.dev" ];
|
|
extraConfig = ''
|
|
reverse_proxy ${HOST}:${PORT}
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
systemd.services = {
|
|
fancyTypistDotDev-site = {
|
|
enable = true;
|
|
description = "The Haskell Servant executable server that hosts my FancyTypist.dev site.";
|
|
path = with pkgs; [ nix git ];
|
|
script = ''
|
|
cd ${PROJECT_ROOT}
|
|
nix run .#fancyTypistDotDev-site
|
|
'';
|
|
};
|
|
|
|
osdsFancyTypistSubdomain-site = {
|
|
enable = true;
|
|
description = "Emanote site running the OSDS content.";
|
|
path = with pkgs; [ nix git ];
|
|
script = ''
|
|
cd ${PROJECT_ROOT}
|
|
nix run .#osdsFancyTypistSubdomain-site
|
|
'';
|
|
};
|
|
};
|
|
|
|
services.emanote = {
|
|
enable = true;
|
|
# host = "127.0.0.1"; # default listen address is 127.0.0.1
|
|
# port = 7000; # default http port is 7000
|
|
notes = [
|
|
"/workspace/admin"
|
|
];
|
|
package = emanote.packages.${system}.default;
|
|
};
|
|
}
|