diff --git a/README.md b/README.md index fb913d5..390b756 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,10 @@ My test system. ## Goals -- Learn Nix. -- Attempt to make homelab, a la [Yunohost](https://yunohost.org/)[^1]...but declarative, reproducable +- Learn NixOS. +- Attempt to make basic media homelab, a la [Yunohost](https://yunohost.org/)[^1]...but declarative, reproducable - Try to avoid Docker +- No flakes ## Tasks - [X] ZFS for root file system @@ -13,9 +14,9 @@ My test system. - [X] VPS Caddy reverse proxy --> NixOS machine - [X] Setup Jellyfin - [X] Setup calibre-web -- [ ] Setup Transmission +- [X] Setup Transmission - [ ] Setup Nextcloud -- [ ] Setup systemwide auth system - LDAP? OAuth? +- [ ] Setup systemwide auth system - LDAP? OAuth? OR don't do this ## System Information ``` @@ -41,4 +42,4 @@ My test system. ▝▀▀▀ ▀▀▀▀▘ ▀▀▀▘ ``` -[^1]: No shade on Yunohost. It's a great project and got me into self-hosting. I just want to see if I can spread my wings and fly. Setting up a new Debian server from scratch is kinda annoying. I'd rather not do that again. +[^1]: No shade on [Yunohost](https://yunohost.org/). It's a great project and got me into self-hosting. I just want to see if I can spread my wings and fly. Setting up a new Debian server from scratch is kinda annoying. I'd rather not do that again. diff --git a/configuration.nix b/configuration.nix index aa316cc..9d42afc 100644 --- a/configuration.nix +++ b/configuration.nix @@ -16,6 +16,7 @@ ./services/glances.nix ./services/fail2ban.nix ./services/transmission.nix + ./services/nextcloud.nix ]; # Bootloader. boot.loader.systemd-boot.enable = true; @@ -49,7 +50,6 @@ # ZFS services.zfs.autoScrub.enable = true; - # Nix settings nix = { settings = { diff --git a/services/nextcloud-reset.sh b/services/nextcloud-reset.sh index 66d5e2e..6ff76a6 100755 --- a/services/nextcloud-reset.sh +++ b/services/nextcloud-reset.sh @@ -1,6 +1,9 @@ #!/run/current-system/sw/bin/bash sudo systemctl stop postgresql sudo systemctl stop nextcloud-setup +sudo systemctl stop nextcloud-cron +sudo systemctl stop phpfm-nextcloud +sudo systemctl stop redis-nextcloud sudo rm -rf /var/lib/nextcloud sudo rm -rf /var/lib/postgresql diff --git a/services/nextcloud.nix b/services/nextcloud.nix index af800ba..42bc9d3 100644 --- a/services/nextcloud.nix +++ b/services/nextcloud.nix @@ -5,10 +5,10 @@ services.nextcloud = { configureRedis = true; package = pkgs.nextcloud30; hostName = "nextcloud.knossos"; - datadir = "/var/lib/nextcloud/"; + datadir = "/home/elias/nextcloud/"; settings = { overwriteprotocol = "https"; - trusted_proxies = [ "localhost" "127.0.0.1" "100.122.246.61" ]; + trusted_proxies = [ "localhost" "127.0.0.1" "100.82.24.89" ]; #trusted_domains = [ "knossos.zebra-rudd.ts.net" ]; }; config = { @@ -16,7 +16,7 @@ services.nextcloud = { dbuser = "nextcloud"; dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself dbname = "nextcloud"; - adminpassFile = "/var/nextcloud-admin-pass"; + adminpassFile = "/var/lib/secrets/nextcloud-admin-pass"; adminuser = "admin"; }; };