From 60aef07ed1a416b2e85b1e32b71b068f877c3e5c Mon Sep 17 00:00:00 2001 From: "Shahar \"Dawn\" Or" Date: Fri, 15 May 2026 11:36:23 +0700 Subject: [PATCH 1/7] flake/dev: devshell flake=false --- flake/dev/devshell.nix | 2 +- flake/dev/flake.lock | 6 +----- flake/dev/flake.nix | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/flake/dev/devshell.nix b/flake/dev/devshell.nix index a56669f07a..e7158a9501 100644 --- a/flake/dev/devshell.nix +++ b/flake/dev/devshell.nix @@ -1,7 +1,7 @@ { lib, inputs, ... }: { imports = [ - inputs.devshell.flakeModule + (inputs.devshell + "/flake-module.nix") ]; perSystem = diff --git a/flake/dev/flake.lock b/flake/dev/flake.lock index 9345631417..e0d792ecf3 100644 --- a/flake/dev/flake.lock +++ b/flake/dev/flake.lock @@ -17,11 +17,7 @@ } }, "devshell": { - "inputs": { - "nixpkgs": [ - "dev-nixpkgs" - ] - }, + "flake": false, "locked": { "lastModified": 1768818222, "narHash": "sha256-460jc0+CZfyaO8+w8JNtlClB2n4ui1RbHfPTLkpwhU8=", diff --git a/flake/dev/flake.nix b/flake/dev/flake.nix index a1767420a3..8cc4d27916 100644 --- a/flake/dev/flake.nix +++ b/flake/dev/flake.nix @@ -13,7 +13,7 @@ # keep-sorted start block=yes newline_separated=yes devshell = { url = "github:numtide/devshell"; - inputs.nixpkgs.follows = "dev-nixpkgs"; + flake = false; }; git-hooks = { From 201631b0310d413e6f327d304a9a2fd18fd6d08c Mon Sep 17 00:00:00 2001 From: "Shahar \"Dawn\" Or" Date: Fri, 15 May 2026 11:39:59 +0700 Subject: [PATCH 2/7] flake/dev: git-hooks flake=false --- flake/dev/flake.lock | 31 +------------------------------ flake/dev/flake.nix | 3 +-- flake/dev/git-hooks.nix | 2 +- 3 files changed, 3 insertions(+), 33 deletions(-) diff --git a/flake/dev/flake.lock b/flake/dev/flake.lock index e0d792ecf3..bdfbae365c 100644 --- a/flake/dev/flake.lock +++ b/flake/dev/flake.lock @@ -66,15 +66,7 @@ } }, "git-hooks": { - "inputs": { - "flake-compat": [ - "flake-compat" - ], - "gitignore": "gitignore", - "nixpkgs": [ - "dev-nixpkgs" - ] - }, + "flake": false, "locked": { "lastModified": 1778507602, "narHash": "sha256-kTwur1wV+01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs=", @@ -89,27 +81,6 @@ "type": "github" } }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ diff --git a/flake/dev/flake.nix b/flake/dev/flake.nix index 8cc4d27916..32ecb80f71 100644 --- a/flake/dev/flake.nix +++ b/flake/dev/flake.nix @@ -18,8 +18,7 @@ git-hooks = { url = "github:cachix/git-hooks.nix"; - inputs.nixpkgs.follows = "dev-nixpkgs"; - inputs.flake-compat.follows = "flake-compat"; + flake = false; }; home-manager = { diff --git a/flake/dev/git-hooks.nix b/flake/dev/git-hooks.nix index 7dd4c0b037..a50acb1328 100644 --- a/flake/dev/git-hooks.nix +++ b/flake/dev/git-hooks.nix @@ -1,7 +1,7 @@ { inputs, ... }: { imports = [ - inputs.git-hooks.flakeModule + (inputs.git-hooks + "/flake-module.nix") ]; perSystem = From 0566e39a153a10e6fb6d57f4448a13e7539cbb1b Mon Sep 17 00:00:00 2001 From: "Shahar \"Dawn\" Or" Date: Fri, 15 May 2026 22:15:20 +0700 Subject: [PATCH 3/7] flake/dev: home-manager flake=false --- flake/dev/flake.lock | 6 +----- flake/dev/flake.nix | 2 +- tests/platforms/hm-extra-files-byte-compiling.nix | 6 +++--- tests/platforms/hm-submodule-merge.nix | 6 +++--- tests/platforms/hm.nix | 6 +++++- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/flake/dev/flake.lock b/flake/dev/flake.lock index bdfbae365c..72fb3e17c0 100644 --- a/flake/dev/flake.lock +++ b/flake/dev/flake.lock @@ -82,11 +82,7 @@ } }, "home-manager": { - "inputs": { - "nixpkgs": [ - "dev-nixpkgs" - ] - }, + "flake": false, "locked": { "lastModified": 1778850834, "narHash": "sha256-JB+iK+5p0m3Jx9Zi9vQO2d3BR07dbW3UqpgOhUXix3s=", diff --git a/flake/dev/flake.nix b/flake/dev/flake.nix index 32ecb80f71..449644b1a8 100644 --- a/flake/dev/flake.nix +++ b/flake/dev/flake.nix @@ -23,7 +23,7 @@ home-manager = { url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "dev-nixpkgs"; + flake = false; }; nix-darwin = { diff --git a/tests/platforms/hm-extra-files-byte-compiling.nix b/tests/platforms/hm-extra-files-byte-compiling.nix index 7caa4931ca..6e19a764d5 100644 --- a/tests/platforms/hm-extra-files-byte-compiling.nix +++ b/tests/platforms/hm-extra-files-byte-compiling.nix @@ -1,11 +1,11 @@ { self, pkgs, + lib, }: let - inherit (self.inputs.home-manager.lib) - homeManagerConfiguration - ; + hmLib = import (self.inputs.home-manager + "/lib") { inherit lib; }; + inherit (hmLib) homeManagerConfiguration; config = { home = { diff --git a/tests/platforms/hm-submodule-merge.nix b/tests/platforms/hm-submodule-merge.nix index e6c2d71588..fb46b215d0 100644 --- a/tests/platforms/hm-submodule-merge.nix +++ b/tests/platforms/hm-submodule-merge.nix @@ -1,6 +1,7 @@ { self, pkgs, + lib, }: # This test covers a user-reported regression where nixvim's submodule-option (programs.nixvim) # cannot correctly merge options declared from the parent scope. @@ -9,9 +10,8 @@ # # To be clear, this is an upstream module system bug, this test validates our workaround. let - inherit (self.inputs.home-manager.lib) - homeManagerConfiguration - ; + hmLib = import (self.inputs.home-manager + "/lib") { inherit lib; }; + inherit (hmLib) homeManagerConfiguration; # This test module declares a nixvim option from a Home Manager module # The module system will attempt an option-type merge on the `programs.nixvim` option, diff --git a/tests/platforms/hm.nix b/tests/platforms/hm.nix index 6e54ccf9b1..1e3bc7193b 100644 --- a/tests/platforms/hm.nix +++ b/tests/platforms/hm.nix @@ -1,8 +1,12 @@ { self, pkgs, + lib, }: -self.inputs.home-manager.lib.homeManagerConfiguration { +let + hmLib = import (self.inputs.home-manager + "/lib") { inherit lib; }; +in +hmLib.homeManagerConfiguration { inherit pkgs; modules = [ From 3b64bc6a184a80747a6c32b623c8550a06bf0276 Mon Sep 17 00:00:00 2001 From: "Shahar \"Dawn\" Or" Date: Sat, 16 May 2026 15:56:58 +0700 Subject: [PATCH 4/7] flake/dev: nix-darwin flake=false --- flake/dev/flake.lock | 6 +----- flake/dev/flake.nix | 2 +- tests/platforms/darwin.nix | 28 ++++++++++++++++++++-------- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/flake/dev/flake.lock b/flake/dev/flake.lock index 72fb3e17c0..eb844a8474 100644 --- a/flake/dev/flake.lock +++ b/flake/dev/flake.lock @@ -124,11 +124,7 @@ } }, "nix-darwin": { - "inputs": { - "nixpkgs": [ - "dev-nixpkgs" - ] - }, + "flake": false, "locked": { "lastModified": 1777780666, "narHash": "sha256-8wURyQMdDkGUarSTKOGdCuFfYiwa3HbzwscUfn3STDE=", diff --git a/flake/dev/flake.nix b/flake/dev/flake.nix index 449644b1a8..441cf518ef 100644 --- a/flake/dev/flake.nix +++ b/flake/dev/flake.nix @@ -28,7 +28,7 @@ nix-darwin = { url = "github:lnl7/nix-darwin"; - inputs.nixpkgs.follows = "dev-nixpkgs"; + flake = false; }; nuschtosSearch = { diff --git a/tests/platforms/darwin.nix b/tests/platforms/darwin.nix index dc66f308e8..672bc12b4a 100644 --- a/tests/platforms/darwin.nix +++ b/tests/platforms/darwin.nix @@ -1,18 +1,30 @@ { self, system, + lib, }: -self.inputs.nix-darwin.lib.darwinSystem { +let + darwinSystem = import (self.inputs.nix-darwin + "/eval-config.nix"); +in +darwinSystem { + inherit lib; + modules = [ - { - nixpkgs.hostPlatform = system; + ( + { config, ... }: + { + nixpkgs = { + source = self.inputs.nixpkgs; + hostPlatform = system; + }; - programs.nixvim = { - enable = true; - }; + programs.nixvim = { + enable = true; + }; - system.stateVersion = 5; - } + system.stateVersion = config.system.maxStateVersion; + } + ) self.nixDarwinModules.nixvim ]; } From 27ab16ae6da6bf5c61aefd32eef3f0438e273ac5 Mon Sep 17 00:00:00 2001 From: "Shahar \"Dawn\" Or" Date: Fri, 15 May 2026 13:39:20 +0700 Subject: [PATCH 5/7] flake/dev: treefmt-nix flake=false --- flake/dev/flake.lock | 6 +----- flake/dev/flake.nix | 2 +- flake/dev/fmt.nix | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/flake/dev/flake.lock b/flake/dev/flake.lock index eb844a8474..c0cbef6ed3 100644 --- a/flake/dev/flake.lock +++ b/flake/dev/flake.lock @@ -190,11 +190,7 @@ } }, "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "dev-nixpkgs" - ] - }, + "flake": false, "locked": { "lastModified": 1775636079, "narHash": "sha256-pc20NRoMdiar8oPQceQT47UUZMBTiMdUuWrYu2obUP0=", diff --git a/flake/dev/flake.nix b/flake/dev/flake.nix index 441cf518ef..14a901dade 100644 --- a/flake/dev/flake.nix +++ b/flake/dev/flake.nix @@ -39,7 +39,7 @@ treefmt-nix = { url = "github:numtide/treefmt-nix"; - inputs.nixpkgs.follows = "dev-nixpkgs"; + flake = false; }; # keep-sorted end diff --git a/flake/dev/fmt.nix b/flake/dev/fmt.nix index 07bad8333b..cf192c0345 100644 --- a/flake/dev/fmt.nix +++ b/flake/dev/fmt.nix @@ -1,7 +1,7 @@ { inputs, ... }: { imports = [ - inputs.treefmt-nix.flakeModule + (inputs.treefmt-nix + "/flake-module.nix") ]; perSystem = From 7b802116bafd82b05909e2edb3ea215c1151de69 Mon Sep 17 00:00:00 2001 From: "Shahar \"Dawn\" Or" Date: Fri, 15 May 2026 21:55:19 +0700 Subject: [PATCH 6/7] flake/dev: flake-compat flake=false --- flake/dev/flake.lock | 1 + flake/dev/flake.nix | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/flake/dev/flake.lock b/flake/dev/flake.lock index c0cbef6ed3..924e589ec5 100644 --- a/flake/dev/flake.lock +++ b/flake/dev/flake.lock @@ -33,6 +33,7 @@ } }, "flake-compat": { + "flake": false, "locked": { "lastModified": 1767039857, "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", diff --git a/flake/dev/flake.nix b/flake/dev/flake.nix index 14a901dade..c31a26eaf8 100644 --- a/flake/dev/flake.nix +++ b/flake/dev/flake.nix @@ -8,7 +8,10 @@ dev-nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; # flake-compat is used by the root `default.nix` to allow non-flake users to import nixvim - flake-compat.url = "github:NixOS/flake-compat"; + flake-compat = { + url = "github:NixOS/flake-compat"; + flake = false; + }; # keep-sorted start block=yes newline_separated=yes devshell = { From 4d35f4db3280907c8e4139231059762b9ee8c1ad Mon Sep 17 00:00:00 2001 From: "Shahar \"Dawn\" Or" Date: Fri, 15 May 2026 22:05:41 +0700 Subject: [PATCH 7/7] flake/dev: comment about flake=false --- flake/dev/flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake/dev/flake.nix b/flake/dev/flake.nix index c31a26eaf8..b61398c6eb 100644 --- a/flake/dev/flake.nix +++ b/flake/dev/flake.nix @@ -1,6 +1,8 @@ { description = "Private inputs for development purposes. These are used by the top level flake in the `dev` partition, but do not appear in consumers' lock files."; + # Avoid `flake = true` when we do not need to evaluate flake outputs or fetch flake inputs. + # e.g. when we only import loose files. inputs = { # NOTE: Use a different name to the root flake's inputs.nixpkgs to avoid shadowing it. # NOTE: The only reason we specify a nixpkgs input at all here, is so the other inputs can follow it.