1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 11:36:05 +01:00

flake: don't import modules (#6481)

since the `imports` attributes of modules allows for paths we can remove
the `import` making the consumption of nixosModules, darwinModules and
flakeModules cheaper
This commit is contained in:
isabel 2025-02-18 02:20:42 +00:00 committed by GitHub
parent 69dfc316c5
commit 5cfbf5cc37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,21 +6,21 @@
outputs = { self, nixpkgs, ... }: outputs = { self, nixpkgs, ... }:
{ {
nixosModules = rec { nixosModules = rec {
home-manager = import ./nixos; home-manager = ./nixos;
default = home-manager; default = home-manager;
}; };
# deprecated in Nix 2.8 # deprecated in Nix 2.8
nixosModule = self.nixosModules.default; nixosModule = self.nixosModules.default;
darwinModules = rec { darwinModules = rec {
home-manager = import ./nix-darwin; home-manager = ./nix-darwin;
default = home-manager; default = home-manager;
}; };
# unofficial; deprecated in Nix 2.8 # unofficial; deprecated in Nix 2.8
darwinModule = self.darwinModules.default; darwinModule = self.darwinModules.default;
flakeModules = rec { flakeModules = rec {
home-manager = import ./flake-module.nix; home-manager = ./flake-module.nix;
default = home-manager; default = home-manager;
}; };