remove nixos-rebuild-diff
Revert "add nixos-rebuild-diff to show diffs after rebuild"
(commit 02d1b21916)
Implemented within nixos-rebuild-ng itself instead,
see https://github.com/NixOS/nixpkgs/pull/489208
This commit is contained in:
parent
c9540d82c5
commit
da97f617fb
1 changed files with 1 additions and 18 deletions
|
|
@ -12,23 +12,6 @@ let
|
|||
# use a more verbose output style for nix than default
|
||||
# only lix supports log-format = multiline-with-logs
|
||||
logFormat = if config.nixowos.system.lix.enable then "multiline-with-logs" else "bar-with-logs";
|
||||
|
||||
nixos-rebuild-diff = pkgs.writeShellApplication {
|
||||
name = "nixos-rebuild-diff";
|
||||
|
||||
runtimeInputs = [ config.nix.package ];
|
||||
|
||||
text = ''
|
||||
if [[ $* =~ build|boot|test|switch ]]; then
|
||||
priorSystem=$(readlink /run/current-system)
|
||||
newSystem=$(command nixos-rebuild --ask-sudo-password --log-format ${logFormat} "$@" | tail -n 1)
|
||||
|
||||
nix store diff-closures "$priorSystem" "$newSystem"
|
||||
else
|
||||
command nixos-rebuild --ask-sudo-password --log-format ${logFormat} "$@"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
options.nixowos.cli.${name} = {
|
||||
|
|
@ -47,7 +30,7 @@ in
|
|||
# make nix-shell preserve the user's $SHELL
|
||||
nix-shell = /* sh */ ''nix-shell --command "export SHELL=$SHELL; $SHELL"'';
|
||||
|
||||
nixos-rebuild = /* sh */ "${nixos-rebuild-diff}/bin/nixos-rebuild-diff";
|
||||
nixos-rebuild = /* sh */ "nixos-rebuild --ask-sudo-password --log-format ${logFormat}";
|
||||
|
||||
nix = /* sh */ "nix --log-format ${logFormat}";
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue