Skip to content

Commit 57b6932

Browse files
committed
fix(nix): update repl init
1 parent 6b0f279 commit 57b6932

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

home/mlenz/common/packages/commands.nix

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,15 @@
239239
exec rlwrap ssh eu.nixbuild.net shell
240240
'';
241241
nix-repl = ''
242-
exec nix repl --expr "rec { pkgs = import <pkgs> {}; lib = pkgs.lib; }" "$@"
242+
exec nix repl --expr 'rec {
243+
self = builtins.getFlake ("git+file://" + toString ./.);
244+
cfg = builtins.getFlake "cfg";
245+
pkgs = import <pkgs> {
246+
overlays = [ cfg.overlays.default ];
247+
config = cfg.nixpkgsConfig;
248+
};
249+
lib = pkgs.lib;
250+
}' "$@"
243251
'';
244252
noeol = ''
245253
exec tr -d '\n'

lib/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ rec {
3333
};
3434
})
3535
{
36-
self = inputs.self;
36+
cfg = inputs.self;
3737
nixpkgs = inputs.nixpkgs;
3838
stable = systemInput {
3939
inherit os;

0 commit comments

Comments
 (0)