mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 14:01:34 +01:00
Add global lib relativePath
This commit is contained in:
parent
39bd59c8ee
commit
56f11d4ade
4 changed files with 19 additions and 9 deletions
|
|
@ -2,6 +2,7 @@
|
|||
config,
|
||||
self,
|
||||
lib,
|
||||
lib',
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
|
@ -34,10 +35,10 @@ in
|
|||
|> lib.map (value: value.options.meta.domains.list.definitionsWithLocations)
|
||||
|> lib.concatLists
|
||||
|> lib.concatMap (
|
||||
entry:
|
||||
entry.value
|
||||
{ file, value }:
|
||||
value
|
||||
|> lib.map (domain: {
|
||||
file = entry.file |> lib.removePrefix "${self}/";
|
||||
file = lib'.relativePath file;
|
||||
inherit domain;
|
||||
})
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
config,
|
||||
options,
|
||||
self,
|
||||
lib,
|
||||
lib',
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
|
@ -28,10 +28,10 @@ in
|
|||
protocol:
|
||||
options.meta.ports.${protocol}.list.definitionsWithLocations
|
||||
|> lib.concatMap (
|
||||
entry:
|
||||
entry.value
|
||||
{ file, value }:
|
||||
value
|
||||
|> lib.map (port: {
|
||||
file = entry.file |> lib.removePrefix "${self}/";
|
||||
file = lib'.relativePath file;
|
||||
inherit port;
|
||||
})
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue