Add a command to launch a repl of the current flake.
This commit is contained in:
@@ -90,6 +90,30 @@
|
||||
];
|
||||
};
|
||||
}
|
||||
(
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
repl_path = toString ./.;
|
||||
nix-self-repl = pkgs.writeShellScriptBin "nix-self-repl" ''
|
||||
source /etc/set-environment
|
||||
nix repl "${repl_path}/repl.nix" "$@"
|
||||
'';
|
||||
# If we wanted the current version of a flake then we'd just launch
|
||||
# nix repl
|
||||
# and then run:
|
||||
# :lf /path/to/flake
|
||||
in
|
||||
{
|
||||
config = {
|
||||
environment.systemPackages = lib.mkIf config.nix.enable [ nix-self-repl ];
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
) nodes;
|
||||
|
||||
Reference in New Issue
Block a user