2022-02-20 17:46:48 +01:00
|
|
|
# nixos-config
|
|
|
|
|
|
|
|
[![Build](https://github.com/tboerger/nixos-config/actions/workflows/build.yml/badge.svg)](https://github.com/tboerger/nixos-config/actions/workflows/build.yml)
|
|
|
|
|
|
|
|
Provisioning for my NixOS systems based on [Nix][nix].
|
|
|
|
|
2022-09-27 22:44:54 +02:00
|
|
|
## Chnum
|
|
|
|
|
|
|
|
### Bootstrap
|
|
|
|
|
2022-10-26 20:37:14 +02:00
|
|
|
Copy `/etc/ssh/ssh_host_ed25519_key.pub` into [secrets](./secrets/secrets.nix)
|
|
|
|
and rekey the secrets via [agenix][agenix]. After pushing the rekeyed secrets
|
|
|
|
execute these commands:
|
|
|
|
|
2022-09-27 22:44:54 +02:00
|
|
|
```console
|
2022-09-29 16:04:08 +02:00
|
|
|
sudo loadkeys de
|
2022-09-27 22:44:54 +02:00
|
|
|
sudo nix-shell --packages nixUnstable
|
|
|
|
|
|
|
|
bash -c "$(curl -fsSL https://raw.githubusercontent.com/tboerger/nixos-config/master/scripts/chnum-partitions)"
|
2022-10-26 20:37:14 +02:00
|
|
|
|
|
|
|
mkdir -p /mnt/etc/ssh
|
|
|
|
cp /etc/ssh/ssh_host_* /mnt/etc/ssh/
|
2022-11-10 16:01:39 +01:00
|
|
|
nixos-install --no-root-password --root /mnt --flake github:tboerger/nixos-config#chnum
|
2022-09-27 22:44:54 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
### Updates
|
|
|
|
|
|
|
|
If the repository had been cloned you could just execute `make switch`,
|
|
|
|
otherwise there is still this long option to update the deployment:
|
|
|
|
|
|
|
|
```console
|
|
|
|
nixos-rebuild switch \
|
|
|
|
--flake github:tboerger/nixos-config#chnum
|
|
|
|
```
|
2022-02-20 17:46:48 +01:00
|
|
|
|
2022-02-20 18:30:31 +01:00
|
|
|
## Asgard
|
2022-02-20 17:46:48 +01:00
|
|
|
|
|
|
|
### Bootstrap
|
|
|
|
|
2022-10-26 20:37:14 +02:00
|
|
|
Copy `/etc/ssh/ssh_host_ed25519_key.pub` into [secrets](./secrets/secrets.nix)
|
|
|
|
and rekey the secrets via [agenix][agenix]. After pushing the rekeyed secrets
|
|
|
|
execute these commands:
|
|
|
|
|
2022-02-20 17:46:48 +01:00
|
|
|
```console
|
2022-09-29 16:04:08 +02:00
|
|
|
sudo loadkeys de
|
2022-02-20 18:48:50 +01:00
|
|
|
sudo nix-shell --packages nixUnstable
|
|
|
|
|
2022-02-20 18:30:31 +01:00
|
|
|
bash -c "$(curl -fsSL https://raw.githubusercontent.com/tboerger/nixos-config/master/scripts/asgard-partitions)"
|
2022-02-20 17:46:48 +01:00
|
|
|
|
2022-10-26 20:37:14 +02:00
|
|
|
mkdir -p /mnt/etc/ssh
|
|
|
|
cp /etc/ssh/ssh_host_* /mnt/etc/ssh/
|
|
|
|
nixos-install --no-root-password --root /mnt --flake github:tboerger/nixos-config#asgard
|
|
|
|
```
|
2022-10-26 17:52:42 +02:00
|
|
|
|
2022-02-20 17:46:48 +01:00
|
|
|
### Updates
|
|
|
|
|
|
|
|
If the repository had been cloned you could just execute `make switch`,
|
|
|
|
otherwise there is still this long option to update the deployment:
|
|
|
|
|
|
|
|
```console
|
|
|
|
nixos-rebuild switch \
|
2022-02-20 19:15:31 +01:00
|
|
|
--flake github:tboerger/nixos-config#asgard
|
2022-02-20 17:46:48 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## Utgard
|
|
|
|
|
|
|
|
### Bootstrap
|
|
|
|
|
2022-10-26 20:37:14 +02:00
|
|
|
Copy `/etc/ssh/ssh_host_ed25519_key.pub` into [secrets](./secrets/secrets.nix)
|
|
|
|
and rekey the secrets via [agenix][agenix]. After pushing the rekeyed secrets
|
|
|
|
execute these commands:
|
|
|
|
|
2022-02-20 17:46:48 +01:00
|
|
|
```console
|
2022-09-29 16:04:08 +02:00
|
|
|
sudo loadkeys de
|
2022-02-20 18:48:50 +01:00
|
|
|
sudo nix-shell --packages nixUnstable
|
|
|
|
|
2022-02-20 18:30:31 +01:00
|
|
|
bash -c "$(curl -fsSL https://raw.githubusercontent.com/tboerger/nixos-config/master/scripts/utgard-partitions)"
|
2022-10-26 20:37:14 +02:00
|
|
|
|
|
|
|
mkdir -p /mnt/etc/ssh
|
|
|
|
cp /etc/ssh/ssh_host_* /mnt/etc/ssh/
|
2022-10-30 20:30:54 +01:00
|
|
|
nixos-install --no-root-password --root /mnt --flake github:tboerger/nixos-config#utgard
|
2022-02-20 17:46:48 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
### Updates
|
|
|
|
|
|
|
|
If the repository had been cloned you could just execute `make switch`,
|
|
|
|
otherwise there is still this long option to update the deployment:
|
|
|
|
|
|
|
|
```console
|
|
|
|
nixos-rebuild switch \
|
2022-02-20 19:15:31 +01:00
|
|
|
--flake github:tboerger/nixos-config#utgard
|
2022-02-20 17:46:48 +01:00
|
|
|
```
|
|
|
|
|
2022-09-26 15:14:32 +02:00
|
|
|
## Midgard
|
|
|
|
|
|
|
|
### Bootstrap
|
|
|
|
|
2022-10-26 20:37:14 +02:00
|
|
|
Copy `/etc/ssh/ssh_host_ed25519_key.pub` into [secrets](./secrets/secrets.nix)
|
|
|
|
and rekey the secrets via [agenix][agenix]. After pushing the rekeyed secrets
|
|
|
|
execute these commands:
|
|
|
|
|
2022-09-26 15:14:32 +02:00
|
|
|
```console
|
2022-09-29 16:04:08 +02:00
|
|
|
sudo loadkeys de
|
2022-09-26 15:14:32 +02:00
|
|
|
sudo nix-shell --packages nixUnstable
|
|
|
|
|
|
|
|
mount /dev/disk/by-label/NIXOS_SD /mnt
|
2022-10-26 20:37:14 +02:00
|
|
|
|
|
|
|
mkdir -p /mnt/etc/ssh
|
|
|
|
cp /etc/ssh/ssh_host_* /mnt/etc/ssh/
|
2022-10-30 20:30:54 +01:00
|
|
|
nixos-install --no-root-password --root /mnt --flake github:tboerger/nixos-config#midgard
|
2022-09-26 15:14:32 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
### Updates
|
|
|
|
|
|
|
|
If the repository had been cloned you could just execute `make switch`,
|
|
|
|
otherwise there is still this long option to update the deployment:
|
|
|
|
|
|
|
|
```console
|
|
|
|
nixos-rebuild switch \
|
|
|
|
--flake github:tboerger/nixos-config#midgard
|
|
|
|
```
|
|
|
|
|
2022-02-20 17:46:48 +01:00
|
|
|
## Security
|
|
|
|
|
|
|
|
If you find a security issue please contact thomas@webhippie.de first.
|
|
|
|
|
|
|
|
## Contributing
|
|
|
|
|
|
|
|
Fork -> Patch -> Push -> Pull Request
|
|
|
|
|
|
|
|
## Authors
|
|
|
|
|
|
|
|
- [Thomas Boerger](https://github.com/tboerger)
|
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
Apache-2.0
|
|
|
|
|
|
|
|
## Copyright
|
|
|
|
|
|
|
|
```console
|
|
|
|
Copyright (c) 2021 Thomas Boerger <thomas@webhippie.de>
|
|
|
|
```
|
|
|
|
|
|
|
|
[nix]: https://nixos.org/manual/nix/stable/
|
|
|
|
[agenix]: https://github.com/ryantm/agenix
|