Restic: Difference between revisions

Phobos (talk | contribs)
m added section for connecting to a REST server with secrets
Tags: Mobile edit Mobile web edit Advanced mobile edit Visual edit
DHCP (talk | contribs)
m minor formatting fix
 
Line 29: Line 29:
</syntaxhighlight>To declaratively use the <code>htpasswd</code> file you will need to use a [[Comparison of secret managing schemes|secret management method]]. The following example uses [https://github.com/Mic92/sops-nix sops-nix].
</syntaxhighlight>To declaratively use the <code>htpasswd</code> file you will need to use a [[Comparison of secret managing schemes|secret management method]]. The following example uses [https://github.com/Mic92/sops-nix sops-nix].


{{File|3={config,inputs,...}:
{{File|3={ config, inputs, ... }:
{
{
   imports =
   imports =
Line 63: Line 63:


Below is an example of a configuration that connects to a remote repository using sops-nix for secrets.  
Below is an example of a configuration that connects to a remote repository using sops-nix for secrets.  
{{File|3={config, inputs, pkgs, ...}:
{{File|3={ config, inputs, pkgs, ... }:
{
{
   imports =
   imports =
Line 74: Line 74:
     defaultSopsFile = ./secrets.yaml;
     defaultSopsFile = ./secrets.yaml;
     secrets = {
     secrets = {
       "restic/repo_password" = {};
       "restic/repo_password" = { };
       "restic/server_url" = {};
       "restic/server_url" = { };
     };
     };
   };
   };
Line 122: Line 122:
       isSystemUser = true;
       isSystemUser = true;
     };
     };
     groups.restic = {};
     groups.restic = { };
   };
   };