agenix icon indicating copy to clipboard operation
agenix copied to clipboard

Reading from a file

Open ashuramaruzxc opened this issue 11 months ago • 2 comments

I have a folding@home service that requires a string to pass to the args, however since both builtins.readfile and lib.fileContents are impure because the .path is an absolute path i cannot read it. What best practice should i use in this case?

services.foldingathome = {
    enable = true;
    user = "x";
    team = 1;
    daemonNiceLevel = -9;
    extraArgs = [
      "--cause=alzheimers"
      "--beta=false"
      "--passkey ${lib.fileContents config.age.secrets.passkey.path}"
      "--account-token ${lib.fileContents config.age.secrets.token.path}"
    ];
  };

ashuramaruzxc avatar Mar 29 '24 17:03 ashuramaruzxc