summary refs log tree commit diff
path: root/secrets/secrets.nix
blob: 7332beb92e4e7b5b083b565b979f2505007f6998 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.l
let
  keys = import ./keys.nix;

  inherit (keys) allAdmins allSystems;
  inherit (keys.system)
    renard
    lapin
    corsac
    fourmi
    taupe
    truite
    taureau
    ;
in
{
  "binary-cache-key.age".publicKeys = [
    renard
  ] ++ allAdmins;

  "cloudflare-dns.age".publicKeys = allSystems ++ allAdmins;

  "pds-secrets.age".publicKeys = [
    lapin
  ] ++ allAdmins;

  "continuwuity-registration-token.age".publicKeys = [
    renard
  ] ++ allAdmins;

  "mullvad-gluetun.age".publicKeys = [
    corsac
  ] ++ allAdmins;

  "internal-tls.age".publicKeys = [
    corsac
  ] ++ allAdmins;

  "password.age".publicKeys = allSystems ++ allAdmins;

  "wireless-secrets.age".publicKeys = [
    corsac
    fourmi
  ] ++ allAdmins;

  "vpn/ingress-key.age".publicKeys = [
    truite
  ] ++ allAdmins;

  "vpn/egress-key-taureau.age".publicKeys = [
    taureau
  ] ++ allAdmins;

  "vpn/egress-key-taupe.age".publicKeys = [
    taupe
  ] ++ allAdmins;
}
&str, value: Value) { for scope in self.scopes.iter_mut() { if scope.contains_key(ident) { scope.insert(ident.to_string(), value); return; } } let inner_scope = self .scopes .last_mut() .expect("Tried accessing scope after last frame is gone."); inner_scope.insert(ident.to_string(), value); } pub fn get_var(&self, ident: &str) -> Option<Value> { for scope in self.scopes.iter().rev() { if let Some(value) = scope.get(ident) { return Some(value.clone()); } } None } }