mergerfs migration server/scripts

This commit is contained in:
2023-10-01 15:51:36 -06:00
parent 4226d0b422
commit 2b022b59e6
2 changed files with 135 additions and 72 deletions

View File

@@ -375,7 +375,7 @@ fd # modern find, faster searches
fzf # fuzzy finder! super cool and useful
gdu # disk-space utility, somewhat useful
du-dust # rusty du
trashy # oop! didn't meant to delete that
trash-cli # oop! didn't meant to delete that
unstable.eza # like ls but with colors
rmlint # probably my favourite app, amazing dupe finder that integrates well with BTRFS
#+end_src
@@ -556,8 +556,11 @@ programs.bash = {
f = "fzf --multi --exact -i";
sc = "systemctl --user";
jc = "journalctl --user -xefu";
open-gallery = "cd /mnt/disk2/scrapping/JawZ/gallery-dl && xdg-open $(fd . ./ Husbands -tdirectory -d 1 | fzf -i)\"";
unique-extensions = "fd -tf | rev | cut -d. -f1 | rev | tr '[:upper:]' '[:lower:]' | sort | uniq --count | sort -rn";
open-gallery = "cd /mnt/pool/scrapping/JawZ/gallery-dl &&
xdg-open $(fd . ./ Husbands -tdirectory -d 1 | fzf -i)\"";
unique-extensions = "fd -tf | rev | cut -d. -f1 | rev |
tr '[:upper:]' '[:lower:]' | sort |
uniq --count | sort -rn";
};
enableVteIntegration = true;
initExtra = ''
@@ -692,6 +695,8 @@ environment = {
wget
jellyfin-ffmpeg # coolest video converter!
dlib
mergerfs
mergerfs-tools
];
variables = rec {
# PATH
@@ -751,43 +756,42 @@ historic backup of your files, I am more concerned with the whole disk recovery
in case of failure, as such a frequent sync fits my preferences.
#+begin_src nix
snapraid = {
enable = true;
touchBeforeSync = true;
sync.interval = "02:00";
scrub = {
plan = 10;
olderThan = 15;
interval = "4:00";
};
parityFiles = [
"/mnt/parity/snapraid.parity"
];
extraConfig = ''
autosave 5000
'';
exclude = [
"/tmp/"
"/lost+found/"
"/multimedia/downloads/"
"/scrapping/nextcloud/"
"/backups/"
"/glue/Spankbank/unorganized/chaturbate/"
"/nextcloud/nextcloud.log"
"/.Trash-1000"
"/seeding"
];
dataDisks = {
d1 = "/mnt/disk1/";
d2 = "/mnt/disk2/";
d3 = "/mnt/seedbox";
};
contentFiles = [
"/var/snapraid.content"
"/mnt/disk1/snapraid.content"
"/mnt/disk2/snapraid.content"
];
};
# snapraid = {
# enable = true;
# touchBeforeSync = true;
# sync.interval = "02:00";
# scrub = {
# plan = 10;
# olderThan = 15;
# interval = "4:00";
# };
# parityFiles = [
# "/mnt/disks/parity/snapraid.parity"
# ];
# extraConfig = ''
# autosave 5000
# '';
# exclude = [
# "/tmp/"
# "/lost+found/"
# "/multimedia/downloads/"
# "/backups/"
# "/glue/Spankbank/unorganized/chaturbate/"
# "/nextcloud/nextcloud.log"
# "/.Trash-1000/"
# "/seeding/"
# ];
# dataDisks = {
# d1 = "/mnt/disks/disk1/";
# d2 = "/mnt/disks/disk2/";
# d3 = "/mnt/disks/seedbox/";
# };
# contentFiles = [
# "/var/snapraid.content"
# "/mnt/disks/disk1/snapraid.content"
# "/mnt/disks/disk2/snapraid.content"
# ];
# };
#+end_src
* PROGRAMS
@@ -837,9 +841,8 @@ services = {
settings = {
inotify = "yes";
media_dir = [
"/mnt/disk2/glue"
"/mnt/seedbox/glue"
"/mnt/disk1/multimedia/downloads"
"/mnt/disks/seedbox"
"/mnt/pool"
];
};
};
@@ -852,8 +855,8 @@ services = {
enable = true;
fileSystems = [
"/"
"/mnt/disk1"
"/mnt/disk2"
"/mnt/disks/disk1"
"/mnt/disks/disk2"
];
};
samba-wsdd.enable = true;
@@ -873,7 +876,7 @@ services = {
follow symlinks = yes
security = user
hosts allow = 192.168.0.0/16 localhost
hosts allow = 192.168.0. localhost
hosts deny = 0.0.0.0/0
guest account = nobody
map to guest = Bad user
@@ -884,9 +887,9 @@ services = {
browseable = "yes";
writable = "yes";
"read only" = "no";
"guest ok" = "no";
"guest ok" = "yes";
# "write list" = "jawz";
"force user" = "jawz";
"write list" = "jawz";
"force group" = "WORKGROUP";
};
in {
@@ -933,7 +936,7 @@ systemd = {
serviceConfig = {
Restart = "on-failure";
RestartSec = 30;
WorkingDirectory="/mnt/hnbox";
WorkingDirectory="/mnt/disks/hnbox";
ExecStart = "${pkgs.HentaiAtHome}/bin/HentaiAtHome";
};
};