bao: s3fs + autofs for personal cloud drive: s3fs command not found

top-level-nix
Pegasust 2022-12-22 17:40:35 -07:00
parent e10fb596a7
commit 1bee9c3368
2 changed files with 19 additions and 5 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
secrets/

View File

@ -188,11 +188,24 @@
({config, pkgs, lib, ...}: { ({config, pkgs, lib, ...}: {
environment.systemPackages = [pkgs.s3fs]; # s3fs-fuse environment.systemPackages = [pkgs.s3fs]; # s3fs-fuse
# Sadly, this uses systemd, so we can't put it in home-manager yet # Sadly, this uses systemd, so we can't put it in home-manager yet
# WIP # HACK: need to store secret somewhere so that root can access this
# services.autofs = { # because autofs runs as root
# enable = true; services.autofs = let
# autoMaster = personalStorage = [
# }; "hot -fstype=fuse,use_cache=/tmp,del_cache,allow_other,url=f5i0.ph.idrivee2-32.com :s3fs#hungtr-hot"
];
persoConf = pkgs.writeText "personal" (builtins.concatStringsSep "\n" personalStorage);
in {
enable = true;
# Creates /perso directory with every subdirectory declared by ${personalStorage}
# as of now (might be stale), /perso/hot is the only mount accessible
# that is also managed by s3fs
autoMaster = ''
/perso file:${persoConf}
'';
timeout = 600; # default, 600 seconds (10 mins) of inactivity => unmount
debug = true; # writes to journalctl
};
}) })
# GPU, sound, networking stuffs # GPU, sound, networking stuffs
({ config, pkgs, lib, ... }: ({ config, pkgs, lib, ... }: