From 28d78dce6194ef3d09398686ea534c071274ec83 Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Mon, 7 Jul 2025 14:39:36 +0800 Subject: [PATCH] refactor(nix): rename lib.nix to meta.nix and add flake.root option --- flake.nix | 1 + nix/flake-parts/{lib.nix => meta.nix} | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) rename nix/flake-parts/{lib.nix => meta.nix} (68%) diff --git a/flake.nix b/flake.nix index ad30700..53bc0fa 100644 --- a/flake.nix +++ b/flake.nix @@ -56,6 +56,7 @@ (inputs.import-tree ./nix) // { systems = import inputs.systems; + flake.root = ./.; } ); } diff --git a/nix/flake-parts/lib.nix b/nix/flake-parts/meta.nix similarity index 68% rename from nix/flake-parts/lib.nix rename to nix/flake-parts/meta.nix index 8813495..e7659e6 100644 --- a/nix/flake-parts/lib.nix +++ b/nix/flake-parts/meta.nix @@ -1,7 +1,7 @@ { lib, inputs, ... }: let inherit (lib.options) mkOption; - inherit (lib.types) lazyAttrsOf raw; + inherit (lib.types) path lazyAttrsOf raw; inherit (inputs.flake-parts.lib) mkSubmoduleOptions; in { @@ -10,5 +10,9 @@ in type = lazyAttrsOf raw; default = { }; }; + root = mkOption { + type = path; + default = ""; + }; }; }