diff --git a/README.md b/README.md index 1b199eb..41cd241 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ - [ ] Nix home-manager - [ ] Stylix - [ ] NixOS Everywhere, NixOS Anywhere -- [ ] Inputs in Nix -- [ ] Nix language +- [x] Inputs in Nix +- [ ] Nix language (if else statements, pipes, and other interesting things) - [ ] Nix Modules - [ ] Vlastní options - [ ] Nix fetching @@ -16,4 +16,4 @@ - [ ] Ovverrides and overlays - [ ] Nix Shell - [x] Nix writers -- [ ] [Nixhub](https://www.nixhub.io/) \ No newline at end of file +- [ ] [Nixhub](https://www.nixhub.io/) diff --git a/prezentace.md b/prezentace.md index 0dea0c6..4e326c5 100644 --- a/prezentace.md +++ b/prezentace.md @@ -173,27 +173,46 @@ nix build /etc/nixos#nixosConfigurations.nixos.config.system.build.toplevel \ --- +# Remote building + +- `nixos-rebuild --target-host nixFreak@192.168.8.32 switch --flake .#default` +- `--use-remote-sudo` + +- `--build-host` - konfigurace tady +- `--target-host` - konfigurace tam + +--- + +# Virtual machine + +`nix run github:nix-community/nixos-generators -- -c ./flake.nix --flake '#default' -f vm --disk-size 20480` + +--- + # Nix writers -* Jednoduchý způsob přidávání skriptů v různých programovacích jazycích do systému ve flake konfiguraci -* Rozdíl oproti klasickému `pkgs.writeShellScriptBin` -* [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/writers/scripts.nix) - pro všechny možnosti konfigurace skriptů -* [https://nixos.wiki/wiki/Nix-writers](https://nixos.wiki/wiki/Nix-writers) - osekaná wiki +- Jednoduchý způsob přidávání skriptů v různých programovacích jazycích do + systému ve flake konfiguraci +- Rozdíl oproti klasickému `pkgs.writeShellScriptBin` +- [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/writers/scripts.nix) - + pro všechny možnosti konfigurace skriptů +- [https://nixos.wiki/wiki/Nix-writers](https://nixos.wiki/wiki/Nix-writers) - + osekaná wiki --- ```nix -pkgs.writers.writeBash "hello-world-bash" {} +pkgs.writers.writeBash "hello-world-bash" {} '' echo "Hello world!" '' -pkgs.writers.writePython3 "hello-world-python" {} +pkgs.writers.writePython3 "hello-world-python" {} '' print("Hello world!") '' -pkgs.writers.writeRust "hello-world-rust" {} +pkgs.writers.writeRust "hello-world-rust" {} '' fn main() { println!("Hello world!") @@ -204,18 +223,16 @@ fn main() { --- ```nix - -pkgs.writers.writePython3 "hello-world-python" +pkgs.writers.writePython3 "hello-world-python" { libraries = [ pkgs.python3Packages.requests ]; makeWrapperArgs = [ "--prefix", "PATH", ":", "${pkgs.sl}/bin", ]; -} +} '' print("Hello world!") '' - ```