Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
joinemm authored Jul 11, 2024
1 parent 78b83cf commit 617b51d
Showing 1 changed file with 26 additions and 21 deletions.
47 changes: 26 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,21 @@
<div align="center">
<img alt="NixOS" src="https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nix-snowflake-white.svg" width="120px"/>
<h1>Snowflake</h1>
<img src="https://img.shields.io/github/stars/joinemm/snowflake?style=for-the-badge&labelColor=1B2330&color=a4ffff" alt="GitHub Repo stars"/>
<img src="https://img.shields.io/github/last-commit/joinemm/snowflake?style=for-the-badge&labelColor=1B2330&color=a4ffff" alt="GitHub last commit"/>
<img src="https://img.shields.io/github/repo-size/joinemm/snowflake?style=for-the-badge&labelColor=1B2330&color=a4ffff" alt="GitHub repo size"/>
<a href="https://nixos.org" target="_blank">
<img src="https://img.shields.io/badge/NixOS-unstable-blue.svg?style=for-the-badge&labelColor=1B2330&logo=NixOS&logoColor=white&color=a4ffff" alt="NixOS Unstable"/>
</a>
</div>
<img alt="NixOS" src="https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nix-snowflake-white.svg" width="150px"/>

---

This is my NixOS flake, including all my system dotfiles and settings.
# Snowflake

It contains configurations for multiple host systems, and is
split into nixos modules and home-manager modules,
which are then imported from each host according to it's needs.
My personal NixOS flake, building dotfiles for all of my systems and servers.

Shell scripts built from the flake at <https://github.com/joinemm/bin>
The configuration is modular, with modules imported to each host as needed.

Shell scripts are built from the flake at <https://github.com/joinemm/bin>

## Hosts

- `zeus` - Desktop workstation/gaming pc
- `x1` - Thinkpad X1 Carbon gen11 work laptop
- `monitoring` - Grafana and prometheus server for monitoring my servers
- `hetzner` - Syncthing central sync node and webserver
- `monitoring` - Grafana and prometheus server for monitoring Miso Bot
- `apollo` - Syncthing central sync node and cloud server for web services
- `archimedes` - Raspberry Pi 4B, local homelab for local services such as DNS

## Installation

Expand All @@ -34,10 +25,24 @@ For a given `host`
nixos-rebuild switch --flake .#$HOST
```

## Deploying to remote servers
## Installing to remote servers

The included script will install the system, and add `ssh_host_ed25519_key` specified in `secrets.yaml`

```
./scripts/install .#$HOST $REMOTE_IP --secrets hosts/$HOST/secrets.yaml
```

## SD card images

This goes for cloud hosts like hetzner. The target server needs to have passwordless sudo for the user you log in as.
The raspberry pi config can be built as flashable sd card image for initial installation:

```
nixos-rebuild switch --flake .#$HOST --use-remote-sudo --target-host $IP
nix build .#nixosConfigurations.archimedes.config.system.build.sdImage
# flash to sd card
lsblk # check sd card device
sudo dd if=result/nixos-sd-image-xxx-aarch64-linux.img of=/dev/sda bs=4M conv=fsync status=progress
```

This sd card can now be inserted into a raspberry pi and it will boot the configuration.

0 comments on commit 617b51d

Please sign in to comment.