feat(nix): port over libs

This commit is contained in:
Mohammad Rafiq 2025-07-09 01:33:28 +08:00
parent 03bac12a2d
commit 96b5aa3fef
No known key found for this signature in database
3 changed files with 104 additions and 1 deletions

View file

@ -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;
};
};
}