31 Aug 2024 |
undltd | Also, would it be possible to somehow use an agenix secret for one of the values in virtualisation.oci-containers.containers.<name>.environment ? | 16:32:35 |
ryantm | Yes, you can use nix to read a directory's contents and use that as your secrets.nix output. | 18:31:59 |
ryantm | Are those containers built when building the OS? If so, no and there wouldn't be much point. | 18:33:46 |
| @thedevofnight:matrix.org joined the room. | 19:25:12 |
| @thedevofnight:matrix.org changed their display name from Devon Wolfe to thedevofnight. | 19:28:07 |
| @thedevofnight:matrix.org left the room. | 19:28:56 |
1 Sep 2024 |
undltd | In reply to@ryantm:matrix.org Are those containers built when building the OS? If so, no and there wouldn't be much point. That is a good question... Looks like the containers are instantiated (podman / docker run ) by a systemd unit, so that would be during activation. Also I notice there is an environmentFiles option that maps to docker run / podman run --env-file option, which should be ideal to use with agenix . So yeah, should work! | 09:01:48 |
undltd | That is a good question... Looks like the containers are instantiated (podman / docker run ) by a systemd unit, so that would be during boot / activation. Also I notice there is an environmentFiles option that maps to docker run / podman run --env-file option, which should be ideal to use with agenix . So yeah, should work! | 09:02:16 |
undltd | In reply to@ryantm:matrix.org Yes, you can use nix to read a directory's contents and use that as your secrets.nix output. How can I access nixpkgs' lib in secrets.nix ? | 09:37:51 |
undltd | (namely lib.attrsets.mergeAttrsList ) | 09:56:06 |
ryantm | Same way you would in any standalone nix file:
let pks = import <nixpkgs> { config ={};}; in ... pkgs.lib | 11:03:09 |
undltd | Thanks! | 12:32:12 |
3 Sep 2024 |
| @djacu:matrix.org left the room. | 23:29:28 |
5 Sep 2024 |
| lingo5080 joined the room. | 15:55:25 |
6 Sep 2024 |
| Thom Jordan joined the room. | 18:19:09 |
7 Sep 2024 |
/madonius[er|he] | Cheers | 13:35:39 |
/madonius[er|he] | I am trying to add agenix to a server's configuration and keep getting error: The option age' does not exist. Definition values:` | 13:36:25 |
/madonius[er|he] | * I am trying to add agenix to a server's configuration and keep getting error: The option age' does not exist. Definition values:` | 13:36:31 |
K900 | That usually means you didn't import the module | 13:36:41 |
/madonius[er|he] | * I am trying to add agenix to a server's configuration and keep getting
error: The option`age' does not exist. Definition values:\ | 13:36:48 |
/madonius[er|he] | I have agenix in my flakes.nix | 13:37:00 |
/madonius[er|he] | both in inputs and outputs it's defined | 13:37:50 |
/madonius[er|he] | do I have to use agenix | 13:38:02 |
K900 | That does not automatically include the module in your NixOS configs | 13:38:05 |
/madonius[er|he] | ah ok | 13:38:14 |
K900 | You need to add agenix.nixosModules.default to your modules list in nixosSystem | 13:38:20 |
K900 | Or do something similar | 13:38:23 |
/madonius[er|he] | that I have also done | 13:38:35 |
K900 | Then it should work | 13:38:46 |
K900 | Are you maybe mixing NixOS and home-manager contexts? | 13:38:53 |