Add secret files in the public

Was initially afraid of how age is secure for the publicly showing
secret files (even if encrypted). We'll start with something simple for
now.
This commit is contained in:
Gabriel Arazas 2021-12-11 13:20:55 +08:00
parent efc578e961
commit 7991d33650
5 changed files with 24 additions and 0 deletions

View File

@ -36,6 +36,7 @@ nixos-config
├── lib/ ├── lib/
├── modules/ ├── modules/
├── pkgs/ ├── pkgs/
├── secrets/
├── users/ ├── users/
├── flake.lock ├── flake.lock
├── flake.nix ├── flake.nix
@ -52,6 +53,8 @@ For more information, see the link:./modules/README.adoc[related documentation].
* link:./pkgs/[`./pkgs/`] contains my custom packages. * link:./pkgs/[`./pkgs/`] contains my custom packages.
It is exported in the flakes at `outputs.packages` compiled through various systems. It is exported in the flakes at `outputs.packages` compiled through various systems.
* link:./secrets/[`./secrets/`] contains my secrets managed with link:https://github.com/ryantm/agenix[agenix].
* link:./users/[`./users/`] contains my link:https://github.com/nix-community/home-manager[home-manager] configurations and modules. * link:./users/[`./users/`] contains my link:https://github.com/nix-community/home-manager[home-manager] configurations and modules.
It is exported in the flakes at `outputs.homeConfigurations`. It is exported in the flakes at `outputs.homeConfigurations`.
For more information, see the link:./users/README.adoc[related documentation]. For more information, see the link:./users/README.adoc[related documentation].

5
secrets/README.adoc Normal file
View File

@ -0,0 +1,5 @@
= Secrets
:toc:
My secret files in public!
This is managed through link:https://github.com/ryantm/agenix[agenix] (thus, uses the link:https://github.com/FiloSottile/age[age encryption tool]).

Binary file not shown.

BIN
secrets/archive/password Normal file

Binary file not shown.

16
secrets/secrets.nix Normal file
View File

@ -0,0 +1,16 @@
let
system1 =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG42LafAFOeh3oYz/cm6FXes0ss59/EOCXpGsYvhpI21";
user1 =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMclb6WPpYRoMVqCCzQcG2XQHczB6vaIEDIHqjVsyQJi";
user2 =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBhrzY7tD0ZiGoA6nnfVxRQVQox0votQ2fuHz78LjNUD";
user3 =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIytwsseYS6kV8ldiUV767C2Gy7okxckdDRW4aA3q/Ku";
user4 =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGtn+t2D7clY1U1rzKcSCBJjNbuJzbRArEiM3soyFcnv";
in {
"archive/password".publicKeys = [ system1 user3 user4 ];
"archive/borgmatic.json".publicKeys = [ system1 user3 user4 ];
}