Ntfy setup

This commit is contained in:
Filippo Berto 2024-03-05 15:55:49 +01:00
parent 7e63b18eef
commit bad95afc7b
Signed by: bertof
GPG key ID: 9DBF7E6A1D2CE9ED
4 changed files with 27 additions and 3 deletions

View file

@ -212,6 +212,7 @@
./instances/freya/configuration.nix ./instances/freya/configuration.nix
./modules/nixos/nextcloud.nix ./modules/nixos/nextcloud.nix
./modules/nixos/ntfy.nix
] ++ homeManagerModules ++ [ ] ++ homeManagerModules ++ [
{ home-manager.users.bertof = import ./instances/freya/hm.nix; } { home-manager.users.bertof = import ./instances/freya/hm.nix; }
]; ];

View file

@ -86,6 +86,15 @@
proxy_buffering off; proxy_buffering off;
''; '';
}; };
"ntfy.bertof.net" = ssl // {
locations."/" = {
proxyPass = "http://freya.tsn:7080/";
proxyWebsockets = true;
extraConfig = ''
client_max_body_size 5g;
'';
};
};
"my-nextcloud.bertof.net" = ssl // { "my-nextcloud.bertof.net" = ssl // {
locations."/" = { locations."/" = {
proxyPass = "http://freya.tsn:80/"; proxyPass = "http://freya.tsn:80/";

View file

@ -2,9 +2,7 @@
home = { home = {
language.base = "it_IT.UTF-8"; language.base = "it_IT.UTF-8";
packages = builtins.attrValues { packages = builtins.attrValues {
inherit (pkgs) inherit (pkgs) fd file htop mmv-go neofetchnixos-optionntfy-shpvripgrepunrarunzipwget xclip yq zip;
fd file htop mmv-go neofetch nixos-option pv ripgrep unrar unzip wget
xclip yq zip;
}; };
}; };

16
modules/nixos/ntfy.nix Normal file
View file

@ -0,0 +1,16 @@
let
port = 7080;
in
{
services.ntfy-sh = {
enable = true;
settings = {
listen-http = ":${toString port}";
base-url = "https://ntfy.bertof.net";
behind-proxy = true;
auth-default-access = "deny-all";
};
};
networking.firewall.allowedTCPPorts = [ port ];
}