mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-04-25 08:06:19 +02:00
seafile: init
This commit is contained in:
parent
2bacb74cc1
commit
fdcfeb524c
10 changed files with 170 additions and 41 deletions
|
@ -5,17 +5,20 @@
|
|||
services.borgmatic = {
|
||||
enable = true;
|
||||
settings = {
|
||||
location = {
|
||||
source_directories = [
|
||||
"/var/lib"
|
||||
"/var/log"
|
||||
"/root"
|
||||
];
|
||||
# fix failing check
|
||||
location = null;
|
||||
source_directories = [
|
||||
"/var/lib"
|
||||
"/var/log"
|
||||
"/root"
|
||||
];
|
||||
|
||||
repositories = [
|
||||
"ssh://root@192.168.10.2/mnt/backup/falkenstein"
|
||||
];
|
||||
};
|
||||
repositories = [
|
||||
{
|
||||
path = "ssh://root@192.168.10.2/mnt/backup/falkenstein";
|
||||
label = "nuc";
|
||||
}
|
||||
];
|
||||
storage = {
|
||||
encryption_passcommand = "${pkgs.coreutils}/bin/cat ${config.sops.secrets."borg/passphrase".path}";
|
||||
compression = "lz4";
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
./modules/backup
|
||||
./modules/hydra
|
||||
./modules/nextcloud
|
||||
./modules/seafile
|
||||
./modules/uptime-kuma
|
||||
./modules/vaultwarden
|
||||
./modules/nginx
|
||||
|
|
|
@ -12,13 +12,18 @@
|
|||
services.borgmatic = {
|
||||
enable = true;
|
||||
settings = {
|
||||
location.source_directories = [
|
||||
# fix failing check
|
||||
location = null;
|
||||
source_directories = [
|
||||
"/var/lib"
|
||||
"/var/log"
|
||||
"/nix/persist"
|
||||
];
|
||||
location.repositories = [
|
||||
"/mnt/backup/nuc"
|
||||
repositories = [
|
||||
{
|
||||
label = "nuc";
|
||||
path = "/mnt/backup/nuc";
|
||||
}
|
||||
];
|
||||
storage = {
|
||||
encryption_passcommand = "${pkgs.coreutils}/bin/cat ${config.sops.secrets."borg/passphrase".path}";
|
||||
|
|
29
hosts/nuc/modules/seafile/default.nix
Normal file
29
hosts/nuc/modules/seafile/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
domain = "seafile.${config.networking.domain}";
|
||||
in
|
||||
{
|
||||
services.seafile = {
|
||||
enable = true;
|
||||
adminEmail = "rouven@rfive.de";
|
||||
initialAdminPassword = "unused garbage";
|
||||
ccnetSettings.General.SERVICE_URL = "https://${domain}";
|
||||
ccnetSettings.General.FILE_SERVER_ROOT = "https://${domain}/seafhttp";
|
||||
};
|
||||
services.nginx.virtualHosts."${domain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://unix:/run/seahub/gunicorn.sock";
|
||||
};
|
||||
locations."/seafhttp" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.seafile.seafileSettings.fileserver.port}";
|
||||
extraConfig = ''
|
||||
rewrite ^/seafhttp(.*)$ $1 break;
|
||||
'';
|
||||
};
|
||||
locations."/media" = {
|
||||
root = pkgs.seahub;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -5,32 +5,35 @@
|
|||
services.borgmatic = {
|
||||
enable = true;
|
||||
settings = {
|
||||
location = {
|
||||
source_directories = [
|
||||
"/var/lib"
|
||||
"/var/log"
|
||||
"/nix/persist"
|
||||
"/home"
|
||||
"/etc/secureboot"
|
||||
];
|
||||
# fix failing check
|
||||
location = null;
|
||||
source_directories = [
|
||||
"/var/lib"
|
||||
"/var/log"
|
||||
"/nix/persist"
|
||||
"/home"
|
||||
"/etc/secureboot"
|
||||
];
|
||||
|
||||
repositories = [
|
||||
"ssh://root@192.168.10.2/mnt/backup/thinkpad"
|
||||
];
|
||||
exclude_patterns = [
|
||||
"/home/*/.cache"
|
||||
"/home/*/.zcomp*"
|
||||
"/home/*/.zcomp*"
|
||||
"/home/*/.gradle*"
|
||||
"/home/*/.java*"
|
||||
"/home/*/.m2*"
|
||||
"/home/*/.wine*"
|
||||
"/home/*/.mypy_cache*"
|
||||
"/home/*/.local/share"
|
||||
"/home/*/.local/share"
|
||||
"/home/*/Linux/Isos"
|
||||
];
|
||||
};
|
||||
repositories = [
|
||||
{
|
||||
label = "nuc";
|
||||
path = "ssh://root@192.168.10.2/mnt/backup/thinkpad";
|
||||
}
|
||||
];
|
||||
exclude_patterns = [
|
||||
"/home/*/.cache"
|
||||
"/home/*/.zcomp*"
|
||||
"/home/*/.zcomp*"
|
||||
"/home/*/.gradle*"
|
||||
"/home/*/.java*"
|
||||
"/home/*/.m2*"
|
||||
"/home/*/.wine*"
|
||||
"/home/*/.mypy_cache*"
|
||||
"/home/*/.local/share"
|
||||
"/home/*/.local/share"
|
||||
"/home/*/Linux/Isos"
|
||||
];
|
||||
storage = {
|
||||
encryption_passcommand = "${pkgs.coreutils}/bin/cat ${config.sops.secrets."borg/passphrase".path}";
|
||||
compression = "lz4";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue