WIP: sftp: define playground as a btrfs subvolume

This commit is contained in:
Colin 2023-09-01 00:35:43 +00:00
parent 68bce9c8b7
commit cf9558f166

View File

@ -14,7 +14,7 @@
# - sane.persist API could expose a `subvolume` option to make this feel natural # - sane.persist API could expose a `subvolume` option to make this feel natural
{ lib, pkgs, sane-lib, ... }: { config, lib, pkgs, sane-lib, ... }:
let let
# user permissions: # user permissions:
# - see <repo:drakkan/sftpgo:internal/dataprovider/user.go> # - see <repo:drakkan/sftpgo:internal/dataprovider/user.go>
@ -177,19 +177,28 @@ in
device = "/var/lib/uninsane/media"; device = "/var/lib/uninsane/media";
options = [ "rbind" ]; options = [ "rbind" ];
}; };
sane.persist.sys.plaintext = [ # sane.persist.sys.plaintext = [
{ user = "sftpgo"; group = "sftpgo"; path = "/var/lib/sftpgo/export/playground"; } # { user = "sftpgo"; group = "sftpgo"; path = "/var/lib/sftpgo/export/playground"; }
]; # ];
sane.fs."/var/lib/sftpgo/export/playground/README.md" = { fileSystems."/var/lib/sftpgo/export/playground" = {
wantedBy = [ "sftpgo.service" ]; device = config.fileSystems."/mnt/persist/ext".device;
file.text = '' fsType = "btrfs";
this directory is intentionally read+write by anyone. options = [
there are no rules, except a server-level quota: "subvol=export-playground"
- share files "compress=zstd"
- write poetry "defaults"
- be a friendly troll ];
'';
}; };
# sane.fs."/var/lib/sftpgo/export/playground/README.md" = {
# wantedBy = [ "sftpgo.service" ];
# file.text = ''
# this directory is intentionally read+write by anyone.
# there are no rules, except a server-level quota:
# - share files
# - write poetry
# - be a friendly troll
# '';
# };
sane.fs."/var/lib/sftpgo/export/README.md" = { sane.fs."/var/lib/sftpgo/export/README.md" = {
wantedBy = [ "sftpgo.service" ]; wantedBy = [ "sftpgo.service" ];
file.text = '' file.text = ''