mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Merge branch 'main' of codeberg.org:muon/home
This commit is contained in:
commit
47bf3e923d
2 changed files with 22 additions and 2 deletions
|
|
@ -12,10 +12,13 @@ in with lib; {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = let port = 5001;
|
||||||
networking.firewall = { allowedTCPPorts = [ 443 80 ]; };
|
in {
|
||||||
|
networking.firewall = { allowedTCPPorts = [ port ]; };
|
||||||
services.grav = mkIf cfg.grav.enable {
|
services.grav = mkIf cfg.grav.enable {
|
||||||
|
inherit port;
|
||||||
enable = true;
|
enable = true;
|
||||||
|
root = "/curr/grav/grav";
|
||||||
phpPackage = pkgs.php81;
|
phpPackage = pkgs.php81;
|
||||||
};
|
};
|
||||||
users.users.${config.mods.user.name}.extraGroups = lib.mkAfter [ "grav" ];
|
users.users.${config.mods.user.name}.extraGroups = lib.mkAfter [ "grav" ];
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,17 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
addr = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = "IP address.";
|
||||||
|
default = "0.0.0.0";
|
||||||
|
};
|
||||||
|
port = mkOption {
|
||||||
|
type = types.nullOr types.port;
|
||||||
|
description = "Port number.";
|
||||||
|
default = 3000;
|
||||||
|
};
|
||||||
|
|
||||||
phpPackage = mkPackageOption pkgs "php" { };
|
phpPackage = mkPackageOption pkgs "php" { };
|
||||||
|
|
||||||
maxUploadSize = mkOption {
|
maxUploadSize = mkOption {
|
||||||
|
|
@ -153,10 +164,16 @@ in {
|
||||||
|
|
||||||
services.nginx = mkIf (cfg.virtualHost != null) {
|
services.nginx = mkIf (cfg.virtualHost != null) {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
${cfg.virtualHost} = {
|
${cfg.virtualHost} = {
|
||||||
root = "${servedRoot}";
|
root = "${servedRoot}";
|
||||||
|
|
||||||
|
listen = [{
|
||||||
|
addr = cfg.addr;
|
||||||
|
port = cfg.port;
|
||||||
|
}];
|
||||||
|
|
||||||
locations = {
|
locations = {
|
||||||
"= /robots.txt" = {
|
"= /robots.txt" = {
|
||||||
priority = 100;
|
priority = 100;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue