From f61d2eedefa8e5e4c0c4fdbb794bdca23f1e902f Mon Sep 17 00:00:00 2001 From: kity Date: Mon, 23 Dec 2024 14:39:18 +0100 Subject: [PATCH] started refactoring --- hosts/sisyphe/configuration.nix | 4 ++-- .../sisyphe/features}/authentik.nix | 0 .../sisyphe/features}/backups-repos.nix | 0 .../server => hosts/sisyphe/features}/backups.nix | 1 - .../server => hosts/sisyphe/features}/caddy.nix | 0 .../sisyphe/features}/containers/4get.nix | 0 .../features}/containers/crafty-controller.nix | 0 .../sisyphe/features}/containers/default.nix | 0 .../sisyphe/features}/containers/flaresolverr.nix | 0 .../sisyphe/features}/containers/freshrss.nix | 0 .../sisyphe/features}/containers/sonarr.nix | 0 .../sisyphe/features}/databases/default.nix | 0 .../server => hosts/sisyphe/features}/default.nix | 0 .../server => hosts/sisyphe/features}/fail2ban.nix | 0 .../sisyphe/features}/multimedia/arr-suite.nix | 0 .../sisyphe/features}/multimedia/calibre-web.nix | 0 .../sisyphe/features}/multimedia/default.nix | 0 .../sisyphe/features}/multimedia/jellyfin.nix | 0 .../sisyphe/features}/multimedia/slskd.nix | 0 .../sisyphe/features}/multimedia/transmission.nix | 0 .../sisyphe/features}/prometheus.nix | 0 .../sisyphe/features}/samba-shares.nix | 14 +++++++++----- .../sisyphe/features}/services/akkoma.nix | 0 .../sisyphe/features}/services/default.nix | 0 .../sisyphe/features}/services/forgejo-smtp.nix | 0 .../sisyphe/features}/services/forgejo.nix | 0 .../sisyphe/features}/services/freshrss.nix | 0 .../sisyphe/features}/services/grafana.nix | 0 .../features}/services/homelab-dashboard.nix | 0 .../sisyphe/features}/services/irc-server.nix | 0 .../features}/services/nextcloud-network.nix | 0 .../sisyphe/features}/services/nextcloud.nix | 0 .../sisyphe/features}/services/synapse-matrix.nix | 0 .../sisyphe/features}/services/uptime-kuma.nix | 0 .../sisyphe/features}/tailscale.nix | 0 hosts/sisyphe/server-configuration.nix | 3 +-- 36 files changed, 12 insertions(+), 10 deletions(-) rename {features/server => hosts/sisyphe/features}/authentik.nix (100%) rename {features/server => hosts/sisyphe/features}/backups-repos.nix (100%) rename {features/server => hosts/sisyphe/features}/backups.nix (98%) rename {features/server => hosts/sisyphe/features}/caddy.nix (100%) rename {features/server => hosts/sisyphe/features}/containers/4get.nix (100%) rename {features/server => hosts/sisyphe/features}/containers/crafty-controller.nix (100%) rename {features/server => hosts/sisyphe/features}/containers/default.nix (100%) rename {features/server => hosts/sisyphe/features}/containers/flaresolverr.nix (100%) rename {features/server => hosts/sisyphe/features}/containers/freshrss.nix (100%) rename {features/server => hosts/sisyphe/features}/containers/sonarr.nix (100%) rename {features/server => hosts/sisyphe/features}/databases/default.nix (100%) rename {features/server => hosts/sisyphe/features}/default.nix (100%) rename {features/server => hosts/sisyphe/features}/fail2ban.nix (100%) rename {features/server => hosts/sisyphe/features}/multimedia/arr-suite.nix (100%) rename {features/server => hosts/sisyphe/features}/multimedia/calibre-web.nix (100%) rename {features/server => hosts/sisyphe/features}/multimedia/default.nix (100%) rename {features/server => hosts/sisyphe/features}/multimedia/jellyfin.nix (100%) rename {features/server => hosts/sisyphe/features}/multimedia/slskd.nix (100%) rename {features/server => hosts/sisyphe/features}/multimedia/transmission.nix (100%) rename {features/server => hosts/sisyphe/features}/prometheus.nix (100%) rename {features/server => hosts/sisyphe/features}/samba-shares.nix (81%) rename {features/server => hosts/sisyphe/features}/services/akkoma.nix (100%) rename {features/server => hosts/sisyphe/features}/services/default.nix (100%) rename {features/server => hosts/sisyphe/features}/services/forgejo-smtp.nix (100%) rename {features/server => hosts/sisyphe/features}/services/forgejo.nix (100%) rename {features/server => hosts/sisyphe/features}/services/freshrss.nix (100%) rename {features/server => hosts/sisyphe/features}/services/grafana.nix (100%) rename {features/server => hosts/sisyphe/features}/services/homelab-dashboard.nix (100%) rename {features/server => hosts/sisyphe/features}/services/irc-server.nix (100%) rename {features/server => hosts/sisyphe/features}/services/nextcloud-network.nix (100%) rename {features/server => hosts/sisyphe/features}/services/nextcloud.nix (100%) rename {features/server => hosts/sisyphe/features}/services/synapse-matrix.nix (100%) rename {features/server => hosts/sisyphe/features}/services/uptime-kuma.nix (100%) rename {features/server => hosts/sisyphe/features}/tailscale.nix (100%) diff --git a/hosts/sisyphe/configuration.nix b/hosts/sisyphe/configuration.nix index d6c77df..174f043 100644 --- a/hosts/sisyphe/configuration.nix +++ b/hosts/sisyphe/configuration.nix @@ -9,8 +9,8 @@ imports = [ ./hardware-configuration.nix ./server-configuration.nix - ../../features/server/default.nix - ../../features/shared/ssh.nix + ./features/server/default.nix + ./features/shared/ssh.nix ]; # Use the GRUB 2 boot loader. diff --git a/features/server/authentik.nix b/hosts/sisyphe/features/authentik.nix similarity index 100% rename from features/server/authentik.nix rename to hosts/sisyphe/features/authentik.nix diff --git a/features/server/backups-repos.nix b/hosts/sisyphe/features/backups-repos.nix similarity index 100% rename from features/server/backups-repos.nix rename to hosts/sisyphe/features/backups-repos.nix diff --git a/features/server/backups.nix b/hosts/sisyphe/features/backups.nix similarity index 98% rename from features/server/backups.nix rename to hosts/sisyphe/features/backups.nix index ad0407a..990b06b 100644 --- a/features/server/backups.nix +++ b/hosts/sisyphe/features/backups.nix @@ -79,7 +79,6 @@ ]; postgresql_databases = [ { name = "nextcloud"; } - { name = "matrix-synapse"; } ]; exclude_patterns = [ "/home/*/.cache" ]; encryption_passcommand = "${pkgs.coreutils}/bin/cat /run/secrets/borgRemoteServerPassword"; diff --git a/features/server/caddy.nix b/hosts/sisyphe/features/caddy.nix similarity index 100% rename from features/server/caddy.nix rename to hosts/sisyphe/features/caddy.nix diff --git a/features/server/containers/4get.nix b/hosts/sisyphe/features/containers/4get.nix similarity index 100% rename from features/server/containers/4get.nix rename to hosts/sisyphe/features/containers/4get.nix diff --git a/features/server/containers/crafty-controller.nix b/hosts/sisyphe/features/containers/crafty-controller.nix similarity index 100% rename from features/server/containers/crafty-controller.nix rename to hosts/sisyphe/features/containers/crafty-controller.nix diff --git a/features/server/containers/default.nix b/hosts/sisyphe/features/containers/default.nix similarity index 100% rename from features/server/containers/default.nix rename to hosts/sisyphe/features/containers/default.nix diff --git a/features/server/containers/flaresolverr.nix b/hosts/sisyphe/features/containers/flaresolverr.nix similarity index 100% rename from features/server/containers/flaresolverr.nix rename to hosts/sisyphe/features/containers/flaresolverr.nix diff --git a/features/server/containers/freshrss.nix b/hosts/sisyphe/features/containers/freshrss.nix similarity index 100% rename from features/server/containers/freshrss.nix rename to hosts/sisyphe/features/containers/freshrss.nix diff --git a/features/server/containers/sonarr.nix b/hosts/sisyphe/features/containers/sonarr.nix similarity index 100% rename from features/server/containers/sonarr.nix rename to hosts/sisyphe/features/containers/sonarr.nix diff --git a/features/server/databases/default.nix b/hosts/sisyphe/features/databases/default.nix similarity index 100% rename from features/server/databases/default.nix rename to hosts/sisyphe/features/databases/default.nix diff --git a/features/server/default.nix b/hosts/sisyphe/features/default.nix similarity index 100% rename from features/server/default.nix rename to hosts/sisyphe/features/default.nix diff --git a/features/server/fail2ban.nix b/hosts/sisyphe/features/fail2ban.nix similarity index 100% rename from features/server/fail2ban.nix rename to hosts/sisyphe/features/fail2ban.nix diff --git a/features/server/multimedia/arr-suite.nix b/hosts/sisyphe/features/multimedia/arr-suite.nix similarity index 100% rename from features/server/multimedia/arr-suite.nix rename to hosts/sisyphe/features/multimedia/arr-suite.nix diff --git a/features/server/multimedia/calibre-web.nix b/hosts/sisyphe/features/multimedia/calibre-web.nix similarity index 100% rename from features/server/multimedia/calibre-web.nix rename to hosts/sisyphe/features/multimedia/calibre-web.nix diff --git a/features/server/multimedia/default.nix b/hosts/sisyphe/features/multimedia/default.nix similarity index 100% rename from features/server/multimedia/default.nix rename to hosts/sisyphe/features/multimedia/default.nix diff --git a/features/server/multimedia/jellyfin.nix b/hosts/sisyphe/features/multimedia/jellyfin.nix similarity index 100% rename from features/server/multimedia/jellyfin.nix rename to hosts/sisyphe/features/multimedia/jellyfin.nix diff --git a/features/server/multimedia/slskd.nix b/hosts/sisyphe/features/multimedia/slskd.nix similarity index 100% rename from features/server/multimedia/slskd.nix rename to hosts/sisyphe/features/multimedia/slskd.nix diff --git a/features/server/multimedia/transmission.nix b/hosts/sisyphe/features/multimedia/transmission.nix similarity index 100% rename from features/server/multimedia/transmission.nix rename to hosts/sisyphe/features/multimedia/transmission.nix diff --git a/features/server/prometheus.nix b/hosts/sisyphe/features/prometheus.nix similarity index 100% rename from features/server/prometheus.nix rename to hosts/sisyphe/features/prometheus.nix diff --git a/features/server/samba-shares.nix b/hosts/sisyphe/features/samba-shares.nix similarity index 81% rename from features/server/samba-shares.nix rename to hosts/sisyphe/features/samba-shares.nix index cc8fa9b..1405e4d 100644 --- a/features/server/samba-shares.nix +++ b/hosts/sisyphe/features/samba-shares.nix @@ -1,6 +1,4 @@ { config, lib, ... }: -with lib; -# TODO: add access to series and TV folders. let cfg = config.samba; in @@ -31,20 +29,20 @@ in browseable = "yes"; "read only" = "no"; "create mask" = "0644"; - "directory mask" = "0755"; + "directory mask" = "0655"; }; ebooks = { path = "${cfg.dir}/Ebooks"; browseable = "yes"; "read only" = "no"; "create mask" = "0644"; - "directory mask" = "0755"; + "directory mask" = "0655"; }; movies = { path = "${cfg.dir}/Films"; browseable = "yes"; "create mask" = "0644"; - "directory mask" = "0755"; + "directory mask" = "0655"; "read only" = "no"; }; shows = { @@ -54,6 +52,12 @@ in "directory mask" = "0755"; browseable = "yes"; }; + torrents = { + path = "${cfg.dir}/Torrents"; + "read only" = "yes"; + "create mask" = "644"; + browseable = "yes"; + }; }; }; }; diff --git a/features/server/services/akkoma.nix b/hosts/sisyphe/features/services/akkoma.nix similarity index 100% rename from features/server/services/akkoma.nix rename to hosts/sisyphe/features/services/akkoma.nix diff --git a/features/server/services/default.nix b/hosts/sisyphe/features/services/default.nix similarity index 100% rename from features/server/services/default.nix rename to hosts/sisyphe/features/services/default.nix diff --git a/features/server/services/forgejo-smtp.nix b/hosts/sisyphe/features/services/forgejo-smtp.nix similarity index 100% rename from features/server/services/forgejo-smtp.nix rename to hosts/sisyphe/features/services/forgejo-smtp.nix diff --git a/features/server/services/forgejo.nix b/hosts/sisyphe/features/services/forgejo.nix similarity index 100% rename from features/server/services/forgejo.nix rename to hosts/sisyphe/features/services/forgejo.nix diff --git a/features/server/services/freshrss.nix b/hosts/sisyphe/features/services/freshrss.nix similarity index 100% rename from features/server/services/freshrss.nix rename to hosts/sisyphe/features/services/freshrss.nix diff --git a/features/server/services/grafana.nix b/hosts/sisyphe/features/services/grafana.nix similarity index 100% rename from features/server/services/grafana.nix rename to hosts/sisyphe/features/services/grafana.nix diff --git a/features/server/services/homelab-dashboard.nix b/hosts/sisyphe/features/services/homelab-dashboard.nix similarity index 100% rename from features/server/services/homelab-dashboard.nix rename to hosts/sisyphe/features/services/homelab-dashboard.nix diff --git a/features/server/services/irc-server.nix b/hosts/sisyphe/features/services/irc-server.nix similarity index 100% rename from features/server/services/irc-server.nix rename to hosts/sisyphe/features/services/irc-server.nix diff --git a/features/server/services/nextcloud-network.nix b/hosts/sisyphe/features/services/nextcloud-network.nix similarity index 100% rename from features/server/services/nextcloud-network.nix rename to hosts/sisyphe/features/services/nextcloud-network.nix diff --git a/features/server/services/nextcloud.nix b/hosts/sisyphe/features/services/nextcloud.nix similarity index 100% rename from features/server/services/nextcloud.nix rename to hosts/sisyphe/features/services/nextcloud.nix diff --git a/features/server/services/synapse-matrix.nix b/hosts/sisyphe/features/services/synapse-matrix.nix similarity index 100% rename from features/server/services/synapse-matrix.nix rename to hosts/sisyphe/features/services/synapse-matrix.nix diff --git a/features/server/services/uptime-kuma.nix b/hosts/sisyphe/features/services/uptime-kuma.nix similarity index 100% rename from features/server/services/uptime-kuma.nix rename to hosts/sisyphe/features/services/uptime-kuma.nix diff --git a/features/server/tailscale.nix b/hosts/sisyphe/features/tailscale.nix similarity index 100% rename from features/server/tailscale.nix rename to hosts/sisyphe/features/tailscale.nix diff --git a/hosts/sisyphe/server-configuration.nix b/hosts/sisyphe/server-configuration.nix index 8140f1f..f038092 100644 --- a/hosts/sisyphe/server-configuration.nix +++ b/hosts/sisyphe/server-configuration.nix @@ -38,8 +38,7 @@ in allowedTCPPorts = [ 22 # ssh 80 # http - 8008 # matrix-synapse - 8448 # matrix-synapse + 443 # ssh ]; allowedUDPPorts = [ ]; };