!XLCFfvFhUkYwOMLbVx:nixos.org

agenix

330 Members
age-encrypted secrets for NixOS https://github.com/ryantm/agenix/98 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
4 Dec 2024
@bjrnmrtns:matrix.orgbjrnmrtns
In reply to @bjrnmrtns:matrix.org
so it is because of the private key
Line 4 ;-)
12:42:54
@lordkekz:matrix.orgLordKekzYour /home is on a separate btrfs subvolume. I think it should be fine but maybe it gets mounted too late. Make sure to set `filesystems."/home".neededForBoot = true;` in your config, maybe that can help ensure it gets mounted early.12:44:24
@lordkekz:matrix.orgLordKekz
In reply to @bjrnmrtns:matrix.org
Line 4 ;-)
Just as suspected!
12:45:29
@lordkekz:matrix.orgLordKekz
In reply to @lordkekz:matrix.org
Your /home is on a separate btrfs subvolume. I think it should be fine but maybe it gets mounted too late. Make sure to set filesystems."/home".neededForBoot = true; in your config, maybe that can help ensure it gets mounted early.
Beware typos tho
12:46:32
@lordkekz:matrix.orgLordKekz* In reply to @lordkekz:matrix.org Your /home is on a separate btrfs subvolume. I think it should be fine but maybe it gets mounted too late. Make sure to set filesystems."/home".neededForBoot = true; in your config, maybe that can help ensure it gets mounted early. Beware typos tho, since I'm on my phone and just doing it from memory12:47:02
@bjrnmrtns:matrix.orgbjrnmrtns
In reply to @lordkekz:matrix.org

In reply to @lordkekz:matrix.org
Your /home is on a separate btrfs subvolume. I think it should be fine but maybe it gets mounted too late. Make sure to set filesystems."/home".neededForBoot = true; in your config, maybe that can help ensure it gets mounted early.

Beware typos tho, since I'm on my phone and just doing it from memory

That makes a lot of sense. I'm going to try it and report back. Thanks a lot so far!
12:48:34
@bjrnmrtns:matrix.orgbjrnmrtns
In reply to @lordkekz:matrix.org

In reply to @lordkekz:matrix.org
Your /home is on a separate btrfs subvolume. I think it should be fine but maybe it gets mounted too late. Make sure to set filesystems."/home".neededForBoot = true; in your config, maybe that can help ensure it gets mounted early.

Beware typos tho, since I'm on my phone and just doing it from memory

fileSystems."/home".neededForBoot = true; did the trick.
Thanks a lot for the help with debugging. I was fighting this problem already a few times, but couldn't find the issue.
12:57:05
@lordkekz:matrix.orgLordKekzNice! I'm glad I could help :)12:59:27
@orfeasz:matrix.orgOrfeasZ joined the room.17:36:44
@orfeasz:matrix.orgOrfeasZ Hello, I'm having an issue with agenix and was wondering if anybody has any solutions: I have an OCI container that uses an environment file that's decrypted by agenix. However, agenix seems to always use the same path for that file (/run/agenix/whatever.env) even when its contents change. This makes it so when I update the env file and rebuild my system, the container doesn't get rebuilt since the path hasn't changed. 17:38:31
@orfeasz:matrix.orgOrfeasZ * Hello, I'm having an issue with agenix and was wondering if anybody has any solutions: I have an OCI container that uses an environment file that's decrypted by agenix. However, agenix seems to always use the same path for that file (/run/agenix/whatever.env) even when its contents change. This makes it so when I update the env file and rebuild my system, the container doesn't get recreated since the path hasn't changed. 17:42:54
@orfeasz:matrix.orgOrfeasZ

Alright, looks like I was able to work around this by making agenix use a hash of the encrypted file as the file name:

age.secrets."my-secret" = {
  file = ./my-secret.age;
  name = builtins.hashFile "sha256" ./my-secret.age;
};
19:30:57

Show newer messages


Back to Room ListRoom Version: 6