remote building and vm
This commit is contained in:
parent
e6e4ccc0bb
commit
8277a2ca7b
@ -4,8 +4,8 @@
|
|||||||
- [ ] Nix home-manager
|
- [ ] Nix home-manager
|
||||||
- [ ] Stylix
|
- [ ] Stylix
|
||||||
- [ ] NixOS Everywhere, NixOS Anywhere
|
- [ ] NixOS Everywhere, NixOS Anywhere
|
||||||
- [ ] Inputs in Nix
|
- [x] Inputs in Nix
|
||||||
- [ ] Nix language
|
- [ ] Nix language (if else statements, pipes, and other interesting things)
|
||||||
- [ ] Nix Modules
|
- [ ] Nix Modules
|
||||||
- [ ] Vlastní options
|
- [ ] Vlastní options
|
||||||
- [ ] Nix fetching
|
- [ ] Nix fetching
|
||||||
|
|||||||
@ -173,12 +173,31 @@ 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
|
# Nix writers
|
||||||
|
|
||||||
* Jednoduchý způsob přidávání skriptů v různých programovacích jazycích do systému ve flake konfiguraci
|
- Jednoduchý způsob přidávání skriptů v různých programovacích jazycích do
|
||||||
* Rozdíl oproti klasickému `pkgs.writeShellScriptBin`
|
systému ve flake konfiguraci
|
||||||
* [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/writers/scripts.nix) - pro všechny možnosti konfigurace skriptů
|
- Rozdíl oproti klasickému `pkgs.writeShellScriptBin`
|
||||||
* [https://nixos.wiki/wiki/Nix-writers](https://nixos.wiki/wiki/Nix-writers) - osekaná wiki
|
- [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
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -204,7 +223,6 @@ fn main() {
|
|||||||
---
|
---
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
|
|
||||||
pkgs.writers.writePython3 "hello-world-python"
|
pkgs.writers.writePython3 "hello-world-python"
|
||||||
{
|
{
|
||||||
libraries = [ pkgs.python3Packages.requests ];
|
libraries = [ pkgs.python3Packages.requests ];
|
||||||
@ -217,5 +235,4 @@ pkgs.writers.writePython3 "hello-world-python"
|
|||||||
''
|
''
|
||||||
print("Hello world!")
|
print("Hello world!")
|
||||||
''
|
''
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user