From c4407c23612c17e3a367e985e6eec39661e2754d Mon Sep 17 00:00:00 2001 From: Leon Vatthauer Date: Wed, 29 May 2024 08:27:05 +0200 Subject: [PATCH] add nextcloud --- dafoe/configuration.nix | 4 ++-- dafoe/hardware-configuration.nix | 7 +++++++ dafoe/services/default.nix | 1 + dafoe/services/nextcloud.nix | 6 +++++- dafoe/services/nginx.nix | 1 + 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/dafoe/configuration.nix b/dafoe/configuration.nix index bd5b462..fb969dc 100644 --- a/dafoe/configuration.nix +++ b/dafoe/configuration.nix @@ -63,8 +63,8 @@ EDITOR = "vim"; # bitwarden key - YUBICO_CLIENT_ID = "${../nix-secrets/willem/vaultwarden/yubico-id}"; - YUBICO_SECRET_KEY = "${../nix-secrets/willem/vaultwarden/yubico-secret}"; + YUBICO_CLIENT_ID = "${../nix-secrets/dafoe/vaultwarden/yubico-id}"; + YUBICO_SECRET_KEY = "${../nix-secrets/dafoe/vaultwarden/yubico-secret}"; }; environment.shells = [ pkgs.zsh ]; diff --git a/dafoe/hardware-configuration.nix b/dafoe/hardware-configuration.nix index 72881ed..1c6fb17 100644 --- a/dafoe/hardware-configuration.nix +++ b/dafoe/hardware-configuration.nix @@ -18,6 +18,13 @@ fsType = "ext4"; }; + fileSystems."/nix" = + { device = "/dev/disk/by-label/nix"; + fsType = "ext4"; + neededForBoot = true; + options = [ "noatime" ]; + }; + swapDevices = [ { device = "/dev/disk/by-uuid/d8d1edd9-e549-4d92-94d5-8ac5af126a5b"; } ]; diff --git a/dafoe/services/default.nix b/dafoe/services/default.nix index 7791043..f1e0166 100644 --- a/dafoe/services/default.nix +++ b/dafoe/services/default.nix @@ -9,5 +9,6 @@ ./restic.nix ./ssh.nix ./vaultwarden.nix + ./nextcloud.nix ]; } diff --git a/dafoe/services/nextcloud.nix b/dafoe/services/nextcloud.nix index f9c5859..483eec1 100644 --- a/dafoe/services/nextcloud.nix +++ b/dafoe/services/nextcloud.nix @@ -1,11 +1,15 @@ +{ pkgs, ... }: { services.nextcloud = { enable = true; - package = pkgs.nextcloud29 + package = pkgs.nextcloud29; hostName = "cloud.vatthauer.xyz"; https = true; + config.adminuser = "admin"; config.adminpassFile = "${../../nix-secrets/dafoe/nextcloud/adminpass}"; configureRedis = true; maxUploadSize = "1G"; + #nginx.enable = true; + settings.overwriteProtocol = "https"; }; } diff --git a/dafoe/services/nginx.nix b/dafoe/services/nginx.nix index 85b1bf7..9be086c 100644 --- a/dafoe/services/nginx.nix +++ b/dafoe/services/nginx.nix @@ -48,6 +48,7 @@ services.nginx.virtualHosts."cloud.vatthauer.xyz" = { forceSSL = true; enableACME = true; + #locations."/".proxyPass = "http://localhost:8080"; # nextcloud does location setup itself }; }