mob next [ci-skip] [ci skip] [skip ci]
lastFile:machines/deneb/configuration.nix
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
sitename = "erptest.kurogeek.home";
|
||||
in
|
||||
{
|
||||
imports = [ inputs.frappix.nixosModules.x86_64-linux.frappix ];
|
||||
nixpkgs.overlays = [
|
||||
inputs.self.overlays.frappeOverlay
|
||||
inputs.self.overlays.pythonOverlay
|
||||
inputs.self.overlays.libsOverlay
|
||||
inputs.self.overlays.toolsOverlay
|
||||
inputs.self.overlays.frappePythonPkgsOverlay
|
||||
];
|
||||
|
||||
clan.core.vars.generators.frappix = {
|
||||
files = {
|
||||
sslCertificate.secret = false;
|
||||
sslCertificateKey = {
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
secret = true;
|
||||
};
|
||||
};
|
||||
runtimeInputs = [
|
||||
pkgs.openssl
|
||||
];
|
||||
script = ''
|
||||
openssl req -x509 -newkey rsa:4096 -keyout $out/sslCertificateKey -out $out/sslCertificate -sha256 -days 3650 -nodes -subj "/C=TH/ST=ChiangMai/L=ChiangMai/O=kurogeek/CN=kurogeek.home"
|
||||
'';
|
||||
};
|
||||
|
||||
services.frappe = {
|
||||
enable = true;
|
||||
project = "test";
|
||||
gunicorn_workers = 2;
|
||||
sites = {
|
||||
"${sitename}" = {
|
||||
domains = [ "localhost" ];
|
||||
apps = [
|
||||
"frappe"
|
||||
"erpnext"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."${sitename}" = {
|
||||
sslCertificate = config.clan.core.vars.generators.frappix.files.sslCertificate.path;
|
||||
sslCertificateKey = config.clan.core.vars.generators.frappix.files.sslCertificateKey.path;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user