From 7d52c492d407b5b3b78cd850ac3822c8aeb081b9 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Wed, 19 Apr 2023 07:31:34 +0200 Subject: [PATCH] backup tdarr --- flake.lock | 7 +++---- flake.nix | 4 ++-- nixos/machines/pepe/syncthing.nix | 22 +++++++++++++++------- nixos/machines/pepe/tdarr.nix | 6 ++++++ nixos/modules/services/samba-share.nix | 6 +++--- 5 files changed, 29 insertions(+), 16 deletions(-) diff --git a/flake.lock b/flake.lock index f4aa523..c048dc9 100644 --- a/flake.lock +++ b/flake.lock @@ -829,16 +829,15 @@ "locked": { "lastModified": 1680777934, "narHash": "sha256-/rwZWwylNzgZwVfaH0qgxOXurfWEK/kXzN2C+a1psCI=", - "ref": "main", + "ref": "refs/heads/main", "rev": "3dfb08abebc5ac3fea1882c63598bea48b783fcd", "revCount": 9, "type": "git", - "url": "ssh://gitea@git.ingolf-wagner.de/palo/nixos-private-assets.git" + "url": "file:///home/palo/dev/nixos/nixos-private-assets" }, "original": { - "ref": "main", "type": "git", - "url": "ssh://gitea@git.ingolf-wagner.de/palo/nixos-private-assets.git" + "url": "file:///home/palo/dev/nixos/nixos-private-assets" } }, "retiolum": { diff --git a/flake.nix b/flake.nix index d06878a..63ba7fd 100644 --- a/flake.nix +++ b/flake.nix @@ -56,8 +56,8 @@ inputs.nixpkgs.follows = "nixpkgs"; }; private_assets = { - #url = "git+file:///home/palo/dev/nixos/nixos-private-assets"; - url = "git+ssh://gitea@git.ingolf-wagner.de/palo/nixos-private-assets.git?ref=main"; + url = "git+file:///home/palo/dev/nixos/nixos-private-assets"; + #url = "git+ssh://gitea@git.ingolf-wagner.de/palo/nixos-private-assets.git?ref=main"; flake = true; }; retiolum = { diff --git a/nixos/machines/pepe/syncthing.nix b/nixos/machines/pepe/syncthing.nix index 4e13330..80f08b4 100644 --- a/nixos/machines/pepe/syncthing.nix +++ b/nixos/machines/pepe/syncthing.nix @@ -4,13 +4,19 @@ custom.samba-share = { enable = true; - folders = { - #media = config.services.syncthing.folders.media.path; - media = "/media/syncthing/media"; - }; - private.upload = { - folder = "/media/upload"; - users = "upload"; + #folders = { + # #media = config.services.syncthing.folders.media.path; + # media = "/media/syncthing/media"; + #}; + private = { + media = { + folder = "/media/syncthing/media"; + users = "upload"; + }; + #upload = { + # folder = "/media/upload"; + # users = "upload"; + #}; }; }; @@ -102,6 +108,8 @@ services.permown."/media/syncthing" = { owner = "syncthing"; group = "syncthing"; + directory-mode = "770"; + file-mode = "660"; }; systemd.services."permown._media_syncthing" = { bindsTo = [ "media.mount" ]; diff --git a/nixos/machines/pepe/tdarr.nix b/nixos/machines/pepe/tdarr.nix index 1660d7a..69ec908 100644 --- a/nixos/machines/pepe/tdarr.nix +++ b/nixos/machines/pepe/tdarr.nix @@ -6,6 +6,12 @@ group = "syncthing"; }; + backup.dirs = [ + "/srv/tdarr/server" + "/srv/tdarr/configs" + "/srv/tdarr/logs" + ]; + # https://docs.tdarr.io/docs/installation/docker/run-compose virtualisation.oci-containers = { backend = "podman"; diff --git a/nixos/modules/services/samba-share.nix b/nixos/modules/services/samba-share.nix index 665a083..461814f 100644 --- a/nixos/modules/services/samba-share.nix +++ b/nixos/modules/services/samba-share.nix @@ -79,11 +79,11 @@ in name = name; value = { browsable = "yes"; - comment = "read only share ${name}"; + comment = "read write share ${name}"; path = folder; - "read only" = "no"; "valid users" = users; - "guest ok" = "false"; + "read only" = "no"; + "guest ok" = "no"; }; }) cfg.private);