Skip to content

Commit

Permalink
fix: move overlays within home-manager module
Browse files Browse the repository at this point in the history
* fix the hash
* program is now successfully compiling
  * thanks to Kevin for writing this piece
    * https://kevinmacksa.me/post/20240128-nix-develop/
* if `args` is not consumed by nixpkgs.overlays through the `import`
  function, the following error will be thrown

error:
       … while evaluating a branch condition

         at /nix/store/7gmkl9bfx98djaamhym69wkj4r3sh1q6-source/lib/lists.nix:125:9:

          124|       fold' = n:
          125|         if n == len
             |         ^
          126|         then nul

       … while calling the 'length' builtin

         at /nix/store/7gmkl9bfx98djaamhym69wkj4r3sh1q6-source/lib/lists.nix:123:13:

          122|     let
          123|       len = length list;
             |             ^
          124|       fold' = n:

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: A definition for option `nixpkgs.overlays' is not of type `null or (list of (nixpkgs overlay))'. Definition values:
       - In `/nix/store/263gwwg2y9jxammp2yrrkpjwkqi1bnjv-source/hosts/M-C02FX3JUML85/home.nix': <function>

Resolves:
Related:
Signed-off-by: Daniel-Andrei Minca <[email protected]>
  • Loading branch information
dminca committed Jul 6, 2024
1 parent 2e4ee8d commit 171d735
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
sops-nix.homeManagerModules.sops
./hosts/common
./hosts/M-C02FX3JUML85
(args: { nixpkgs.overlays = import ./overlays args; } )
];
};
};
Expand Down
3 changes: 2 additions & 1 deletion hosts/M-C02FX3JUML85/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pkgs,
lib,
...
}:
} @ args:

{
home.username = "DanielAndrei.Minca";
Expand Down Expand Up @@ -282,4 +282,5 @@
programs.jq = {
enable = true;
};
nixpkgs.overlays = import ../../overlays args;
}
2 changes: 1 addition & 1 deletion overlays/kluctl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
owner = "kluctl";
repo = "kluctl";
rev = "refs/tags/v${version}";
hash = "";
hash = "sha256-WtTBkc9mop+bfMcVLI8k4Bqmift5JG9riF+QbDeiR9c=";
};
});
};
Expand Down

0 comments on commit 171d735

Please sign in to comment.