Add 'trivionomicon/' from commit 'bf39923f9c
'
git-subtree-dir: trivionomicon git-subtree-mainline:98a32736d6
git-subtree-split:bf39923f9c
This commit is contained in:
commit
f585491296
49 changed files with 2083 additions and 0 deletions
23
trivionomicon/modules/nix-registry/hm.nix
Normal file
23
trivionomicon/modules/nix-registry/hm.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
cfg,
|
||||
flakes,
|
||||
...
|
||||
}: let
|
||||
registryName = name:
|
||||
if name == "self"
|
||||
then cfg.renameSelf
|
||||
else name;
|
||||
|
||||
registryFilter = {
|
||||
nixpkgs = true;
|
||||
unstable = true;
|
||||
self = cfg.renameSelf != null;
|
||||
};
|
||||
in {
|
||||
nix.registry =
|
||||
lib.mapAttrs'
|
||||
(name: value: lib.nameValuePair (registryName name) {flake = value;})
|
||||
(lib.filterAttrs (name: _: registryFilter.${name} or cfg.allInputs) flakes);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue