init: public
This commit is contained in:
61
config/hosts/imxyy-nix-server/note.nix
Normal file
61
config/hosts/imxyy-nix-server/note.nix
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
config,
|
||||
sopsRoot,
|
||||
...
|
||||
}:
|
||||
{
|
||||
sops.secrets = {
|
||||
flatnote-env = {
|
||||
sopsFile = sopsRoot + /flatnote.env;
|
||||
format = "dotenv";
|
||||
};
|
||||
siyuan-env = {
|
||||
sopsFile = sopsRoot + /siyuan.env;
|
||||
format = "dotenv";
|
||||
};
|
||||
};
|
||||
virtualisation.oci-containers = {
|
||||
containers = {
|
||||
flatnotes = {
|
||||
image = "dullage/flatnotes:latest";
|
||||
volumes = [
|
||||
"/mnt/nas/flatnotes/data:/data"
|
||||
];
|
||||
environmentFiles = [
|
||||
"${config.sops.secrets.flatnote-env.path}"
|
||||
];
|
||||
ports = [ "8093:8080" ];
|
||||
};
|
||||
siyuan = {
|
||||
image = "apkdv/siyuan-unlock:v3.1.24";
|
||||
volumes = [
|
||||
"/mnt/nas/siyuan/workspace:/workspace"
|
||||
"/mnt/nas/siyuan:/home/siyuan"
|
||||
];
|
||||
cmd = [
|
||||
"--workspace=/workspace"
|
||||
];
|
||||
environment = {
|
||||
PUID = "0";
|
||||
PGID = "0";
|
||||
};
|
||||
environmentFiles = [
|
||||
"${config.sops.secrets.siyuan-env.path}"
|
||||
];
|
||||
ports = [ "8095:6806" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
services.caddy.virtualHosts = {
|
||||
"note.imxyy.top" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy :8093
|
||||
'';
|
||||
};
|
||||
"sy.imxyy.top" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy :8095
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user