feat: use sops antipattern intentionally instead of git-crypt to read secrets
This commit is contained in:
1 parent
cf6f3772ab
commit
5c6888a352
5 files changed
+42
-4
No files matched your search
@@ -1 +0,0 @@
|
|||||||
secret-config.nix filter=git-crypt diff=git-crypt
|
|
||||||
@@ -12,16 +12,27 @@
|
|||||||
./vaultwarden.nix
|
./vaultwarden.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
options.nix-leonhard.domain =
|
options.nix-leonhard = with lib.types; {
|
||||||
with lib.types;
|
domain = lib.mkOption {
|
||||||
lib.mkOption {
|
|
||||||
type = str;
|
type = str;
|
||||||
default = "";
|
default = "";
|
||||||
description = "Domain of the device.";
|
description = "Domain of the device.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
publicKeys = lib.mkOption {
|
||||||
|
type = listOf str;
|
||||||
|
default = [ ];
|
||||||
|
description = "Public keys for ssh login.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
nix-leonhard.graphical = false;
|
nix-leonhard.graphical = false;
|
||||||
|
|
||||||
|
# Intentional antipattern for information that is not
|
||||||
|
# critical but should still not be in the config
|
||||||
|
nix-leonhard.domain = builtins.readFile config.sops.secrets.domain.path;
|
||||||
|
nix-leonhard.publicKeys = builtins.readFile config.sops.secrets.domain.publicKeys;
|
||||||
|
|
||||||
users.users.leonhard = {
|
users.users.leonhard = {
|
||||||
initialPassword = "leonhard";
|
initialPassword = "leonhard";
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
|||||||
@@ -17,4 +17,14 @@
|
|||||||
sopsFile = ./vaultwarden.env;
|
sopsFile = ./vaultwarden.env;
|
||||||
owner = config.systemd.services.vaultwarden.serviceConfig.User;
|
owner = config.systemd.services.vaultwarden.serviceConfig.User;
|
||||||
};
|
};
|
||||||
|
sops.secrets.domain = {
|
||||||
|
format = "json";
|
||||||
|
sopsFile = ./secret-config.json;
|
||||||
|
mode = 0444;
|
||||||
|
};
|
||||||
|
sops.secrets.publicKeys = {
|
||||||
|
format = "json";
|
||||||
|
sopsFile = ./secret-config.json;
|
||||||
|
mode = 0444;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"domain": "ENC[AES256_GCM,data:inv81dspil/uEiiyrdvE1NDX7oYCnLU=,iv:Fz9YNq9s/lGLGYWNQD2ie+U8u/mRnEvE66KuFOmUBC0=,tag:0tshZsQEVzPmmRES0C3Obw==,type:str]",
|
||||||
|
"publicKeys": [
|
||||||
|
"ENC[AES256_GCM,data:59HxISOZE+ZewwmZ0A9iiV5JJtk6M8e3v6PPe4XSxdgKsjCeKmOVwX41H88OMxDpwKh6Ac29fN5DL/uUzWcNEr9o3/rBwQcNxXpBDMl1OK2+wJyfQx3FTJE=,iv:YAi7wwHtHx/sAhqjOXK2dFC/7Pt0oQU7KueGn1ObX1s=,tag:ZN6TydnMu04cLf1jxr9B/A==,type:str]"
|
||||||
|
],
|
||||||
|
"sops": {
|
||||||
|
"age": [
|
||||||
|
{
|
||||||
|
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBTRkh6Z3dHQWdQK0FwVnUx\ncnRSZ2N3SWc0YlNPaHlPcUhsZVJETkNlY1NBCjVtNVpiQXVJNmlhNzVLWEs1Mm1F\nd1YwVmhLbFVJTlJVRVFFeWNwclhWV0EKLS0tIFJzQTI5NnhJK3A2c3FXaWkrRUsw\nZU42QytpTzNXbDZMNDNGVHZlK3I2NWcKL0bpc7eJHFx/Q4K3D849wUaJGPx33R+M\nxTZR2d54YnsH0o2eyZhqfDT2saLgdLaN2ANAWAHcjvQXz2QKug0RfA==\n-----END AGE ENCRYPTED FILE-----\n",
|
||||||
|
"recipient": "age1cma8j2jk0jmzgttjmqn06l87u4as9k46yzmvetflzqp995wzdsgsjppacx"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"lastmodified": "2026-11-13T10:58:00Z",
|
||||||
|
"mac": "ENC[AES256_GCM,data:tiaZgjDZ87VW66Kg9WiGHTtvWDanDt6E9DBv71iBMdgm6p/VkqE5VYIk+iUoYYQ9K+7oJk2TwDrdNf8spgAUNubLbihUC39jyGLiSScQGhIIj1Zm4dlDnr3Z78CiSxRJEwpKa9N55+ySFe+aj4OUiBX+Tq8H4tQTqha9e1H0Wic=,iv:I6UpTz2PkAtqpXEwKV77m6TOR2i/LFRl7z33AcSqROs=,tag:rtpsGDRxYoEIUKeztNox/Q==,type:str]",
|
||||||
|
"unencrypted_suffix": "_unencrypted",
|
||||||
|
"version": "3.13.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
Reference in new issue
Block a user