-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
61 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: "NixOS Tests" | ||
on: | ||
pull_request: | ||
push: | ||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: cachix/install-nix-action@v27 | ||
with: | ||
extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm" | ||
|
||
- uses: cachix/cachix-action@v15 | ||
with: | ||
name: esselius-config | ||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
extraPullNames: nix-community | ||
|
||
- uses: rrbutani/use-nix-shell-action@v1 | ||
|
||
- name: Monitoring Auth | ||
run: nix run .#nixosTests.monitoring-auth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,43 @@ | ||
# Usage | ||
|
||
## Local darwin config | ||
|
||
Install nix with the [DeterminateSystems nix-installer](https://github.com/DeterminateSystems/nix-installer) | ||
|
||
```shell | ||
$ nix-installer plan macos --case-sensitive --extra-conf "use-case-hack = false" --encrypt true > plan.json | ||
$ nix-installer install plan.json | ||
|
||
$ sudo mv /etc/nix/nix.conf{,.before-nix-darwin} | ||
$ nix --extra-experimental-features 'flakes nix-command' run nix-darwin -- switch --flake . | ||
``` | ||
|
||
Switch darwin config | ||
## Raspberry Pi bootstrap | ||
|
||
Generate SD card image | ||
|
||
```shell | ||
$ sudo mv /etc/nix/nix.conf{,.before-nix-darwin} | ||
$ nix --extra-experimental-features 'flakes nix-command' run nix-darwin -- switch --flake . | ||
$ nix build .#nixosConfigurations.adama.config.system.build.sdImage | ||
$ unzstd result/sd-image/nixos-sd-image-24.05.20240706.49ee0e9-aarch64-linux.img.zst -o x.img | ||
``` | ||
|
||
Flash SD card or USB stick with `x.img` using [Raspberry Pi Imager](https://www.raspberrypi.com/software/), put in RPi and start attached to network. | ||
|
||
Grab new ssh host key. | ||
|
||
```shell | ||
$ ssh-keyscan 192.168.1.195 | ||
``` | ||
|
||
Update host key in `secrets/secrets.nix` and rekey secrets. | ||
|
||
```shell | ||
$ cd secrets | ||
$ agenix --rekey | ||
``` | ||
|
||
Deploy refreshed secrets. | ||
|
||
```shell | ||
$ nixos-rebuild switch --flake . --target-host 192.168.1.195 --fast --use-remote-sudo | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,5 +19,6 @@ | |
nixpkgs-fmt | ||
jq | ||
zstd | ||
nixos-rebuild | ||
]; | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
age-encryption.org/v1 | ||
-> ssh-ed25519 q0q77g oRcBQhZIoKzLlVZdsRlf4LdxmX9SuTEefbF0mJ3s6lU | ||
F1xEx2BBzLL9/G4pvuNyeV8foPy9XPCspiXRsRgsT+g | ||
--- km9jGq8etKb4qrdyzmy6gSROuUuklHfYQ8/DQbrkwP4 | ||
���c�Sj���}~��j�WKD��˭�B���f�Bk%6�'�:�� | ||
-> ssh-ed25519 q0q77g 9i/kyZ2fTApdkvxZtGQM8nr6Dm7Tr0Gk5HDfgcOLlSI | ||
Z/zX899laT67h1+bzeDTu6gw/HpBi8xFa5QQovJuOzY | ||
--- /f9vBC76yKogzwhVZt2QwELwGasnCiLWgFDxGtAhYWw | ||
tm��ܶ���7��;j*�g�}*P�p{����A�4�~���m��{;. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters