This commit is contained in:
Hadi 2024-06-19 23:20:49 +02:00
parent 939597dd90
commit debb139aeb
4 changed files with 15 additions and 16 deletions

View File

@ -1,9 +1,6 @@
# Nextcloud # Nextcloud
{ pkgs, ... }: let hostname = "cloud.anotherhadi.com";
let in {
hostname = "cloud.anotherhadi.com";
in
{
services.nextcloud = { services.nextcloud = {
enable = true; enable = true;
hostName = hostname; hostName = hostname;
@ -13,12 +10,13 @@ in
adminpassFile = "/etc/nextcloud/adminpassFile"; adminpassFile = "/etc/nextcloud/adminpassFile";
}; };
settings = { settings = {
trusted_domains = [ "localhost" "127.0.0.1" "192.168.2.23" "cloud.anotherhadi.com" ]; trusted_domains =
[ "localhost" "127.0.0.1" "192.168.2.23" "cloud.anotherhadi.com" ];
}; };
nginx.recommendedHttpHeaders = true; nginx.recommendedHttpHeaders = true;
}; };
services.nginx.virtualHosts.${hostname} = { services.nginx.virtualHosts.${hostname} = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
} };
} }

View File

@ -9,6 +9,7 @@
# test # test
services.nginx.virtualHosts."anotherhadi.com" = { services.nginx.virtualHosts."anotherhadi.com" = {
locations."/".root = "/var/www/default"; serverAliases = [ "www.anotherhadi.com" ];
root = "/var/www/default";
}; };
} }

View File

@ -13,11 +13,10 @@
path = "/home/hadi/.ssh/github"; path = "/home/hadi/.ssh/github";
owner = "hadi"; owner = "hadi";
}; };
# nextcloud-adminpass = { nextcloud-adminpass = {
# path = "/etc/nextcloud/adminpassFile"; mode = "0444"; # FIXME
# owner = "nextcloud"; path = "/etc/nextcloud/adminpassFile";
# group = "nextcloud"; };
# };
cloudflare-apitoken = { cloudflare-apitoken = {
mode = "0444"; # FIXME mode = "0444"; # FIXME
path = "/etc/cloudflare/apiToken"; path = "/etc/cloudflare/apiToken";

View File

@ -7,6 +7,7 @@
../modules/server/sops.nix ../modules/server/sops.nix
../modules/server/cloudflare-dyndns.nix ../modules/server/cloudflare-dyndns.nix
../modules/server/nginx.nix ../modules/server/nginx.nix
../modules/server/nextcloud.nix
]; ];
# Bootloader. # Bootloader.