1
submitted 9 months ago by [email protected] to c/[email protected]

I want to call the escapeSystemdPath (defined in nixpgs at nixos/lib/utils.nix) to derive the name of a systemd mount unit from the target path (eg. srv-my-dir.mount from /srv/my/dir), but I can't figure out how I can reference it... any ideas?

all 3 comments
sorted by: hot top controversial new old
[-] [email protected] 1 points 9 months ago

Probably nixpkgs.lib.escapeSystemdPath. If you are talking about a NixOS config you can request lib as an argument.

(I haven't actually checked, but this is where most lib functions are)

this post was submitted on 02 Oct 2023
1 points (100.0% liked)

nixos

1210 readers
2 users here now

All about NixOS - https://nixos.org/

founded 4 years ago