Skip to content

Commit

Permalink
feat: renamed forlders to machines and profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
tboerger committed Nov 24, 2024
1 parent 101194e commit d530b95
Show file tree
Hide file tree
Showing 134 changed files with 33 additions and 742 deletions.
111 changes: 15 additions & 96 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,68 +11,9 @@ and rekey the secrets via [agenix][agenix], you could also just execute
`ssh-keyscan ip_or_fqdn` to fetch the current public keys. After pushing the
rekeyed secrets execute the commands below.

## Desktops
## Asgard

Generally after the installation I'm cloning this repository somewhere onto the
desktop machine and just execute `make switch` within that repository to apply
updates, if this is not the case I can always execute the following command to
get the latest changes pulled in:

```console
nixos-rebuild switch --flake github:tboerger/nixos-config#hostname
```

### Anubis

```console
sudo loadkeys de
sudo nix-shell --packages nixUnstable

nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko --flake github:tboerger/nixos-config#anubis

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#anubis
```

After a reboot of the system it should be fully provisioned with the regular
flake which includes all defined services:

```console
nixos-rebuild switch --flake github:tboerger/nixos-config#anubis
```

### Chnum

```console
sudo loadkeys de
sudo nix-shell --packages nixUnstable

nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko --flake github:tboerger/nixos-config#chnum

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#chnum
```

After a reboot of the system it should be fully provisioned with the regular
flake which includes all defined services:

```console
nixos-rebuild switch --flake github:tboerger/nixos-config#chnum
```

## Servers

To apply updates for servers this repository should be updated to the latest
version, after that it is possible to use `deploy-rs` to upgrade the deployment
with a command like this:

```console
nix run github:serokell/deploy-rs github:tboerger/nixos-config#hostname
```

### Asgard
### Bootstrap

```console
sudo loadkeys de
Expand All @@ -85,14 +26,15 @@ cp /etc/ssh/ssh_host_* /mnt/etc/ssh/
nixos-install --no-root-password --root /mnt --flake github:tboerger/nixos-config#asgard
```

After a reboot of the system it should be fully provisioned with the regular
flake which includes all defined services:
### Updates

```console
nix run github:serokell/deploy-rs github:tboerger/nixos-config#asgard
```

### Utgard
## Utgard

### Bootstrap

```console
sudo loadkeys de
Expand All @@ -105,14 +47,15 @@ cp /etc/ssh/ssh_host_* /mnt/etc/ssh/
nixos-install --no-root-password --root /mnt --flake github:tboerger/nixos-config#utgard
```

After a reboot of the system it should be fully provisioned with the regular
flake which includes all defined services:
### Updates

```console
nix run github:serokell/deploy-rs github:tboerger/nixos-config#utgard
```

### Vanaheim
## Vanaheim

### Bootstrap

```console
sudo loadkeys de
Expand All @@ -125,14 +68,15 @@ cp /etc/ssh/ssh_host_* /mnt/etc/ssh/
nixos-install --no-root-password --root /mnt --flake github:tboerger/nixos-config#vanaheim
```

After a reboot of the system it should be fully provisioned with the regular
flake which includes all defined services:
### Updates

```console
nix run github:serokell/deploy-rs github:tboerger/nixos-config#vanaheim
```

### Yggdrasil
## Yggdrasil

### Bootstrap

```console
sudo loadkeys de
Expand All @@ -145,37 +89,12 @@ cp /etc/ssh/ssh_host_* /mnt/etc/ssh/
nixos-install --no-root-password --root /mnt --flake github:tboerger/nixos-config#yggdrasil
```

After a reboot of the system it should be fully provisioned with the regular
flake which includes all defined services:
### Updates

```console
nix run github:serokell/deploy-rs github:tboerger/nixos-config#yggdrasil
```

## Finish

Finally after I have setup the whole system I usually copy the remaining
credentials from my securely stored USB stick to get access to my SSH keys and
Gnupg keys if this is required on the machine. It should not be required for
servers.

### SSH

```console
mkdir -p ${HOME}/.ssh/
cp /media/$(whoami)/secrets/ssh/id_* ${HOME}/.ssh/
chown -R $(id -u):$(id -g) ${HOME}/.ssh
chmod u=rw,g=,o= ${HOME}/.ssh/id_*
```

### Gnupg

```console
for FILE in /media/$(whoami)/secrets/gpg/*.asc; do
gpg --import ${FILE}
done
```

## Security

If you find a security issue please contact [email protected] first.
Expand Down
42 changes: 0 additions & 42 deletions desktops/anubis/boot.nix

This file was deleted.

59 changes: 0 additions & 59 deletions desktops/anubis/default.nix

This file was deleted.

93 changes: 0 additions & 93 deletions desktops/anubis/disko.nix

This file was deleted.

19 changes: 0 additions & 19 deletions desktops/anubis/extras.nix

This file was deleted.

Loading

0 comments on commit d530b95

Please sign in to comment.