enabled nextcloud

This commit is contained in:
Ingolf Wagner 2024-04-11 19:51:10 +02:00
parent a4f2b06d1e
commit 26266dc088
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
3 changed files with 14 additions and 45 deletions

View file

@ -100,6 +100,18 @@ in
compression = "lz4"; compression = "lz4";
}; };
}; };
"nextcloud" = {
type = "zfs_fs";
mountpoint = "/var/lib/nixos-containers/nextcloud";
options = {
mountpoint = "legacy";
compression = "lz4";
"com.sun:auto-snapshot:hourly" = toString true;
"com.sun:auto-snapshot:daily" = toString true;
#"com.sun:auto-snapshot:weekly" = false;
#"com.sun:auto-snapshot:monthly" = false;
};
};
}; };
}; };
@ -122,19 +134,6 @@ in
#"com.sun:auto-snapshot:monthly" = false; #"com.sun:auto-snapshot:monthly" = false;
}; };
}; };
# todo make sure this disk has some minimum space
"nextcloud" = {
type = "zfs_fs";
mountpoint = "/var/lib/nextcloud";
options = {
mountpoint = "legacy";
compression = "lz4";
"com.sun:auto-snapshot:hourly" = toString true;
"com.sun:auto-snapshot:daily" = toString true;
#"com.sun:auto-snapshot:weekly" = false;
#"com.sun:auto-snapshot:monthly" = false;
};
};
}; };
}; };

View file

@ -9,7 +9,7 @@ let
nextcloudUid = 1000; nextcloudUid = 1000;
nextcloudGid = 1000; nextcloudGid = 1000;
nextcloudPort = 8080; nextcloudPort = 8080;
nextcloudHostName = "cloud.ingolf-wagner.de"; nextcloudHostName = "nextcloud.ingolf-wagner.de";
phpPackage = pkgs.php73; phpPackage = pkgs.php73;
nextcloudPackage = pkgs.nextcloud28; nextcloudPackage = pkgs.nextcloud28;
@ -17,10 +17,6 @@ let
in in
{ {
# host nginx
# ----------
networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.firewall.allowedUDPPorts = [ 80 443 ]; networking.firewall.allowedUDPPorts = [ 80 443 ];
@ -85,26 +81,6 @@ in
mountPoint = "/run/secrets/nextcloud_database_password"; mountPoint = "/run/secrets/nextcloud_database_password";
isReadOnly = true; isReadOnly = true;
}; };
#home = {
# # make sure this folder exist on the host
# hostPath = toString "/var/lib/nextcloud";
# mountPoint = "/var/lib/nextcloud";
# isReadOnly = false;
#};
#db = {
# # make sure this folder exist on the host
# hostPath = toString "/var/lib/nextcloud_mysql";
# mountPoint = "/var/lib/mysql";
# isReadOnly = false;
#};
#media = {
# #mountPoint = toString config.services.syncthing.folders.media.path;
# #hostPath = toString config.services.syncthing.folders.media.path;
# mountPoint = "/media/syncthing/media";
# hostPath = "/media/media";
# isReadOnly = true;
#};
}; };
privateNetwork = false; privateNetwork = false;
@ -118,7 +94,6 @@ in
#environment.etc."resolv.conf".text = "nameserver 8.8.8.8"; #environment.etc."resolv.conf".text = "nameserver 8.8.8.8";
system.stateVersion = "23.11"; system.stateVersion = "23.11";
#system.stateVersion = "21.05";
users.users.nextcloud.uid = nextcloudUid; users.users.nextcloud.uid = nextcloudUid;
@ -133,9 +108,6 @@ in
recommendedTlsSettings = lib.mkDefault true; recommendedTlsSettings = lib.mkDefault true;
}; };
#networking.firewall.allowedTCPPorts = [ 80 ];
#networking.firewall.allowedUDPPorts = [ 80 ];
# nextcloud database # nextcloud database
# ================== # ==================
# #
@ -199,8 +171,6 @@ in
enable = true; enable = true;
package = nextcloudPackage; package = nextcloudPackage;
autoUpdateApps.enable = true; autoUpdateApps.enable = true;
# nginx.enable = true;
# enableBrokenCiphersForSSE = false; # see https://github.com/NixOS/nixpkgs/pull/198470
hostName = nextcloudHostName; hostName = nextcloudHostName;
logLevel = 2; logLevel = 2;
https = true; https = true;

View file

@ -12,7 +12,7 @@
./borg.nix ./borg.nix
./codimd.nix ./codimd.nix
./gitea.nix ./gitea.nix
./nextcloud.nix #./nextcloud.nix
./packages.nix ./packages.nix
./taskserver.nix ./taskserver.nix
./vaultwarden.nix ./vaultwarden.nix