Sender | Message | Time |
---|---|---|
11 Dec 2022 | ||
whoops | 15:45:08 | |
I think I found the cause. This host is also using Impermanence with an ephemeral root, and there is one secret that was being decrypted by agenix and symlinked to a user-owned directory by Impermanence in the user's home-manager service. The configuration for that secret was as follows:
Here is the home-manager configuration for symlinking the agenix-decrypted secret:
Removing these blocks from the configuration and rebuilding (and rebooting) resulted in the creation of In lieu of an agenix home-manager module, is there a best (or better) practice for linking decrypted secrets into user-owned directories? | 15:54:55 | |
* I think I found the cause. This host is also using Impermanence with an ephemeral root, and there is one secret that was being decrypted by agenix and symlinked to a user-owned directory by Impermanence in the user's home-manager service. The configuration for that secret was as follows:
Here is the home-manager configuration for symlinking the agenix-decrypted secret:
Removing these blocks from the configuration and rebuilding (and rebooting) resulted in the creation of In lieu of an agenix home-manager module, is there a best (or better) practice for linking decrypted secrets into user-owned directories? | 15:57:46 | |
...except that now the secret with the custom path exists both in | 16:04:37 | |
12 Dec 2022 | ||
05:03:28 | ||
14 Dec 2022 | ||
10:30:44 | ||
10:53:57 | ||
11:30:54 | ||
11:33:02 | ||
17:34:20 | ||
17:35:08 | ||
15 Dec 2022 | ||
hi, i can't seem to provision keys to a new system. getting this while switching to a new generation:
| 21:54:47 | |
note that i have no idea what i'm doing at this point 🙃 | 22:06:52 | |
ok i think i solved it by nix-collect-garbage -d && /run/current-system/bin/switch-to-configuration switch . it seems some old initrd secrets was the culprit? | 22:44:53 | |
16 Dec 2022 | ||
I haven't really thought much about early boot secrets. What is this secret for? | 05:25:31 | |
that particular secret is an ssh key used in initrd | 07:38:40 | |
it works sometimes after collecting garbage but still fails sometimes | 07:40:06 | |
17 Dec 2022 | ||
22:20:49 | ||
18 Dec 2022 | ||
03:27:07 | ||
20:40:20 | ||
Hi, I am first time user of agenix and I am trying to get nixos to read user password file encrypted by agenix. In the code below the system can read the value of "description" just fine, but the value of passwordFile is not applied to the user account. Any advice is greatly appreciated. users.users.daniel = { isNormalUser = true; description = lib.strings.fileContents config.age.secrets.daniel-fullname.path; passwordFile = config.age.secrets.daniel-password.path; # Value created with mkpasswd. extraGroups = [ "networkmanager" "wheel" ]; }; | 20:45:30 | |
Do you have the .file config option for that secret also specified? | 21:38:43 | |
dasj19: ☝️ | 21:39:28 | |
Yes, I tried with just the .file then I added owners and groups: age.secrets.daniel-fullname = { file = /etc/nixos/secrets/daniel-fullname.age; owner = "daniel"; group = "users"; }; age.secrets.daniel-password = { file = /etc/nixos/secrets/daniel-password.age; owner = "daniel"; group = "users"; }; | 21:40:20 | |
What you are doing with description is an antipattern because it leaks the secret into the nix store and has bootstrapping issues. | 21:42:08 | |
yes, i noticed but the goal there is just to hide it from a future git commit | 21:42:47 | |
Okay. I guess it's fine for that. | 21:43:10 | |
the description part works, but just the passwordFile part does not | 21:43:44 | |
Are you using flakes? | 21:43:44 | |
And is your flake.nix in /etc? | 21:43:57 |