feat(nix): port over libs
This commit is contained in:
parent
03bac12a2d
commit
96b5aa3fef
3 changed files with 104 additions and 1 deletions
|
@ -1,7 +1,13 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.types) str;
|
||||
inherit (lib.types)
|
||||
str
|
||||
path
|
||||
int
|
||||
port
|
||||
attrs
|
||||
;
|
||||
in
|
||||
{
|
||||
flake.lib.options = {
|
||||
|
@ -11,5 +17,29 @@ in
|
|||
inherit default;
|
||||
type = str;
|
||||
};
|
||||
mkAttrOption =
|
||||
default:
|
||||
mkOption {
|
||||
inherit default;
|
||||
type = attrs;
|
||||
};
|
||||
mkIntOption =
|
||||
default:
|
||||
mkOption {
|
||||
inherit default;
|
||||
type = int;
|
||||
};
|
||||
mkPortOption =
|
||||
default:
|
||||
mkOption {
|
||||
type = port;
|
||||
inherit default;
|
||||
};
|
||||
mkPathOption =
|
||||
default:
|
||||
mkOption {
|
||||
type = path;
|
||||
inherit default;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue