Skip to content

Commit f43ec4b

Browse files
committed
feat: allow arg pass through to nvd and nix-diff
1 parent da4578a commit f43ec4b

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

docs/content/getting-started/nixos-configuration.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ Removed packages:
139139
Closure size: 562 -> 581 (55 paths added, 36 paths removed, delta +19, disk usage +700.6MiB).
140140
```
141141

142+
!!! info "Arg pass through"
143+
144+
Any additional arguments you provide to `nix run` after `--` will be passed through to the `nvd diff` command.
145+
For example `nix run .#nixosConfigurations.basic.config.facter.debug.nvd -- --help`.
146+
142147
### `nix-diff`
143148

144149
You can output a [nix-diff] of the system closure with and without `nixos-facter` enabled by running
@@ -180,6 +185,11 @@ You can output a [nix-diff] of the system closure with and without `nixos-facter
180185
...
181186
```
182187

188+
!!! info "Arg pass through"
189+
190+
Any additional arguments you provide to `nix run` after `--` will be passed through to the `nix-diff` command.
191+
For example `nix run .#nixosConfigurations.basic.config.facter.debug.nix-diff -- --help`.
192+
183193
[NixOS configuration]: https://nixos.org/manual/nixos/stable/#sec-configuration-syntax
184194
[detected architecture]: https://github.com/numtide/nixos-facter-modules/blob/main/modules/nixos/system.nix
185195
[detected virtualisation]: https://github.com/numtide/nixos-facter-modules/blob/main/modules/nixos/virtualisation.nix

modules/nixos/debug.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
text = ''
5555
nvd diff \
5656
${config.system.build.noFacter.config.system.build.toplevel} \
57-
${config.system.build.toplevel}
57+
${config.system.build.toplevel} \
58+
"$@"
5859
'';
5960
};
6061

@@ -64,7 +65,8 @@
6465
text = ''
6566
nix-diff \
6667
${config.system.build.noFacter.config.system.build.toplevel} \
67-
${config.system.build.toplevel}
68+
${config.system.build.toplevel} \
69+
"$@"
6870
'';
6971
};
7072

0 commit comments

Comments
 (0)