Skip to content

No docs on how to use agenix with home-manager #306

@taciturnaxolotl

Description

@taciturnaxolotl

I've tried directly reading the file (even though ik its an anti pattern but just to check) and nix actually does deny that which is nice. Trying to access the secret through config.age.secrets.xxx.path results in an error stating that that doesn't exist on config. Is there any offical way to do this?

warning: Git tree '/home/kierank/etc/nixos' is dirty
building the system configuration...
warning: Git tree '/home/kierank/etc/nixos' is dirty
error:
       … while calling the 'head' builtin
         at /nix/store/hq74z1248f21rs5lcig5hmpqn08lv9n8-source/lib/attrsets.nix:1574:11:
         1573|         || pred here (elemAt values 1) (head values) then
         1574|           head values
             |           ^
         1575|         elsewhile evaluating the attribute 'value'
         at /nix/store/hq74z1248f21rs5lcig5hmpqn08lv9n8-source/lib/modules.nix:816:9:
          815|     in warnDeprecation opt //
          816|       { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          817|         inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute 'age' missing
       at /nix/store/4l1lmxg6cqgsl7ind29ahgsvg8yz8lpn-source/home-manager/app/cider.nix:15:16:
           14|       path = builtins.fetchurl {
           15|         url =  config.age.secrets.cider.path;
             |                ^
           16|         sha256 = "0zwyin85knvlbkbilm2sdf5k2h12z5f624lb3bfyy2sbxvc9dp2x";

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions