triviOS/triviOS/web.nix
2023-09-11 03:10:06 -06:00

36 lines
748 B
Nix

{ config, pkgs, ... }: {
config.services = {
nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
virtualHosts.home-manager = {
default = true;
locations = {
"/".extraConfig = ''
uwsgi_pass unix://${config.services.uwsgi.runDir}/uwsgi.sock;
'';
};
};
};
uwsgi = {
enable = true;
group = "nginx";
plugins = [ "python3" ];
instance = {
type = "normal";
pythonPackages = py: [ (py.callPackage ../ui { }) ];
module = "homemanager.wsgi";
socket = "${config.services.uwsgi.runDir}/uwsgi.sock";
};
};
};
}