forked from aylac.top/nixcfg
this repo has no description

update privatebin

aylac.top 1b799966 0f7e7035

verified
Changed files
+40 -12
modules
nixos
services
privatebin
+3 -3
flake.lock
···
]
},
"locked": {
-
"lastModified": 1760489844,
-
"narHash": "sha256-IhMAPF+woEzvjONjokZZhY05xEiwjyu3MxErQQ3O+rM=",
"owner": "ayla6",
"repo": "pkgs",
-
"rev": "efc8b7905f76323ecf4ccee0233f504205ff66bc",
"type": "github"
},
"original": {
···
]
},
"locked": {
+
"lastModified": 1760550478,
+
"narHash": "sha256-o0Zhn/rj00rA8xOcN5Koq4TC86HRMvYQW0zB/3zGTdU=",
"owner": "ayla6",
"repo": "pkgs",
+
"rev": "5ed6d3c22218187aadaad82530d0392a9d9fe607",
"type": "github"
},
"original": {
+37 -9
modules/nixos/services/privatebin/default.nix
···
network = config.mySnippets.aylac-top;
service = network.networkMap.${name};
in {
options.myNixOS.services.${name} = {
enable = lib.mkEnableOption "${name} server";
···
"${service.vHost}" = "http://localhost:${toString service.port}";
};
-
nginx.virtualHosts."${config.services.privatebin.virtualHost}".listen = [
-
{
-
addr = "localhost";
-
inherit (service) port;
-
}
-
];
privatebin = {
-
package = pkgs.privatebin-ayla;
enable = true;
-
enableNginx = true;
settings = {
main = {
name = "ayla's trashbin";
···
password = true;
fileupload = true;
burnafterreadingselected = false;
-
defaultformatter = "syntaxhighlighting";
syntaxhighlightingtheme = "sons-of-obsidian";
qrcode = true;
template = "bootstrap-dark";
···
network = config.mySnippets.aylac-top;
service = network.networkMap.${name};
+
+
package = pkgs.privatebin-ayla;
in {
options.myNixOS.services.${name} = {
enable = lib.mkEnableOption "${name} server";
···
"${service.vHost}" = "http://localhost:${toString service.port}";
};
+
nginx = {
+
enable = true;
+
recommendedTlsSettings = lib.mkDefault true;
+
recommendedOptimisation = lib.mkDefault true;
+
recommendedGzipSettings = lib.mkDefault true;
+
virtualHosts."${config.services.privatebin.virtualHost}" = {
+
root = "${package}";
+
locations = {
+
"/" = {
+
tryFiles = "$uri $uri/ /index.php?$query_string";
+
index = "index.php";
+
extraConfig = ''
+
sendfile off;
+
'';
+
};
+
"~ \\.php$" = {
+
extraConfig = ''
+
include ${config.services.nginx.package}/conf/fastcgi_params ;
+
fastcgi_param SCRIPT_FILENAME $request_filename;
+
fastcgi_param modHeadersAvailable true; #Avoid sending the security headers twice
+
fastcgi_pass unix:${config.services.phpfpm.pools.privatebin.socket};
+
'';
+
};
+
};
+
listen = [
+
{
+
addr = "localhost";
+
inherit (service) port;
+
}
+
];
+
};
+
};
privatebin = {
+
inherit package;
enable = true;
+
group = "nginx";
settings = {
main = {
name = "ayla's trashbin";
···
password = true;
fileupload = true;
burnafterreadingselected = false;
+
defaultformatter = "plaintext";
syntaxhighlightingtheme = "sons-of-obsidian";
qrcode = true;
template = "bootstrap-dark";