This commit is contained in:
Hadi 2024-06-08 02:17:04 +02:00
parent 430d30e4ee
commit 2656132158
4 changed files with 52 additions and 16 deletions

View File

@ -61,8 +61,6 @@ in {
enable = true; enable = true;
loginShellInit = '' loginShellInit = ''
dbus-update-activation-environment --systemd DISPLAY dbus-update-activation-environment --systemd DISPLAY
eval $(gnome-keyring-daemon --start --components=ssh,secrets)
eval $(ssh-agent)
''; '';
}; };
users.defaultUserShell = pkgs.zsh; users.defaultUserShell = pkgs.zsh;

View File

@ -1,12 +1,46 @@
{ pkgs, ... }: { # { pkgs, ... }: {
environment.systemPackages = with pkgs; [ cloudflared ]; # environment.systemPackages = with pkgs; [ cloudflared ];
services.cloudflared = { # services.cloudflared = {
# enable = true;
# tunnels = {
# "55ac0504-4ba0-4ea7-bf38-6d04ca7e45c3" = {
# credentialsFile = "/etc/cloudflaredpwd";
# default = "http_status:404";
# ingress = { };
# };
# };
# };
# }
#
{ config, pkgs, ... }:
{
services.nextcloud = {
enable = true; enable = true;
tunnels = { hostName = "localhost";
"55ac0504-4ba0-4ea7-bf38-6d04ca7e45c3" = { https = false;
credentialsFile = "/etc/cloudflaredpwd"; config = {
default = "http_status:404"; dbtype = "sqlite";
ingress = { }; adminuser = "admin";
adminpass = "TESTADMINPASSWORD";
datadirectory = "/var/lib/nextcloud/data";
};
};
services.postgresql.enable = true;
services.nginx = {
virtualHosts."localhost" = {
forceSSL = true;
enableACME = false;
locations."/" = {
proxyPass = "http://127.0.0.1:8080";
extraConfig = ''
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
'';
}; };
}; };
}; };

View File

@ -5,14 +5,18 @@
services.nextcloud = { services.nextcloud = {
enable = true; enable = true;
package = pkgs.nextcloud29; package = pkgs.nextcloud29;
hostName = "localhost"; hostName = "cloud.anotherhadi.com";
config.adminpassFile = "/etc/nextcloudpwd"; config.adminpassFile = "/etc/nextcloudpwd";
}; };
networking.firewall.allowedTCPPorts = [ 80 443 8080 ]; networking.firewall.allowedTCPPorts = [ 80 443 8083 ];
services.nginx.virtualHosts."localhost".listen = [{ services.nginx.virtualHosts.${config.services.nextcloud.hostName} = {
addr = "127.0.0.1"; forceSSL = true;
port = 8080; enableACME = true;
listen = [{
addr = "localhost";
port = 8083;
}]; }];
};
} }

0
hosts/server/pihole.nix Normal file
View File