[Nix-dev] type for path-or-string ?

Mathijs Kwik mathijs at bluescreen303.nl
Thu Oct 31 23:37:53 CET 2013


Hi all,

I used to put local/relative paths in my openssh.authorizedKeys.keyFiles.
Basically, I store the public ssh keys in the git repo that contains
my configuration.nix so I point to them by [ ./laptop.pub ./server.pub
]
However, the type for this option got set to listOf str, breaking my setup.
Changing to "./laptop.pub" of course won't work. I tried
"${./laptop.pub}" as well, but that moves the file to the nix store,
then complains about the path referencing other paths.

So I changed the type of this option to listOf path locally.
Is there a way to allow both? Something like "listOf (Either str path)"?

Thanks,
Mathijs


More information about the nix-dev mailing list