feat(github): add auto-conventional-commit hook with opencode integration
CI / Flake check (aarch64-linux) (push) Successful in 1m30s
CI / Flake check (x86_64-linux) (push) Successful in 1m17s
CI / Pre-commit checks (x86_64-linux) (push) Failing after 19s

- Add prepare-commit-msg git hook that generates conventional commit messages
- Modularize fish configuration with separate conf.d files
- Convert configuration files from .text to .source format for structured data
- Add sops-nix SOPS configuration with explicit secret definitions
- Upgrade age identity to single key file management approach
- Add system activation script for age key management
- Generate .sops.yaml for SOPS creation rules
- Restructure README.md with improved table and cleaner formatting
- Refactor config files to use pkgs.formats.json/toml generators
- Implement YAML format for ashell and walker service configurations
- Update SSH config source to use sops secrets
- Convert zed and other config files to use structured .source format
This commit is contained in:
2026-07-12 17:55:52 +02:00
parent 5116faf0d3
commit 205a1ccc8f
22 changed files with 581 additions and 443 deletions
+112 -146
View File
@@ -1,185 +1,151 @@
<p align="center"><img src="https://i.imgur.com/X5zKxvp.png" width=300px></p>
<p align="center">
<a href="https://hyprland.org/">
<img src="https://img.shields.io/static/v1?label=NIRI&message=latest&style=flat&logo=hyprland&colorA=24273A&colorB=8AADF4&logoColor=CAD3F5"/>
</a>
<a href="https://github.com/zemmsoares/awesome-rices">
<img src="https://raw.githubusercontent.com/zemmsoares/awesome-rices/main/assets/awesome-rice-badge.svg" alt="awesome-rice-badge">
<a href="https://github.com/YaLTeR/niri/">
<img src="https://img.shields.io/static/v1?label=WM&message=Niri&style=flat&logo=hyprland&colorA=24273A&colorB=8AADF4&logoColor=CAD3F5"/>
</a>
<a href="https://nixos.wiki/wiki/Flakes">
<img src="https://img.shields.io/static/v1?label=Nix-Flake&message=check&style=flat&logo=nixos&colorA=24273A&colorB=9173ff&logoColor=CAD3F5">
<img src="https://img.shields.io/static/v1?label=Nix&message=Flakes&style=flat&logo=nixos&colorA=24273A&colorB=9173ff&logoColor=CAD3F5"/>
</a>
<a href="https://nixos.org/">
<img src="https://img.shields.io/badge/NixOS-unstable-informational.svg?style=flat&logo=nixos&logoColor=CAD3F5&colorA=24273A&colorB=8AADF4">
<img src="https://img.shields.io/badge/NixOS-unstable-informational.svg?style=flat&logo=nixos&logoColor=CAD3F5&colorA=24273A&colorB=8AADF4"/>
</a>
</p>
<h1 align="center">芯 (Shin)</h1>
### ⚠ <sup><sub><samp>PLEASE RESPECT THE CREDITS IF YOU USE SOMETHING FROM MY DESKTOP/SETUP.</samp></sub></sup>
**Personal NixOS + Home Manager flake.** Builds for `x86_64-linux` and `aarch64-linux`. Uses [flake-parts](https://flake.parts/).
> **Note:** Built with [flake-parts](https://flake.parts/). The client
> configurations (`desktop`, `laptop`, `tty`) use Home Manager, while the
> Hetzner server is isolated on `nixos-24.05`. The flake builds for both
> **x86_64-linux** and **aarch64-linux**.
| Host | Target | WM | Notes |
|------|--------|-----|-------|
| `desktop` | x86_64 | Niri | Full graphical |
| `laptop` | x86_64 | Niri | Battery, bluetooth, location |
| `tty` | x86_64 | — | Headless server |
| `hetzner` | x86_64 (24.05) | — | Isolated server, disko + sops-nix |
---
<pre align="center"><p align="center"><a href="#seedling--setup">SETUP</a> • <a href="#herb--guides">GUIDES</a> • <a href="#four_leaf_clover--key-bindings">KEYBINDS</a> • <a href="https://linu.dev/kaku">GALLERY</a></p></pre>
---
<a href="#octocat--hi-there-thanks-for-dropping-by">
<picture>
<img alt="" align="right" width="400px" src="/assets/6.png"/>
</picture>
</a>
- **Window Manager** • [Niri](https://github.com/YaLTeR/niri/)🎨 Scrolleable WM!
- **Shell** • [Fish](https://fishshell.com/) 🐟 with
[starship](https://github.com/starship/starship) Cross Shell Platform!
- **Terminal** • [Ghostty](https://ghostty.org/) 💻 Powerful Hyped term
- **Panel** • [Noctalia!](https://noctalia.dev/) 🍧 Beautiful and minimalist desktop shell
- **File Manager** • [Yazi](https://github.com/sxyazi/yazi) 🔖 Rustacean File
Manager!
- **GUI Basic-IDE** • [Helix](https://docs.helix-editor.com/) ✴️ Rustacean vim
version!
- **GTK Theme** • [GTK](https://github.com/someone/Colloid-gtk-theme) 🐾 My
Fork of colloid
## 🌼 <samp>INSTALLATION (NixOS)</samp>
> Request:
> [NixOS](https://channels.nixos.org/nixos-24.05/latest-nixos-minimal-x86_64-linux.iso)
This flake targets **both** `x86_64-linux` and `aarch64-linux`, so grab the
minimal ISO for your architecture:
```bash
# x86_64
wget -O nixos-minimal.iso https://channels.nixos.org/nixos-24.05/latest-nixos-minimal-x86_64-linux.iso
# aarch64 (e.g. Raspberry Pi / ARM boxes)
wget -O nixos-minimal-aarch64.iso https://channels.nixos.org/nixos-24.05/latest-nixos-minimal-aarch64-linux.iso
```
- Boot Into the Installer.
- Switch to Root: `sudo -i`
- Partitions:
_I prefer to use 1GB on the EFI partition. Specifically because the
'generations' list may become very long, and to avoid overloading the
partition._
```bash
# Replace nvme with your disk partition
gdisk /dev/nvme0n1
```
- `o` (create new partition table)
- `n` (add partition, 512M, type ef00 EFI)
- `n` (add partition, remaining space, type 8300 Linux)
`w` (write partition table and exit)
- Format Partitions:
```bash
mkfs.fat -F 32 -n EFI /dev/nvme0n1p1
mkfs.xfs -L NIXOS /dev/nvme0n1p2
```
- Mount Partitions:
```bash
mount /dev/disk/by-label/NIXOS /mnt
mkdir -p /mnt/boot
mount /dev/disk/by-label/EFI /mnt/boot
```
- Enable nixFlakes
```bash
nix-shell -p nixVersions.stable git
```
- Clone my Dotfiles
## Quick Install (with disko — recommended)
```bash
# Boot NixOS minimal ISO, then:
sudo -i
git clone --depth 1 https://github.com/someone/shin /mnt/etc/nixos
```
- Generate your Own Nix Hardware Settings:
# Auto-partition, format, mount (replace 'laptop' with 'desktop'/'tty')
nix --extra-experimental-features "nix-command flakes" \
run github:nix-community/disko -- \
--mode destroy,format,mount /mnt/etc/nixos/hosts/aesthetic/disko-config.nix
### ⚠ <sup><sub><samp>DON'T FORGET IT</samp></sub></sup>
# Generate hardware config
nixos-generate-config --dir /mnt/etc/nixos/hosts/aesthetic
rm /mnt/etc/nixos/hosts/aesthetic/configuration.nix
```bash
sudo nixos-generate-config --dir /mnt/etc/nixos/hosts/aesthetic
# Remove configuration.nix
rm -rf /mnt/etc/nixos/hosts/aesthetic/configuration.nix
```
- Install Dotfiles Using Flake
```bash
# Move to folder
# Install
cd /mnt/etc/nixos
# Install (desktop for a graphical machine, or #laptop)
nixos-install --flake .#desktop
nixos-install --flake .#laptop
```
- Reboot
### 🐙 <sup><sub><samp>Remember <strong>Default</strong> User & password are: nixos</samp></sub></sup>
- Change Default password for User.
```bash
passwd YourUser
**BIOS vs UEFI:** Set in `hosts/aesthetic/default.nix`:
```nix
boot.loader.limine.bootMode = "bios"; # or "uefi"
```
### 🌻 <samp>TODO LIST</samp>
---
### 🧩 <samp>ADDITIONAL TIPS</samp>
If you're using this NixOS configuration flake locally, you can simplify the process of switching and managing your system using [`nh`](https://github.com/viperML/nh), a CLI helper for Nix Flakes.
To switch your system configuration with `nh`, use:
## Post-Install: Secrets
```bash
# Reboot into new system, then:
sops secrets/secrets.yaml
# Fill in:
# hetzner_server — SSH private key for root@severijnse.eu
# gitea_laptop — SSH private key for git@git.severijnse.eu:222
# discordo, openrouter, github, twt, gemini, context7, exa — API tokens
sudo nixos-rebuild switch --flake /etc/nixos#laptop
```
---
## Daily Workflow
```bash
# Rebuild after changes
sudo nixos-rebuild switch --flake /etc/nixos#laptop
# Or with nh (cleaner)
NH_FLAKE=/etc/nixos nh os switch
# Update flake inputs
nix flake update --flake /etc/nixos
# Format Nix code
alejandra /etc/nixos
```
This avoids needing to type out the full `nixos-rebuild` command manually and provides a cleaner workflow when iterating on your setup.
---
> 💡 Make sure `nh` is installed in your system environment or user profile.
## Key Components
## 🍀 <samp>KEY BINDINGS</samp>
| Layer | Tool | Config |
|-------|------|--------|
| WM | Niri | `home/window-managers/niri/` |
| Shell | Fish + Starship | `home/terminal/shell/` |
| Terminal | Ghostty | `home/terminal/emulators/ghostty.nix` |
| Panel | Noctalia | `home/services/wayland/noctalia.nix` |
| Files | Yazi | `home/terminal/software/yazi.nix` |
| Editor | Helix | `home/editors/helix/` |
| Secrets | sops-nix (age via SSH host key) | `secrets/secrets.yaml` |
| Boot | Limine (BIOS/UEFI) | `system/core/limine.nix` |
## 💐 <samp>ACKNOWLEDGEMENTS</samp>
---
| | | Inspiration and Resources | | |
| :-: | :-: | :------------------------------------------ | :-- | :-: |
| | 1 | [owl4ce](https://github.com/owl4ce) | | |
| | 2 | [Ilham25](https://github.com/ilham25) | | |
| | 3 | [Siduck](https://github.com/siduck) | | |
| | 4 | [NvChad](https://github.com/NvChad) | | |
| | 5 | [Rxyhn](https://github.com/rxyhn) | | |
| | 6 | [HeinzDev](https://github.com/HeinzDev) | | |
| | 7 | [fufexan](https://github.com/fufexan) | | |
| | 8 | [AmitGolden](https://github.com/AmitGolden) | | |
| | | | | |
## Flake Structure
## 🌳 <samp>CONTRIBUTING</samp>
```
├── flake.nix # Inputs, outputs, perSystem
├── hosts/
│ ├── default.nix # Host definitions (desktop, laptop, tty, hetzner)
│ └── aesthetic/ # Laptop/desktop hardware config
├── home/ # Home Manager (user config)
│ ├── terminal/ # Shell, emulators, CLI tools
│ ├── editors/ # Helix, Zed, Neovim
│ ├── window-managers/ # Niri, keybinds
│ └── services/ # User systemd services
├── system/ # NixOS modules
│ ├── core/ # Boot, kernel, security
│ └── services/ # System services
├── servers/
│ └── hetzner/ # Isolated server (24.05, disko, sops)
├── secrets/
│ ├── secrets.yaml # sops-encrypted (age via SSH host key)
│ ├── age.key # Age private key (for sops decryption)
│ └── .sops.yaml # sops creation rules
└── pkgs/ # Custom packages/overlays
```
WIP
---
## 🎃 <samp>SECURITY POLICY</samp>
## sops-nix Details
<pre align="center">
<a href="#readme">BACK TO TOP</a>
</pre>
- Encrypts `secrets/secrets.yaml` with **age** using the SSH host ed25519 key (`/etc/ssh/ssh_host_ed25519_key`)
- Auto-decrypts to `/run/secrets/` at activation
- Fish loads secrets from `/run/secrets/` via `home/terminal/shell/fish.nix`
- SSH config references `/run/secrets/hetzner_server` and `/run/secrets/gitea_laptop`
To re-encrypt for a new host key:
```bash
cd /etc/nixos
nix shell nixpkgs#sops -c sops --encrypt --age "$(nix shell nixpkgs#ssh-to-age -c ssh-to-age < /etc/ssh/ssh_host_ed25519_key.pub)" secrets/secrets.yaml > secrets/secrets.yaml.new
mv secrets/secrets.yaml.new secrets/secrets.yaml
```
---
## Credits
Inspired by: [hjem](https://github.com/nix-community/hjem), [owl4ce](https://github.com/owl4ce), [Siduck](https://github.com/siduck), [Rxyhn](https://github.com/rxyhn).
---
## License
MIT — use freely, credits appreciated.