Clarify some footnotes
This commit is contained in:
parent
124277619d
commit
d406d5bdec
2 changed files with 1107 additions and 1076 deletions
2165
cheatsheet.pdf
2165
cheatsheet.pdf
File diff suppressed because it is too large
Load diff
|
|
@ -35,10 +35,10 @@
|
||||||
table.cell(fill: red, colspan: 2, align: center)[*Running software*],
|
table.cell(fill: red, colspan: 2, align: center)[*Running software*],
|
||||||
),
|
),
|
||||||
[Search for software],
|
[Search for software],
|
||||||
[```bash nix search nixpkgs hello``` #footnote[This evaluates nixpkgs so the first run may be slow, but further runs used cached results]],
|
[```bash nix search nixpkgs hello``` #footnote[This evaluates nixpkgs so the first run may be slow, but further runs used cached results.]],
|
||||||
|
|
||||||
[Run program],
|
[Run program],
|
||||||
[```bash nix run nixpkgs#hello``` #footnote[Pass `--` before any arguments to the program]],
|
[```bash nix run nixpkgs#hello``` #footnote[Pass `--` before any arguments to the program.]],
|
||||||
|
|
||||||
[Run program from other nixpkgs branch],
|
[Run program from other nixpkgs branch],
|
||||||
```bash nix run nixpkgs/nixos-25.11#hello```,
|
```bash nix run nixpkgs/nixos-25.11#hello```,
|
||||||
|
|
@ -46,7 +46,7 @@
|
||||||
[Run program from another flake],
|
[Run program from another flake],
|
||||||
```bash nix run github:user/nixpkgs/branch#hello```,
|
```bash nix run github:user/nixpkgs/branch#hello```,
|
||||||
|
|
||||||
[Find nixpkgs revision for a specific version of a program],
|
[Run specific version of a program],
|
||||||
[See #link("https://www.nixhub.io/")[nixhub.io]],
|
[See #link("https://www.nixhub.io/")[nixhub.io]],
|
||||||
|
|
||||||
[Get shell with program], ```bash nix shell nixpkgs#hello```,
|
[Get shell with program], ```bash nix shell nixpkgs#hello```,
|
||||||
|
|
@ -57,15 +57,15 @@
|
||||||
table.cell(fill: orange, colspan: 2, align: center)[*Building the system*],
|
table.cell(fill: orange, colspan: 2, align: center)[*Building the system*],
|
||||||
),
|
),
|
||||||
[Update flake inputs], ```bash nix flake update```,
|
[Update flake inputs], ```bash nix flake update```,
|
||||||
[Build and deploy to this machine], ```bash nixos-rebuild switch --sudo```,
|
[Build and deploy to current machine], ```bash nixos-rebuild switch --sudo```,
|
||||||
[Build on remote machine and deploy to current machine],
|
[Build remotely, deploy to current machine],
|
||||||
[```bash sudo nixos-rebuild switch --build-host user@remote --use-substitutes``` #footnote[This needs root on the current machine to add untrusted paths to the Nix store]],
|
[```bash sudo nixos-rebuild switch --build-host user@remote --use-substitutes``` #footnote[This needs `sudo` to add untrusted paths to the Nix store, since `--sudo` only uses root for activation.]],
|
||||||
|
|
||||||
[Build on current machine and deploy to remote machine],
|
[Build on current machine, deploy remotely],
|
||||||
[```bash nixos-rebuild switch --flake .#remote-machine-hostname --target-host root@remote``` #footnote[This needs root on the remote machine for the same reason]],
|
[```bash nixos-rebuild switch --flake .#remote-machine-hostname --target-host root@remote``` #footnote[This needs root on the remote machine to add untrusted paths to the remote machine's Nix store.]],
|
||||||
|
|
||||||
[Build and run VM from config],
|
[Build and run VM from config],
|
||||||
[```bash nixos-rebuild build-vm && result/bin/run-$hostname-vm -m 4G -smp 4 -device virtio-vga-gl -display sdl,gl=on``` #footnote[You may need to change all occurrences of the QEMU version in the run script if the config uses a different nixpkgs revision than the host]],
|
[```bash nixos-rebuild build-vm && result/bin/run-$hostname-vm -m 4G -smp 4 -device virtio-vga-gl -display sdl,gl=on``` #footnote[You may need to change all occurrences of the QEMU version in the run script if the config uses a different nixpkgs revision than the host.]],
|
||||||
|
|
||||||
[Build ISO from config],
|
[Build ISO from config],
|
||||||
[Add `"/installer/cd-dvd/installation-cd-minimal-new-kernel-no-zfs.nix"` as a module, then run ```bash nix build .#nixosConfigurations.$hostname.config.system.build.isoImage```],
|
[Add `"/installer/cd-dvd/installation-cd-minimal-new-kernel-no-zfs.nix"` as a module, then run ```bash nix build .#nixosConfigurations.$hostname.config.system.build.isoImage```],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue