add initial modules lib
This commit is contained in:
19
lib/modules.nix
Normal file
19
lib/modules.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ inputs, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
|
||||
in {
|
||||
mkBoolOpt = { def, desc ? "" }:
|
||||
{
|
||||
type = lib.types.bool;
|
||||
default = def;
|
||||
description = desc;
|
||||
};
|
||||
|
||||
linkMutable = { src, dest, after }:
|
||||
lib.hm.dag.entryAfter [ "writeBoundary" ] ++ after ''
|
||||
if [ ! -L "${dest}" ]; then
|
||||
ln -sf ${src} ${dest}
|
||||
fi
|
||||
'';
|
||||
}
|
Reference in New Issue
Block a user