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
{ pkgs, ... }:
let
hostname = "cloud.anotherhadi.com";
in
{
let hostname = "cloud.anotherhadi.com";
in {
services.nextcloud = {
enable = true;
hostName = hostname;
@ -13,12 +10,13 @@ in
adminpassFile = "/etc/nextcloud/adminpassFile";
};
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;
};
services.nginx.virtualHosts.${hostname} = {
forceSSL = true;
enableACME = true;
}
};
}

View File

@ -9,6 +9,7 @@
# test
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";
owner = "hadi";
};
# nextcloud-adminpass = {
# path = "/etc/nextcloud/adminpassFile";
# owner = "nextcloud";
# group = "nextcloud";
# };
nextcloud-adminpass = {
mode = "0444"; # FIXME
path = "/etc/nextcloud/adminpassFile";
};
cloudflare-apitoken = {
mode = "0444"; # FIXME
path = "/etc/cloudflare/apiToken";

View File

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