Create nixfiles lib and define flake type
This commit is contained in:
parent
89f7debf17
commit
4a1b0a5502
7
lib/nixfiles/default.nix
Normal file
7
lib/nixfiles/default.nix
Normal file
@ -0,0 +1,7 @@
|
||||
pkgs:
|
||||
let
|
||||
inherit (pkgs) lib;
|
||||
in
|
||||
{
|
||||
types = (import ./types.nix) pkgs;
|
||||
}
|
13
lib/nixfiles/types.nix
Normal file
13
lib/nixfiles/types.nix
Normal file
@ -0,0 +1,13 @@
|
||||
pkgs:
|
||||
let
|
||||
inherit (pkgs) lib;
|
||||
inherit (lib.types) mkOptionType;
|
||||
inherit (lib.options) mergeEqualOption;
|
||||
in
|
||||
{
|
||||
flake = mkOptionType {
|
||||
name="flake";
|
||||
description="Nix flake";
|
||||
descriptionClass = "noun";
|
||||
merge = mergeEqualOption; check = (value: value._type or "" == "flake"); };
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user