nixos/rustus: add user name to enable restoring of backups

This commit is contained in:
happysalada 2023-08-13 18:11:00 +08:00 committed by Jörg Thalheim
parent 4c23dbb416
commit 4022b2733a

View file

@ -226,6 +226,10 @@ in
serviceConfig = {
ExecStart = "${pkgs.rustus}/bin/rustus";
StateDirectory = "rustus";
# User name is defined here to enable restoring a backup for example
# You will run the backup restore command as sudo -u rustus in order
# to have write permissions to /var/lib
User = "rustus";
DynamicUser = true;
LoadCredential = lib.optionals isHybridS3 [
"S3_ACCESS_KEY_PATH:${cfg.storage.s3_access_key_file}"