blob: 1b71883294e0877b3d92e21fdb3cebc3f2868454 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# LANDAU servers configurations
## Installation
Run the following command to install NixOS to remote host:
```bash
nixos-anywhere --flake .#cgit root@<host ip>
```
After installation, run `nixos-rebuild switch` to apply changes. You can also use `--build-host` and `--remote-host` options to build on a different machine.
For first-time setup on new hosting, hardware configuration is required. Use `--generate-hardware-config nixos-generate-config ./servers/cgit-hardware-configuration.nix` to generate it.
## Run locally
You can also run this configuration locally in a VM:
```bash
nixos-rebuild build-vm --flake .#cgit
./result/bin/run-cgit-vm
```
Now you can access the [server](http://localhost:8080/) for debug purposes.
## Nix-related checklist
- [ ] Format all files with `nix run nixpkgs#nixfmt-tree`
- [ ] Check for any warnings with `nix flake check`
- [ ] Update lock file (if needed) with `nix flake update`
|