mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 22:11:33 +01:00
Move secrets decryption from containers to server
This commit is contained in:
parent
a4abd033cc
commit
a7e1ced2a2
13 changed files with 58 additions and 196 deletions
|
|
@ -5,9 +5,7 @@ in
|
|||
{
|
||||
imports = lib.mapAttrsToList (name: _: ./${name}) containers;
|
||||
|
||||
sops.secrets = lib.mapAttrs' (
|
||||
name: _: lib.nameValuePair "container/${name}/tailscale-auth-key" { }
|
||||
) containers;
|
||||
sops.secrets."container/tailscale-auth-key" = { };
|
||||
|
||||
virtualisation.oci-containers = {
|
||||
backend = "docker";
|
||||
|
|
@ -23,7 +21,7 @@ in
|
|||
};
|
||||
environmentFiles = [
|
||||
# Contains "TS_AUTHKEY=<token>"
|
||||
config.sops.secrets."container/${name}/tailscale-auth-key".path
|
||||
config.sops.secrets."container/tailscale-auth-key".path
|
||||
];
|
||||
volumes = [ "/var/lib/tailscale-${name}:/var/lib/tailscale" ];
|
||||
extraOptions = [ "--network=container:${name}" ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue