add secrets
This commit is contained in:
parent
30bafe174e
commit
d8bb7cd045
@ -1,4 +1,6 @@
|
||||
{
|
||||
age.identityPaths = ["/etc/nixos/keys/ssh_key"];
|
||||
|
||||
age.secrets.nixGithubAccessToken.file = ../../../secrets/nixGithubAccessToken.age;
|
||||
age.secrets.wgTkarontoKey.file = ../../../secrets/wgTkarontoKey.age;
|
||||
}
|
||||
|
1
hosts/tkaronto/modules/wgWolumondeIp
Normal file
1
hosts/tkaronto/modules/wgWolumondeIp
Normal file
@ -0,0 +1 @@
|
||||
23.88.101.188
|
1
hosts/tkaronto/modules/wgWolumondeKey.pub
Normal file
1
hosts/tkaronto/modules/wgWolumondeKey.pub
Normal file
@ -0,0 +1 @@
|
||||
wua7uoPmmz0nXop3TKJOEUJ++LSmJdQxCRk9rNbPaAg=
|
@ -3,9 +3,9 @@
|
||||
networking.wireguard.interfaces."wg0" = {
|
||||
privateKeyFile = config.age.secrets.wgTkarontoKey.path;
|
||||
peers = [{
|
||||
publicKey = import ./wgWolumondeKey.pub;
|
||||
publicKey = builtins.readFile ./wgWolumondeKey.pub;
|
||||
allowedIPs = ["10.99.0.1/32"];
|
||||
endpoint = "${import ./wgWolumondeIp}:51820";
|
||||
endpoint = "${builtins.readFile ./wgWolumondeIp}:51820";
|
||||
}];
|
||||
};
|
||||
}
|
@ -5,6 +5,6 @@
|
||||
passwordAuthentication = false;
|
||||
};
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
(builtins.readFile "${inputs.self}/secrets/ssh-key.pub")
|
||||
(builtins.readFile "${inputs.self}/secrets/yusdacra.key.pub")
|
||||
];
|
||||
}
|
||||
|
1
hosts/wolumonde/modules/wgTkarontoKey.pub
Normal file
1
hosts/wolumonde/modules/wgTkarontoKey.pub
Normal file
@ -0,0 +1 @@
|
||||
IPz9tX4jsDOYcujU5B2KVuPaPVG2JaYA1FqLsZzky0Q=
|
@ -4,7 +4,7 @@
|
||||
listenPort = 51820;
|
||||
privateKeyFile = config.age.secrets.wgWolumondeKey.path;
|
||||
peers = [{
|
||||
publicKey = import ./wgTkarontoKey.pub;
|
||||
publicKey = builtins.readFile ./wgTkarontoKey.pub;
|
||||
allowedIPs = ["10.99.0.2/32"];
|
||||
}];
|
||||
};
|
||||
|
@ -14,8 +14,11 @@ lib.makeExtensible (self: {
|
||||
importFolder = modules: let
|
||||
b = builtins;
|
||||
files = b.readDir modules;
|
||||
fileNames = b.attrNames files;
|
||||
filesToImport =
|
||||
b.map (name: "${modules}/${name}") (b.attrNames files);
|
||||
b.map
|
||||
(name: "${modules}/${name}")
|
||||
(b.filter (name: b.match ".*\.nix" name != null) fileNames);
|
||||
in
|
||||
filesToImport;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user