mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2024-11-22 11:41:26 +00:00
c1ed3a522c
Nix store is world-readable, and while nix repl fails to get the secret due to file permissions, we should still set up secrets without getting them in Nix store. In the past tmpfiles.d was used, but its entire contents get to the nix store. Now, all files with secrets are generated in activation scripts, with the help of jq and sed. Also dead Pleroma code was deleted, but CAPTCHA is still broken. Co-authored-by: inexcode <inex.code@selfprivacy.org> Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config/pulls/19 Co-authored-by: Inex Code <inex.code@selfprivacy.org> Co-committed-by: Inex Code <inex.code@selfprivacy.org>
30 lines
577 B
Nix
30 lines
577 B
Nix
{ config, pkgs, ... }:
|
|
let
|
|
cfg = config.services.userdata;
|
|
in
|
|
{
|
|
services.restic.backups = {
|
|
options = {
|
|
passwordFile = "/etc/restic/resticPasswd";
|
|
repository = "s3:s3.anazonaws.com/${cfg.backblaze.bucket}";
|
|
initialize = true;
|
|
paths = [
|
|
"/var/dkim"
|
|
"/var/vmail"
|
|
];
|
|
timerConfig = {
|
|
OnCalendar = [ "daily" ];
|
|
};
|
|
user = "restic";
|
|
pruneOpts = [
|
|
"--keep-daily 5"
|
|
];
|
|
};
|
|
};
|
|
users.users.restic = {
|
|
isNormalUser = false;
|
|
isSystemUser = true;
|
|
group = "restic";
|
|
};
|
|
}
|