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

nixos

1262 readers
6 users here now

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

founded 4 years ago
 

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?

you are viewing a single comment's thread
view the rest of the comments
[โ€“] ck_@discuss.tchncs.de 3 points 1 year ago (1 children)

It's not on lib, it's on utils, which is not necessarily exposed all that well. You should be able to just get it passed into your module config, eg.

{config, pkgs, lib, utils, ...}: { # do your thing }

[โ€“] gomp@lemmy.ml 1 points 1 year ago

That's it! I love you, thanks!