Compare commits
No commits in common. "3dd421cb08d3d6e71b3092593846f40e81a767fb" and "dc34a785f77fd227622ab1111454f234a0108d18" have entirely different histories.
3dd421cb08
...
dc34a785f7
5 changed files with 53 additions and 135 deletions
|
@ -123,16 +123,15 @@ with lib.hm.gvariant;
|
||||||
"blur-my-shell@aunetx"
|
"blur-my-shell@aunetx"
|
||||||
"color-picker@tuberry"
|
"color-picker@tuberry"
|
||||||
"dash-in-panel@fthx"
|
"dash-in-panel@fthx"
|
||||||
# "eepresetselector@ulville.github.io"
|
|
||||||
"just-perfection-desktop@just-perfection"
|
"just-perfection-desktop@just-perfection"
|
||||||
"monitor-brightness-volume@ailin.nemui"
|
"monitor-brightness-volume@ailin.nemui"
|
||||||
"pano@elhan.io"
|
"pano@elhan.io"
|
||||||
"paperwm@paperwm.github.com"
|
"paperwm@paperwm.github.com"
|
||||||
"quicksettings-audio-devices-hider@marcinjahn.com"
|
"quicksettings-audio-devices-hider@marcinjahn.com"
|
||||||
"quicksettings-audio-devices-renamer@marcinjahn.com"
|
"quicksettings-audio-devices-renamer@marcinjahn.com"
|
||||||
"solaar-extension@sidevesh"
|
|
||||||
"undecorate@sun.wxg@gmail.com"
|
"undecorate@sun.wxg@gmail.com"
|
||||||
"user-theme@gnome-shell-extensions.gcampax.github.com"
|
"user-theme@gnome-shell-extensions.gcampax.github.com"
|
||||||
|
"solaar-extension@sidevesh"
|
||||||
"Vitals@CoreCoding.com"
|
"Vitals@CoreCoding.com"
|
||||||
];
|
];
|
||||||
favorite-apps = lib.mkDefault [
|
favorite-apps = lib.mkDefault [
|
||||||
|
@ -323,7 +322,7 @@ with lib.hm.gvariant;
|
||||||
window-gap = 8;
|
window-gap = 8;
|
||||||
winprops = [
|
winprops = [
|
||||||
''
|
''
|
||||||
{"wm_class":"Code","spaceIndex":0}
|
{"wm_class":"Code","preferredWidth":"70%","spaceIndex":0}
|
||||||
''
|
''
|
||||||
''
|
''
|
||||||
{"wm_class":"com.mitchellh.ghostty","scratch_layer":true}
|
{"wm_class":"com.mitchellh.ghostty","scratch_layer":true}
|
||||||
|
|
|
@ -1,14 +1,6 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
## DE ##
|
## DE ##
|
||||||
services.xserver = {
|
|
||||||
enable = true;
|
|
||||||
xkb = {
|
|
||||||
layout = "us";
|
|
||||||
variant = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.desktopManager.gnome = {
|
services.desktopManager.gnome = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraGSettingsOverridePackages = [ pkgs.mutter ];
|
extraGSettingsOverridePackages = [ pkgs.mutter ];
|
||||||
|
@ -53,7 +45,6 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
## Exclusions ##
|
## Exclusions ##
|
||||||
services.xserver.excludePackages = [ pkgs.xterm ];
|
|
||||||
environment.gnome.excludePackages = (
|
environment.gnome.excludePackages = (
|
||||||
with pkgs;
|
with pkgs;
|
||||||
[
|
[
|
||||||
|
|
|
@ -48,9 +48,6 @@
|
||||||
"amdgpu"
|
"amdgpu"
|
||||||
];
|
];
|
||||||
extraModulePackages = [ ];
|
extraModulePackages = [ ];
|
||||||
|
|
||||||
# Allow running ARM binaries on x86_64; for Cross Compilation
|
|
||||||
binfmt.emulatedSystems = [ "aarch64-linux" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# For less permission issues with SSHFS
|
# For less permission issues with SSHFS
|
||||||
|
|
|
@ -31,6 +31,7 @@ in
|
||||||
|
|
||||||
## Misc Inputs ##
|
## Misc Inputs ##
|
||||||
])
|
])
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
## Host Specifications ##
|
## Host Specifications ##
|
||||||
|
|
162
readme.md
162
readme.md
|
@ -21,15 +21,11 @@ This repository follows a **layered, modular approach** that separates system-le
|
||||||
├── ❄️ flake.nix # Central entry point & dependency management
|
├── ❄️ flake.nix # Central entry point & dependency management
|
||||||
├── 🔐 secrets.nix # Encrypted secrets (git-crypt)
|
├── 🔐 secrets.nix # Encrypted secrets (git-crypt)
|
||||||
├── 🏠 hosts/ # System-level configurations
|
├── 🏠 hosts/ # System-level configurations
|
||||||
│ ├── x86/ # Intel/AMD 64-bit systems
|
|
||||||
│ └── arm/ # ARM64 systems
|
|
||||||
├── 👤 home/ # User environment configurations
|
├── 👤 home/ # User environment configurations
|
||||||
├── 📦 modules/ # Reusable configuration modules
|
├── 📦 modules/ # Reusable configuration modules
|
||||||
├── 🎨 overlays/ # Package customizations
|
├── 🎨 overlays/ # Package customizations
|
||||||
├── 📋 pkgs/ # Custom package definitions
|
├── 📋 pkgs/ # Custom package definitions
|
||||||
├── 🛠️ lib/ # Helper functions & utilities
|
└── 🛠️ lib/ # Helper functions & utilities
|
||||||
├── 🔧 iso/ # ISO build configurations
|
|
||||||
└── ⚙️ .github/workflows/ # CI/CD automation
|
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
@ -61,21 +57,16 @@ The heart of the configuration, managing:
|
||||||
```
|
```
|
||||||
hosts/global/
|
hosts/global/
|
||||||
├── core/ # Essential base settings
|
├── core/ # Essential base settings
|
||||||
│ ├── default.nix # Core system imports & Nix configuration
|
|
||||||
│ ├── fonts.nix # Font management
|
│ ├── fonts.nix # Font management
|
||||||
│ ├── networking.nix # Network configuration
|
│ ├── networking.nix # Network configuration
|
||||||
│ ├── ssh.nix # SSH server setup
|
│ ├── ssh.nix # SSH server setup
|
||||||
│ └── user.nix # User account setup & Home Manager integration
|
│ └── user.nix # User account setup
|
||||||
└── common/ # Optional system features
|
└── common/ # Optional system features
|
||||||
├── audio.nix # PipeWire audio stack
|
├── audio.nix # PipeWire audio stack
|
||||||
├── gaming.nix # Steam, GameMode, hardware optimizations
|
├── gaming.nix # Steam, GameMode, hardware optimizations
|
||||||
├── gnome.nix # GNOME desktop environment
|
├── gnome.nix # GNOME desktop environment
|
||||||
├── docker.nix # Docker setup with update-containers script
|
├── docker.nix # Docker setup
|
||||||
├── libvirt.nix # VM tools and management
|
└── libvirt.nix # VM tools and management
|
||||||
├── warp.nix # Cloudflare WARP VPN support
|
|
||||||
└── system/
|
|
||||||
├── pool.nix # NFS pool mounting & symlink management
|
|
||||||
└── lxc.nix # Central hardware configuration for LXC hosts
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### **Host-Specific Configurations**
|
### **Host-Specific Configurations**
|
||||||
|
@ -86,18 +77,17 @@ Each system in `hosts/nixos/<hostname>/` contains:
|
||||||
|
|
||||||
#### 🖥️ **Current Hosts**
|
#### 🖥️ **Current Hosts**
|
||||||
|
|
||||||
| Host | Type | Purpose | Hardware | Services |
|
| Host | Type | Purpose | Hardware | Services |
|
||||||
| ---------- | ------------- | ---------------------- | --------------------------- | -------------------------------- |
|
| ---------- | ------------- | ---------------------- | --------------------------- | --------------------------------- |
|
||||||
| **rune** | Desktop | My workstation | Ryzen 9 7900X3D, RX 9070 XT | Gaming, Development, VMs |
|
| **rune** | Desktop | My workstation | Ryzen 9 7900X3D, RX 9070 XT | Gaming, Development, VMs |
|
||||||
| **gojo** | Desktop | Giovanni's workstation | Ryzen 7 7800X3D, RX 7900 XT | Gaming, Development |
|
| **gojo** | Desktop | Giovanni's workstation | Ryzen CPU, RX 6950 XT | Gaming, Development |
|
||||||
| **haze** | Desktop | Cesar's workstation | Ryzen 7, RX 6950 XT | Gaming, Development |
|
| **haze** | Desktop | Cesar's workstation | Ryzen 7, RX 6950 XT | Gaming, Development |
|
||||||
| **caenus** | Server | Oracle VPS | ARM 4vCPU, 24GB RAM, 200GB | FRP, Public IP |
|
| **sock** | Server | Backup & Storage | Intel N150 | WIP; Hosted on Firewall |
|
||||||
| **sock** | Server | Backup & Storage | Intel N150 | Komodo (Docker), Backups, Newt |
|
| **cloud** | LXC Container | Storage & NFS | 4C/4GB | File storage, NFS server, Backups |
|
||||||
| **cloud** | LXC Container | Storage & NFS | 4C/4GB | File storage, NFS, Newt |
|
| **komodo** | LXC Container | Docker orchestration | 12C/30GB | Authentik, Komodo, Web services |
|
||||||
| **komodo** | LXC Container | Docker orchestration | 12C/30GB | Authentik, Komodo (Docker), Newt |
|
| **proxy** | LXC Container | Network proxy | 3C/2GB | Cloudflare tunnels, Caddy |
|
||||||
| **proxy** | LXC Container | Network proxy | 3C/2GB | Pangolin, AdGuard, Newt |
|
| **nix** | LXC Container | Development server | 10C/12GB | Remote development, VSCode server |
|
||||||
| **nix** | LXC Container | Development server | 10C/12GB | **Not Deployed ATM** |
|
| **vm** | VM | Testing environment | Variable | System testing |
|
||||||
| **vm** | VM | Testing environment | Variable | System testing |
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -113,11 +103,8 @@ home/global/
|
||||||
│ └── ssh.nix # SSH client configuration
|
│ └── ssh.nix # SSH client configuration
|
||||||
└── common/ # Optional user applications
|
└── common/ # Optional user applications
|
||||||
├── gaming/ # Gaming tools & emulator backups
|
├── gaming/ # Gaming tools & emulator backups
|
||||||
│ └── switch.nix # Nintendo Switch emulator with Borg backups
|
|
||||||
├── gnome/ # GNOME-specific programs & settings
|
├── gnome/ # GNOME-specific programs & settings
|
||||||
│ └── dconf.nix # Enhanced PaperWM & extension configs
|
|
||||||
├── vscode/ # VS Code with patched SSH
|
├── vscode/ # VS Code with patched SSH
|
||||||
├── xdg.nix # XDG directory & file associations
|
|
||||||
└── zen.nix # Zen browser configuration
|
└── zen.nix # Zen browser configuration
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -177,9 +164,14 @@ Each user in `home/users/<username>/` includes:
|
||||||
- **Curated Applications**: Includes configurations for applications like the Zen browser and VS Code.
|
- **Curated Applications**: Includes configurations for applications like the Zen browser and VS Code.
|
||||||
- **XDG & Mime Associations**: Sensible default applications configured via `xdg.mimeApps`, using `handlr-regex` for flexibility.
|
- **XDG & Mime Associations**: Sensible default applications configured via `xdg.mimeApps`, using `handlr-regex` for flexibility.
|
||||||
|
|
||||||
|
### **🐳 Container Management**
|
||||||
|
- **Komodo Integration**: Docker stack management through web UI
|
||||||
|
- **Service Definitions**: Authentik SSO, Caddy reverse proxy, various applications
|
||||||
|
- **compose2nix**: Docker Compose files converted to NixOS modules
|
||||||
|
|
||||||
### **🐳 Advanced Container Management**
|
### **🐳 Advanced Container Management**
|
||||||
- **Docker Orchestration**: Komodo provides a web UI for managing Docker stacks.
|
- **Docker Orchestration**: Komodo provides a web UI for managing Docker stacks.
|
||||||
- **Key Services**: Pre-defined declarative configurations for services like Authentik (SSO) and Pangolin (reverse proxy).
|
- **Key Services**: Pre-defined declarative configurations for services like Authentik (SSO) and Caddy (reverse proxy).
|
||||||
- **Declarative Stacks**: `compose2nix` is used to convert Docker Compose files into NixOS declarative modules for services like FileRun, Authentik, etc.
|
- **Declarative Stacks**: `compose2nix` is used to convert Docker Compose files into NixOS declarative modules for services like FileRun, Authentik, etc.
|
||||||
|
|
||||||
### **🔐 Integrated Security**
|
### **🔐 Integrated Security**
|
||||||
|
@ -198,12 +190,12 @@ For setting up a new system (in NixOS) with this configuration:
|
||||||
|
|
||||||
#### **1. Clone Configuration Repository**
|
#### **1. Clone Configuration Repository**
|
||||||
```bash
|
```bash
|
||||||
# Enter development shell with necessary tools for installation
|
# Get yay.nix temporarily for installation
|
||||||
nix develop github:TophC7/dot.nix --extra-experimental-features "flakes nix-command"
|
nix shell github:Tophc7/yay.nix --extra-experimental-features flakes --extra-experimental-features nix-command --no-write-lock-file
|
||||||
|
|
||||||
# Clone the configuration repository using yay try
|
# Clone the configuration repository using yay try
|
||||||
FLAKE=~/Documents/dot.nix
|
yay try git git-crypt micro
|
||||||
cd ~/Documents
|
cd ~/Documents/
|
||||||
git clone https://github.com/tophc7/dot.nix
|
git clone https://github.com/tophc7/dot.nix
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -213,53 +205,22 @@ cd ~/Documents/dot.nix
|
||||||
git-crypt unlock <<path/to/symmetric.key>> # Or use GPG key
|
git-crypt unlock <<path/to/symmetric.key>> # Or use GPG key
|
||||||
```
|
```
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><b>Setup Your Own Secrets</b></summary>
|
|
||||||
|
|
||||||
Since you won't have access to the encrypted secrets, create your own:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd ~/Documents/dot.nix
|
|
||||||
|
|
||||||
# Copy the example and customize it
|
|
||||||
cp lib/public/secrets.example.nix secrets.nix
|
|
||||||
|
|
||||||
# Edit with your credentials, SSH keys, etc.
|
|
||||||
micro secrets.nix
|
|
||||||
|
|
||||||
# Initialize git-crypt for your secrets
|
|
||||||
git-crypt init
|
|
||||||
git-crypt add-gpg-user YOUR_GPG_KEY_ID
|
|
||||||
```
|
|
||||||
|
|
||||||
After setting up your secrets, encrypt the file:
|
|
||||||
```bash
|
|
||||||
git add secrets.nix
|
|
||||||
git-crypt lock
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
#### **3. Configure Hardware Settings**
|
#### **3. Configure Hardware Settings**
|
||||||
1. Compare hardware configurations:
|
1. **Compare hardware configurations:**
|
||||||
```bash
|
```bash
|
||||||
# Note: path structure (hosts/x86/ or hosts/arm/)
|
micro ~/Documents/dot.nix/hosts/nixos/gojo/hardware.nix
|
||||||
micro ~/Documents/dot.nix/hosts/x86/gojo/hardware.nix
|
|
||||||
micro /etc/nixos/hardware-configuration.nix
|
micro /etc/nixos/hardware-configuration.nix
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Update hardware.nix with the `fileSystems` and `swapDevices` from the generated `/etc/nixos/hardware-configuration.nix`
|
2. **Update hardware.nix** with the `fileSystems` and `swapDevices` from the generated `/etc/nixos/hardware-configuration.nix`
|
||||||
|
|
||||||
#### **4. Install Configuration (TTY Recommended)**
|
#### **4. Install Configuration (TTY)**
|
||||||
1. Switch to TTY: `Ctrl+Alt+F2` (to avoid desktop service conflicts)
|
1. **Switch to TTY**: `Ctrl+Alt+F2`
|
||||||
2. Login to TTY
|
2. **Login to TTY**
|
||||||
3. Rebuild system:
|
3. **Rebuild system:**
|
||||||
```bash
|
```bash
|
||||||
# Enter development shell again with necessary tools for installation
|
nix shell github:Tophc7/yay.nix --extra-experimental-features flakes --extra-experimental-features nix-command --no-write-lock-file
|
||||||
nix develop github:TophC7/dot.nix --extra-experimental-features "flakes nix-command"
|
yay rebuild -H gojo -p ~/Documents/dot.nix -e
|
||||||
|
|
||||||
# Rebuild with your host configuration
|
|
||||||
yay rebuild -H your-hostname -p ~/Documents/dot.nix
|
|
||||||
sudo reboot -f
|
sudo reboot -f
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -296,27 +257,6 @@ yay untar myfiles.tar.zst
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🔧 ISO Generation
|
|
||||||
|
|
||||||
### **Automated Build System**
|
|
||||||
- **GitHub Actions**: CI/CD pipeline for ISO releases
|
|
||||||
- **Variants**: Server (minimal) and Desktop (GNOME) ISOs
|
|
||||||
- **Architectures**: x86_64 and aarch64 support with optimized builds
|
|
||||||
- **Cross-compilation**: ARM ISOs can be built on x86_64 systems
|
|
||||||
- **Distribution**: Automatic releases with artifact uploads (X86 only)
|
|
||||||
|
|
||||||
### **Local Building**
|
|
||||||
```bash
|
|
||||||
# Build locally
|
|
||||||
cd iso
|
|
||||||
nix build .#server-iso-x86
|
|
||||||
nix build .#desktop-iso-arm
|
|
||||||
|
|
||||||
# Cross-compile ARM ISOs on x86_64 systems
|
|
||||||
nix build .#server-iso-arm --system x86_64-linux --extra-platforms aarch64-linux
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
## 📚 Development Philosophy
|
## 📚 Development Philosophy
|
||||||
|
|
||||||
### **Modularity**
|
### **Modularity**
|
||||||
|
@ -346,38 +286,28 @@ nix build .#server-iso-arm --system x86_64-linux --extra-platforms aarch64-linux
|
||||||
| **Virtualization** | libvirt, QEMU, LXC |
|
| **Virtualization** | libvirt, QEMU, LXC |
|
||||||
| **Storage** | MergerFS, SnapRAID, BorgBackup, NFS, `inotify-tools` |
|
| **Storage** | MergerFS, SnapRAID, BorgBackup, NFS, `inotify-tools` |
|
||||||
| **Containers** | Docker, Komodo, compose2nix |
|
| **Containers** | Docker, Komodo, compose2nix |
|
||||||
| **Networking** | Newt, Pangolin, AdGuard Home, Cloudflare WARP |
|
| **Security** | git-crypt, ACME, Cloudflare Tunnels |
|
||||||
| **Reverse Proxy** | Traefik (via Pangolin) |
|
|
||||||
| **Security** | git-crypt, ACME, Zero Trust tunneling |
|
|
||||||
| **Development** | VS Code (Patched SSH), `nixfmt`, `biome` |
|
| **Development** | VS Code (Patched SSH), `nixfmt`, `biome` |
|
||||||
| **Gaming** | Steam, Proton, GameScope, GameMode, `lact` |
|
| **Gaming** | Steam, Proton, GameScope, GameMode, `lact` |
|
||||||
| **Monitoring** | Apprise notifications, systemd timers |
|
| **Monitoring** | Apprise notifications, systemd timers |
|
||||||
| **CI/CD** | GitHub Actions, Automated ISO builds |
|
|
||||||
|
|
||||||
---9;ulj]
|
---
|
||||||
|
|
||||||
## 📝 Quick Reference
|
## 📝 Quick Reference
|
||||||
|
|
||||||
### **Key Configuration Files**
|
### **Directory Structure**
|
||||||
|
- `hosts/nixos/<name>/` - System configurations
|
||||||
|
- `home/users/<name>/` - User environments
|
||||||
|
- `home/hosts/<name>/` - Host-specific user overrides
|
||||||
|
- `modules/global/` - Shared specifications
|
||||||
|
- `pkgs/` - Custom packages
|
||||||
- `secrets.nix` - Encrypted secrets (git-crypt)
|
- `secrets.nix` - Encrypted secrets (git-crypt)
|
||||||
|
|
||||||
|
### **Key Files**
|
||||||
|
- `flake.nix` - Dependency management & outputs
|
||||||
|
- `shell.nix` - Recovery environment
|
||||||
- `modules/global/host-spec.nix` - Host attribute definitions
|
- `modules/global/host-spec.nix` - Host attribute definitions
|
||||||
- `modules/global/secret-spec.nix` - Secret structure definitions
|
- `modules/global/secret-spec.nix` - Secret structure definitions
|
||||||
- `modules/nixos/newt.nix` - Newt tunneling service module
|
|
||||||
- `flake.nix` - Main dependency management & host discovery
|
|
||||||
- `iso/flake.nix` - ISO generation configuration
|
|
||||||
|
|
||||||
### **Frequently Modified Directories**
|
|
||||||
- `home/users/<name>/` - Individual user configurations
|
|
||||||
- `home/global/` - Shared user settings & applications
|
|
||||||
- `hosts/global/` - System-wide shared configurations
|
|
||||||
- `hosts/{x86,arm}/<name>/` - Host-specific system configs
|
|
||||||
- `home/hosts/<name>/` - Host-specific user overrides
|
|
||||||
- `pkgs/` - Custom package definitions
|
|
||||||
|
|
||||||
### **Development Workflow**
|
|
||||||
- `shell.nix` - Recovery environment for troubleshooting
|
|
||||||
- `.github/workflows/` - CI/CD for ISO builds
|
|
||||||
- `iso/` - ISO build system (separate flake)
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue