Skip to content

Commit

Permalink
Merge #39
Browse files Browse the repository at this point in the history
39: generate registry and add fup-repl to env r=blaggacao a=Pacman99

fixes #17
The command is just `repl`, I don't know if it needs to be `flk repl` since its a really generic command.

Co-authored-by: Pacman99 <[email protected]>
  • Loading branch information
bors[bot] and Pacman99 authored Jun 1, 2021
2 parents 5862c77 + cf803e8 commit 2a09fd2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@
"home-manager=${self.inputs.home}"
];

nix.registry = {
devos.flake = self;
nixos.flake = channel.input;
};
# package and option is from fup
environment.systemPackages = [ pkgs.fup-repl ];
nix.generateRegistryFromInputs = lib.mkDefault true;

nix.extraOptions = ''
experimental-features = ${lib.concatStringsSep " "
Expand Down
1 change: 1 addition & 0 deletions src/pkgs-lib/shell/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ let
nixos-generate-config
nixos-enter
pkgs'.nixos-rebuild
pkgs'.fup-repl
];

git.hooks = {
Expand Down
7 changes: 6 additions & 1 deletion src/pkgs-lib/shell/flk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ usage () {
"iso HOST" "Generate an ISO image of HOST" \
"install HOST [ARGS]" "Shortcut for nixos-install" \
"home HOST USER [switch]" "Home-manager config of USER from HOST" \
"HOST (switch|boot|test)" "Shortcut for nixos-rebuild"
"HOST (switch|boot|test)" "Shortcut for nixos-rebuild" \
"repl FLAKE" "Enter a repl with the flake's outputs"
}

case "$1" in
Expand Down Expand Up @@ -93,6 +94,10 @@ case "$1" in
fi
;;

"repl")
repl ${@:2}
;;

*)
sudo nixos-rebuild --flake "$DEVSHELL_ROOT#$1" "${@:2}"
;;
Expand Down

0 comments on commit 2a09fd2

Please sign in to comment.