add nix command flakes examples
This commit is contained in:
parent
e6e4ccc0bb
commit
f89d810989
@ -38,9 +38,9 @@ footer: "Albert Vala, Filip Kohout, Nix flakes & Nix command"
|
||||
# Porovnani
|
||||
|
||||
```shell
|
||||
nix-shell -p cowsay #Stare
|
||||
nix shell nixpkgs#cowsay #Nove
|
||||
nix run nixpkgs#cowsay #Nove
|
||||
nix-shell -p cowsay #Old
|
||||
nix shell nixpkgs#cowsay #New
|
||||
nix run nixpkgs#cowsay #New
|
||||
```
|
||||
|
||||
---
|
||||
@ -68,6 +68,17 @@ nix run nixpkgs#cowsay #Nove
|
||||
|
||||
* Cokoliv.
|
||||
|
||||
---
|
||||
# Nix command + flakes
|
||||
- temp shell
|
||||
```shell
|
||||
nix shell nixpkgs#alejandra
|
||||
nix shell github:kamadorueda/alejandra
|
||||
```
|
||||
- Show output attr
|
||||
```shell
|
||||
nix flake show github:kamadorueda/alejandra
|
||||
```
|
||||
---
|
||||
|
||||
# Jak pouzit flakes na system configuraci?
|
||||
@ -167,8 +178,8 @@ nh os switch
|
||||
```
|
||||
|
||||
```shell
|
||||
nix build /etc/nixos#nixosConfigurations.nixos.config.system.build.toplevel \
|
||||
&& ./result/bin/switch-to-configuration switch
|
||||
nix build /etc/nixos#nixosConfigurations.nixos.config.system.build.toplevel
|
||||
./result/bin/switch-to-configuration switch
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Loading…
Reference in New Issue
Block a user