forked from clan/clan-core
docs: fix unsupported languages
This commit is contained in:
parent
6aec3ac73d
commit
d292f2de98
@ -15,7 +15,7 @@ In this tutorial we will guide you through building and flashing it to a bootabl
|
|||||||
|
|
||||||
2. Identify your flash drive with `lsblk`
|
2. Identify your flash drive with `lsblk`
|
||||||
|
|
||||||
```shellSession
|
```bash
|
||||||
$ lsblk
|
$ lsblk
|
||||||
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
|
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
|
||||||
sdb 8:0 1 117,2G 0 disk
|
sdb 8:0 1 117,2G 0 disk
|
||||||
@ -84,7 +84,7 @@ See: Guide for Wifi Below
|
|||||||
|
|
||||||
### Whats next?
|
### Whats next?
|
||||||
|
|
||||||
- [Deploying](): Deploying a Machine configuration
|
- [Deploying Machines](./02-machines.md): Deploying a Machine configuration
|
||||||
- [WiFi](#optional-connect-to-wifi): Guide for connecting to Wifi.
|
- [WiFi](#optional-connect-to-wifi): Guide for connecting to Wifi.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
@ -24,7 +24,7 @@ crucial.
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
3. **Update the Controller Machine**: Execute the following:
|
3. **Update the Controller Machine**: Execute the following:
|
||||||
```console
|
```bash
|
||||||
$ clan machines update <CONTROLLER>
|
$ clan machines update <CONTROLLER>
|
||||||
```
|
```
|
||||||
Your machine is now operational as the VPN controller.
|
Your machine is now operational as the VPN controller.
|
||||||
@ -43,24 +43,24 @@ To introduce a new machine to the VPN, adhere to the following steps:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
2. **Update the New Machine**: Execute:
|
2. **Update the New Machine**: Execute:
|
||||||
```console
|
```bash
|
||||||
$ clan machines update <NEW_MACHINE>
|
$ clan machines update <NEW_MACHINE>
|
||||||
```
|
```
|
||||||
Replace `<NEW_MACHINE>` with the designated new machine name.
|
Replace `<NEW_MACHINE>` with the designated new machine name.
|
||||||
3. **Retrieve the ZeroTier ID**: On the `new_machine`, execute:
|
3. **Retrieve the ZeroTier ID**: On the `new_machine`, execute:
|
||||||
```console
|
```bash
|
||||||
$ sudo zerotier-cli info
|
$ sudo zerotier-cli info
|
||||||
```
|
```
|
||||||
Example Output: `200 info d2c71971db 1.12.1 OFFLINE`, where `d2c71971db` is
|
Example Output: `200 info d2c71971db 1.12.1 OFFLINE`, where `d2c71971db` is
|
||||||
the ZeroTier ID.
|
the ZeroTier ID.
|
||||||
4. **Authorize the New Machine on Controller**: On the controller machine,
|
4. **Authorize the New Machine on Controller**: On the controller machine,
|
||||||
execute:
|
execute:
|
||||||
```console
|
```bash
|
||||||
$ sudo zerotier-members allow <ID>
|
$ sudo zerotier-members allow <ID>
|
||||||
```
|
```
|
||||||
Substitute `<ID>` with the ZeroTier ID obtained previously.
|
Substitute `<ID>` with the ZeroTier ID obtained previously.
|
||||||
5. **Verify Connection**: On the `new_machine`, re-execute:
|
5. **Verify Connection**: On the `new_machine`, re-execute:
|
||||||
```console
|
```bash
|
||||||
$ sudo zerotier-cli info
|
$ sudo zerotier-cli info
|
||||||
```
|
```
|
||||||
The status should now be "ONLINE" e.g., `200 info 47303517ef 1.12.1 ONLINE`.
|
The status should now be "ONLINE" e.g., `200 info 47303517ef 1.12.1 ONLINE`.
|
||||||
|
@ -20,7 +20,7 @@ nix build git+https://git.clan.lol/clan/clan-core.git#install-iso
|
|||||||
|
|
||||||
2. Identify your flash drive with `lsblk`.
|
2. Identify your flash drive with `lsblk`.
|
||||||
|
|
||||||
```shellSession
|
```bash
|
||||||
$ lsblk
|
$ lsblk
|
||||||
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
|
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
|
||||||
sdb 8:0 1 117,2G 0 disk
|
sdb 8:0 1 117,2G 0 disk
|
||||||
@ -106,13 +106,13 @@ After writing the installer to the USB drive, use it to boot the target machine.
|
|||||||
|
|
||||||
2. List available networks. Double press tab after station for device autocompletion. In this case `wlan0` is the only network wifi device.
|
2. List available networks. Double press tab after station for device autocompletion. In this case `wlan0` is the only network wifi device.
|
||||||
|
|
||||||
```shellSession
|
```bash
|
||||||
[iwd] station wlan0 get-networks
|
[iwd] station wlan0 get-networks
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Connect to a Wifi network. Replace `SSID` with the wlan network name.
|
3. Connect to a Wifi network. Replace `SSID` with the wlan network name.
|
||||||
|
|
||||||
```shellSession
|
```bash
|
||||||
[iwd] station wlan0 connect SSID
|
[iwd] station wlan0 connect SSID
|
||||||
```
|
```
|
||||||
|
|
@ -53,13 +53,13 @@ sops/
|
|||||||
|
|
||||||
New machines in Clan come with age keys stored in `./sops/machines/<machine_name>`. To list these machines:
|
New machines in Clan come with age keys stored in `./sops/machines/<machine_name>`. To list these machines:
|
||||||
|
|
||||||
```shellSession
|
```bash
|
||||||
$ clan secrets machines list
|
$ clan secrets machines list
|
||||||
```
|
```
|
||||||
|
|
||||||
For existing machines, add their keys:
|
For existing machines, add their keys:
|
||||||
|
|
||||||
```shellSession
|
```bash
|
||||||
$ clan secrets machines add <machine_name> <age_key>
|
$ clan secrets machines add <machine_name> <age_key>
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ $ clan secrets machines add <machine_name> <age_key>
|
|||||||
|
|
||||||
To fetch an age key from an SSH host key:
|
To fetch an age key from an SSH host key:
|
||||||
|
|
||||||
```shellSession
|
```bash
|
||||||
$ ssh-keyscan <domain_name> | nix shell nixpkgs#ssh-to-age -c ssh-to-age
|
$ ssh-keyscan <domain_name> | nix shell nixpkgs#ssh-to-age -c ssh-to-age
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -75,19 +75,19 @@ $ ssh-keyscan <domain_name> | nix shell nixpkgs#ssh-to-age -c ssh-to-age
|
|||||||
|
|
||||||
By default, secrets are encrypted for your key. To specify which users and machines can access a secret:
|
By default, secrets are encrypted for your key. To specify which users and machines can access a secret:
|
||||||
|
|
||||||
```shellSession
|
```bash
|
||||||
$ clan secrets set --machine <machine1> --machine <machine2> --user <user1> --user <user2> <secret_name>
|
$ clan secrets set --machine <machine1> --machine <machine2> --user <user1> --user <user2> <secret_name>
|
||||||
```
|
```
|
||||||
|
|
||||||
You can add machines/users to existing secrets without modifying the secret:
|
You can add machines/users to existing secrets without modifying the secret:
|
||||||
|
|
||||||
```shellSession
|
```bash
|
||||||
$ clan secrets machines add-secret <machine_name> <secret_name>
|
$ clan secrets machines add-secret <machine_name> <secret_name>
|
||||||
```
|
```
|
||||||
|
|
||||||
## 4. Adding Secrets
|
## 4. Adding Secrets
|
||||||
|
|
||||||
```shellSession
|
```bash
|
||||||
$ clan secrets set mysecret
|
$ clan secrets set mysecret
|
||||||
Paste your secret:
|
Paste your secret:
|
||||||
```
|
```
|
||||||
@ -96,13 +96,13 @@ Paste your secret:
|
|||||||
|
|
||||||
## 5. Retrieving Stored Secrets
|
## 5. Retrieving Stored Secrets
|
||||||
|
|
||||||
```shellSession
|
```bash
|
||||||
$ clan secrets get mysecret
|
$ clan secrets get mysecret
|
||||||
```
|
```
|
||||||
|
|
||||||
### List all Secrets
|
### List all Secrets
|
||||||
|
|
||||||
```shellSession
|
```bash
|
||||||
$ clan secrets list
|
$ clan secrets list
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -120,19 +120,19 @@ Here's how to get started:
|
|||||||
|
|
||||||
Assign users to a new group, e.g., `admins`:
|
Assign users to a new group, e.g., `admins`:
|
||||||
|
|
||||||
```shellSession
|
```bash
|
||||||
$ clan secrets groups add admins <username>
|
$ clan secrets groups add admins <username>
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **Listing Groups**:
|
2. **Listing Groups**:
|
||||||
|
|
||||||
```shellSession
|
```bash
|
||||||
$ clan secrets groups list
|
$ clan secrets groups list
|
||||||
```
|
```
|
||||||
|
|
||||||
3. **Assigning Secrets to Groups**:
|
3. **Assigning Secrets to Groups**:
|
||||||
|
|
||||||
```shellSession
|
```bash
|
||||||
$ clan secrets groups add-secret <group_name> <secret_name>
|
$ clan secrets groups add-secret <group_name> <secret_name>
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ commonly allows to put all secrets in a yaml or json documents.
|
|||||||
|
|
||||||
If you already happened to use sops-nix, you can migrate by using the `clan secrets import-sops` command by importing these documents:
|
If you already happened to use sops-nix, you can migrate by using the `clan secrets import-sops` command by importing these documents:
|
||||||
|
|
||||||
```shellSession
|
```bash
|
||||||
% clan secrets import-sops --prefix matchbox- --group admins --machine matchbox nixos/matchbox/secrets/secrets.yaml
|
% clan secrets import-sops --prefix matchbox- --group admins --machine matchbox nixos/matchbox/secrets/secrets.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ such as USB hard drives or network-attached storage. It uses a tool called rsnap
|
|||||||
|
|
||||||
First, figure out which device you'll use for backups. You can see all connected devices by running this command in your terminal:
|
First, figure out which device you'll use for backups. You can see all connected devices by running this command in your terminal:
|
||||||
|
|
||||||
```console
|
```bash
|
||||||
lsblk --output NAME,PTUUID,FSTYPE,SIZE,MOUNTPOINT
|
lsblk --output NAME,PTUUID,FSTYPE,SIZE,MOUNTPOINT
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ Replace `/dev/sda2` with your device and `/mnt/hdd` with your preferred mount po
|
|||||||
|
|
||||||
4. **Create Backups:** To create a backup, run:
|
4. **Create Backups:** To create a backup, run:
|
||||||
|
|
||||||
```console
|
```bash
|
||||||
clan backups create mymachine
|
clan backups create mymachine
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ Replace `/dev/sda2` with your device and `/mnt/hdd` with your preferred mount po
|
|||||||
|
|
||||||
5. **Listing Backups:** To see available backups, run:
|
5. **Listing Backups:** To see available backups, run:
|
||||||
|
|
||||||
```console
|
```bash
|
||||||
clan backups list mymachine
|
clan backups list mymachine
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -132,18 +132,18 @@ Ensure the path to the public key is correct.
|
|||||||
|
|
||||||
Backups are automatically performed nightly. To check the next scheduled backup, use:
|
Backups are automatically performed nightly. To check the next scheduled backup, use:
|
||||||
|
|
||||||
```console
|
```bash
|
||||||
systemctl list-timers | grep -E 'NEXT|borg'
|
systemctl list-timers | grep -E 'NEXT|borg'
|
||||||
```
|
```
|
||||||
|
|
||||||
- **Listing Backups:** To see available backups, run:
|
- **Listing Backups:** To see available backups, run:
|
||||||
|
|
||||||
```console
|
```bash
|
||||||
clan backups list mymachine
|
clan backups list mymachine
|
||||||
```
|
```
|
||||||
|
|
||||||
- **Manual Backups:** You can also initiate a backup manually:
|
- **Manual Backups:** You can also initiate a backup manually:
|
||||||
|
|
||||||
```console
|
```bash
|
||||||
clan backups create mymachine
|
clan backups create mymachine
|
||||||
```
|
```
|
||||||
|
@ -22,13 +22,13 @@ After you can use the local bin wrapper to test things in the cli:
|
|||||||
By default tests run in parallel using pytest-parallel.
|
By default tests run in parallel using pytest-parallel.
|
||||||
pytest-parallel however breaks `breakpoint()`. To disable it, use this:
|
pytest-parallel however breaks `breakpoint()`. To disable it, use this:
|
||||||
|
|
||||||
```console
|
```bash
|
||||||
pytest -n0 -s
|
pytest -n0 -s
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also run a single test like this:
|
You can also run a single test like this:
|
||||||
|
|
||||||
```console
|
```bash
|
||||||
pytest -n0 -s tests/test_secrets_cli.py::test_users
|
pytest -n0 -s tests/test_secrets_cli.py::test_users
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -36,12 +36,12 @@ pytest -n0 -s tests/test_secrets_cli.py::test_users
|
|||||||
|
|
||||||
Run all impure checks
|
Run all impure checks
|
||||||
|
|
||||||
```console
|
```bash
|
||||||
nix run .#impure-checks
|
nix run .#impure-checks
|
||||||
```
|
```
|
||||||
|
|
||||||
Run all checks
|
Run all checks
|
||||||
|
|
||||||
```console
|
```bash
|
||||||
nix flake check
|
nix flake check
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user