nixpkgs/pkgs/os-specific/linux/nixos-rebuild
Klemens Nanni 7a0549387b nixos-rebuild: Accept only one argument
Multiple arguments make no sense but they are accepted, the last one
winning.

Found editing a previous run from shell history and adding a command
rather than replacing it;  observe in verbose mode:

```
$ nixos-rebuild dry-run -v
building the system configuration...
Building in legacy (non-flake) mode.
No --build-host given, running nix-build locally
$ nix-build <nixpkgs/nixos> -A system -k -I nixpkgs=/home/kn/src/nixpkgs -v --dry-run
...
```

```
$ nixos-rebuild dry-run build -v
building Nix...
$ nix-instantiate <nixpkgs/nixos> --add-root /tmp/nixos-rebuild.jgEYqZ/nix.drv --indirect -A config.nix.package.out -I nixpkgs=/home/kn/src/nixpkgs -v
...
```

nixos-rebuild(8) already bails out on zero arguments, so do the same
when passing a second one.
2022-06-23 21:39:13 +04:00
..
default.nix nixos-rebuild: add meta & add Profpatsch as maintainer 2022-03-22 18:35:33 +01:00
nixos-rebuild.sh nixos-rebuild: Accept only one argument 2022-06-23 21:39:13 +04:00