mirror of
https://github.com/nix-community/nixos-generators.git
synced 2024-09-11 12:15:29 +03:00
all-formats: link directly to filename
This commit is contained in:
parent
11c9892996
commit
3c949b3842
@ -1,6 +1,7 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
extendModules,
|
||||
...
|
||||
}: let
|
||||
@ -30,8 +31,11 @@
|
||||
|
||||
# attrset of formats to be exposed under config.system.formats
|
||||
formats = lib.flip lib.mapAttrs allConfigs (
|
||||
formatName: conf:
|
||||
conf.config.system.build.${conf.config.formatAttr}
|
||||
formatName: conf: pkgs.runCommand formatName {} ''
|
||||
set -efu
|
||||
target=$(find '${conf.config.system.build.${conf.config.formatAttr}}' -wholename '${conf.config.filename}' -xtype f -print -quit)
|
||||
ln -s "$target" "$out"
|
||||
''
|
||||
);
|
||||
in {
|
||||
_file = ./all-formats.nix;
|
||||
|
Loading…
Reference in New Issue
Block a user