Skip to content

Commit 72ae20d

Browse files
authored
blink: fix missing inputs.self in HM and NixOS modules (#644)
* home-manager: fix missing inputs.self some options in nvf module uses inputs.self but it's not exposed in the inputs we pass to home-manager module: example flake.nix: ``` { inputs = { /* ... */ }; outputs = {nixpkgs, ...}@inputs: { testing = { a = inputs.self # valid b = inputs.self.inputs # valid c = inputs.self.inputs.self # does not exist # prior to this change, inputs.self.inputs was passed to the hm # module, which lacks the self attr # # This change passes in the "top-level" inputs instead. }; }; } ``` * nixos: fix missing inputs.self see previous commit for details
1 parent 0644475 commit 72ae20d

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

flake.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
};
3434

3535
homeManagerModules = {
36-
nvf = import ./flake/modules/home-manager.nix {inherit lib self;};
36+
nvf = import ./flake/modules/home-manager.nix {inherit lib inputs;};
3737
default = self.homeManagerModules.nvf;
3838
neovim-flake =
3939
lib.warn ''
@@ -44,7 +44,7 @@
4444
};
4545

4646
nixosModules = {
47-
nvf = import ./flake/modules/nixos.nix {inherit lib self;};
47+
nvf = import ./flake/modules/nixos.nix {inherit lib inputs;};
4848
default = self.nixosModules.nvf;
4949
neovim-flake =
5050
lib.warn ''

flake/modules/home-manager.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Home Manager module
22
{
3-
self,
3+
inputs,
44
lib,
55
}: {
66
config,
77
pkgs,
88
...
99
}: let
10-
inherit (self) packages inputs;
10+
inherit (inputs.self) packages;
1111
inherit (lib) maintainers;
1212
inherit (lib.modules) mkIf mkAliasOptionModule;
1313
inherit (lib.lists) optional;
@@ -19,7 +19,7 @@
1919
nvfModule = submoduleWith {
2020
description = "Nvf module";
2121
class = "nvf";
22-
specialArgs = {
22+
specialArgs = lib.trace (builtins.attrNames inputs) {
2323
inherit pkgs lib inputs;
2424
};
2525
modules = import ../../modules/modules.nix {inherit pkgs lib;};

flake/modules/nixos.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# NixOS module
22
{
3-
self,
3+
inputs,
44
lib,
55
}: {
66
config,
77
pkgs,
88
...
99
}: let
10-
inherit (self) inputs packages;
10+
inherit (inputs.self) packages;
1111
inherit (lib) maintainers;
1212
inherit (lib.modules) mkIf mkOverride mkAliasOptionModule;
1313
inherit (lib.lists) optional;

0 commit comments

Comments
 (0)