Compare commits
79 Commits
88df4eef88
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24fab1402b | ||
|
|
5e7bb9c986 | ||
|
|
0dda14266d | ||
|
|
0b1924359e | ||
|
|
7dcb0df9b8 | ||
|
|
ec543d6c5d | ||
|
|
224edeb402 | ||
|
|
85a130d868 | ||
|
|
2347c002d8 | ||
|
|
7e9a64023f | ||
|
|
630c087308 | ||
|
|
452e287fb0 | ||
|
|
97434671a9 | ||
|
|
dcfe921975 | ||
|
|
0e8d262b4a | ||
|
|
25db631be3 | ||
|
|
19ee636814 | ||
|
|
1c8f908375 | ||
|
|
cebf1c9052 | ||
|
|
ddb42b131a | ||
|
|
0f6ee21a35 | ||
|
|
1e3e314411 | ||
|
|
96c927c0db | ||
|
|
e53c1d2f25 | ||
|
|
9542689024 | ||
|
|
a9616c8564 | ||
|
|
f9970ce3af | ||
|
|
bd889f3a5e | ||
|
|
a8ece6cf19 | ||
|
|
6a04621728 | ||
|
|
18d18ff693 | ||
|
|
b555cbe0af | ||
|
|
d414e862f5 | ||
|
|
eadb0c45ce | ||
|
|
f1d8ea6069 | ||
|
|
b5399c5cc8 | ||
|
|
58594d582b | ||
|
|
3a8e182170 | ||
|
|
106eccf350 | ||
|
|
2f870f4f2e | ||
|
|
a99cc07124 | ||
|
|
819c444daf | ||
|
|
d8f045d69e | ||
|
|
2721c696d0 | ||
|
|
682531cff4 | ||
|
|
2ff867e6b6 | ||
|
|
2ce14b1c70 | ||
|
|
f653079816 | ||
|
|
f952623634 | ||
|
|
63720605a0 | ||
|
|
86a6dc481d | ||
|
|
49ef43cf25 | ||
|
|
1a42c54678 | ||
|
|
4edb4e5535 | ||
|
|
1f5664502c | ||
|
|
971d5ebb76 | ||
|
|
bbe44afe28 | ||
|
|
ca194088ae | ||
|
|
d301d3fd98 | ||
|
|
ba648817a3 | ||
|
|
43fb59184c | ||
|
|
c32e7a81f8 | ||
|
|
d93952b272 | ||
|
|
21e2463822 | ||
|
|
fb3af7f9fa | ||
|
|
0f77e228b0 | ||
|
|
bf5077a437 | ||
|
|
64380acf01 | ||
|
|
e68b9ca00a | ||
|
|
6b53bd8dc3 | ||
|
|
57317446da | ||
|
|
209cbf4cbb | ||
|
|
c0c6de8a45 | ||
|
|
4c54d131af | ||
|
|
782b040ee6 | ||
|
|
cf8314dbd0 | ||
|
|
e521076313 | ||
|
|
b8036c00ec | ||
|
|
d1959bdd8f |
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
@@ -1,215 +0,0 @@
|
|||||||
# Device Architecture Overview
|
|
||||||
|
|
||||||
This document provides a comprehensive overview of all devices managed by this NixOS/nix-darwin dotfiles repository.
|
|
||||||
|
|
||||||
> **Visual Diagram**: See [assets/devices-diagram.svg](assets/devices-diagram.svg) for a visual representation of this architecture.
|
|
||||||
|
|
||||||
## Device Categories
|
|
||||||
|
|
||||||
### 🖥️ Server Infrastructure (Headless)
|
|
||||||
|
|
||||||
#### mirai (Main Server)
|
|
||||||
- **Architecture**: x86_64-linux
|
|
||||||
- **User**: fs0c131y
|
|
||||||
- **Role**: Primary server hosting various services
|
|
||||||
- **Configuration**: NixOS + Home Manager
|
|
||||||
- **Hardware**: AMD CPU with NVME storage
|
|
||||||
- **Location**: Local network
|
|
||||||
- **Services**:
|
|
||||||
- Nextcloud (file storage and sync)
|
|
||||||
- Gitea (Git hosting)
|
|
||||||
- Minecraft server
|
|
||||||
- Immich (photo management)
|
|
||||||
- Paperless (document management)
|
|
||||||
- Tailscale VPN node
|
|
||||||
- ZeroTier network node
|
|
||||||
- Atuin (shell history sync)
|
|
||||||
- LLDAP (LDAP server)
|
|
||||||
- Navidrome (music streaming)
|
|
||||||
- Searxng (search engine)
|
|
||||||
- Syncthing
|
|
||||||
- And many more services
|
|
||||||
|
|
||||||
#### deoxys (VM Server)
|
|
||||||
- **Architecture**: x86_64-linux
|
|
||||||
- **User**: servius
|
|
||||||
- **Role**: Virtual machine server for testing and isolation
|
|
||||||
- **Configuration**: NixOS + Home Manager
|
|
||||||
- **Location**: Local network
|
|
||||||
|
|
||||||
#### tsuba (Raspberry Pi)
|
|
||||||
- **Architecture**: aarch64-linux
|
|
||||||
- **User**: servius
|
|
||||||
- **Role**: ARM-based server for lightweight services
|
|
||||||
- **Configuration**: NixOS + Home Manager (using stable channel)
|
|
||||||
- **Hardware**: Raspberry Pi
|
|
||||||
- **Access**: External via tsuba.darksailor.dev
|
|
||||||
- **Special**: Uses nixos-raspberrypi input for hardware support
|
|
||||||
|
|
||||||
### 💻 Development Workstations
|
|
||||||
|
|
||||||
#### ryu (Main Desktop)
|
|
||||||
- **Architecture**: x86_64-linux
|
|
||||||
- **User**: servius
|
|
||||||
- **Role**: Primary development workstation
|
|
||||||
- **Configuration**: NixOS + Home Manager
|
|
||||||
- **Desktop Environment**: Hyprland (primary) + GNOME (fallback)
|
|
||||||
- **Features**:
|
|
||||||
- Multi-monitor setup:
|
|
||||||
- Primary: HDMI-A-1 (Gigabyte FO27Q3)
|
|
||||||
- Secondary: DP-3 (Acer XV272U)
|
|
||||||
- Tertiary: DP-1 (Gigabyte M27Q)
|
|
||||||
- Audio production setup (musnix)
|
|
||||||
- Gaming support (Wine, Steam)
|
|
||||||
- Virtualization (virt-manager)
|
|
||||||
- Hardware acceleration (CUDA support)
|
|
||||||
- Secure boot with Lanzaboote
|
|
||||||
- TPM2 support
|
|
||||||
|
|
||||||
#### shiro (Mac Mini)
|
|
||||||
- **Architecture**: aarch64-darwin (Apple Silicon)
|
|
||||||
- **User**: servius
|
|
||||||
- **Role**: macOS desktop and build server
|
|
||||||
- **Configuration**: nix-darwin + Home Manager
|
|
||||||
- **Features**:
|
|
||||||
- ARM64 build server for distributed builds
|
|
||||||
- Samba file sharing
|
|
||||||
- Colima container runtime
|
|
||||||
- Aerospace window management
|
|
||||||
|
|
||||||
### 📱 Portable/Mobile Devices
|
|
||||||
|
|
||||||
#### kuro (MacBook)
|
|
||||||
- **Architecture**: aarch64-darwin (Apple Silicon)
|
|
||||||
- **User**: fs0c131y
|
|
||||||
- **Role**: macOS development machine
|
|
||||||
- **Configuration**: nix-darwin + Home Manager
|
|
||||||
- **Features**:
|
|
||||||
- Touch ID for sudo authentication
|
|
||||||
- Custom keyboard mappings
|
|
||||||
- Homebrew integration
|
|
||||||
|
|
||||||
#### SteamDeck (Gaming Handheld)
|
|
||||||
- **Architecture**: x86_64-linux
|
|
||||||
- **User**: deck
|
|
||||||
- **Role**: Portable gaming device
|
|
||||||
- **Configuration**: Home Manager only (no NixOS)
|
|
||||||
- **Special**: Uses SteamOS with Home Manager overlay
|
|
||||||
|
|
||||||
## Network Architecture
|
|
||||||
|
|
||||||
### VPN Networks
|
|
||||||
- **Tailscale**: Primary VPN connecting most devices
|
|
||||||
- Devices: mirai, deoxys, tsuba, deck
|
|
||||||
- **ZeroTier**: Secondary network layer
|
|
||||||
- Devices: mirai, ryu
|
|
||||||
|
|
||||||
### Local Network
|
|
||||||
- **Primary connection**: ryu (main desktop)
|
|
||||||
- **Wake-on-LAN**: Enabled for ryu (eno1 interface)
|
|
||||||
|
|
||||||
## Configuration Management
|
|
||||||
|
|
||||||
### NixOS Flake
|
|
||||||
- **Manages**: mirai, deoxys, tsuba, ryu
|
|
||||||
- **Features**: Unified configuration across Linux devices
|
|
||||||
- **Inputs**: Multiple flake inputs for extended functionality
|
|
||||||
|
|
||||||
### nix-darwin
|
|
||||||
- **Manages**: kuro, shiro
|
|
||||||
- **Features**: macOS system configuration
|
|
||||||
|
|
||||||
### Home Manager
|
|
||||||
- **Standalone**: deck (SteamDeck)
|
|
||||||
- **Integrated**: All other devices
|
|
||||||
- **Stable channel**: Used for tsuba
|
|
||||||
|
|
||||||
## Build Infrastructure
|
|
||||||
|
|
||||||
### Distributed Building
|
|
||||||
- **Build machines**:
|
|
||||||
- mirai (primary build server)
|
|
||||||
- shiro (macOS builds)
|
|
||||||
- tsuba (ARM builds, commented out)
|
|
||||||
- **Consumers**:
|
|
||||||
- ryu (uses remote builders)
|
|
||||||
- kuro (uses remote builders)
|
|
||||||
|
|
||||||
### Cache Strategy
|
|
||||||
- **Substituters**:
|
|
||||||
- nix-community.cachix.org
|
|
||||||
- nixos-raspberrypi.cachix.org (for ARM builds)
|
|
||||||
- **Build optimization**: Auto-optimise-store enabled
|
|
||||||
|
|
||||||
## Deployment Strategy
|
|
||||||
|
|
||||||
### SSH-based Deployment
|
|
||||||
Using deploy-rs for automated deployments:
|
|
||||||
|
|
||||||
```
|
|
||||||
ryu → mirai, deoxys, tsuba, deck
|
|
||||||
kuro → mirai, shiro
|
|
||||||
```
|
|
||||||
|
|
||||||
### Special Access
|
|
||||||
- **tsuba**: Accessed via external domain (tsuba.darksailor.dev)
|
|
||||||
- **All servers**: SSH key authentication with authorized_keys
|
|
||||||
|
|
||||||
## Hardware-Specific Features
|
|
||||||
|
|
||||||
### ryu (Desktop)
|
|
||||||
- **Graphics**: NVIDIA with CUDA support
|
|
||||||
- **Audio**: Professional audio setup with musnix
|
|
||||||
- **Input devices**: QMK keyboard support
|
|
||||||
- **Monitors**: DDC/CI control with ddcutil
|
|
||||||
- **Security**: TPM2, secure boot (Lanzaboote)
|
|
||||||
|
|
||||||
### mirai (Server)
|
|
||||||
- **CPU**: AMD with virtualization support
|
|
||||||
- **Storage**: Custom disk layout with disko
|
|
||||||
- **Containers**: Docker with custom mount points
|
|
||||||
- **Emulation**: aarch64-linux binfmt support
|
|
||||||
|
|
||||||
### macOS Devices (kuro - MacBook, shiro - Mac Mini)
|
|
||||||
- **Authentication**: Touch ID integration (kuro)
|
|
||||||
- **Keyboard**: Custom modifier key mappings
|
|
||||||
- **Package management**: Homebrew + Nix hybrid approach
|
|
||||||
- **Build server**: shiro provides ARM64 builds for the network
|
|
||||||
|
|
||||||
## Security Features
|
|
||||||
|
|
||||||
- **SOPS**: Secrets management across all devices
|
|
||||||
- **SSH keys**: Centralized key management
|
|
||||||
- **Fail2ban**: Enabled on mirai
|
|
||||||
- **Secure boot**: Implemented on ryu
|
|
||||||
- **TPM**: Hardware security on ryu
|
|
||||||
|
|
||||||
## Development Environment
|
|
||||||
|
|
||||||
### Shared Tools
|
|
||||||
- **Editor**: Nixvim (custom Neovim configuration)
|
|
||||||
- **Shell**: Fish + Nushell support
|
|
||||||
- **Terminal**: Various per-device preferences
|
|
||||||
- **Version control**: Git with shared configuration
|
|
||||||
|
|
||||||
### Language Support
|
|
||||||
- **Rust**: Custom overlay with latest toolchain
|
|
||||||
- **Python**: Python 3 with development tools
|
|
||||||
- **Nix**: Latest Nix with flakes enabled
|
|
||||||
- **Web**: Node.js and web development tools
|
|
||||||
|
|
||||||
## Monitoring and Observability
|
|
||||||
|
|
||||||
- **System metrics**: Collected across all NixOS devices
|
|
||||||
- **Shell history**: Synchronized via Atuin
|
|
||||||
- **File synchronization**: Syncthing for selective sync
|
|
||||||
|
|
||||||
## Backup and Data Management
|
|
||||||
|
|
||||||
- **Nextcloud**: Primary cloud storage on mirai
|
|
||||||
- **Syncthing**: Decentralized file sync
|
|
||||||
- **Git repositories**: Self-hosted on Gitea (mirai)
|
|
||||||
- **Photos**: Immich for photo management
|
|
||||||
- **Documents**: Paperless for document archival
|
|
||||||
|
|
||||||
This architecture provides a robust, scalable, and maintainable infrastructure for development, gaming, media consumption, and server hosting across multiple platforms and architectures.
|
|
||||||
264
README.md
264
README.md
@@ -1,259 +1,11 @@
|
|||||||
# Personal Dotfiles & NixOS Configuration
|
# Machines
|
||||||
|
|
||||||
A comprehensive, multi-platform dotfiles repository managing Linux, macOS, and specialized devices through Nix flakes, NixOS, nix-darwin, and Home Manager.
|
1. Ryu Dektop (Intel i9-14900KS / Nvidia 5090 / 64GB CL36@6000MTs)
|
||||||
|
|
||||||
## 📊 Architecture Overview
|
|
||||||
|
|
||||||
This repository manages **7 devices** across multiple platforms and architectures:
|
|
||||||
|
|
||||||
- **3 Servers**: mirai (main), deoxys (VM), tsuba (Raspberry Pi)
|
|
||||||
- **1 Workstation**: ryu (primary desktop)
|
|
||||||
- **3 Portable devices**: kuro (MacBook), SteamDeck, and 1 desktop Mac Mini (shiro)
|
|
||||||
|
|
||||||
> 📈 **Visual Architecture**: See [Device Architecture Diagram](assets/devices-diagram.svg) for a complete visual overview.
|
|
||||||
|
|
||||||
## 🖥️ Device Portfolio
|
|
||||||
|
|
||||||
### Server Infrastructure
|
|
||||||
| Device | Architecture | Role | Services |
|
|
||||||
|--------|-------------|------|----------|
|
|
||||||
| **mirai** | x86_64-linux | Main Server | Nextcloud, Gitea, Minecraft, Immich, Paperless, +20 more |
|
|
||||||
| **deoxys** | x86_64-linux | VM Server | Testing & isolation environment |
|
|
||||||
| **tsuba** | aarch64-linux | Raspberry Pi | ARM-based lightweight services |
|
|
||||||
|
|
||||||
### Development Environment
|
|
||||||
| Device | Architecture | Setup | Features |
|
|
||||||
|--------|-------------|-------|----------|
|
|
||||||
| **ryu** | x86_64-linux | Main Desktop | Hyprland+GNOME, 3-monitor setup, gaming, audio production |
|
|
||||||
| **shiro** | aarch64-darwin | Mac Mini Desktop | nix-darwin + Home Manager, build server |
|
|
||||||
|
|
||||||
### Portable Devices
|
|
||||||
| Device | Architecture | Platform | Configuration |
|
|
||||||
|--------|-------------|----------|---------------|
|
|
||||||
| **kuro** | aarch64-darwin | MacBook | nix-darwin + Home Manager |
|
|
||||||
| **SteamDeck** | x86_64-linux | SteamOS | Home Manager only |
|
|
||||||
|
|
||||||
## 🚀 Quick Start
|
|
||||||
|
|
||||||
### Prerequisites
|
|
||||||
```bash
|
|
||||||
# Install Nix with flakes support
|
|
||||||
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
|
|
||||||
```
|
```
|
||||||
|
deploy -s .#ryu
|
||||||
### Installation
|
|
||||||
|
|
||||||
#### NixOS (Linux)
|
|
||||||
```bash
|
|
||||||
sudo nixos-rebuild switch --flake .#<device-name>
|
|
||||||
```
|
```
|
||||||
|
2. Mirai Server (AMD Ryzen 7 7700 / 64GB@5200MHz)
|
||||||
#### macOS (nix-darwin)
|
3. Tako Server (Intel Xeon E-2236 / 64GB)
|
||||||
```bash
|
4. Tsuba Server (Raspberry Pi 5 / 8GB)
|
||||||
nix run nix-darwin -- switch --flake .#<device-name>
|
5. Kuro Laptop (Apple M4 Pro macbook / 24GB)
|
||||||
```
|
6. Shiro Desktop (Apple M4 macmini / 16GB)
|
||||||
|
|
||||||
#### Home Manager only (SteamDeck)
|
|
||||||
```bash
|
|
||||||
nix run home-manager/master -- switch --flake .#deck
|
|
||||||
```
|
|
||||||
|
|
||||||
### Available Devices
|
|
||||||
- `mirai` - Main server
|
|
||||||
- `ryu` - Primary desktop
|
|
||||||
- `deoxys` - VM server
|
|
||||||
- `tsuba` - Raspberry Pi
|
|
||||||
- `kuro` - MacBook (fs0c131y)
|
|
||||||
- `shiro` - MacBook (servius)
|
|
||||||
- `deck` - SteamDeck
|
|
||||||
|
|
||||||
## 🛠️ Development Tools
|
|
||||||
|
|
||||||
### Using Just (Recommended)
|
|
||||||
```bash
|
|
||||||
# Install on current system
|
|
||||||
just install
|
|
||||||
|
|
||||||
# Build without switching
|
|
||||||
just build
|
|
||||||
|
|
||||||
# Try Neovim configuration
|
|
||||||
just nvim
|
|
||||||
|
|
||||||
# Home Manager for non-NixOS
|
|
||||||
just home
|
|
||||||
```
|
|
||||||
|
|
||||||
### Core Technologies
|
|
||||||
- **OS**: NixOS, macOS, SteamOS
|
|
||||||
- **Shells**: Fish (primary), Nushell
|
|
||||||
- **Editor**: Neovim with custom nixvim configuration
|
|
||||||
- **Desktop**: Hyprland (Linux), Yabai + Aerospace (macOS)
|
|
||||||
- **Terminals**: Foot, Wezterm, Kitty
|
|
||||||
- **Package Management**: Nix Flakes with distributed building
|
|
||||||
|
|
||||||
## 🎯 Key Features
|
|
||||||
|
|
||||||
### 🔧 Multi-Platform Configuration Management
|
|
||||||
- **NixOS**: Complete system configuration for servers and workstations
|
|
||||||
- **nix-darwin**: macOS system management with Homebrew integration
|
|
||||||
- **Home Manager**: User environment configuration across all platforms
|
|
||||||
|
|
||||||
### 🌐 Network Infrastructure
|
|
||||||
- **Tailscale VPN**: Secure mesh networking across all devices
|
|
||||||
- **ZeroTier**: Secondary network layer for specific services
|
|
||||||
- **SSH Deployment**: Automated deployment via deploy-rs
|
|
||||||
|
|
||||||
### ⚡ Development Environment
|
|
||||||
- **Nixvim**: Custom Neovim configuration with LSP, tree-sitter, and plugins
|
|
||||||
- **Multi-monitor support**: Professional 3-monitor setup on ryu
|
|
||||||
- **Cross-compilation**: ARM64 and x86_64 support with distributed builds
|
|
||||||
|
|
||||||
### 🔒 Security & Secrets Management
|
|
||||||
- **SOPS**: Encrypted secrets management across all devices
|
|
||||||
- **SSH Keys**: Centralized key distribution
|
|
||||||
- **Secure Boot**: Lanzaboote implementation on ryu
|
|
||||||
- **TPM Support**: Hardware security module integration
|
|
||||||
|
|
||||||
### 🏗️ Build Infrastructure
|
|
||||||
- **Distributed Building**: mirai, shiro as build servers
|
|
||||||
- **Binary Caches**: nix-community and custom caches
|
|
||||||
- **Cross-platform**: ARM64 and x86_64 builds
|
|
||||||
|
|
||||||
## 📦 Self-Hosted Services (mirai)
|
|
||||||
|
|
||||||
### Core Services
|
|
||||||
- **Nextcloud**: File storage and synchronization
|
|
||||||
- **Gitea**: Self-hosted Git server
|
|
||||||
|
|
||||||
- **Immich**: Photo management and AI-powered search
|
|
||||||
- **Paperless**: Document management and OCR
|
|
||||||
|
|
||||||
### Development Tools
|
|
||||||
- **Atuin**: Shell history synchronization
|
|
||||||
- **LLDAP**: Lightweight LDAP server
|
|
||||||
- **VS Code Server**: Remote development environment
|
|
||||||
|
|
||||||
### Entertainment & Media
|
|
||||||
- **Minecraft Server**: Gaming server
|
|
||||||
- **Navidrome**: Music streaming server
|
|
||||||
- **Polaris**: Alternative music server
|
|
||||||
|
|
||||||
### Networking & Security
|
|
||||||
- **Tailscale**: VPN coordination node
|
|
||||||
- **ZeroTier**: Network management
|
|
||||||
- **Fail2ban**: Intrusion prevention
|
|
||||||
- **Caddy**: Reverse proxy and SSL termination
|
|
||||||
|
|
||||||
## 🎮 Gaming & Entertainment
|
|
||||||
|
|
||||||
### Gaming Setup (ryu)
|
|
||||||
- **Steam**: Native Linux gaming
|
|
||||||
- **Wine/Proton**: Windows game compatibility
|
|
||||||
- **Controller support**: Multiple gamepad configurations
|
|
||||||
- **Performance**: NVIDIA GPU with CUDA support
|
|
||||||
|
|
||||||
### Audio Production
|
|
||||||
- **Musnix**: Real-time audio kernel optimization
|
|
||||||
- **Professional audio**: Low-latency audio pipeline
|
|
||||||
- **Hardware support**: Audio interfaces and MIDI controllers
|
|
||||||
|
|
||||||
## 📱 Portable Configuration
|
|
||||||
|
|
||||||
### macOS Features (kuro - MacBook, shiro - Mac Mini)
|
|
||||||
- **Touch ID**: Sudo authentication integration (kuro)
|
|
||||||
- **Keyboard remapping**: Custom modifier key layouts
|
|
||||||
- **Aerospace/Yabai**: Tiling window management
|
|
||||||
- **Homebrew**: Package management for macOS-specific applications
|
|
||||||
- **Build server**: shiro serves as ARM64 build machine
|
|
||||||
|
|
||||||
### SteamDeck Integration
|
|
||||||
- **Home Manager**: User environment without system changes
|
|
||||||
- **Tailscale**: VPN connectivity for remote access
|
|
||||||
- **Development tools**: Portable development environment
|
|
||||||
|
|
||||||
## 🔄 Deployment & Management
|
|
||||||
|
|
||||||
### Automated Deployment
|
|
||||||
```bash
|
|
||||||
# Deploy to all servers from ryu
|
|
||||||
deploy .
|
|
||||||
|
|
||||||
# Deploy specific device
|
|
||||||
deploy .#mirai
|
|
||||||
```
|
|
||||||
|
|
||||||
### Build Management
|
|
||||||
- **Local builds**: Fast builds on powerful workstations
|
|
||||||
- **Remote builds**: Offload to build servers for efficiency
|
|
||||||
- **Binary caches**: Minimize rebuild times across devices
|
|
||||||
|
|
||||||
### Configuration Updates
|
|
||||||
- **Git-based**: All configurations version controlled
|
|
||||||
- **Atomic updates**: Rollback capability for all changes
|
|
||||||
- **Testing**: Safe deployment with easy rollback
|
|
||||||
|
|
||||||
## 📚 Try My Configurations
|
|
||||||
|
|
||||||
### Neovim Configuration
|
|
||||||
```bash
|
|
||||||
# Try my Neovim setup without installation
|
|
||||||
nix run github:uttarayan21/dotfiles#neovim
|
|
||||||
```
|
|
||||||
|
|
||||||
### Standalone Packages
|
|
||||||
The flake provides packages for:
|
|
||||||
- Custom Neovim configuration
|
|
||||||
- Development shells with tools
|
|
||||||
- Custom applications and scripts
|
|
||||||
|
|
||||||
## 🛡️ Security Practices
|
|
||||||
|
|
||||||
- **Encrypted secrets**: All sensitive data managed via SOPS
|
|
||||||
- **SSH hardening**: Key-based authentication only
|
|
||||||
- **Network segmentation**: VPN-based access control
|
|
||||||
- **Regular updates**: Automated security updates via Nix channels
|
|
||||||
- **Hardware security**: TPM and secure boot where available
|
|
||||||
|
|
||||||
## 📖 Documentation
|
|
||||||
|
|
||||||
- **[Device Architecture](DEVICE_ARCHITECTURE.md)**: Detailed device specifications and relationships
|
|
||||||
- **[Visual Diagram](assets/devices-diagram.svg)**: Complete infrastructure overview
|
|
||||||
- **Module documentation**: Inline documentation for custom Nix modules
|
|
||||||
|
|
||||||
## 🧰 Included Tools
|
|
||||||
|
|
||||||
### Command Line Utilities
|
|
||||||
| Tool | Purpose | Repository |
|
|
||||||
|------|---------|------------|
|
|
||||||
| `bat` | Enhanced cat with syntax highlighting | [sharkdp/bat](https://github.com/sharkdp/bat) |
|
|
||||||
| `dust` | Intuitive du replacement | [bootandy/dust](https://github.com/bootandy/dust) |
|
|
||||||
| `eza` | Modern ls replacement | [eza-community/eza](https://github.com/eza-community/eza) |
|
|
||||||
| `fd` | Simple, fast find alternative | [sharkdp/fd](https://github.com/sharkdp/fd) |
|
|
||||||
| `fzf` | Command-line fuzzy finder | [junegunn/fzf](https://github.com/junegunn/fzf) |
|
|
||||||
| `just` | Command runner | [casey/just](https://github.com/casey/just) |
|
|
||||||
| `ripgrep` | Fast text search | [BurntSushi/ripgrep](https://github.com/BurntSushi/ripgrep) |
|
|
||||||
| `starship` | Cross-shell prompt | [starship/starship](https://github.com/starship/starship) |
|
|
||||||
| `zoxide` | Smarter cd command | [ajeetdsouza/zoxide](https://github.com/ajeetdsouza/zoxide) |
|
|
||||||
|
|
||||||
### GUI Applications
|
|
||||||
- **Anyrun**: Application launcher for Hyprland
|
|
||||||
- **Hyprland**: Modern Wayland compositor
|
|
||||||
- **Ghostty**: GPU-accelerated terminal
|
|
||||||
- **Firefox**: Web browser with custom CSS
|
|
||||||
- **And many more...**
|
|
||||||
|
|
||||||
## 🤝 Contributing
|
|
||||||
|
|
||||||
This is a personal dotfiles repository, but feel free to:
|
|
||||||
- Use configurations as inspiration
|
|
||||||
- Report issues or suggest improvements
|
|
||||||
- Fork for your own use (please respect licenses)
|
|
||||||
|
|
||||||
## 📄 License
|
|
||||||
|
|
||||||
This repository contains configurations and scripts for personal use. Individual tools and applications maintain their respective licenses.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Infrastructure Status**: 7 devices managed • 20+ services hosted • Multi-platform deployment ready
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
# {
|
||||||
hostName = "sh.darksailor.dev";
|
# hostName = "mirai.darksailor.dev";
|
||||||
sshUser = "remotebuilder";
|
# sshUser = "remotebuilder";
|
||||||
systems = ["x86_64-linux" "aarch64-linux"];
|
# systems = ["x86_64-linux" "aarch64-linux"];
|
||||||
protocol = "ssh-ng";
|
# protocol = "ssh-ng";
|
||||||
supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"];
|
# supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"];
|
||||||
}
|
# }
|
||||||
|
|||||||
7
builders/tako.nix
Normal file
7
builders/tako.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
hostName = "tako.darksailor.dev";
|
||||||
|
sshUser = "remotebuilder";
|
||||||
|
systems = ["x86_64-linux" "aarch64-linux"];
|
||||||
|
protocol = "ssh-ng";
|
||||||
|
supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"];
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
device,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [./services ./homebrew.nix ./programs];
|
imports = [./services ./homebrew.nix ./programs];
|
||||||
@@ -12,7 +13,7 @@
|
|||||||
# ids.gids.nixbld = 30000;
|
# ids.gids.nixbld = 30000;
|
||||||
experimental-features = "nix-command flakes auto-allocate-uids";
|
experimental-features = "nix-command flakes auto-allocate-uids";
|
||||||
max-jobs = 8;
|
max-jobs = 8;
|
||||||
trusted-users = ["root" "fs0c131y"];
|
trusted-users = ["root" device.user];
|
||||||
substituters = [
|
substituters = [
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
# "https://sh.darksailor.dev"
|
# "https://sh.darksailor.dev"
|
||||||
@@ -29,7 +30,7 @@
|
|||||||
'';
|
'';
|
||||||
package = pkgs.nixVersions.latest;
|
package = pkgs.nixVersions.latest;
|
||||||
buildMachines = [
|
buildMachines = [
|
||||||
../../builders/mirai.nix
|
../../builders/tako.nix
|
||||||
../../builders/shiro.nix
|
../../builders/shiro.nix
|
||||||
];
|
];
|
||||||
distributedBuilds = true;
|
distributedBuilds = true;
|
||||||
@@ -58,7 +59,7 @@
|
|||||||
|
|
||||||
# services.nix-daemon.enable = true;
|
# services.nix-daemon.enable = true;
|
||||||
system.stateVersion = 5;
|
system.stateVersion = 5;
|
||||||
system.primaryUser = "fs0c131y";
|
system.primaryUser = device.user;
|
||||||
|
|
||||||
system.keyboard.enableKeyMapping = true;
|
system.keyboard.enableKeyMapping = true;
|
||||||
system.keyboard.remapCapsLockToControl = true;
|
system.keyboard.remapCapsLockToControl = true;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
# environment.systemPackages = with pkgs; [nix neovim];
|
# environment.systemPackages = with pkgs; [nix neovim];
|
||||||
nix = {
|
nix = {
|
||||||
enable = false;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = "nix-command flakes auto-allocate-uids";
|
experimental-features = "nix-command flakes auto-allocate-uids";
|
||||||
max-jobs = 8;
|
max-jobs = 8;
|
||||||
@@ -29,8 +29,8 @@
|
|||||||
'';
|
'';
|
||||||
package = pkgs.nixVersions.latest;
|
package = pkgs.nixVersions.latest;
|
||||||
buildMachines = [
|
buildMachines = [
|
||||||
../../builders/mirai.nix
|
../../builders/tako.nix
|
||||||
# ../../builders/shiro.nix
|
../../builders/shiro.nix
|
||||||
];
|
];
|
||||||
distributedBuilds = true;
|
distributedBuilds = true;
|
||||||
};
|
};
|
||||||
@@ -43,9 +43,9 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
users.users.remotebuilder = {
|
users.users.remotebuilder = {
|
||||||
name = "remotebuilder";
|
description = "User for Nix remote builds";
|
||||||
uid = 700;
|
uid = 700;
|
||||||
home = "/var/lib/remotebuilder";
|
# home = "/var/remotebuilder";
|
||||||
createHome = true;
|
createHome = true;
|
||||||
shell = "/bin/bash";
|
shell = "/bin/bash";
|
||||||
openssh.authorizedKeys.keyFiles = [
|
openssh.authorizedKeys.keyFiles = [
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
|
|
||||||
# services.nix-daemon.enable = true;
|
# services.nix-daemon.enable = true;
|
||||||
system.primaryUser = "servius";
|
system.primaryUser = "servius";
|
||||||
system.stateVersion = 4;
|
system.stateVersion = 5;
|
||||||
|
|
||||||
system.keyboard.enableKeyMapping = true;
|
system.keyboard.enableKeyMapping = true;
|
||||||
system.keyboard.remapCapsLockToControl = true;
|
system.keyboard.remapCapsLockToControl = true;
|
||||||
|
|||||||
@@ -6,14 +6,14 @@
|
|||||||
];
|
];
|
||||||
casks = [
|
casks = [
|
||||||
"docker"
|
"docker"
|
||||||
"librewolf"
|
|
||||||
"raycast"
|
"raycast"
|
||||||
"kunkun" # Soon
|
|
||||||
"lunar"
|
"lunar"
|
||||||
"virtual-desktop-streamer"
|
"virtual-desktop-streamer"
|
||||||
"kicad"
|
"kicad"
|
||||||
"shapr3d"
|
"shapr3d"
|
||||||
"orcaslicer"
|
"orcaslicer"
|
||||||
|
"zed"
|
||||||
|
"zen"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,31 +4,31 @@
|
|||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
sops = {
|
sops = {
|
||||||
secrets."hetzner/api_key".owner = config.services.caddy.user;
|
secrets."cloudflare/api_key".owner = config.services.caddy.user;
|
||||||
templates = {
|
templates = {
|
||||||
"HETZNER_API_KEY.env".content = ''
|
"CLOUDFLARE_API_KEY.env".content = ''
|
||||||
HETZNER_API_KEY=${config.sops.placeholder."hetzner/api_key"}
|
CLOUDFLARE_API_KEY=${config.sops.placeholder."cloudflare/api_key"}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
caddy = {
|
caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
environmentFile = config.sops.templates."HETZNER_API_KEY.env".path;
|
environmentFile = config.sops.templates."CLOUDFLARE_API_KEY.env".path;
|
||||||
globalConfig = ''
|
globalConfig = ''
|
||||||
debug
|
debug
|
||||||
'';
|
'';
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
(hetzner) {
|
(cloudflare) {
|
||||||
tls {
|
tls {
|
||||||
propagation_timeout -1
|
propagation_timeout -1
|
||||||
propagation_delay 120s
|
propagation_delay 120s
|
||||||
dns hetzner {env.HETZNER_API_KEY}
|
dns cloudflare {env.CLOUDFLARE_API_KEY}
|
||||||
resolvers 1.1.1.1
|
resolvers 1.1.1.1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
package = pkgs.caddyWithHetzner;
|
package = pkgs.caddyWithCloudflare;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
{...}: {
|
{...}: {
|
||||||
imports = [
|
imports = [
|
||||||
../../../modules/darwin/caddy
|
# ../../../modules/darwin/caddy
|
||||||
./yabai.nix
|
./yabai.nix
|
||||||
./skhd.nix
|
./skhd.nix
|
||||||
./tailscale.nix
|
./tailscale.nix
|
||||||
./autossh.nix
|
./autossh.nix
|
||||||
./caddy.nix
|
# ./caddy.nix
|
||||||
./sops.nix
|
./sops.nix
|
||||||
# ./lmstudio.nix
|
# ./lmstudio.nix
|
||||||
# ./colima.nix
|
# ./colima.nix
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{...}: {
|
{...}: {
|
||||||
services = {
|
services = {
|
||||||
caddy.virtualHosts."lmstudio.shiro.darksailor.dev" = ''
|
caddy.virtualHosts."lmstudio.shiro.darksailor.dev" = ''
|
||||||
import hetzner
|
import cloudflare
|
||||||
reverse_proxy localhost:1234
|
reverse_proxy localhost:1234
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
45
deploy.nix
45
deploy.nix
@@ -1,14 +1,15 @@
|
|||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
self,
|
self,
|
||||||
|
deploy-rs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
nodes = {
|
nodes = {
|
||||||
mirai = {
|
mirai = {
|
||||||
hostname = "mirai";
|
hostname = "mirai.darksailor.dev";
|
||||||
profiles.system = {
|
profiles.system = {
|
||||||
sshUser = "fs0c131y";
|
sshUser = "fs0c131y";
|
||||||
path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.mirai;
|
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.mirai;
|
||||||
user = "root";
|
user = "root";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -16,7 +17,7 @@
|
|||||||
hostname = "tsuba.darksailor.dev";
|
hostname = "tsuba.darksailor.dev";
|
||||||
profiles.system = {
|
profiles.system = {
|
||||||
sshUser = "servius";
|
sshUser = "servius";
|
||||||
path = inputs.deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.tsuba;
|
path = deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.tsuba;
|
||||||
user = "root";
|
user = "root";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -24,7 +25,15 @@
|
|||||||
hostname = "ryu";
|
hostname = "ryu";
|
||||||
profiles.system = {
|
profiles.system = {
|
||||||
sshUser = "servius";
|
sshUser = "servius";
|
||||||
path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.ryu;
|
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.ryu;
|
||||||
|
user = "root";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
tako = {
|
||||||
|
hostname = "tako.darksailor.dev";
|
||||||
|
profiles.system = {
|
||||||
|
sshUser = "servius";
|
||||||
|
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.tako;
|
||||||
user = "root";
|
user = "root";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -33,7 +42,7 @@
|
|||||||
interactiveSudo = true;
|
interactiveSudo = true;
|
||||||
profiles.system = {
|
profiles.system = {
|
||||||
sshUser = "fs0c131y";
|
sshUser = "fs0c131y";
|
||||||
path = inputs.deploy-rs.lib.aarch64-darwin.activate.darwin self.darwinConfigurations.kuro;
|
path = deploy-rs.lib.aarch64-darwin.activate.darwin self.darwinConfigurations.kuro;
|
||||||
user = "root";
|
user = "root";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -42,25 +51,17 @@
|
|||||||
interactiveSudo = true;
|
interactiveSudo = true;
|
||||||
profiles.system = {
|
profiles.system = {
|
||||||
sshUser = "servius";
|
sshUser = "servius";
|
||||||
path = inputs.deploy-rs.lib.aarch64-darwin.activate.darwin self.darwinConfigurations.shiro;
|
path = deploy-rs.lib.aarch64-darwin.activate.darwin self.darwinConfigurations.shiro;
|
||||||
user = "root";
|
user = "root";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
deoxys = {
|
# deck = {
|
||||||
hostname = "deoxys";
|
# hostname = "steamdeck";
|
||||||
profiles.system = {
|
# profiles.system = {
|
||||||
sshUser = "servius";
|
# sshUser = "deck";
|
||||||
path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.deoxys;
|
# path = deploy-rs.lib.x86_64-linux.activate.home-manager self.homeConfigurations.deck;
|
||||||
user = "root";
|
# user = "deck";
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
deck = {
|
|
||||||
hostname = "steamdeck";
|
|
||||||
profiles.system = {
|
|
||||||
sshUser = "deck";
|
|
||||||
path = inputs.deploy-rs.lib.x86_64-linux.activate.home-manager self.homeConfigurations.deck;
|
|
||||||
user = "deck";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
1708
flake.lock
generated
1708
flake.lock
generated
File diff suppressed because it is too large
Load Diff
90
flake.nix
90
flake.nix
@@ -3,23 +3,27 @@
|
|||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
nixpkgs-master.url = "github:nixos/nixpkgs/master";
|
nixpkgs-master.url = "github:nixos/nixpkgs/master";
|
||||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
disko = {
|
disko = {
|
||||||
url = "github:nix-community/disko/latest";
|
url = "github:nix-community/disko/latest";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager/release-25.11";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
stylix = {
|
stylix = {
|
||||||
url = "github:nix-community/stylix";
|
url = "github:nix-community/stylix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
stylix-stable = {
|
||||||
|
url = "github:nix-community/stylix/release-25.05";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||||
|
};
|
||||||
home-manager-stable = {
|
home-manager-stable = {
|
||||||
url = "github:nix-community/home-manager/release-25.05";
|
url = "github:nix-community/home-manager/release-25.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||||
};
|
};
|
||||||
nix-darwin = {
|
nix-darwin = {
|
||||||
url = "github:LnL7/nix-darwin";
|
url = "github:LnL7/nix-darwin";
|
||||||
@@ -30,7 +34,7 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
ironbar = {
|
ironbar = {
|
||||||
url = "github:da-x/ironbar/correct-gdk-monitor";
|
url = "github:JakeStanger/ironbar";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
lanzaboote = {
|
lanzaboote = {
|
||||||
@@ -39,7 +43,7 @@
|
|||||||
};
|
};
|
||||||
nixvim = {
|
nixvim = {
|
||||||
url = "github:nix-community/nixvim";
|
url = "github:nix-community/nixvim";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
# inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nix-index-database.url = "github:Mic92/nix-index-database";
|
nix-index-database.url = "github:Mic92/nix-index-database";
|
||||||
music-player = {
|
music-player = {
|
||||||
@@ -119,6 +123,10 @@
|
|||||||
url = "github:nushell/tree-sitter-nu";
|
url = "github:nushell/tree-sitter-nu";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
tree-sitter-pest = {
|
||||||
|
url = "github:pest-parser/tree-sitter-pest";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
navigator = {
|
navigator = {
|
||||||
url = "github:ray-x/navigator.lua";
|
url = "github:ray-x/navigator.lua";
|
||||||
flake = false;
|
flake = false;
|
||||||
@@ -154,7 +162,7 @@
|
|||||||
|
|
||||||
anyrun = {
|
anyrun = {
|
||||||
# My fork of anyrun that allows up / down with <C-n> / <C-p>
|
# My fork of anyrun that allows up / down with <C-n> / <C-p>
|
||||||
url = "github:uttarayan21/anyrun";
|
url = "github:anyrun-org/anyrun";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
anyrun-hyprwin = {
|
anyrun-hyprwin = {
|
||||||
@@ -166,7 +174,7 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
onepassword-shell-plugins = {
|
onepassword-shell-plugins = {
|
||||||
url = "github:uttarayan21/shell-plugins";
|
url = "github:1Password/shell-plugins";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
zeronsd = {
|
zeronsd = {
|
||||||
@@ -187,7 +195,7 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
hyprmonitors = {
|
hyprmonitors = {
|
||||||
url = "git+ssh://gitea@git.darksailor.dev/servius/hyprmonitors";
|
url = "git+https://git.darksailor.dev/servius/hyprmonitors";
|
||||||
# url = "path:/home/servius/Projects/hyprmonitors";
|
# url = "path:/home/servius/Projects/hyprmonitors";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
@@ -199,21 +207,38 @@
|
|||||||
ik_llama = {
|
ik_llama = {
|
||||||
url = "github:ikawrakow/ik_llama.cpp?submodules=1";
|
url = "github:ikawrakow/ik_llama.cpp?submodules=1";
|
||||||
# submodules = true;
|
# submodules = true;
|
||||||
flake = false;
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
llama-cpp = {
|
llama-cpp = {
|
||||||
# url = "https://github.com/ggml-org/llama.cpp";
|
# url = "https://github.com/ggml-org/llama.cpp";
|
||||||
url = "github:ggml-org/llama.cpp/b6178?submodules=1";
|
url = "github:ggml-org/llama.cpp/b6178?submodules=1";
|
||||||
flake = false;
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
|
||||||
immich = {
|
|
||||||
url = "github:immich-app/immich/v1.142.0";
|
|
||||||
flake = false;
|
|
||||||
};
|
};
|
||||||
yabai = {
|
yabai = {
|
||||||
url = "github:koekeishiya/yabai";
|
url = "github:koekeishiya/yabai";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
nix-auth = {
|
||||||
|
url = "github:numtide/nix-auth";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
nixpkgs-xr = {
|
||||||
|
url = "github:nix-community/nixpkgs-xr";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
handoff = {
|
||||||
|
url = "github:xatuke/handoff";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
crates-nix.url = "github:uttarayan21/crates.nix";
|
||||||
|
headplane = {
|
||||||
|
url = "github:tale/headplane";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
vicinae = {
|
||||||
|
url = "github:vicinaehq/vicinae";
|
||||||
|
# inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
@@ -230,11 +255,19 @@
|
|||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
devices = {
|
devices = {
|
||||||
mirai = mkDevice {
|
# mirai = mkDevice {
|
||||||
name = "mirai";
|
# name = "mirai";
|
||||||
|
# system = "x86_64-linux";
|
||||||
|
# user = "fs0c131y";
|
||||||
|
# hasGui = false; # Don't wan't to run GUI apps on a headless server
|
||||||
|
# isNix = true;
|
||||||
|
# isServer = true;
|
||||||
|
# };
|
||||||
|
tako = mkDevice {
|
||||||
|
name = "tako";
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
user = "fs0c131y";
|
user = "servius";
|
||||||
hasGui = false; # Don't wan't to run GUI apps on a headless server
|
hasGui = false;
|
||||||
isNix = true;
|
isNix = true;
|
||||||
isServer = true;
|
isServer = true;
|
||||||
};
|
};
|
||||||
@@ -252,14 +285,6 @@
|
|||||||
tertiary = "DP-1";
|
tertiary = "DP-1";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
deoxys = mkDevice {
|
|
||||||
name = "deoxys";
|
|
||||||
system = "x86_64-linux";
|
|
||||||
user = "servius";
|
|
||||||
hasGui = false; # It's a vm so no GUI apps are used
|
|
||||||
isNix = true;
|
|
||||||
isServer = true;
|
|
||||||
};
|
|
||||||
tsuba = mkDevice {
|
tsuba = mkDevice {
|
||||||
name = "tsuba";
|
name = "tsuba";
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
@@ -317,10 +342,14 @@
|
|||||||
if isDarwin
|
if isDarwin
|
||||||
then "/Users/${device.user}"
|
then "/Users/${device.user}"
|
||||||
else "/home/${device.user}";
|
else "/home/${device.user}";
|
||||||
|
# output =
|
||||||
|
# if isDarwin
|
||||||
|
# then self.darwinConfigurations."${device.name}"
|
||||||
|
# else self.nixosConfigurations."${device.name}";
|
||||||
};
|
};
|
||||||
|
|
||||||
nixos_devices = nixpkgs.lib.attrsets.filterAttrs (n: x: x.isNix) devices;
|
nixos_devices = nixpkgs.lib.attrsets.filterAttrs (n: x: x.isNix) devices;
|
||||||
linux_devices = nixpkgs.lib.attrsets.filterAttrs (n: x: x.isLinux) devices;
|
# linux_devices = nixpkgs.lib.attrsets.filterAttrs (n: x: x.isLinux) devices;
|
||||||
darwin_devices = nixpkgs.lib.attrsets.filterAttrs (n: x: x.isDarwin) devices;
|
darwin_devices = nixpkgs.lib.attrsets.filterAttrs (n: x: x.isDarwin) devices;
|
||||||
rpi_devices = nixpkgs.lib.attrsets.filterAttrs (n: x: x.isArm && x.isLinux) devices;
|
rpi_devices = nixpkgs.lib.attrsets.filterAttrs (n: x: x.isArm && x.isLinux) devices;
|
||||||
|
|
||||||
@@ -328,7 +357,7 @@
|
|||||||
inherit inputs;
|
inherit inputs;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
rec {
|
{
|
||||||
nixosConfigurations =
|
nixosConfigurations =
|
||||||
(import ./nixos {
|
(import ./nixos {
|
||||||
inherit inputs nixpkgs home-manager overlays nur;
|
inherit inputs nixpkgs home-manager overlays nur;
|
||||||
@@ -374,7 +403,8 @@
|
|||||||
in {
|
in {
|
||||||
tsuba = mkImage nixos.tsuba;
|
tsuba = mkImage nixos.tsuba;
|
||||||
};
|
};
|
||||||
deploy = import ./deploy.nix {inherit inputs self;};
|
deploy = import ./deploy.nix {inherit inputs self deploy-rs;};
|
||||||
|
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
||||||
inherit devices;
|
inherit devices;
|
||||||
}
|
}
|
||||||
// flake-utils.lib.eachDefaultSystem (
|
// flake-utils.lib.eachDefaultSystem (
|
||||||
@@ -389,7 +419,7 @@
|
|||||||
in {
|
in {
|
||||||
packages = rec {
|
packages = rec {
|
||||||
default = neovim;
|
default = neovim;
|
||||||
neovim = pkgs.nixvim.makeNixvim (import ./neovim);
|
neovim = pkgs.nixvim.makeNixvim (pkgs.callPackage ./neovim);
|
||||||
};
|
};
|
||||||
devShells = {
|
devShells = {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
}: {
|
}: {
|
||||||
home.packages = lib.optionals pkgs.stdenv.isLinux [
|
home.packages = lib.optionals pkgs.stdenv.isLinux [
|
||||||
pkgs.blueman
|
pkgs.blueman
|
||||||
pkgs.webcord
|
|
||||||
];
|
];
|
||||||
services.blueman-applet.enable = pkgs.stdenv.isLinux;
|
services.blueman-applet.enable = pkgs.stdenv.isLinux;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,37 +7,38 @@ lib.optionalAttrs device.hasGui {
|
|||||||
imports = [
|
imports = [
|
||||||
# ./audacity.nix
|
# ./audacity.nix
|
||||||
./blueman.nix
|
./blueman.nix
|
||||||
./bottles.nix
|
# ./bottles.nix
|
||||||
./chromium.nix
|
./chromium.nix
|
||||||
./cursor.nix
|
# ./cursor.nix
|
||||||
./discord.nix
|
./discord.nix
|
||||||
./firefox.nix
|
./firefox.nix
|
||||||
./ghostty.nix
|
./ghostty.nix
|
||||||
# ./gimp.nix
|
./gimp.nix
|
||||||
./guitarix.nix
|
# ./guitarix.nix
|
||||||
./hyprpicker.nix
|
./hyprpicker.nix
|
||||||
./jellyflix.nix
|
# ./jellyflix.nix
|
||||||
./kicad.nix
|
# ./kicad.nix
|
||||||
./kitty.nix
|
./kitty.nix
|
||||||
./lmstudio.nix
|
./lmstudio.nix
|
||||||
./mpv.nix
|
./mpv.nix
|
||||||
./neovide.nix
|
# ./neovide.nix
|
||||||
./nextcloud.nix
|
./nextcloud.nix
|
||||||
./obs-studio.nix
|
./obs-studio.nix
|
||||||
./openscad.nix
|
# ./openscad.nix
|
||||||
./orcaslicer.nix
|
./orcaslicer.nix
|
||||||
./pcsx2.nix
|
# ./pcsx2.nix
|
||||||
# ./rpcs3.nix
|
# ./rpcs3.nix
|
||||||
# ./shadps4.nix
|
# ./shadps4.nix
|
||||||
./slack.nix
|
./slack.nix
|
||||||
./thunderbird.nix
|
# ./thunderbird.nix
|
||||||
|
# ./tsukimi.nix
|
||||||
|
# ./vial.nix
|
||||||
./vlc.nix
|
./vlc.nix
|
||||||
./vscode.nix
|
./vscode.nix
|
||||||
./wezterm.nix
|
./wezterm.nix
|
||||||
./zathura.nix
|
./zathura.nix
|
||||||
./zed.nix
|
./zed.nix
|
||||||
./zen.nix
|
./zen.nix
|
||||||
./vial.nix
|
./vicinae.nix
|
||||||
./wallpaperengine.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
}: {
|
}: {
|
||||||
home.packages = lib.optionals pkgs.stdenv.isLinux [
|
home.packages = lib.optionals pkgs.stdenv.isLinux [
|
||||||
pkgs.discord
|
pkgs.discord
|
||||||
pkgs.webcord
|
pkgs.vesktop
|
||||||
|
pkgs.discord-canary
|
||||||
|
pkgs.discord-ptb
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,8 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
programs.librewolf = config // {package = stablePkgs.librewolf;};
|
stylix.targets.librewolf.profileNames = ["default"];
|
||||||
|
stylix.targets.zen-browser.profileNames = ["default"];
|
||||||
|
# programs.librewolf = config // {package = stablePkgs.librewolf;};
|
||||||
# programs.firefox = config;
|
# programs.firefox = config;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
{pkgs, ...}: {
|
{
|
||||||
home.packages = with pkgs; [gimp];
|
pkgs,
|
||||||
|
device,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
home.packages = with pkgs; lib.optionals (device.is "ryu") [gimp];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
device,
|
# device,
|
||||||
inputs,
|
# inputs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
stylix.targets.kitty.enable = false;
|
stylix.targets.kitty.enable = false;
|
||||||
|
|||||||
@@ -6,6 +6,9 @@
|
|||||||
}:
|
}:
|
||||||
lib.mkIf (device.is "ryu") {
|
lib.mkIf (device.is "ryu") {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
lmstudio
|
(lmstudio.overrideAttrs
|
||||||
|
(old: {
|
||||||
|
extraPkgs = old.extraPkgs or [] ++ [pkgs.cudaPackages.cudatoolkit];
|
||||||
|
}))
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
5
home/apps/tsukimi.nix
Normal file
5
home/apps/tsukimi.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
tsukimi
|
||||||
|
];
|
||||||
|
}
|
||||||
16
home/apps/vicinae.nix
Normal file
16
home/apps/vicinae.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
device,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [inputs.vicinae.homeManagerModules.default];
|
||||||
|
services.vicinae = {
|
||||||
|
enable = device.is "ryu";
|
||||||
|
autoStart = true;
|
||||||
|
extensions = [];
|
||||||
|
# package = pkgs.vicinae.overrideAttrs (old: {
|
||||||
|
# patches = [../../patches/vicinae-ctrl-np.patch];
|
||||||
|
# });
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
home.packages = lib.optionals pkgs.stdenv.isLinux [
|
|
||||||
pkgs.linux-wallpaperengine
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -102,21 +102,8 @@
|
|||||||
metrics = false;
|
metrics = false;
|
||||||
};
|
};
|
||||||
buffer_font_size = lib.mkDefault 15;
|
buffer_font_size = lib.mkDefault 15;
|
||||||
# language_models = {
|
language_models = {
|
||||||
# ollama = {
|
};
|
||||||
# api_url = "https://ollama.ryu.darksailor.dev";
|
|
||||||
# available_models = [
|
|
||||||
# {
|
|
||||||
# name = "qwen3:30b-a3b";
|
|
||||||
# display_name = "Qwen3 MoE (30b-a3b)";
|
|
||||||
# max_tokens = 32768;
|
|
||||||
# supports_tools = true;
|
|
||||||
# supports_thinking = false;
|
|
||||||
# supports_images = false;
|
|
||||||
# }
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
terminal = {
|
terminal = {
|
||||||
shell = {
|
shell = {
|
||||||
program = "${pkgs.fish}/bin/fish";
|
program = "${pkgs.fish}/bin/fish";
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
stablePkgs = inputs.nixpkgs-stable.legacyPackages.${device.system};
|
stablePkgs = inputs.nixpkgs-stable.legacyPackages.${device.system};
|
||||||
};
|
};
|
||||||
users.${device.user}.imports = [
|
users.${device.user}.imports = [
|
||||||
|
inputs.nixvim.homeModules.nixvim
|
||||||
./.
|
./.
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
settings = {
|
settings = {
|
||||||
save_session = true;
|
save_session = true;
|
||||||
model = "openai:gpt-4o";
|
model = "openai:gpt-4o";
|
||||||
|
# model = "ryu:qwen3-coder-30b";
|
||||||
rag_embedding_model = "ollama:RobinBially/nomic-embed-text-8k";
|
rag_embedding_model = "ollama:RobinBially/nomic-embed-text-8k";
|
||||||
clients = [
|
clients = [
|
||||||
{
|
{
|
||||||
@@ -50,7 +51,7 @@
|
|||||||
api_base = "https://llama.ryu.darksailor.dev/v1";
|
api_base = "https://llama.ryu.darksailor.dev/v1";
|
||||||
models = [
|
models = [
|
||||||
{
|
{
|
||||||
name = "gpt-oss-20b";
|
name = "qwen3-coder-30b";
|
||||||
type = "chat";
|
type = "chat";
|
||||||
}
|
}
|
||||||
# {
|
# {
|
||||||
@@ -175,7 +176,7 @@
|
|||||||
---
|
---
|
||||||
model: openai:gpt-4o
|
model: openai:gpt-4o
|
||||||
---
|
---
|
||||||
Your task is to generate a concise and informative commit message based on the provided diff. Use the conventional commit format, which includes a type (feat, fix, chore, docs, style, refactor, perf, test) and an optional scope. The message should be in the imperative mood and should not exceed 72 characters in the subject line. Don't include any additional text or explanations, just the commit message.
|
Your task is to generate a concise and informative commit message based on the provided diff. Use the conventional commit format, which includes a type (feat, fix, chore, docs, style, refactor, perf, test) and an optional scope. The message should be in the imperative mood and should not exceed 72 characters in the subject line. Do not under any circumstance include any additional text or explanations, just add the commit message.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
./ddcbacklight.nix
|
./ddcbacklight.nix
|
||||||
./direnv.nix
|
./direnv.nix
|
||||||
./eza.nix
|
./eza.nix
|
||||||
|
./fastfetch.nix
|
||||||
./fish.nix
|
./fish.nix
|
||||||
./fzf.nix
|
./fzf.nix
|
||||||
./gh.nix
|
./gh.nix
|
||||||
@@ -24,6 +25,7 @@
|
|||||||
./nix-index.nix
|
./nix-index.nix
|
||||||
./nushell.nix
|
./nushell.nix
|
||||||
./omnix.nix
|
./omnix.nix
|
||||||
|
./retroarch.nix
|
||||||
./rustup.nix
|
./rustup.nix
|
||||||
./ryujinx.nix
|
./ryujinx.nix
|
||||||
./sops.nix
|
./sops.nix
|
||||||
@@ -34,11 +36,13 @@
|
|||||||
./television.nix
|
./television.nix
|
||||||
./tmux.nix
|
./tmux.nix
|
||||||
./tuifeed.nix
|
./tuifeed.nix
|
||||||
|
./uv.nix
|
||||||
./xh.nix
|
./xh.nix
|
||||||
./yazi.nix
|
./yazi.nix
|
||||||
./yt-dlp.nix
|
./yt-dlp.nix
|
||||||
./zoxide.nix
|
./zoxide.nix
|
||||||
./retroarch.nix
|
./neovim.nix
|
||||||
|
./opencode.nix
|
||||||
|
|
||||||
# ./goread.nix
|
# ./goread.nix
|
||||||
# ./helix.nix
|
# ./helix.nix
|
||||||
@@ -61,7 +65,7 @@
|
|||||||
bottom
|
bottom
|
||||||
btop
|
btop
|
||||||
cachix
|
cachix
|
||||||
deploy-rs
|
deploy-rs.deploy-rs
|
||||||
dust
|
dust
|
||||||
fd
|
fd
|
||||||
file
|
file
|
||||||
@@ -72,7 +76,6 @@
|
|||||||
just
|
just
|
||||||
macchina
|
macchina
|
||||||
nb
|
nb
|
||||||
(nixvim.makeNixvim (import ../../neovim))
|
|
||||||
p7zip
|
p7zip
|
||||||
pandoc
|
pandoc
|
||||||
pfetch-rs
|
pfetch-rs
|
||||||
@@ -87,6 +90,13 @@
|
|||||||
nerd-fonts.fira-code
|
nerd-fonts.fira-code
|
||||||
nerd-fonts.hasklug
|
nerd-fonts.hasklug
|
||||||
nerd-fonts.symbols-only
|
nerd-fonts.symbols-only
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-cjk-sans
|
||||||
|
noto-fonts-color-emoji
|
||||||
|
liberation_ttf
|
||||||
|
fira-code
|
||||||
|
fira-code-symbols
|
||||||
|
mplus-outline-fonts.githubRelease
|
||||||
]
|
]
|
||||||
++ lib.optionals device.isLinux []
|
++ lib.optionals device.isLinux []
|
||||||
++ lib.optionals device.isDarwin [];
|
++ lib.optionals device.isDarwin [];
|
||||||
|
|||||||
51
home/programs/fastfetch.nix
Normal file
51
home/programs/fastfetch.nix
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
device,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
nextcloudWallpapers = name: config.home.homeDirectory + "/Nextcloud/Wallpapers/" + name;
|
||||||
|
in {
|
||||||
|
programs = {
|
||||||
|
fastfetch = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
logo = lib.mkIf (device.is "ryu") {
|
||||||
|
source = nextcloudWallpapers "hornet.png";
|
||||||
|
width = 70;
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
"title"
|
||||||
|
"separator"
|
||||||
|
"os"
|
||||||
|
"host"
|
||||||
|
"kernel"
|
||||||
|
"uptime"
|
||||||
|
"packages"
|
||||||
|
"shell"
|
||||||
|
"display"
|
||||||
|
"de"
|
||||||
|
"wm"
|
||||||
|
"wmtheme"
|
||||||
|
"theme"
|
||||||
|
"icons"
|
||||||
|
"cursor"
|
||||||
|
"terminal"
|
||||||
|
"terminalfont"
|
||||||
|
"cpu"
|
||||||
|
"gpu"
|
||||||
|
"memory"
|
||||||
|
"swap"
|
||||||
|
"disk"
|
||||||
|
"battery"
|
||||||
|
"poweradapter"
|
||||||
|
"locale"
|
||||||
|
"break"
|
||||||
|
"colors"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
fish.shellAbbrs.ff = "fastfetch";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,8 +1,11 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
|
device,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
lib.optionalAttrs (!(device.is "tsuba")) {
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
|
|||||||
21
home/programs/neovim.nix
Normal file
21
home/programs/neovim.nix
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
device,
|
||||||
|
stablePkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
stylix.targets.nixvim.enable = false;
|
||||||
|
programs = lib.optionalAttrs (device.is "ryu" || device.is "kuro" || device.is "mirai" || device.is "tako" || device.is "shiro") {
|
||||||
|
nixvim =
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
nixpkgs = {
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// (import ./../../neovim {inherit pkgs stablePkgs;});
|
||||||
|
};
|
||||||
|
}
|
||||||
10
home/programs/opencode.nix
Normal file
10
home/programs/opencode.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
device,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
lib.optionalAttrs (device.is "ryu") {
|
||||||
|
programs.opencode = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -9,25 +9,25 @@
|
|||||||
matchBlocks = {
|
matchBlocks = {
|
||||||
tsuba = {
|
tsuba = {
|
||||||
user = "servius";
|
user = "servius";
|
||||||
hostname = "tsuba";
|
hostname = "tsuba.darksailor.dev";
|
||||||
};
|
};
|
||||||
github = {
|
github = {
|
||||||
user = "git";
|
user = "git";
|
||||||
host = "github.com";
|
host = "github.com";
|
||||||
};
|
};
|
||||||
deoxys = {
|
# mirai = {
|
||||||
|
# user = "fs0c131y";
|
||||||
|
# hostname = "mirai.darksailor.dev";
|
||||||
|
# forwardAgent = true;
|
||||||
|
# };
|
||||||
|
tako = {
|
||||||
user = "servius";
|
user = "servius";
|
||||||
hostname = "deoxys";
|
hostname = "tako.darksailor.dev";
|
||||||
forwardAgent = true;
|
|
||||||
};
|
|
||||||
mirai = {
|
|
||||||
user = "fs0c131y";
|
|
||||||
hostname = "sh.darksailor.dev";
|
|
||||||
forwardAgent = true;
|
forwardAgent = true;
|
||||||
};
|
};
|
||||||
ryu = {
|
ryu = {
|
||||||
user = "servius";
|
user = "servius";
|
||||||
hostname = "ryu";
|
hostname = "ryu.darksailor.dev";
|
||||||
forwardAgent = true;
|
forwardAgent = true;
|
||||||
};
|
};
|
||||||
kuro = {
|
kuro = {
|
||||||
|
|||||||
3
home/programs/uv.nix
Normal file
3
home/programs/uv.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{...}: {
|
||||||
|
programs.uv.enable = true;
|
||||||
|
}
|
||||||
@@ -1,11 +1,5 @@
|
|||||||
{
|
{...}: {
|
||||||
pkgs,
|
programs. yazi = {
|
||||||
lib,
|
|
||||||
device,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
programs.
|
|
||||||
yazi = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
enableNushellIntegration = true;
|
enableNushellIntegration = true;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
imports = [inputs.anyrun.homeManagerModules.default];
|
imports = [inputs.anyrun.homeManagerModules.default];
|
||||||
programs.anyrun = {
|
programs.anyrun = {
|
||||||
enable = device.isDesktopLinux;
|
enable = device.isDesktopLinux;
|
||||||
|
package = inputs.anyrun.packages.${pkgs.system}.anyrun.overrideAttrs (finalAttrs: prevAttrs: {patches = [../../patches/ctrl-np.patch];});
|
||||||
config = {
|
config = {
|
||||||
plugins = with inputs.anyrun.packages.${pkgs.system}; [
|
plugins = with inputs.anyrun.packages.${pkgs.system}; [
|
||||||
inputs.anyrun-nixos-options.packages.${pkgs.system}.default
|
inputs.anyrun-nixos-options.packages.${pkgs.system}.default
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
./kdeconnect.nix
|
./kdeconnect.nix
|
||||||
./gtk.nix
|
./gtk.nix
|
||||||
./anyrun.nix
|
./anyrun.nix
|
||||||
./ironbar
|
# ./ironbar
|
||||||
./gui.nix
|
./gui.nix
|
||||||
./eww.nix
|
./eww.nix
|
||||||
./xdg.nix
|
./xdg.nix
|
||||||
./hyprmon.nix
|
./hyprmon.nix
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
./hyprpaper.nix
|
./hyprpaper.nix
|
||||||
./wallpaperengine.nix
|
# ./wallpaperengine.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,15 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
|
||||||
device,
|
device,
|
||||||
lib,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}: {
|
||||||
activate_linux = pkgs.fetchFromGitHub {
|
|
||||||
owner = "Nycta-b424b3c7";
|
|
||||||
repo = "eww_activate-linux";
|
|
||||||
rev = "master";
|
|
||||||
sha256 = "sha256-CHNkRYR4F9JGMrNubHu+XzkwwI3IHzh93nuS7/Plhe4=";
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
programs.eww = {
|
programs.eww = {
|
||||||
enable = device.is "ryu";
|
enable = device.is "ryu";
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
configDir = activate_linux;
|
|
||||||
};
|
};
|
||||||
|
# xdg.configFile = {
|
||||||
|
# eww = {
|
||||||
|
# source = "${config.home.homeDirectory}/Projects/dotfiles/home/services/eww";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
}
|
}
|
||||||
|
|||||||
5
home/services/eww/README.md
Normal file
5
home/services/eww/README.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# "Activate Linux"
|
||||||
|
|
||||||
|
"Activate Linux" text for [Eww](https://github.com/elkowar/eww/)
|
||||||
|
|
||||||
|

|
||||||
BIN
home/services/eww/activate-linux.png
LFS
Normal file
BIN
home/services/eww/activate-linux.png
LFS
Normal file
Binary file not shown.
7
home/services/eww/eww.scss
Normal file
7
home/services/eww/eww.scss
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
.activate-linux {
|
||||||
|
color: rgba(250, 250, 250, 0.5);
|
||||||
|
|
||||||
|
&.background {
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
41
home/services/eww/eww.yuck
Normal file
41
home/services/eww/eww.yuck
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
(defwidget activate-linux []
|
||||||
|
(box
|
||||||
|
:orientation "v"
|
||||||
|
:halign "start"
|
||||||
|
:valign "start"
|
||||||
|
(label :xalign 0 :markup "<span font_size=\"large\">Activate Linux</span>")
|
||||||
|
(label :xalign 0 :text "Go to Settings to activate Linux")))
|
||||||
|
|
||||||
|
(defwindow activate-linux
|
||||||
|
:monitor 0
|
||||||
|
:stacking "fg"
|
||||||
|
:geometry (geometry :x "96px" :y "96px" :width "250px" :anchor "bottom right")
|
||||||
|
(activate-linux))
|
||||||
|
|
||||||
|
|
||||||
|
(defwidget bar []
|
||||||
|
(centerbox :orientation "h"
|
||||||
|
(workspaces)
|
||||||
|
(music)
|
||||||
|
(tray)))
|
||||||
|
|
||||||
|
|
||||||
|
;; (defwidget tray []
|
||||||
|
;; (box :sclass "tray" :orientation "h" :space-evenly false :haligh "end"
|
||||||
|
;; (system-tray)
|
||||||
|
;; (battery)
|
||||||
|
;; (clock)))
|
||||||
|
|
||||||
|
|
||||||
|
(defwidgets workspaces []
|
||||||
|
(box :class "workspaces" :orientation "h" :space-evenly true :halign "start" :spacing 10
|
||||||
|
(workspace-indicator :index 0)
|
||||||
|
(workspace-indicator :index 1)
|
||||||
|
(workspace-indicator :index 2)
|
||||||
|
(workspace-indicator :index 3)
|
||||||
|
(workspace-indicator :index 4)
|
||||||
|
(workspace-indicator :index 5)
|
||||||
|
(workspace-indicator :index 6)
|
||||||
|
(workspace-indicator :index 7)
|
||||||
|
(workspace-indicator :index 8)
|
||||||
|
(workspace-indicator :index 9)))
|
||||||
@@ -3,10 +3,11 @@
|
|||||||
lib,
|
lib,
|
||||||
device,
|
device,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
stylix.targets.gtk.enable = false;
|
lib.optionalAttrs (device.is "ryu") {
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = device.is "ryu";
|
enable = device.is "ryu";
|
||||||
|
colorScheme = lib.mkForce "dark";
|
||||||
theme = {
|
theme = {
|
||||||
name = "catppuccin-mocha-mauve-standard+normal";
|
name = "catppuccin-mocha-mauve-standard+normal";
|
||||||
package = pkgs.catppuccinThemes.gtk;
|
package = pkgs.catppuccinThemes.gtk;
|
||||||
@@ -38,4 +39,7 @@
|
|||||||
# pkgs.catppuccinThemes.gtk
|
# pkgs.catppuccinThemes.gtk
|
||||||
pkgs.catppuccinThemes.papirus-folders
|
pkgs.catppuccinThemes.papirus-folders
|
||||||
];
|
];
|
||||||
|
# stylix.targets.gtk.enable = false;
|
||||||
|
stylix.targets.gtk.enable = false;
|
||||||
|
stylix.targets.gnome.enable = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
device,
|
device,
|
||||||
lib,
|
lib,
|
||||||
|
inputs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
systemd.user.services.onepassword-gui = lib.optionalAttrs (device.is "ryu") {
|
systemd.user.services.onepassword-gui = lib.optionalAttrs (device.is "ryu") {
|
||||||
@@ -24,21 +25,21 @@
|
|||||||
nautilus
|
nautilus
|
||||||
totem
|
totem
|
||||||
ffmpegthumbnailer
|
ffmpegthumbnailer
|
||||||
polkit_gnome
|
# polkit_gnome
|
||||||
seahorse
|
seahorse
|
||||||
signal-desktop
|
signal-desktop
|
||||||
# sony-headphones-client
|
# sony-headphones-client
|
||||||
spotify
|
spotify
|
||||||
steam-run
|
steam-run
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
(prismlauncher.override {
|
# (prismlauncher.override {
|
||||||
additionalPrograms = [ffmpeg zenity];
|
# additionalPrograms = [ffmpeg zenity];
|
||||||
jdks = [
|
# jdks = [
|
||||||
graalvm-ce
|
# # graalvm-ce
|
||||||
zulu8
|
# zulu8
|
||||||
zulu17
|
# zulu17
|
||||||
zulu
|
# zulu
|
||||||
];
|
# ];
|
||||||
})
|
# })
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
device,
|
device,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
# lib.optionalAttrs device.isNix
|
# lib.optionalAttrs device.isNix
|
||||||
@@ -51,7 +52,7 @@
|
|||||||
supports_wide_color = 1;
|
supports_wide_color = 1;
|
||||||
supports_hdr = 1;
|
supports_hdr = 1;
|
||||||
bitdepth = 10;
|
bitdepth = 10;
|
||||||
# cm = "hdr";
|
cm = "hdr";
|
||||||
# sdrbrightness = 0.005;
|
# sdrbrightness = 0.005;
|
||||||
# sdrsaturation = 200;
|
# sdrsaturation = 200;
|
||||||
}
|
}
|
||||||
@@ -187,28 +188,32 @@
|
|||||||
];
|
];
|
||||||
bind = [
|
bind = [
|
||||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||||
"$mainMod, Return, exec, ${pkgs.kitty}/bin/kitty"
|
"$mainMod, Return, exec, ${lib.getExe pkgs.kitty}"
|
||||||
"$mainModShift, Return, exec, ${pkgs.wezterm}/bin/wezterm"
|
"$mainModShift, Return, exec, ${lib.getExe pkgs.wezterm}"
|
||||||
# "$mainModShift, Return, exec, ${pkgs.foot}/bin/foot"
|
# "$mainModShift, Return, exec, ${pkgs.foot}/bin/foot"
|
||||||
"$mainModShift, Q, killactive,"
|
"$mainModShift, Q, killactive,"
|
||||||
"$mainModShift, s, exec, ${pkgs.hyprshot}/bin/hyprshot -m region"
|
"$mainModShift, s, exec, ${lib.getExe pkgs.hyprshot} -m region -o ~/Pictures/Screenshots/"
|
||||||
# "$mainMod, M, exit,"
|
# "$mainMod, M, exit,"
|
||||||
"$mainModShift, f, togglefloating,"
|
"$mainModShift, f, togglefloating,"
|
||||||
"$mainModShift, f, pin"
|
"$mainModShift, f, pin"
|
||||||
"$mainModShift, f, alterzorder, top"
|
"$mainModShift, f, alterzorder, top"
|
||||||
"$mainMod, f, fullscreen,"
|
"$mainMod, f, fullscreen,"
|
||||||
"$mainMod, g, fullscreenstate,0,2"
|
"$mainMod, g, fullscreenstate,0,2"
|
||||||
"$mainMod, d, exec, ${pkgs.anyrun}/bin/anyrun"
|
"$mainMod, d, exec, ${lib.getExe pkgs.vicinae} toggle"
|
||||||
"$mainMod, Space, exec, ${pkgs.anyrun}/bin/anyrun"
|
"$mainMod, Space, exec, ${lib.getExe pkgs.vicinae} toggle"
|
||||||
"$mainMod, p, pseudo, # dwindle"
|
"$mainMod, p, pseudo, # dwindle"
|
||||||
"$mainMod, v, togglesplit,"
|
"$mainMod, v, togglesplit,"
|
||||||
# "$mainMod, a, exec, swaync-client -t"
|
"$mainMod, a, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t"
|
||||||
"$mainMod, Tab, cyclenext"
|
"$mainMod, Tab, cyclenext"
|
||||||
# Audio
|
# Audio
|
||||||
",xf86audiomute, exec, ${pkgs.swayosd}/bin/swayosd-client --output-volume mute-toggle"
|
",xf86audiomute, exec, ${pkgs.swayosd}/bin/swayosd-client --output-volume mute-toggle"
|
||||||
# ",xf86audioprev, exec, /home/fs0c131y/.cargo/bin/mctl prev"
|
# replace with later
|
||||||
# ",xf86audionext, exec, /home/fs0c131y/.cargo/bin/mctl next"
|
# https://github.com/uttarayan21/mctl-rs
|
||||||
# ",xf86audioplay, exec, /home/fs0c131y/.cargo/bin/mctl toggle"
|
",xf86audioprev, exec, ${lib.getExe pkgs.playerctl} previous"
|
||||||
|
",xf86audionext, exec, ${lib.getExe pkgs.playerctl} next"
|
||||||
|
",xf86audioplay, exec, ${lib.getExe pkgs.playerctl} play-pause"
|
||||||
|
",xf86monbrightnessup, exec, ${lib.getExe pkgs.ddcbacklight} inc 10"
|
||||||
|
",xf86monbrightnessdown, exec, ${lib.getExe pkgs.ddcbacklight} dec 10"
|
||||||
|
|
||||||
# Screenshot
|
# Screenshot
|
||||||
# "$mainMod,Print, exec, grim"
|
# "$mainMod,Print, exec, grim"
|
||||||
|
|||||||
@@ -11,19 +11,18 @@
|
|||||||
wallpapers = import ../../utils/wallhaven.nix {inherit pkgs;};
|
wallpapers = import ../../utils/wallhaven.nix {inherit pkgs;};
|
||||||
nextcloudWallpapers = name: config.home.homeDirectory + "/Nextcloud/Wallpapers/" + name;
|
nextcloudWallpapers = name: config.home.homeDirectory + "/Nextcloud/Wallpapers/" + name;
|
||||||
silksongFleas = nextcloudWallpapers "silksong-fleas.jpg";
|
silksongFleas = nextcloudWallpapers "silksong-fleas.jpg";
|
||||||
in {
|
silksongShadeLord = nextcloudWallpapers "silksong-shadelord.jpg";
|
||||||
|
in rec {
|
||||||
enable = device.is "ryu";
|
enable = device.is "ryu";
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
systemd.target = "hyprland-session.target";
|
systemd.target = "hyprland-session.target";
|
||||||
settings.preload =
|
settings.preload =
|
||||||
wallpapers.all
|
wallpapers.all
|
||||||
++ [
|
++ pkgs.lib.mapAttrsToList (_: value: value) settings.wallpapers;
|
||||||
silksongFleas
|
|
||||||
];
|
|
||||||
settings.wallpapers = {
|
settings.wallpapers = {
|
||||||
# "${device.monitors.primary}" = silksongFleas;
|
"${device.monitors.primary}" = silksongShadeLord;
|
||||||
"${device.monitors.secondary}" = wallpapers.frieren_3;
|
"${device.monitors.secondary}" = wallpapers.frieren_3;
|
||||||
"${device.monitors.tertiary}" = wallpapers.hornet;
|
"${device.monitors.tertiary}" = silksongFleas;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
imports = [inputs.ironbar.homeManagerModules.default];
|
imports = [inputs.ironbar.homeManagerModules.default];
|
||||||
programs.ironbar = {
|
programs.ironbar = {
|
||||||
enable = device.is "ryu";
|
enable = device.is "ryu";
|
||||||
package = inputs.ironbar.packages.${pkgs.system}.default;
|
package = inputs.ironbar.packages.${pkgs.system}.ironbar;
|
||||||
systemd = true;
|
systemd = true;
|
||||||
config.monitors = {
|
config.monitors = {
|
||||||
"${device.monitors.secondary}" = {
|
"${device.monitors.secondary}" = {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
enable = true;
|
enable = device.is "ryu";
|
||||||
openDefaultPorts = true;
|
openDefaultPorts = true;
|
||||||
# user = "${device.user}";
|
# user = "${device.user}";
|
||||||
# group = "${device.user}";
|
# group = "${device.user}";
|
||||||
|
|||||||
@@ -5,28 +5,28 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.mkIf (device.is "ryu") {
|
lib.mkIf (device.is "ryu") {
|
||||||
systemd.user.services.wallpaperengine = {
|
# systemd.user.services.wallpaperengine = {
|
||||||
Unit = {
|
# Unit = {
|
||||||
Description = "Linux Wallpaper Engine";
|
# Description = "Linux Wallpaper Engine";
|
||||||
After = ["hyprland-session.target"];
|
# After = ["hyprland-session.target"];
|
||||||
Wants = ["hyprland-session.target"];
|
# Wants = ["hyprland-session.target"];
|
||||||
PartOf = ["hyprland-session.target"];
|
# PartOf = ["hyprland-session.target"];
|
||||||
};
|
# };
|
||||||
|
#
|
||||||
Service = {
|
# Service = {
|
||||||
Environment = [
|
# Environment = [
|
||||||
"XDG_SESSION_TYPE=wayland"
|
# "XDG_SESSION_TYPE=wayland"
|
||||||
];
|
# ];
|
||||||
Type = "simple";
|
# Type = "simple";
|
||||||
ExecStartPre = "${pkgs.coreutils}/bin/sleep 3";
|
# ExecStartPre = "${pkgs.coreutils}/bin/sleep 3";
|
||||||
ExecStart = "${pkgs.linux-wallpaperengine}/bin/linux-wallpaperengine --silent --no-audio-processing -f 15 --scaling fill --screen-root HDMI-A-1 --bg 2780316434";
|
# ExecStart = "${pkgs.linux-wallpaperengine}/bin/linux-wallpaperengine --silent --no-audio-processing -f 15 --scaling fill --screen-root HDMI-A-1 --bg 2780316434";
|
||||||
Restart = "on-failure";
|
# Restart = "on-failure";
|
||||||
RestartSec = 5;
|
# RestartSec = 5;
|
||||||
TimeoutStartSec = 30;
|
# TimeoutStartSec = 30;
|
||||||
};
|
# };
|
||||||
|
#
|
||||||
Install = {
|
# Install = {
|
||||||
WantedBy = ["hyprland-session.target"];
|
# WantedBy = ["hyprland-session.target"];
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,20 @@
|
|||||||
{pkgs, ...}: {
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
device,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
lib.optionalAttrs (device.is "ryu") {
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = pkgs.stdenv.isLinux;
|
enable = pkgs.stdenv.isLinux;
|
||||||
# config = {
|
config = {
|
||||||
#
|
hyprland.default = ["kde" "hyprland"];
|
||||||
# };
|
common.default = ["*" "hyprland"];
|
||||||
|
};
|
||||||
extraPortals = with pkgs; [
|
extraPortals = with pkgs; [
|
||||||
xdg-desktop-portal-hyprland
|
|
||||||
kdePackages.xdg-desktop-portal-kde
|
kdePackages.xdg-desktop-portal-kde
|
||||||
|
xdg-desktop-portal-hyprland
|
||||||
|
xdg-desktop-portal-gtk
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
2
justfile
2
justfile
@@ -6,7 +6,7 @@ install:
|
|||||||
|
|
||||||
[linux]
|
[linux]
|
||||||
install:
|
install:
|
||||||
sudo nixos-rebuild switch --flake .
|
sudo nixos-rebuild switch --flake . --builders '' --max-jobs 1
|
||||||
|
|
||||||
[macos]
|
[macos]
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -4,10 +4,7 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
with lib; let
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.services.caddy;
|
cfg = config.services.caddy;
|
||||||
|
|
||||||
certs = config.security.acme.certs;
|
certs = config.security.acme.certs;
|
||||||
@@ -17,12 +14,9 @@ let
|
|||||||
dependentCertNames = filter (cert: certs.${cert}.dnsProvider == null) vhostCertNames; # those that might depend on the HTTP server
|
dependentCertNames = filter (cert: certs.${cert}.dnsProvider == null) vhostCertNames; # those that might depend on the HTTP server
|
||||||
independentCertNames = filter (cert: certs.${cert}.dnsProvider != null) vhostCertNames; # those that don't depend on the HTTP server
|
independentCertNames = filter (cert: certs.${cert}.dnsProvider != null) vhostCertNames; # those that don't depend on the HTTP server
|
||||||
|
|
||||||
mkVHostConf =
|
mkVHostConf = hostOpts: let
|
||||||
hostOpts:
|
|
||||||
let
|
|
||||||
sslCertDir = config.security.acme.certs.${hostOpts.useACMEHost}.directory;
|
sslCertDir = config.security.acme.certs.${hostOpts.useACMEHost}.directory;
|
||||||
in
|
in ''
|
||||||
''
|
|
||||||
${hostOpts.hostName} ${concatStringsSep " " hostOpts.serverAliases} {
|
${hostOpts.hostName} ${concatStringsSep " " hostOpts.serverAliases} {
|
||||||
${optionalString (
|
${optionalString (
|
||||||
hostOpts.listenAddresses != []
|
hostOpts.listenAddresses != []
|
||||||
@@ -41,10 +35,9 @@ let
|
|||||||
settingsFormat = pkgs.formats.json {};
|
settingsFormat = pkgs.formats.json {};
|
||||||
|
|
||||||
configFile =
|
configFile =
|
||||||
if cfg.settings != { } then
|
if cfg.settings != {}
|
||||||
settingsFormat.generate "caddy.json" cfg.settings
|
then settingsFormat.generate "caddy.json" cfg.settings
|
||||||
else
|
else let
|
||||||
let
|
|
||||||
Caddyfile = pkgs.writeTextDir "Caddyfile" ''
|
Caddyfile = pkgs.writeTextDir "Caddyfile" ''
|
||||||
{
|
{
|
||||||
${cfg.globalConfig}
|
${cfg.globalConfig}
|
||||||
@@ -58,9 +51,10 @@ let
|
|||||||
cp --no-preserve=mode ${Caddyfile}/Caddyfile $out/Caddyfile
|
cp --no-preserve=mode ${Caddyfile}/Caddyfile $out/Caddyfile
|
||||||
${lib.getExe cfg.package} fmt --overwrite $out/Caddyfile
|
${lib.getExe cfg.package} fmt --overwrite $out/Caddyfile
|
||||||
'';
|
'';
|
||||||
in
|
in "${
|
||||||
"${
|
if pkgs.stdenv.buildPlatform == pkgs.stdenv.hostPlatform
|
||||||
if pkgs.stdenv.buildPlatform == pkgs.stdenv.hostPlatform then Caddyfile-formatted else Caddyfile
|
then Caddyfile-formatted
|
||||||
|
else Caddyfile
|
||||||
}/Caddyfile";
|
}/Caddyfile";
|
||||||
|
|
||||||
etcConfigFile = "caddy/caddy_config";
|
etcConfigFile = "caddy/caddy_config";
|
||||||
@@ -68,8 +62,7 @@ let
|
|||||||
configPath = "/etc/${etcConfigFile}";
|
configPath = "/etc/${etcConfigFile}";
|
||||||
|
|
||||||
mkCertOwnershipAssertion = import ../../../security/acme/mk-cert-ownership-assertion.nix lib;
|
mkCertOwnershipAssertion = import ../../../security/acme/mk-cert-ownership-assertion.nix lib;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
(mkRemovedOptionModule [
|
(mkRemovedOptionModule [
|
||||||
"services"
|
"services"
|
||||||
@@ -183,10 +176,9 @@ in
|
|||||||
|
|
||||||
adapter = mkOption {
|
adapter = mkOption {
|
||||||
default =
|
default =
|
||||||
if ((cfg.configFile != configFile) || (builtins.baseNameOf cfg.configFile) == "Caddyfile") then
|
if ((cfg.configFile != configFile) || (builtins.baseNameOf cfg.configFile) == "Caddyfile")
|
||||||
"caddyfile"
|
then "caddyfile"
|
||||||
else
|
else null;
|
||||||
null;
|
|
||||||
defaultText = literalExpression ''
|
defaultText = literalExpression ''
|
||||||
if ((cfg.configFile != configFile) || (builtins.baseNameOf cfg.configFile) == "Caddyfile") then "caddyfile" else null
|
if ((cfg.configFile != configFile) || (builtins.baseNameOf cfg.configFile) == "Caddyfile") then "caddyfile" else null
|
||||||
'';
|
'';
|
||||||
@@ -380,8 +372,8 @@ in
|
|||||||
|
|
||||||
# implementation
|
# implementation
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
assertions =
|
||||||
assertions = [
|
[
|
||||||
{
|
{
|
||||||
assertion = cfg.configFile == configFile -> cfg.adapter == "caddyfile" || cfg.adapter == null;
|
assertion = cfg.configFile == configFile -> cfg.adapter == "caddyfile" || cfg.adapter == null;
|
||||||
message = "To specify an adapter other than 'caddyfile' please provide your own configuration via `services.caddy.configFile`";
|
message = "To specify an adapter other than 'caddyfile' please provide your own configuration via `services.caddy.configFile`";
|
||||||
@@ -394,7 +386,8 @@ in
|
|||||||
groups = config.users.groups;
|
groups = config.users.groups;
|
||||||
services = [config.systemd.services.caddy];
|
services = [config.systemd.services.caddy];
|
||||||
}
|
}
|
||||||
) vhostCertNames;
|
)
|
||||||
|
vhostCertNames;
|
||||||
|
|
||||||
services.caddy.globalConfig = ''
|
services.caddy.globalConfig = ''
|
||||||
${optionalString (cfg.email != null) "email ${cfg.email}"}
|
${optionalString (cfg.email != null) "email ${cfg.email}"}
|
||||||
@@ -422,13 +415,11 @@ in
|
|||||||
reloadTriggers = optional cfg.enableReload cfg.configFile;
|
reloadTriggers = optional cfg.enableReload cfg.configFile;
|
||||||
restartTriggers = optional (!cfg.enableReload) cfg.configFile;
|
restartTriggers = optional (!cfg.enableReload) cfg.configFile;
|
||||||
|
|
||||||
serviceConfig =
|
serviceConfig = let
|
||||||
let
|
|
||||||
runOptions = ''--config ${configPath} ${
|
runOptions = ''--config ${configPath} ${
|
||||||
optionalString (cfg.adapter != null) "--adapter ${cfg.adapter}"
|
optionalString (cfg.adapter != null) "--adapter ${cfg.adapter}"
|
||||||
}'';
|
}'';
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
# Override the `ExecStart` line from upstream's systemd unit file by our own:
|
# Override the `ExecStart` line from upstream's systemd unit file by our own:
|
||||||
# https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStart=
|
# https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStart=
|
||||||
# If the empty string is assigned to this option, the list of commands to start is reset, prior assignments of this option will have no effect.
|
# If the empty string is assigned to this option, the list of commands to start is reset, prior assignments of this option will have no effect.
|
||||||
@@ -437,7 +428,8 @@ in
|
|||||||
''${lib.getExe cfg.package} run ${runOptions} ${optionalString cfg.resume "--resume"}''
|
''${lib.getExe cfg.package} run ${runOptions} ${optionalString cfg.resume "--resume"}''
|
||||||
];
|
];
|
||||||
# Validating the configuration before applying it ensures we’ll get a proper error that will be reported when switching to the configuration
|
# Validating the configuration before applying it ensures we’ll get a proper error that will be reported when switching to the configuration
|
||||||
ExecReload = [
|
ExecReload =
|
||||||
|
[
|
||||||
""
|
""
|
||||||
]
|
]
|
||||||
++ lib.optional cfg.enableReload "${lib.getExe cfg.package} reload ${runOptions} --force";
|
++ lib.optional cfg.enableReload "${lib.getExe cfg.package} reload ${runOptions} --force";
|
||||||
@@ -470,15 +462,16 @@ in
|
|||||||
caddy.gid = config.ids.gids.caddy;
|
caddy.gid = config.ids.gids.caddy;
|
||||||
};
|
};
|
||||||
|
|
||||||
security.acme.certs =
|
security.acme.certs = let
|
||||||
let
|
certCfg =
|
||||||
certCfg = map (
|
map (
|
||||||
certName:
|
certName:
|
||||||
nameValuePair certName {
|
nameValuePair certName {
|
||||||
group = mkDefault cfg.group;
|
group = mkDefault cfg.group;
|
||||||
reloadServices = ["caddy.service"];
|
reloadServices = ["caddy.service"];
|
||||||
}
|
}
|
||||||
) vhostCertNames;
|
)
|
||||||
|
vhostCertNames;
|
||||||
in
|
in
|
||||||
listToAttrs certCfg;
|
listToAttrs certCfg;
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
{ cfg }:
|
{cfg}: {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
name,
|
name,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
inherit (lib) literalExpression mkOption types;
|
inherit (lib) literalExpression mkOption types;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
hostName = mkOption {
|
hostName = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = name;
|
default = name;
|
||||||
@@ -83,6 +79,5 @@ in
|
|||||||
automatically generated `Caddyfile`.
|
automatically generated `Caddyfile`.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
{config, pkgs, lib, ...}:
|
|
||||||
let
|
|
||||||
cfg = config.services.satisfactory;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.services.satisfactory;
|
||||||
|
in {
|
||||||
options.services.satisfactory = {
|
options.services.satisfactory = {
|
||||||
enable = lib.mkEnableOption "Enable Satisfactory Dedicated Server";
|
enable = lib.mkEnableOption "Enable Satisfactory Dedicated Server";
|
||||||
|
|
||||||
@@ -56,7 +59,12 @@ in
|
|||||||
networking = {
|
networking = {
|
||||||
firewall = {
|
firewall = {
|
||||||
allowedUDPPorts = [15777 15000 7777 27015];
|
allowedUDPPorts = [15777 15000 7777 27015];
|
||||||
allowedUDPPortRanges = [ { from = 27031; to = 27036; } ];
|
allowedUDPPortRanges = [
|
||||||
|
{
|
||||||
|
from = 27031;
|
||||||
|
to = 27036;
|
||||||
|
}
|
||||||
|
];
|
||||||
allowedTCPPorts = [27015 27036];
|
allowedTCPPorts = [27015 27036];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -76,8 +84,16 @@ in
|
|||||||
ln -sfv /var/lib/satisfactory/.steam/steam/linux64 /var/lib/satisfactory/.steam/sdk64
|
ln -sfv /var/lib/satisfactory/.steam/steam/linux64 /var/lib/satisfactory/.steam/sdk64
|
||||||
mkdir -p /var/lib/satisfactory/SatisfactoryDedicatedServer/FactoryGame/Saved/Config/LinuxServer
|
mkdir -p /var/lib/satisfactory/SatisfactoryDedicatedServer/FactoryGame/Saved/Config/LinuxServer
|
||||||
${pkgs.crudini}/bin/crudini --set /var/lib/satisfactory/SatisfactoryDedicatedServer/FactoryGame/Saved/Config/LinuxServer/Game.ini '/Script/Engine.GameSession' MaxPlayers ${toString cfg.maxPlayers}
|
${pkgs.crudini}/bin/crudini --set /var/lib/satisfactory/SatisfactoryDedicatedServer/FactoryGame/Saved/Config/LinuxServer/Game.ini '/Script/Engine.GameSession' MaxPlayers ${toString cfg.maxPlayers}
|
||||||
${pkgs.crudini}/bin/crudini --set /var/lib/satisfactory/SatisfactoryDedicatedServer/FactoryGame/Saved/Config/LinuxServer/ServerSettings.ini '/Script/FactoryGame.FGServerSubsystem' mAutoPause ${if cfg.autoPause then "True" else "False"}
|
${pkgs.crudini}/bin/crudini --set /var/lib/satisfactory/SatisfactoryDedicatedServer/FactoryGame/Saved/Config/LinuxServer/ServerSettings.ini '/Script/FactoryGame.FGServerSubsystem' mAutoPause ${
|
||||||
${pkgs.crudini}/bin/crudini --set /var/lib/satisfactory/SatisfactoryDedicatedServer/FactoryGame/Saved/Config/LinuxServer/ServerSettings.ini '/Script/FactoryGame.FGServerSubsystem' mAutoSaveOnDisconnect ${if cfg.autoSaveOnDisconnect then "True" else "False"}
|
if cfg.autoPause
|
||||||
|
then "True"
|
||||||
|
else "False"
|
||||||
|
}
|
||||||
|
${pkgs.crudini}/bin/crudini --set /var/lib/satisfactory/SatisfactoryDedicatedServer/FactoryGame/Saved/Config/LinuxServer/ServerSettings.ini '/Script/FactoryGame.FGServerSubsystem' mAutoSaveOnDisconnect ${
|
||||||
|
if cfg.autoSaveOnDisconnect
|
||||||
|
then "True"
|
||||||
|
else "False"
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
script = ''
|
script = ''
|
||||||
/var/lib/satisfactory/SatisfactoryDedicatedServer/Engine/Binaries/Linux/UnrealServer-Linux-Shipping FactoryGame -multihome=${cfg.address}
|
/var/lib/satisfactory/SatisfactoryDedicatedServer/Engine/Binaries/Linux/UnrealServer-Linux-Shipping FactoryGame -multihome=${cfg.address}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
# config,
|
stablePkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
mkMappings = mappings:
|
mkMappings = mappings:
|
||||||
@@ -107,6 +107,7 @@ in {
|
|||||||
"<C-q>x" = "[[<cmd>tabclose<cr>]]";
|
"<C-q>x" = "[[<cmd>tabclose<cr>]]";
|
||||||
"<C-q>n" = "[[<cmd>tabnext<cr>]]";
|
"<C-q>n" = "[[<cmd>tabnext<cr>]]";
|
||||||
"<C-q>p" = "[[<cmd>tabprevious<cr>]]";
|
"<C-q>p" = "[[<cmd>tabprevious<cr>]]";
|
||||||
|
"<c-.>" = "require('sidekick.cli').toggle";
|
||||||
};
|
};
|
||||||
terminal = {
|
terminal = {
|
||||||
"<C-\\>" = "require('FTerm').toggle";
|
"<C-\\>" = "require('FTerm').toggle";
|
||||||
@@ -128,6 +129,14 @@ in {
|
|||||||
pattern = "*.norg";
|
pattern = "*.norg";
|
||||||
command = "set conceallevel=3";
|
command = "set conceallevel=3";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
event = [
|
||||||
|
"BufEnter"
|
||||||
|
"BufWinEnter"
|
||||||
|
];
|
||||||
|
pattern = "*.pest";
|
||||||
|
command = "setlocal commentstring=//%s";
|
||||||
|
}
|
||||||
# {
|
# {
|
||||||
# event = ["BufEnter" "BufWinEnter"];
|
# event = ["BufEnter" "BufWinEnter"];
|
||||||
# pattern = "*.sql";
|
# pattern = "*.sql";
|
||||||
@@ -143,6 +152,20 @@ in {
|
|||||||
pattern = "?*";
|
pattern = "?*";
|
||||||
command = "silent! loadview!";
|
command = "silent! loadview!";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
event = ["FileType"];
|
||||||
|
pattern = "json";
|
||||||
|
callback =
|
||||||
|
rawLua
|
||||||
|
/*
|
||||||
|
lua
|
||||||
|
*/
|
||||||
|
''
|
||||||
|
function(ev)
|
||||||
|
vim.bo[ev.buf].formatprg = "${pkgs.jq}/bin/jq"
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
plugins = {
|
plugins = {
|
||||||
@@ -155,6 +178,16 @@ in {
|
|||||||
trouble.enable = true;
|
trouble.enable = true;
|
||||||
ts-context-commentstring.enable = true;
|
ts-context-commentstring.enable = true;
|
||||||
which-key.enable = true;
|
which-key.enable = true;
|
||||||
|
|
||||||
|
sidekick = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
nes = {
|
||||||
|
enabled = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
conform-nvim = {
|
conform-nvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
@@ -169,6 +202,7 @@ in {
|
|||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
|
json = ["jq"];
|
||||||
d2 = ["d2"];
|
d2 = ["d2"];
|
||||||
sql = ["sleek"];
|
sql = ["sleek"];
|
||||||
toml = ["taplo"];
|
toml = ["taplo"];
|
||||||
@@ -180,7 +214,7 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
panel = {
|
panel = {
|
||||||
enabled = true;
|
enabled = false;
|
||||||
};
|
};
|
||||||
suggestion = {
|
suggestion = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
@@ -221,6 +255,7 @@ in {
|
|||||||
|
|
||||||
lualine = {
|
lualine = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
# package = stablePkgs.vimPlugins.lualine-nvim;
|
||||||
};
|
};
|
||||||
|
|
||||||
neotest = {
|
neotest = {
|
||||||
@@ -334,9 +369,11 @@ in {
|
|||||||
tree-sitter-norg-meta
|
tree-sitter-norg-meta
|
||||||
tree-sitter-just
|
tree-sitter-just
|
||||||
tree-sitter-nu
|
tree-sitter-nu
|
||||||
# pkgs.tree-sitter-grammars.tree-sitter-d2
|
tree-sitter-pest
|
||||||
|
tree-sitter-slint
|
||||||
])
|
])
|
||||||
++ pkgs.vimPlugins.nvim-treesitter.allGrammars;
|
++ pkgs.vimPlugins.nvim-treesitter.allGrammars;
|
||||||
|
nixGrammars = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
telescope = {
|
telescope = {
|
||||||
@@ -508,6 +545,7 @@ in {
|
|||||||
slint_lsp.enable = true;
|
slint_lsp.enable = true;
|
||||||
# sourcekit.enable = true;
|
# sourcekit.enable = true;
|
||||||
openscad_lsp.enable = true;
|
openscad_lsp.enable = true;
|
||||||
|
tinymist.enable = true;
|
||||||
rust_analyzer = {
|
rust_analyzer = {
|
||||||
enable = false;
|
enable = false;
|
||||||
installCargo = false;
|
installCargo = false;
|
||||||
@@ -696,6 +734,12 @@ in {
|
|||||||
end,
|
end,
|
||||||
{})
|
{})
|
||||||
|
|
||||||
|
vim.api.nvim_create_user_command('DapUiToggle',
|
||||||
|
function()
|
||||||
|
require('dapui').toggle()
|
||||||
|
end,
|
||||||
|
{})
|
||||||
|
|
||||||
local iron = require("iron.core")
|
local iron = require("iron.core")
|
||||||
iron.setup({
|
iron.setup({
|
||||||
config = {
|
config = {
|
||||||
@@ -755,12 +799,20 @@ in {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
vim.filetype.add({
|
||||||
|
extension = {
|
||||||
|
pest = "pest",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
vim.filetype.add({
|
vim.filetype.add({
|
||||||
filename = {
|
filename = {
|
||||||
['nurfile'] = "nu",
|
['nurfile'] = "nu",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
vim.bo.formatexpr = "v:lua.require'conform'.formatexpr()"
|
||||||
|
|
||||||
'';
|
'';
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
FTerm-nvim
|
FTerm-nvim
|
||||||
@@ -796,5 +848,9 @@ in {
|
|||||||
pkgs.sleek
|
pkgs.sleek
|
||||||
pkgs.graphqurl
|
pkgs.graphqurl
|
||||||
pkgs.sqls
|
pkgs.sqls
|
||||||
|
pkgs.lua
|
||||||
|
pkgs.ripgrep
|
||||||
|
pkgs.nodejs-slim
|
||||||
|
pkgs.qwen-code
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,16 @@
|
|||||||
version = "1";
|
version = "1";
|
||||||
src = inputs.tree-sitter-nu;
|
src = inputs.tree-sitter-nu;
|
||||||
};
|
};
|
||||||
|
tree-sitter-pest = final.pkgs.tree-sitter.buildGrammar {
|
||||||
|
language = "pest";
|
||||||
|
version = "1";
|
||||||
|
src = inputs.tree-sitter-pest;
|
||||||
|
};
|
||||||
|
tree-sitter-slint = final.pkgs.tree-sitter.buildGrammar {
|
||||||
|
language = "slint";
|
||||||
|
version = "1";
|
||||||
|
src = inputs.tree-sitter-slint;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in [
|
in [
|
||||||
@@ -37,3 +47,36 @@ in [
|
|||||||
vimPlugins
|
vimPlugins
|
||||||
tree-sitter-grammars
|
tree-sitter-grammars
|
||||||
]
|
]
|
||||||
|
# tree-sitter-grammars = final: prev: {
|
||||||
|
# tree-sitter-grammars =
|
||||||
|
# prev.tree-sitter-grammars
|
||||||
|
# // {
|
||||||
|
# # tree-sitter-just = final.pkgs.tree-sitter.buildGrammar {
|
||||||
|
# # language = "just";
|
||||||
|
# # version = "1";
|
||||||
|
# # src = inputs.tree-sitter-just;
|
||||||
|
# # };
|
||||||
|
# # tree-sitter-nu = final.pkgs.tree-sitter.buildGrammar {
|
||||||
|
# # language = "nu";
|
||||||
|
# # version = "1";
|
||||||
|
# # src = inputs.tree-sitter-nu;
|
||||||
|
# # };
|
||||||
|
# tree-sitter-d2 = final.pkgs.tree-sitter.buildGrammar {
|
||||||
|
# language = "d2";
|
||||||
|
# version = "1";
|
||||||
|
# src = inputs.tree-sitter-d2;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# vimPlugins = final: prev: {
|
||||||
|
# vimPlugins =
|
||||||
|
# prev.vimPlugins
|
||||||
|
# // {
|
||||||
|
# d2 = final.pkgs.vimUtils.buildVimPlugin {
|
||||||
|
# name = "d2";
|
||||||
|
# version = "1";
|
||||||
|
# src = inputs.d2;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
|
|||||||
@@ -11,18 +11,23 @@
|
|||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit device inputs;
|
inherit device inputs;
|
||||||
stablePkgs = inputs.nixpkgs-stable.legacyPackages.${device.system};
|
stablePkgs = inputs.nixpkgs-stable.legacyPackages.${device.system};
|
||||||
|
masterPkgs = inputs.nixpkgs-master.legacyPackages.${device.system};
|
||||||
lanzaboote = inputs.lanzaboote;
|
lanzaboote = inputs.lanzaboote;
|
||||||
|
cratesNix = inputs.crates-nix.mkLib {pkgs = nixpkgs.legacyPackages.${device.system};};
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
inputs.arion.nixosModules.arion
|
inputs.arion.nixosModules.arion
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
|
inputs.handoff.nixosModules.default
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.lanzaboote.nixosModules.lanzaboote
|
inputs.lanzaboote.nixosModules.lanzaboote
|
||||||
inputs.musnix.nixosModules.musnix
|
inputs.musnix.nixosModules.musnix
|
||||||
inputs.nix-minecraft.nixosModules.minecraft-servers
|
inputs.nix-minecraft.nixosModules.minecraft-servers
|
||||||
|
inputs.nixpkgs-xr.nixosModules.nixpkgs-xr
|
||||||
inputs.nur.modules.nixos.default
|
inputs.nur.modules.nixos.default
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
inputs.stylix.nixosModules.stylix
|
inputs.stylix.nixosModules.stylix
|
||||||
|
inputs.headplane.nixosModules.headplane
|
||||||
|
|
||||||
./${device.name}/configuration.nix
|
./${device.name}/configuration.nix
|
||||||
../home/module.nix
|
../home/module.nix
|
||||||
|
|||||||
@@ -1,127 +0,0 @@
|
|||||||
# Edit this configuration file to define what should be installed on
|
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
# Include the results of the hardware scan.
|
|
||||||
./deoxys.nix
|
|
||||||
./services
|
|
||||||
];
|
|
||||||
|
|
||||||
# Bootloader.
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
systemd.services.NetworkManager-wait-online.enable = lib.mkForce false;
|
|
||||||
|
|
||||||
nix = {
|
|
||||||
settings = {
|
|
||||||
auto-optimise-store = true;
|
|
||||||
extra-experimental-features = "nix-command flakes auto-allocate-uids";
|
|
||||||
trusted-users = ["root" "servius" "fs0c131y"];
|
|
||||||
};
|
|
||||||
extraOptions = ''
|
|
||||||
build-users-group = nixbld
|
|
||||||
extra-nix-path = nixpkgs=flake:nixpkgs
|
|
||||||
builders-use-substitutes = true
|
|
||||||
'';
|
|
||||||
gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "daily";
|
|
||||||
options = "--delete-older-than +5";
|
|
||||||
};
|
|
||||||
package = pkgs.nixVersions.latest;
|
|
||||||
buildMachines = [];
|
|
||||||
distributedBuilds = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "deoxys"; # Define your hostname.
|
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
|
|
||||||
# Enable networking
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "Asia/Kolkata";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US";
|
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "en_US";
|
|
||||||
LC_IDENTIFICATION = "en_US";
|
|
||||||
LC_MEASUREMENT = "en_US";
|
|
||||||
LC_MONETARY = "en_US";
|
|
||||||
LC_NAME = "en_US";
|
|
||||||
LC_NUMERIC = "en_US";
|
|
||||||
LC_PAPER = "en_US";
|
|
||||||
LC_TELEPHONE = "en_US";
|
|
||||||
LC_TIME = "en_US";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver = {
|
|
||||||
xkb = {
|
|
||||||
layout = "us";
|
|
||||||
variant = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
users.users.servius = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "servius";
|
|
||||||
extraGroups = ["networkmanager" "wheel"];
|
|
||||||
packages = with pkgs; [];
|
|
||||||
openssh.authorizedKeys.keyFiles = [
|
|
||||||
../../secrets/id_ed25519.pub
|
|
||||||
../../secrets/id_ios.pub
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Allow unfree packages
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
|
||||||
# $ nix search wget
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
|
||||||
# wget
|
|
||||||
];
|
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
# programs.mtr.enable = true;
|
|
||||||
# programs.gnupg.agent = {
|
|
||||||
# enable = true;
|
|
||||||
# enableSSHSupport = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
services.openssh.enable = true;
|
|
||||||
services.tailscale.enable = true;
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
networking.firewall.allowedTCPPorts = [22];
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
# networking.firewall.enable = false;
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
|
||||||
# settings for stateful data, like file locations and database versions
|
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
||||||
# this value at the release version of the first install of this system.
|
|
||||||
# Before changing this value read the documentation for this option
|
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
||||||
system.stateVersion = "23.11"; # Did you read the comment?
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{...}: {
|
|
||||||
imports = [];
|
|
||||||
}
|
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
cores = 8;
|
cores = 8;
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
extra-experimental-features = "nix-command flakes auto-allocate-uids";
|
extra-experimental-features = "nix-command flakes auto-allocate-uids";
|
||||||
trusted-users = ["root" "fs0c131y" "remotebuilder"];
|
trusted-users = [device.user "remotebuilder"];
|
||||||
trusted-substituters = [
|
trusted-substituters = [
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
"https://nixos-raspberrypi.cachix.org"
|
"https://nixos-raspberrypi.cachix.org"
|
||||||
@@ -65,11 +65,11 @@
|
|||||||
dates = "daily";
|
dates = "daily";
|
||||||
options = "--delete-older-than 5d";
|
options = "--delete-older-than 5d";
|
||||||
};
|
};
|
||||||
package = pkgs.nixVersions.nix_2_31; # deploy-rs doesn't work with nix >= 2.32
|
package = pkgs.nixVersions.latest; # deploy-rs doesn't work with nix >= 2.32
|
||||||
distributedBuilds = true;
|
distributedBuilds = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.fs0c131y = {
|
users.users.${device.user} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = ["wheel" "docker" "media"];
|
extraGroups = ["wheel" "docker" "media"];
|
||||||
openssh.authorizedKeys.keyFiles = [
|
openssh.authorizedKeys.keyFiles = [
|
||||||
|
|||||||
@@ -1,615 +0,0 @@
|
|||||||
{
|
|
||||||
"annotations": {
|
|
||||||
"list": [
|
|
||||||
{
|
|
||||||
"builtIn": 1,
|
|
||||||
"datasource": {
|
|
||||||
"type": "grafana",
|
|
||||||
"uid": "-- Grafana --"
|
|
||||||
},
|
|
||||||
"enable": true,
|
|
||||||
"hide": true,
|
|
||||||
"iconColor": "rgba(0, 211, 255, 1)",
|
|
||||||
"name": "Annotations & Alerts",
|
|
||||||
"type": "dashboard"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"editable": true,
|
|
||||||
"fiscalYearStartMonth": 0,
|
|
||||||
"graphTooltip": 0,
|
|
||||||
"id": null,
|
|
||||||
"links": [],
|
|
||||||
"liveNow": false,
|
|
||||||
"panels": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "palette-classic"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"axisCenteredZero": false,
|
|
||||||
"axisColorMode": "text",
|
|
||||||
"axisLabel": "",
|
|
||||||
"axisPlacement": "auto",
|
|
||||||
"barAlignment": 0,
|
|
||||||
"drawStyle": "line",
|
|
||||||
"fillOpacity": 10,
|
|
||||||
"gradientMode": "none",
|
|
||||||
"hideFrom": {
|
|
||||||
"legend": false,
|
|
||||||
"tooltip": false,
|
|
||||||
"vis": false
|
|
||||||
},
|
|
||||||
"insertNulls": false,
|
|
||||||
"lineInterpolation": "linear",
|
|
||||||
"lineWidth": 1,
|
|
||||||
"pointSize": 5,
|
|
||||||
"scaleDistribution": {
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"showPoints": "never",
|
|
||||||
"spanNulls": false,
|
|
||||||
"stacking": {
|
|
||||||
"group": "A",
|
|
||||||
"mode": "none"
|
|
||||||
},
|
|
||||||
"thresholdsStyle": {
|
|
||||||
"mode": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"max": 100,
|
|
||||||
"min": 0,
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"unit": "percent"
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 12,
|
|
||||||
"x": 0,
|
|
||||||
"y": 0
|
|
||||||
},
|
|
||||||
"id": 1,
|
|
||||||
"options": {
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom",
|
|
||||||
"showLegend": true
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"mode": "single",
|
|
||||||
"sort": "none"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "100 - (avg by (instance) (irate(node_cpu_seconds_total{job=\"mirai-node\",mode=\"idle\"}[5m])) * 100)",
|
|
||||||
"legendFormat": "CPU Usage",
|
|
||||||
"range": true,
|
|
||||||
"refId": "A"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Mirai CPU Usage",
|
|
||||||
"type": "timeseries"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "palette-classic"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"axisCenteredZero": false,
|
|
||||||
"axisColorMode": "text",
|
|
||||||
"axisLabel": "",
|
|
||||||
"axisPlacement": "auto",
|
|
||||||
"barAlignment": 0,
|
|
||||||
"drawStyle": "line",
|
|
||||||
"fillOpacity": 10,
|
|
||||||
"gradientMode": "none",
|
|
||||||
"hideFrom": {
|
|
||||||
"legend": false,
|
|
||||||
"tooltip": false,
|
|
||||||
"vis": false
|
|
||||||
},
|
|
||||||
"insertNulls": false,
|
|
||||||
"lineInterpolation": "linear",
|
|
||||||
"lineWidth": 1,
|
|
||||||
"pointSize": 5,
|
|
||||||
"scaleDistribution": {
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"showPoints": "never",
|
|
||||||
"spanNulls": false,
|
|
||||||
"stacking": {
|
|
||||||
"group": "A",
|
|
||||||
"mode": "none"
|
|
||||||
},
|
|
||||||
"thresholdsStyle": {
|
|
||||||
"mode": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"unit": "bytes"
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 12,
|
|
||||||
"x": 12,
|
|
||||||
"y": 0
|
|
||||||
},
|
|
||||||
"id": 2,
|
|
||||||
"options": {
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom",
|
|
||||||
"showLegend": true
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"mode": "single",
|
|
||||||
"sort": "none"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "node_memory_MemTotal_bytes{job=\"mirai-node\"} - node_memory_MemAvailable_bytes{job=\"mirai-node\"}",
|
|
||||||
"legendFormat": "Used Memory",
|
|
||||||
"range": true,
|
|
||||||
"refId": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "node_memory_MemTotal_bytes{job=\"mirai-node\"}",
|
|
||||||
"legendFormat": "Total Memory",
|
|
||||||
"range": true,
|
|
||||||
"refId": "B"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Mirai Memory Usage",
|
|
||||||
"type": "timeseries"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "thresholds"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"align": "auto",
|
|
||||||
"cellOptions": {
|
|
||||||
"type": "auto"
|
|
||||||
},
|
|
||||||
"inspect": false
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byName",
|
|
||||||
"options": "CPU %"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"id": "unit",
|
|
||||||
"value": "percent"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "custom.cellOptions",
|
|
||||||
"value": {
|
|
||||||
"type": "gauge"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "max",
|
|
||||||
"value": 100
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byName",
|
|
||||||
"options": "Memory"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"id": "unit",
|
|
||||||
"value": "bytes"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 24,
|
|
||||||
"x": 0,
|
|
||||||
"y": 8
|
|
||||||
},
|
|
||||||
"id": 3,
|
|
||||||
"options": {
|
|
||||||
"cellHeight": "sm",
|
|
||||||
"footer": {
|
|
||||||
"countRows": false,
|
|
||||||
"fields": "",
|
|
||||||
"reducer": [
|
|
||||||
"sum"
|
|
||||||
],
|
|
||||||
"show": false
|
|
||||||
},
|
|
||||||
"showHeader": true,
|
|
||||||
"sortBy": [
|
|
||||||
{
|
|
||||||
"desc": true,
|
|
||||||
"displayName": "CPU %"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"pluginVersion": "10.0.0",
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "namedprocess_namegroup_cpu_seconds_total{job=\"mirai-process\"}",
|
|
||||||
"format": "table",
|
|
||||||
"legendFormat": "__auto",
|
|
||||||
"range": true,
|
|
||||||
"refId": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "namedprocess_namegroup_memory_bytes{job=\"mirai-process\"}",
|
|
||||||
"format": "table",
|
|
||||||
"hide": false,
|
|
||||||
"legendFormat": "__auto",
|
|
||||||
"range": true,
|
|
||||||
"refId": "B"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Mirai Running Processes",
|
|
||||||
"transformations": [
|
|
||||||
{
|
|
||||||
"id": "merge",
|
|
||||||
"options": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "organize",
|
|
||||||
"options": {
|
|
||||||
"excludeByName": {
|
|
||||||
"__name__": true,
|
|
||||||
"instance": true,
|
|
||||||
"job": true
|
|
||||||
},
|
|
||||||
"indexByName": {},
|
|
||||||
"renameByName": {
|
|
||||||
"Value #A": "CPU %",
|
|
||||||
"Value #B": "Memory",
|
|
||||||
"groupname": "Process Name"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": "table"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "palette-classic"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"axisCenteredZero": false,
|
|
||||||
"axisColorMode": "text",
|
|
||||||
"axisLabel": "",
|
|
||||||
"axisPlacement": "auto",
|
|
||||||
"barAlignment": 0,
|
|
||||||
"drawStyle": "line",
|
|
||||||
"fillOpacity": 10,
|
|
||||||
"gradientMode": "none",
|
|
||||||
"hideFrom": {
|
|
||||||
"legend": false,
|
|
||||||
"tooltip": false,
|
|
||||||
"vis": false
|
|
||||||
},
|
|
||||||
"insertNulls": false,
|
|
||||||
"lineInterpolation": "linear",
|
|
||||||
"lineWidth": 1,
|
|
||||||
"pointSize": 5,
|
|
||||||
"scaleDistribution": {
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"showPoints": "never",
|
|
||||||
"spanNulls": false,
|
|
||||||
"stacking": {
|
|
||||||
"group": "A",
|
|
||||||
"mode": "none"
|
|
||||||
},
|
|
||||||
"thresholdsStyle": {
|
|
||||||
"mode": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"unit": "short"
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 12,
|
|
||||||
"x": 0,
|
|
||||||
"y": 16
|
|
||||||
},
|
|
||||||
"id": 4,
|
|
||||||
"options": {
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom",
|
|
||||||
"showLegend": true
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"mode": "single",
|
|
||||||
"sort": "none"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "node_load1{job=\"mirai-node\"}",
|
|
||||||
"legendFormat": "1m load",
|
|
||||||
"range": true,
|
|
||||||
"refId": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "node_load5{job=\"mirai-node\"}",
|
|
||||||
"legendFormat": "5m load",
|
|
||||||
"range": true,
|
|
||||||
"refId": "B"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "node_load15{job=\"mirai-node\"}",
|
|
||||||
"legendFormat": "15m load",
|
|
||||||
"range": true,
|
|
||||||
"refId": "C"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Mirai System Load",
|
|
||||||
"type": "timeseries"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "palette-classic"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"axisCenteredZero": false,
|
|
||||||
"axisColorMode": "text",
|
|
||||||
"axisLabel": "",
|
|
||||||
"axisPlacement": "auto",
|
|
||||||
"barAlignment": 0,
|
|
||||||
"drawStyle": "line",
|
|
||||||
"fillOpacity": 10,
|
|
||||||
"gradientMode": "none",
|
|
||||||
"hideFrom": {
|
|
||||||
"legend": false,
|
|
||||||
"tooltip": false,
|
|
||||||
"vis": false
|
|
||||||
},
|
|
||||||
"insertNulls": false,
|
|
||||||
"lineInterpolation": "linear",
|
|
||||||
"lineWidth": 1,
|
|
||||||
"pointSize": 5,
|
|
||||||
"scaleDistribution": {
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"showPoints": "never",
|
|
||||||
"spanNulls": false,
|
|
||||||
"stacking": {
|
|
||||||
"group": "A",
|
|
||||||
"mode": "none"
|
|
||||||
},
|
|
||||||
"thresholdsStyle": {
|
|
||||||
"mode": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"unit": "bytes"
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 12,
|
|
||||||
"x": 12,
|
|
||||||
"y": 16
|
|
||||||
},
|
|
||||||
"id": 5,
|
|
||||||
"options": {
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom",
|
|
||||||
"showLegend": true
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"mode": "single",
|
|
||||||
"sort": "none"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "rate(node_network_receive_bytes_total{job=\"mirai-node\",device!~\"lo|veth.*|docker.*|virbr.*|br-.*\"}[5m])",
|
|
||||||
"legendFormat": "{{device}} - Inbound",
|
|
||||||
"range": true,
|
|
||||||
"refId": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "rate(node_network_transmit_bytes_total{job=\"mirai-node\",device!~\"lo|veth.*|docker.*|virbr.*|br-.*\"}[5m])",
|
|
||||||
"legendFormat": "{{device}} - Outbound",
|
|
||||||
"range": true,
|
|
||||||
"refId": "B"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Mirai Network I/O",
|
|
||||||
"type": "timeseries"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"refresh": "30s",
|
|
||||||
"schemaVersion": 38,
|
|
||||||
"style": "dark",
|
|
||||||
"tags": [
|
|
||||||
"monitoring",
|
|
||||||
"mirai"
|
|
||||||
],
|
|
||||||
"templating": {
|
|
||||||
"list": []
|
|
||||||
},
|
|
||||||
"time": {
|
|
||||||
"from": "now-1h",
|
|
||||||
"to": "now"
|
|
||||||
},
|
|
||||||
"timepicker": {},
|
|
||||||
"timezone": "",
|
|
||||||
"title": "Mirai System Monitoring",
|
|
||||||
"uid": "mirai-monitoring",
|
|
||||||
"version": 0,
|
|
||||||
"weekStart": ""
|
|
||||||
}
|
|
||||||
@@ -1,689 +0,0 @@
|
|||||||
{
|
|
||||||
"annotations": {
|
|
||||||
"list": [
|
|
||||||
{
|
|
||||||
"builtIn": 1,
|
|
||||||
"datasource": {
|
|
||||||
"type": "grafana",
|
|
||||||
"uid": "-- Grafana --"
|
|
||||||
},
|
|
||||||
"enable": true,
|
|
||||||
"hide": true,
|
|
||||||
"iconColor": "rgba(0, 211, 255, 1)",
|
|
||||||
"name": "Annotations & Alerts",
|
|
||||||
"type": "dashboard"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"editable": true,
|
|
||||||
"fiscalYearStartMonth": 0,
|
|
||||||
"graphTooltip": 0,
|
|
||||||
"id": null,
|
|
||||||
"links": [],
|
|
||||||
"liveNow": false,
|
|
||||||
"panels": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "palette-classic"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"axisCenteredZero": false,
|
|
||||||
"axisColorMode": "text",
|
|
||||||
"axisLabel": "",
|
|
||||||
"axisPlacement": "auto",
|
|
||||||
"barAlignment": 0,
|
|
||||||
"drawStyle": "line",
|
|
||||||
"fillOpacity": 10,
|
|
||||||
"gradientMode": "none",
|
|
||||||
"hideFrom": {
|
|
||||||
"legend": false,
|
|
||||||
"tooltip": false,
|
|
||||||
"vis": false
|
|
||||||
},
|
|
||||||
"insertNulls": false,
|
|
||||||
"lineInterpolation": "linear",
|
|
||||||
"lineWidth": 1,
|
|
||||||
"pointSize": 5,
|
|
||||||
"scaleDistribution": {
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"showPoints": "never",
|
|
||||||
"spanNulls": false,
|
|
||||||
"stacking": {
|
|
||||||
"group": "A",
|
|
||||||
"mode": "none"
|
|
||||||
},
|
|
||||||
"thresholdsStyle": {
|
|
||||||
"mode": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"max": 100,
|
|
||||||
"min": 0,
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "yellow",
|
|
||||||
"value": 70
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 85
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"unit": "percent"
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 24,
|
|
||||||
"x": 0,
|
|
||||||
"y": 0
|
|
||||||
},
|
|
||||||
"id": 1,
|
|
||||||
"options": {
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom",
|
|
||||||
"showLegend": true
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"mode": "single",
|
|
||||||
"sort": "none"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "100 - (avg by (instance) (irate(node_cpu_seconds_total{job=\"tsuba-node\",mode=\"idle\"}[5m])) * 100)",
|
|
||||||
"legendFormat": "Tsuba CPU Usage",
|
|
||||||
"range": true,
|
|
||||||
"refId": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "100 - (avg by (instance) (irate(node_cpu_seconds_total{job=\"ryu-node\",mode=\"idle\"}[5m])) * 100)",
|
|
||||||
"legendFormat": "Ryu CPU Usage",
|
|
||||||
"range": true,
|
|
||||||
"refId": "B"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "100 - (avg by (instance) (irate(node_cpu_seconds_total{job=\"mirai-node\",mode=\"idle\"}[5m])) * 100)",
|
|
||||||
"legendFormat": "Mirai CPU Usage",
|
|
||||||
"range": true,
|
|
||||||
"refId": "C"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "All Devices - CPU Usage",
|
|
||||||
"type": "timeseries"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "palette-classic"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"axisCenteredZero": false,
|
|
||||||
"axisColorMode": "text",
|
|
||||||
"axisLabel": "",
|
|
||||||
"axisPlacement": "auto",
|
|
||||||
"barAlignment": 0,
|
|
||||||
"drawStyle": "line",
|
|
||||||
"fillOpacity": 10,
|
|
||||||
"gradientMode": "none",
|
|
||||||
"hideFrom": {
|
|
||||||
"legend": false,
|
|
||||||
"tooltip": false,
|
|
||||||
"vis": false
|
|
||||||
},
|
|
||||||
"insertNulls": false,
|
|
||||||
"lineInterpolation": "linear",
|
|
||||||
"lineWidth": 1,
|
|
||||||
"pointSize": 5,
|
|
||||||
"scaleDistribution": {
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"showPoints": "never",
|
|
||||||
"spanNulls": false,
|
|
||||||
"stacking": {
|
|
||||||
"group": "A",
|
|
||||||
"mode": "none"
|
|
||||||
},
|
|
||||||
"thresholdsStyle": {
|
|
||||||
"mode": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"unit": "percent"
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 24,
|
|
||||||
"x": 0,
|
|
||||||
"y": 8
|
|
||||||
},
|
|
||||||
"id": 2,
|
|
||||||
"options": {
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom",
|
|
||||||
"showLegend": true
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"mode": "single",
|
|
||||||
"sort": "none"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "(node_memory_MemTotal_bytes{job=\"tsuba-node\"} - node_memory_MemAvailable_bytes{job=\"tsuba-node\"}) / node_memory_MemTotal_bytes{job=\"tsuba-node\"} * 100",
|
|
||||||
"legendFormat": "Tsuba Memory Usage",
|
|
||||||
"range": true,
|
|
||||||
"refId": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "(node_memory_MemTotal_bytes{job=\"ryu-node\"} - node_memory_MemAvailable_bytes{job=\"ryu-node\"}) / node_memory_MemTotal_bytes{job=\"ryu-node\"} * 100",
|
|
||||||
"legendFormat": "Ryu Memory Usage",
|
|
||||||
"range": true,
|
|
||||||
"refId": "B"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "(node_memory_MemTotal_bytes{job=\"mirai-node\"} - node_memory_MemAvailable_bytes{job=\"mirai-node\"}) / node_memory_MemTotal_bytes{job=\"mirai-node\"} * 100",
|
|
||||||
"legendFormat": "Mirai Memory Usage",
|
|
||||||
"range": true,
|
|
||||||
"refId": "C"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "All Devices - Memory Usage",
|
|
||||||
"type": "timeseries"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "thresholds"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"align": "auto",
|
|
||||||
"cellOptions": {
|
|
||||||
"type": "auto"
|
|
||||||
},
|
|
||||||
"inspect": false
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byName",
|
|
||||||
"options": "CPU %"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"id": "unit",
|
|
||||||
"value": "percent"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "custom.cellOptions",
|
|
||||||
"value": {
|
|
||||||
"type": "gauge"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "max",
|
|
||||||
"value": 100
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byName",
|
|
||||||
"options": "Memory %"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"id": "unit",
|
|
||||||
"value": "percent"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "custom.cellOptions",
|
|
||||||
"value": {
|
|
||||||
"type": "gauge"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "max",
|
|
||||||
"value": 100
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byName",
|
|
||||||
"options": "Load 1m"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"id": "unit",
|
|
||||||
"value": "short"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 24,
|
|
||||||
"x": 0,
|
|
||||||
"y": 16
|
|
||||||
},
|
|
||||||
"id": 3,
|
|
||||||
"options": {
|
|
||||||
"cellHeight": "sm",
|
|
||||||
"footer": {
|
|
||||||
"countRows": false,
|
|
||||||
"fields": "",
|
|
||||||
"reducer": [
|
|
||||||
"sum"
|
|
||||||
],
|
|
||||||
"show": false
|
|
||||||
},
|
|
||||||
"showHeader": true
|
|
||||||
},
|
|
||||||
"pluginVersion": "10.0.0",
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "100 - (avg by (instance) (irate(node_cpu_seconds_total{job=~\"tsuba-node|ryu-node|mirai-node\",mode=\"idle\"}[5m])) * 100)",
|
|
||||||
"format": "table",
|
|
||||||
"legendFormat": "__auto",
|
|
||||||
"range": true,
|
|
||||||
"refId": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "(node_memory_MemTotal_bytes{job=~\"tsuba-node|ryu-node|mirai-node\"} - node_memory_MemAvailable_bytes{job=~\"tsuba-node|ryu-node|mirai-node\"}) / node_memory_MemTotal_bytes{job=~\"tsuba-node|ryu-node|mirai-node\"} * 100",
|
|
||||||
"format": "table",
|
|
||||||
"hide": false,
|
|
||||||
"legendFormat": "__auto",
|
|
||||||
"range": true,
|
|
||||||
"refId": "B"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "node_load1{job=~\"tsuba-node|ryu-node|mirai-node\"}",
|
|
||||||
"format": "table",
|
|
||||||
"hide": false,
|
|
||||||
"legendFormat": "__auto",
|
|
||||||
"range": true,
|
|
||||||
"refId": "C"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "System Overview",
|
|
||||||
"transformations": [
|
|
||||||
{
|
|
||||||
"id": "merge",
|
|
||||||
"options": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "organize",
|
|
||||||
"options": {
|
|
||||||
"excludeByName": {
|
|
||||||
"__name__": true,
|
|
||||||
"instance": true
|
|
||||||
},
|
|
||||||
"indexByName": {},
|
|
||||||
"renameByName": {
|
|
||||||
"Value #A": "CPU %",
|
|
||||||
"Value #B": "Memory %",
|
|
||||||
"Value #C": "Load 1m",
|
|
||||||
"job": "Device"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "filterFieldsByName",
|
|
||||||
"options": {
|
|
||||||
"include": {
|
|
||||||
"names": [
|
|
||||||
"Device",
|
|
||||||
"CPU %",
|
|
||||||
"Memory %",
|
|
||||||
"Load 1m"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": "table"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "palette-classic"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"axisCenteredZero": false,
|
|
||||||
"axisColorMode": "text",
|
|
||||||
"axisLabel": "",
|
|
||||||
"axisPlacement": "auto",
|
|
||||||
"barAlignment": 0,
|
|
||||||
"drawStyle": "line",
|
|
||||||
"fillOpacity": 10,
|
|
||||||
"gradientMode": "none",
|
|
||||||
"hideFrom": {
|
|
||||||
"legend": false,
|
|
||||||
"tooltip": false,
|
|
||||||
"vis": false
|
|
||||||
},
|
|
||||||
"insertNulls": false,
|
|
||||||
"lineInterpolation": "linear",
|
|
||||||
"lineWidth": 1,
|
|
||||||
"pointSize": 5,
|
|
||||||
"scaleDistribution": {
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"showPoints": "never",
|
|
||||||
"spanNulls": false,
|
|
||||||
"stacking": {
|
|
||||||
"group": "A",
|
|
||||||
"mode": "none"
|
|
||||||
},
|
|
||||||
"thresholdsStyle": {
|
|
||||||
"mode": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"unit": "short"
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 12,
|
|
||||||
"x": 0,
|
|
||||||
"y": 24
|
|
||||||
},
|
|
||||||
"id": 4,
|
|
||||||
"options": {
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom",
|
|
||||||
"showLegend": true
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"mode": "single",
|
|
||||||
"sort": "none"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "node_load1{job=\"tsuba-node\"}",
|
|
||||||
"legendFormat": "Tsuba 1m load",
|
|
||||||
"range": true,
|
|
||||||
"refId": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "node_load1{job=\"ryu-node\"}",
|
|
||||||
"legendFormat": "Ryu 1m load",
|
|
||||||
"range": true,
|
|
||||||
"refId": "B"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "node_load1{job=\"mirai-node\"}",
|
|
||||||
"legendFormat": "Mirai 1m load",
|
|
||||||
"range": true,
|
|
||||||
"refId": "C"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "System Load Average (1m)",
|
|
||||||
"type": "timeseries"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "thresholds"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"align": "auto",
|
|
||||||
"cellOptions": {
|
|
||||||
"type": "auto"
|
|
||||||
},
|
|
||||||
"inspect": false
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byName",
|
|
||||||
"options": "Process Count"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"id": "unit",
|
|
||||||
"value": "short"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 12,
|
|
||||||
"x": 12,
|
|
||||||
"y": 24
|
|
||||||
},
|
|
||||||
"id": 5,
|
|
||||||
"options": {
|
|
||||||
"cellHeight": "sm",
|
|
||||||
"footer": {
|
|
||||||
"countRows": false,
|
|
||||||
"fields": "",
|
|
||||||
"reducer": [
|
|
||||||
"sum"
|
|
||||||
],
|
|
||||||
"show": false
|
|
||||||
},
|
|
||||||
"showHeader": true
|
|
||||||
},
|
|
||||||
"pluginVersion": "10.0.0",
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "count by (job) (namedprocess_namegroup_num_procs{job=~\"tsuba-process|ryu-process|mirai-process\"})",
|
|
||||||
"format": "table",
|
|
||||||
"legendFormat": "__auto",
|
|
||||||
"range": true,
|
|
||||||
"refId": "A"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Active Process Count by Device",
|
|
||||||
"transformations": [
|
|
||||||
{
|
|
||||||
"id": "organize",
|
|
||||||
"options": {
|
|
||||||
"excludeByName": {
|
|
||||||
"__name__": true,
|
|
||||||
"Time": true
|
|
||||||
},
|
|
||||||
"indexByName": {},
|
|
||||||
"renameByName": {
|
|
||||||
"Value": "Process Count",
|
|
||||||
"job": "Device"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": "table"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"refresh": "30s",
|
|
||||||
"schemaVersion": 38,
|
|
||||||
"style": "dark",
|
|
||||||
"tags": [
|
|
||||||
"monitoring",
|
|
||||||
"overview"
|
|
||||||
],
|
|
||||||
"templating": {
|
|
||||||
"list": []
|
|
||||||
},
|
|
||||||
"time": {
|
|
||||||
"from": "now-1h",
|
|
||||||
"to": "now"
|
|
||||||
},
|
|
||||||
"timepicker": {},
|
|
||||||
"timezone": "",
|
|
||||||
"title": "Infrastructure Overview",
|
|
||||||
"uid": "overview-monitoring",
|
|
||||||
"version": 0,
|
|
||||||
"weekStart": ""
|
|
||||||
}
|
|
||||||
@@ -1,615 +0,0 @@
|
|||||||
{
|
|
||||||
"annotations": {
|
|
||||||
"list": [
|
|
||||||
{
|
|
||||||
"builtIn": 1,
|
|
||||||
"datasource": {
|
|
||||||
"type": "grafana",
|
|
||||||
"uid": "-- Grafana --"
|
|
||||||
},
|
|
||||||
"enable": true,
|
|
||||||
"hide": true,
|
|
||||||
"iconColor": "rgba(0, 211, 255, 1)",
|
|
||||||
"name": "Annotations & Alerts",
|
|
||||||
"type": "dashboard"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"editable": true,
|
|
||||||
"fiscalYearStartMonth": 0,
|
|
||||||
"graphTooltip": 0,
|
|
||||||
"id": null,
|
|
||||||
"links": [],
|
|
||||||
"liveNow": false,
|
|
||||||
"panels": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "palette-classic"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"axisCenteredZero": false,
|
|
||||||
"axisColorMode": "text",
|
|
||||||
"axisLabel": "",
|
|
||||||
"axisPlacement": "auto",
|
|
||||||
"barAlignment": 0,
|
|
||||||
"drawStyle": "line",
|
|
||||||
"fillOpacity": 10,
|
|
||||||
"gradientMode": "none",
|
|
||||||
"hideFrom": {
|
|
||||||
"legend": false,
|
|
||||||
"tooltip": false,
|
|
||||||
"vis": false
|
|
||||||
},
|
|
||||||
"insertNulls": false,
|
|
||||||
"lineInterpolation": "linear",
|
|
||||||
"lineWidth": 1,
|
|
||||||
"pointSize": 5,
|
|
||||||
"scaleDistribution": {
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"showPoints": "never",
|
|
||||||
"spanNulls": false,
|
|
||||||
"stacking": {
|
|
||||||
"group": "A",
|
|
||||||
"mode": "none"
|
|
||||||
},
|
|
||||||
"thresholdsStyle": {
|
|
||||||
"mode": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"max": 100,
|
|
||||||
"min": 0,
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"unit": "percent"
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 12,
|
|
||||||
"x": 0,
|
|
||||||
"y": 0
|
|
||||||
},
|
|
||||||
"id": 1,
|
|
||||||
"options": {
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom",
|
|
||||||
"showLegend": true
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"mode": "single",
|
|
||||||
"sort": "none"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "100 - (avg by (instance) (irate(node_cpu_seconds_total{job=\"ryu-node\",mode=\"idle\"}[5m])) * 100)",
|
|
||||||
"legendFormat": "CPU Usage",
|
|
||||||
"range": true,
|
|
||||||
"refId": "A"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Ryu CPU Usage",
|
|
||||||
"type": "timeseries"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "palette-classic"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"axisCenteredZero": false,
|
|
||||||
"axisColorMode": "text",
|
|
||||||
"axisLabel": "",
|
|
||||||
"axisPlacement": "auto",
|
|
||||||
"barAlignment": 0,
|
|
||||||
"drawStyle": "line",
|
|
||||||
"fillOpacity": 10,
|
|
||||||
"gradientMode": "none",
|
|
||||||
"hideFrom": {
|
|
||||||
"legend": false,
|
|
||||||
"tooltip": false,
|
|
||||||
"vis": false
|
|
||||||
},
|
|
||||||
"insertNulls": false,
|
|
||||||
"lineInterpolation": "linear",
|
|
||||||
"lineWidth": 1,
|
|
||||||
"pointSize": 5,
|
|
||||||
"scaleDistribution": {
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"showPoints": "never",
|
|
||||||
"spanNulls": false,
|
|
||||||
"stacking": {
|
|
||||||
"group": "A",
|
|
||||||
"mode": "none"
|
|
||||||
},
|
|
||||||
"thresholdsStyle": {
|
|
||||||
"mode": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"unit": "bytes"
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 12,
|
|
||||||
"x": 12,
|
|
||||||
"y": 0
|
|
||||||
},
|
|
||||||
"id": 2,
|
|
||||||
"options": {
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom",
|
|
||||||
"showLegend": true
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"mode": "single",
|
|
||||||
"sort": "none"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "node_memory_MemTotal_bytes{job=\"ryu-node\"} - node_memory_MemAvailable_bytes{job=\"ryu-node\"}",
|
|
||||||
"legendFormat": "Used Memory",
|
|
||||||
"range": true,
|
|
||||||
"refId": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "node_memory_MemTotal_bytes{job=\"ryu-node\"}",
|
|
||||||
"legendFormat": "Total Memory",
|
|
||||||
"range": true,
|
|
||||||
"refId": "B"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Ryu Memory Usage",
|
|
||||||
"type": "timeseries"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "thresholds"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"align": "auto",
|
|
||||||
"cellOptions": {
|
|
||||||
"type": "auto"
|
|
||||||
},
|
|
||||||
"inspect": false
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byName",
|
|
||||||
"options": "CPU %"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"id": "unit",
|
|
||||||
"value": "percent"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "custom.cellOptions",
|
|
||||||
"value": {
|
|
||||||
"type": "gauge"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "max",
|
|
||||||
"value": 100
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byName",
|
|
||||||
"options": "Memory"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"id": "unit",
|
|
||||||
"value": "bytes"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 24,
|
|
||||||
"x": 0,
|
|
||||||
"y": 8
|
|
||||||
},
|
|
||||||
"id": 3,
|
|
||||||
"options": {
|
|
||||||
"cellHeight": "sm",
|
|
||||||
"footer": {
|
|
||||||
"countRows": false,
|
|
||||||
"fields": "",
|
|
||||||
"reducer": [
|
|
||||||
"sum"
|
|
||||||
],
|
|
||||||
"show": false
|
|
||||||
},
|
|
||||||
"showHeader": true,
|
|
||||||
"sortBy": [
|
|
||||||
{
|
|
||||||
"desc": true,
|
|
||||||
"displayName": "CPU %"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"pluginVersion": "10.0.0",
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "namedprocess_namegroup_cpu_seconds_total{job=\"ryu-process\"}",
|
|
||||||
"format": "table",
|
|
||||||
"legendFormat": "__auto",
|
|
||||||
"range": true,
|
|
||||||
"refId": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "namedprocess_namegroup_memory_bytes{job=\"ryu-process\"}",
|
|
||||||
"format": "table",
|
|
||||||
"hide": false,
|
|
||||||
"legendFormat": "__auto",
|
|
||||||
"range": true,
|
|
||||||
"refId": "B"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Ryu Running Processes",
|
|
||||||
"transformations": [
|
|
||||||
{
|
|
||||||
"id": "merge",
|
|
||||||
"options": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "organize",
|
|
||||||
"options": {
|
|
||||||
"excludeByName": {
|
|
||||||
"__name__": true,
|
|
||||||
"instance": true,
|
|
||||||
"job": true
|
|
||||||
},
|
|
||||||
"indexByName": {},
|
|
||||||
"renameByName": {
|
|
||||||
"Value #A": "CPU %",
|
|
||||||
"Value #B": "Memory",
|
|
||||||
"groupname": "Process Name"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": "table"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "palette-classic"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"axisCenteredZero": false,
|
|
||||||
"axisColorMode": "text",
|
|
||||||
"axisLabel": "",
|
|
||||||
"axisPlacement": "auto",
|
|
||||||
"barAlignment": 0,
|
|
||||||
"drawStyle": "line",
|
|
||||||
"fillOpacity": 10,
|
|
||||||
"gradientMode": "none",
|
|
||||||
"hideFrom": {
|
|
||||||
"legend": false,
|
|
||||||
"tooltip": false,
|
|
||||||
"vis": false
|
|
||||||
},
|
|
||||||
"insertNulls": false,
|
|
||||||
"lineInterpolation": "linear",
|
|
||||||
"lineWidth": 1,
|
|
||||||
"pointSize": 5,
|
|
||||||
"scaleDistribution": {
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"showPoints": "never",
|
|
||||||
"spanNulls": false,
|
|
||||||
"stacking": {
|
|
||||||
"group": "A",
|
|
||||||
"mode": "none"
|
|
||||||
},
|
|
||||||
"thresholdsStyle": {
|
|
||||||
"mode": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"unit": "short"
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 12,
|
|
||||||
"x": 0,
|
|
||||||
"y": 16
|
|
||||||
},
|
|
||||||
"id": 4,
|
|
||||||
"options": {
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom",
|
|
||||||
"showLegend": true
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"mode": "single",
|
|
||||||
"sort": "none"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "node_load1{job=\"ryu-node\"}",
|
|
||||||
"legendFormat": "1m load",
|
|
||||||
"range": true,
|
|
||||||
"refId": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "node_load5{job=\"ryu-node\"}",
|
|
||||||
"legendFormat": "5m load",
|
|
||||||
"range": true,
|
|
||||||
"refId": "B"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "node_load15{job=\"ryu-node\"}",
|
|
||||||
"legendFormat": "15m load",
|
|
||||||
"range": true,
|
|
||||||
"refId": "C"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Ryu System Load",
|
|
||||||
"type": "timeseries"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "palette-classic"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"axisCenteredZero": false,
|
|
||||||
"axisColorMode": "text",
|
|
||||||
"axisLabel": "",
|
|
||||||
"axisPlacement": "auto",
|
|
||||||
"barAlignment": 0,
|
|
||||||
"drawStyle": "line",
|
|
||||||
"fillOpacity": 10,
|
|
||||||
"gradientMode": "none",
|
|
||||||
"hideFrom": {
|
|
||||||
"legend": false,
|
|
||||||
"tooltip": false,
|
|
||||||
"vis": false
|
|
||||||
},
|
|
||||||
"insertNulls": false,
|
|
||||||
"lineInterpolation": "linear",
|
|
||||||
"lineWidth": 1,
|
|
||||||
"pointSize": 5,
|
|
||||||
"scaleDistribution": {
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"showPoints": "never",
|
|
||||||
"spanNulls": false,
|
|
||||||
"stacking": {
|
|
||||||
"group": "A",
|
|
||||||
"mode": "none"
|
|
||||||
},
|
|
||||||
"thresholdsStyle": {
|
|
||||||
"mode": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"unit": "bytes"
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 12,
|
|
||||||
"x": 12,
|
|
||||||
"y": 16
|
|
||||||
},
|
|
||||||
"id": 5,
|
|
||||||
"options": {
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom",
|
|
||||||
"showLegend": true
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"mode": "single",
|
|
||||||
"sort": "none"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "rate(node_network_receive_bytes_total{job=\"ryu-node\",device!~\"lo|veth.*|docker.*|virbr.*|br-.*\"}[5m])",
|
|
||||||
"legendFormat": "{{device}} - Inbound",
|
|
||||||
"range": true,
|
|
||||||
"refId": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "rate(node_network_transmit_bytes_total{job=\"ryu-node\",device!~\"lo|veth.*|docker.*|virbr.*|br-.*\"}[5m])",
|
|
||||||
"legendFormat": "{{device}} - Outbound",
|
|
||||||
"range": true,
|
|
||||||
"refId": "B"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Ryu Network I/O",
|
|
||||||
"type": "timeseries"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"refresh": "30s",
|
|
||||||
"schemaVersion": 38,
|
|
||||||
"style": "dark",
|
|
||||||
"tags": [
|
|
||||||
"monitoring",
|
|
||||||
"ryu"
|
|
||||||
],
|
|
||||||
"templating": {
|
|
||||||
"list": []
|
|
||||||
},
|
|
||||||
"time": {
|
|
||||||
"from": "now-1h",
|
|
||||||
"to": "now"
|
|
||||||
},
|
|
||||||
"timepicker": {},
|
|
||||||
"timezone": "",
|
|
||||||
"title": "Ryu System Monitoring",
|
|
||||||
"uid": "ryu-monitoring",
|
|
||||||
"version": 0,
|
|
||||||
"weekStart": ""
|
|
||||||
}
|
|
||||||
@@ -1,615 +0,0 @@
|
|||||||
{
|
|
||||||
"annotations": {
|
|
||||||
"list": [
|
|
||||||
{
|
|
||||||
"builtIn": 1,
|
|
||||||
"datasource": {
|
|
||||||
"type": "grafana",
|
|
||||||
"uid": "-- Grafana --"
|
|
||||||
},
|
|
||||||
"enable": true,
|
|
||||||
"hide": true,
|
|
||||||
"iconColor": "rgba(0, 211, 255, 1)",
|
|
||||||
"name": "Annotations & Alerts",
|
|
||||||
"type": "dashboard"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"editable": true,
|
|
||||||
"fiscalYearStartMonth": 0,
|
|
||||||
"graphTooltip": 0,
|
|
||||||
"id": null,
|
|
||||||
"links": [],
|
|
||||||
"liveNow": false,
|
|
||||||
"panels": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "palette-classic"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"axisCenteredZero": false,
|
|
||||||
"axisColorMode": "text",
|
|
||||||
"axisLabel": "",
|
|
||||||
"axisPlacement": "auto",
|
|
||||||
"barAlignment": 0,
|
|
||||||
"drawStyle": "line",
|
|
||||||
"fillOpacity": 10,
|
|
||||||
"gradientMode": "none",
|
|
||||||
"hideFrom": {
|
|
||||||
"legend": false,
|
|
||||||
"tooltip": false,
|
|
||||||
"vis": false
|
|
||||||
},
|
|
||||||
"insertNulls": false,
|
|
||||||
"lineInterpolation": "linear",
|
|
||||||
"lineWidth": 1,
|
|
||||||
"pointSize": 5,
|
|
||||||
"scaleDistribution": {
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"showPoints": "never",
|
|
||||||
"spanNulls": false,
|
|
||||||
"stacking": {
|
|
||||||
"group": "A",
|
|
||||||
"mode": "none"
|
|
||||||
},
|
|
||||||
"thresholdsStyle": {
|
|
||||||
"mode": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"max": 100,
|
|
||||||
"min": 0,
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"unit": "percent"
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 12,
|
|
||||||
"x": 0,
|
|
||||||
"y": 0
|
|
||||||
},
|
|
||||||
"id": 1,
|
|
||||||
"options": {
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom",
|
|
||||||
"showLegend": true
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"mode": "single",
|
|
||||||
"sort": "none"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "100 - (avg by (instance) (irate(node_cpu_seconds_total{job=\"tsuba-node\",mode=\"idle\"}[5m])) * 100)",
|
|
||||||
"legendFormat": "CPU Usage",
|
|
||||||
"range": true,
|
|
||||||
"refId": "A"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Tsuba CPU Usage",
|
|
||||||
"type": "timeseries"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "palette-classic"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"axisCenteredZero": false,
|
|
||||||
"axisColorMode": "text",
|
|
||||||
"axisLabel": "",
|
|
||||||
"axisPlacement": "auto",
|
|
||||||
"barAlignment": 0,
|
|
||||||
"drawStyle": "line",
|
|
||||||
"fillOpacity": 10,
|
|
||||||
"gradientMode": "none",
|
|
||||||
"hideFrom": {
|
|
||||||
"legend": false,
|
|
||||||
"tooltip": false,
|
|
||||||
"vis": false
|
|
||||||
},
|
|
||||||
"insertNulls": false,
|
|
||||||
"lineInterpolation": "linear",
|
|
||||||
"lineWidth": 1,
|
|
||||||
"pointSize": 5,
|
|
||||||
"scaleDistribution": {
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"showPoints": "never",
|
|
||||||
"spanNulls": false,
|
|
||||||
"stacking": {
|
|
||||||
"group": "A",
|
|
||||||
"mode": "none"
|
|
||||||
},
|
|
||||||
"thresholdsStyle": {
|
|
||||||
"mode": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"unit": "bytes"
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 12,
|
|
||||||
"x": 12,
|
|
||||||
"y": 0
|
|
||||||
},
|
|
||||||
"id": 2,
|
|
||||||
"options": {
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom",
|
|
||||||
"showLegend": true
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"mode": "single",
|
|
||||||
"sort": "none"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "node_memory_MemTotal_bytes{job=\"tsuba-node\"} - node_memory_MemAvailable_bytes{job=\"tsuba-node\"}",
|
|
||||||
"legendFormat": "Used Memory",
|
|
||||||
"range": true,
|
|
||||||
"refId": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "node_memory_MemTotal_bytes{job=\"tsuba-node\"}",
|
|
||||||
"legendFormat": "Total Memory",
|
|
||||||
"range": true,
|
|
||||||
"refId": "B"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Tsuba Memory Usage",
|
|
||||||
"type": "timeseries"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "thresholds"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"align": "auto",
|
|
||||||
"cellOptions": {
|
|
||||||
"type": "auto"
|
|
||||||
},
|
|
||||||
"inspect": false
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byName",
|
|
||||||
"options": "CPU %"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"id": "unit",
|
|
||||||
"value": "percent"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "custom.cellOptions",
|
|
||||||
"value": {
|
|
||||||
"type": "gauge"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "max",
|
|
||||||
"value": 100
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byName",
|
|
||||||
"options": "Memory"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"id": "unit",
|
|
||||||
"value": "bytes"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 24,
|
|
||||||
"x": 0,
|
|
||||||
"y": 8
|
|
||||||
},
|
|
||||||
"id": 3,
|
|
||||||
"options": {
|
|
||||||
"cellHeight": "sm",
|
|
||||||
"footer": {
|
|
||||||
"countRows": false,
|
|
||||||
"fields": "",
|
|
||||||
"reducer": [
|
|
||||||
"sum"
|
|
||||||
],
|
|
||||||
"show": false
|
|
||||||
},
|
|
||||||
"showHeader": true,
|
|
||||||
"sortBy": [
|
|
||||||
{
|
|
||||||
"desc": true,
|
|
||||||
"displayName": "CPU %"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"pluginVersion": "10.0.0",
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "namedprocess_namegroup_cpu_seconds_total{job=\"tsuba-process\"}",
|
|
||||||
"format": "table",
|
|
||||||
"legendFormat": "__auto",
|
|
||||||
"range": true,
|
|
||||||
"refId": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "namedprocess_namegroup_memory_bytes{job=\"tsuba-process\"}",
|
|
||||||
"format": "table",
|
|
||||||
"hide": false,
|
|
||||||
"legendFormat": "__auto",
|
|
||||||
"range": true,
|
|
||||||
"refId": "B"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Tsuba Running Processes",
|
|
||||||
"transformations": [
|
|
||||||
{
|
|
||||||
"id": "merge",
|
|
||||||
"options": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "organize",
|
|
||||||
"options": {
|
|
||||||
"excludeByName": {
|
|
||||||
"__name__": true,
|
|
||||||
"instance": true,
|
|
||||||
"job": true
|
|
||||||
},
|
|
||||||
"indexByName": {},
|
|
||||||
"renameByName": {
|
|
||||||
"Value #A": "CPU %",
|
|
||||||
"Value #B": "Memory",
|
|
||||||
"groupname": "Process Name"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": "table"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "palette-classic"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"axisCenteredZero": false,
|
|
||||||
"axisColorMode": "text",
|
|
||||||
"axisLabel": "",
|
|
||||||
"axisPlacement": "auto",
|
|
||||||
"barAlignment": 0,
|
|
||||||
"drawStyle": "line",
|
|
||||||
"fillOpacity": 10,
|
|
||||||
"gradientMode": "none",
|
|
||||||
"hideFrom": {
|
|
||||||
"legend": false,
|
|
||||||
"tooltip": false,
|
|
||||||
"vis": false
|
|
||||||
},
|
|
||||||
"insertNulls": false,
|
|
||||||
"lineInterpolation": "linear",
|
|
||||||
"lineWidth": 1,
|
|
||||||
"pointSize": 5,
|
|
||||||
"scaleDistribution": {
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"showPoints": "never",
|
|
||||||
"spanNulls": false,
|
|
||||||
"stacking": {
|
|
||||||
"group": "A",
|
|
||||||
"mode": "none"
|
|
||||||
},
|
|
||||||
"thresholdsStyle": {
|
|
||||||
"mode": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"unit": "short"
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 12,
|
|
||||||
"x": 0,
|
|
||||||
"y": 16
|
|
||||||
},
|
|
||||||
"id": 4,
|
|
||||||
"options": {
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom",
|
|
||||||
"showLegend": true
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"mode": "single",
|
|
||||||
"sort": "none"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "node_load1{job=\"tsuba-node\"}",
|
|
||||||
"legendFormat": "1m load",
|
|
||||||
"range": true,
|
|
||||||
"refId": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "node_load5{job=\"tsuba-node\"}",
|
|
||||||
"legendFormat": "5m load",
|
|
||||||
"range": true,
|
|
||||||
"refId": "B"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "node_load15{job=\"tsuba-node\"}",
|
|
||||||
"legendFormat": "15m load",
|
|
||||||
"range": true,
|
|
||||||
"refId": "C"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Tsuba System Load",
|
|
||||||
"type": "timeseries"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "palette-classic"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"axisCenteredZero": false,
|
|
||||||
"axisColorMode": "text",
|
|
||||||
"axisLabel": "",
|
|
||||||
"axisPlacement": "auto",
|
|
||||||
"barAlignment": 0,
|
|
||||||
"drawStyle": "line",
|
|
||||||
"fillOpacity": 10,
|
|
||||||
"gradientMode": "none",
|
|
||||||
"hideFrom": {
|
|
||||||
"legend": false,
|
|
||||||
"tooltip": false,
|
|
||||||
"vis": false
|
|
||||||
},
|
|
||||||
"insertNulls": false,
|
|
||||||
"lineInterpolation": "linear",
|
|
||||||
"lineWidth": 1,
|
|
||||||
"pointSize": 5,
|
|
||||||
"scaleDistribution": {
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"showPoints": "never",
|
|
||||||
"spanNulls": false,
|
|
||||||
"stacking": {
|
|
||||||
"group": "A",
|
|
||||||
"mode": "none"
|
|
||||||
},
|
|
||||||
"thresholdsStyle": {
|
|
||||||
"mode": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"unit": "bytes"
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 12,
|
|
||||||
"x": 12,
|
|
||||||
"y": 16
|
|
||||||
},
|
|
||||||
"id": 5,
|
|
||||||
"options": {
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom",
|
|
||||||
"showLegend": true
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"mode": "single",
|
|
||||||
"sort": "none"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "rate(node_network_receive_bytes_total{job=\"tsuba-node\",device!~\"lo|veth.*|docker.*|virbr.*|br-.*\"}[5m])",
|
|
||||||
"legendFormat": "{{device}} - Inbound",
|
|
||||||
"range": true,
|
|
||||||
"refId": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "rate(node_network_transmit_bytes_total{job=\"tsuba-node\",device!~\"lo|veth.*|docker.*|virbr.*|br-.*\"}[5m])",
|
|
||||||
"legendFormat": "{{device}} - Outbound",
|
|
||||||
"range": true,
|
|
||||||
"refId": "B"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Tsuba Network I/O",
|
|
||||||
"type": "timeseries"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"refresh": "30s",
|
|
||||||
"schemaVersion": 38,
|
|
||||||
"style": "dark",
|
|
||||||
"tags": [
|
|
||||||
"monitoring",
|
|
||||||
"tsuba"
|
|
||||||
],
|
|
||||||
"templating": {
|
|
||||||
"list": []
|
|
||||||
},
|
|
||||||
"time": {
|
|
||||||
"from": "now-1h",
|
|
||||||
"to": "now"
|
|
||||||
},
|
|
||||||
"timepicker": {},
|
|
||||||
"timezone": "",
|
|
||||||
"title": "Tsuba System Monitoring",
|
|
||||||
"uid": "tsuba-monitoring",
|
|
||||||
"version": 0,
|
|
||||||
"weekStart": ""
|
|
||||||
}
|
|
||||||
@@ -1,24 +1,26 @@
|
|||||||
{...}: {
|
{...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./atuin.nix
|
# ./atuin.nix
|
||||||
./authelia.nix
|
# ./authelia.nix
|
||||||
./caddy.nix
|
# ./caddy.nix
|
||||||
./excalidraw.nix
|
# ./excalidraw.nix
|
||||||
./fail2ban.nix
|
# ./fail2ban.nix
|
||||||
./flaresolverr.nix
|
# ./flaresolverr.nix
|
||||||
./gitea.nix
|
# ./games
|
||||||
./homepage.nix
|
# ./gitea.nix
|
||||||
|
# ./homepage.nix
|
||||||
|
# # ./immich.nix
|
||||||
# ./immich.nix
|
# ./immich.nix
|
||||||
./llama.nix
|
# # ./llama.nix
|
||||||
./lldap.nix
|
# ./lldap.nix
|
||||||
./monitoring.nix
|
# ./nextcloud.nix
|
||||||
./nextcloud.nix
|
# # ./paperless.nix
|
||||||
./prowlarr.nix
|
# ./prowlarr.nix
|
||||||
./resolved.nix
|
# ./resolved.nix
|
||||||
./searxng.nix
|
# ./searxng.nix
|
||||||
./tailscale.nix
|
./tailscale.nix
|
||||||
./games
|
# ./headscale.nix
|
||||||
# ./paperless.nix
|
# ./shitpost.nix
|
||||||
];
|
];
|
||||||
services = {
|
services = {
|
||||||
nix-serve = {
|
nix-serve = {
|
||||||
|
|||||||
@@ -2,5 +2,6 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./minecraft.nix
|
./minecraft.nix
|
||||||
./satisfactory.nix
|
./satisfactory.nix
|
||||||
|
./terraria.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
7
nixos/mirai/services/games/terraria.nix
Normal file
7
nixos/mirai/services/games/terraria.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{...}: {
|
||||||
|
services.terraria = {
|
||||||
|
enable = true;
|
||||||
|
# port = 7777;
|
||||||
|
autoCreatedWorldSize = "large";
|
||||||
|
};
|
||||||
|
}
|
||||||
79
nixos/mirai/services/headscale.nix
Normal file
79
nixos/mirai/services/headscale.nix
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
{config, ...}: {
|
||||||
|
sops = {
|
||||||
|
secrets.headscale-secret = {
|
||||||
|
owner = config.systemd.services.headscale.serviceConfig.User;
|
||||||
|
mode = "0440";
|
||||||
|
restartUnits = ["headscale.service" "authelia-darksailor.service"];
|
||||||
|
key = "authelia/oidc/headscale/client_secret";
|
||||||
|
};
|
||||||
|
secrets.headscale-authelia = {
|
||||||
|
owner = config.systemd.services.authelia-darksailor.serviceConfig.User;
|
||||||
|
mode = "0440";
|
||||||
|
restartUnits = ["headscale.service" "authelia-darksailor.service"];
|
||||||
|
key = "authelia/oidc/headscale/client_secret";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services = {
|
||||||
|
headscale = {
|
||||||
|
enable = true;
|
||||||
|
port = 8095;
|
||||||
|
settings = {
|
||||||
|
dns = {
|
||||||
|
magic_dns = true;
|
||||||
|
base_domain = "headscale.darksailor.dev";
|
||||||
|
nameservers.global = ["1.1.1.1"];
|
||||||
|
};
|
||||||
|
oidc = {
|
||||||
|
issuer = "https://auth.darksailor.dev";
|
||||||
|
client_id = "headscale";
|
||||||
|
client_secret_path = "${config.sops.secrets.headscale-secret.path}";
|
||||||
|
pkce = {
|
||||||
|
enabled = true;
|
||||||
|
method = "S256";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# headplane = {
|
||||||
|
# enable = true;
|
||||||
|
# settings = {
|
||||||
|
# server.port = 42562;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
caddy = {
|
||||||
|
virtualHosts."headscale.darksailor.dev".extraConfig = ''
|
||||||
|
reverse_proxy localhost:${toString config.services.headplane.settings.server.port}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
authelia = {
|
||||||
|
instances.darksailor = {
|
||||||
|
settings = {
|
||||||
|
identity_providers = {
|
||||||
|
oidc = {
|
||||||
|
clients = [
|
||||||
|
{
|
||||||
|
client_name = "HeadScale";
|
||||||
|
client_id = "headscale";
|
||||||
|
client_secret = ''{{ secret "${config.sops.secrets.headscale-authelia.path}" }}'';
|
||||||
|
public = false;
|
||||||
|
authorization_policy = "one_factor";
|
||||||
|
require_pkce = true;
|
||||||
|
pkce_challenge_method = "S256";
|
||||||
|
redirect_uris = [
|
||||||
|
"https://headscale.darksailor.dev/oidc/callback"
|
||||||
|
];
|
||||||
|
scopes = ["openid" "email" "profile" "groups"];
|
||||||
|
response_types = ["code"];
|
||||||
|
grant_types = ["authorization_code"];
|
||||||
|
access_token_signed_response_alg = "none";
|
||||||
|
userinfo_signed_response_alg = "none";
|
||||||
|
token_endpoint_auth_method = "client_secret_basic";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
# package = pkgs.ik_llama;
|
# package = pkgs.ik_llama;
|
||||||
};
|
};
|
||||||
ollama = {
|
ollama = {
|
||||||
enable = true;
|
enable = false;
|
||||||
loadModels = [
|
loadModels = [
|
||||||
"deepseek-r1:7b"
|
"deepseek-r1:7b"
|
||||||
"deepseek-r1:14b"
|
"deepseek-r1:14b"
|
||||||
|
|||||||
@@ -1,282 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
sops.secrets = {
|
|
||||||
"grafana/adminPassword" = {
|
|
||||||
owner = "grafana";
|
|
||||||
group = "grafana";
|
|
||||||
};
|
|
||||||
oauth-client-secret-grafana-authelia = {
|
|
||||||
owner = config.systemd.services.authelia-darksailor.serviceConfig.User;
|
|
||||||
key = "authelia/oidc/grafana/client_secret";
|
|
||||||
restartUnits = [
|
|
||||||
"authelia-darksailor.service"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
oauth-client-secret-grafana = {
|
|
||||||
owner = config.systemd.services.grafana.serviceConfig.User;
|
|
||||||
key = "authelia/oidc/grafana/client_secret";
|
|
||||||
restartUnits = [
|
|
||||||
"grafana"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services = {
|
|
||||||
prometheus = {
|
|
||||||
enable = true;
|
|
||||||
port = 9090;
|
|
||||||
listenAddress = "0.0.0.0";
|
|
||||||
|
|
||||||
scrapeConfigs = [
|
|
||||||
{
|
|
||||||
job_name = "tsuba-node";
|
|
||||||
static_configs = [
|
|
||||||
{
|
|
||||||
targets = ["tsuba:9100"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
scrape_interval = "15s";
|
|
||||||
scrape_timeout = "10s";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
job_name = "tsuba-process";
|
|
||||||
static_configs = [
|
|
||||||
{
|
|
||||||
targets = ["tsuba:9256"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
scrape_interval = "15s";
|
|
||||||
scrape_timeout = "10s";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
job_name = "ryu-node";
|
|
||||||
static_configs = [
|
|
||||||
{
|
|
||||||
targets = ["ryu:9100"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
scrape_interval = "15s";
|
|
||||||
scrape_timeout = "10s";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
job_name = "ryu-process";
|
|
||||||
static_configs = [
|
|
||||||
{
|
|
||||||
targets = ["ryu:9256"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
scrape_interval = "15s";
|
|
||||||
scrape_timeout = "10s";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
job_name = "mirai-node";
|
|
||||||
static_configs = [
|
|
||||||
{
|
|
||||||
targets = ["localhost:9100"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
scrape_interval = "15s";
|
|
||||||
scrape_timeout = "10s";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
job_name = "mirai-process";
|
|
||||||
static_configs = [
|
|
||||||
{
|
|
||||||
targets = ["localhost:9256"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
scrape_interval = "15s";
|
|
||||||
scrape_timeout = "10s";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
retentionTime = "30d";
|
|
||||||
|
|
||||||
globalConfig = {
|
|
||||||
scrape_interval = "15s";
|
|
||||||
evaluation_interval = "15s";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
prometheus.exporters = {
|
|
||||||
node = {
|
|
||||||
enable = true;
|
|
||||||
enabledCollectors = [
|
|
||||||
"systemd"
|
|
||||||
"textfile"
|
|
||||||
"filesystem"
|
|
||||||
"loadavg"
|
|
||||||
"meminfo"
|
|
||||||
"netdev"
|
|
||||||
"stat"
|
|
||||||
"time"
|
|
||||||
"uname"
|
|
||||||
"vmstat"
|
|
||||||
];
|
|
||||||
port = 9100;
|
|
||||||
};
|
|
||||||
process = {
|
|
||||||
enable = true;
|
|
||||||
settings.process_names = [
|
|
||||||
{
|
|
||||||
name = "{{.Comm}}";
|
|
||||||
cmdline = [".*"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
grafana = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
server = {
|
|
||||||
http_addr = "0.0.0.0";
|
|
||||||
http_port = 3333;
|
|
||||||
domain = "monitoring.darksailor.dev";
|
|
||||||
root_url = "https://monitoring.darksailor.dev";
|
|
||||||
};
|
|
||||||
security = {
|
|
||||||
admin_user = "admin";
|
|
||||||
admin_password = "$__file{${config.sops.secrets."grafana/adminPassword".path}}";
|
|
||||||
};
|
|
||||||
auth = {
|
|
||||||
disable_login_form = true;
|
|
||||||
};
|
|
||||||
"auth.basic" = {
|
|
||||||
enabled = false;
|
|
||||||
};
|
|
||||||
"auth.generic_oauth" = {
|
|
||||||
enabled = true;
|
|
||||||
name = "Authelia";
|
|
||||||
client_id = "grafana";
|
|
||||||
client_secret = "$__file{${config.sops.secrets.oauth-client-secret-grafana.path}}";
|
|
||||||
scopes = "openid profile email groups";
|
|
||||||
empty_scopes = false;
|
|
||||||
auth_url = "https://auth.darksailor.dev/api/oidc/authorization";
|
|
||||||
token_url = "https://auth.darksailor.dev/api/oidc/token";
|
|
||||||
api_url = "https://auth.darksailor.dev/api/oidc/userinfo";
|
|
||||||
login_attribute_path = "email";
|
|
||||||
groups_attribute_path = "groups";
|
|
||||||
name_attribute_path = "name";
|
|
||||||
email_attribute_path = "email";
|
|
||||||
username_attribute_path = "preferred_username";
|
|
||||||
use_pkce = true;
|
|
||||||
auto_login = true;
|
|
||||||
allow_sign_up = true;
|
|
||||||
role_attribute_path = "contains(groups[*], 'sso_admin') && 'Admin' || Viewer";
|
|
||||||
use_refresh_token = false;
|
|
||||||
id_token_attribute_name = "";
|
|
||||||
signout_redirect_url = "https://auth.darksailor.dev/logout";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
provision = {
|
|
||||||
enable = true;
|
|
||||||
datasources.settings.datasources = [
|
|
||||||
{
|
|
||||||
name = "Prometheus";
|
|
||||||
type = "prometheus";
|
|
||||||
access = "proxy";
|
|
||||||
url = "http://localhost:9090";
|
|
||||||
isDefault = true;
|
|
||||||
jsonData = {
|
|
||||||
timeInterval = "15s";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
dashboards.settings = {
|
|
||||||
apiVersion = 1;
|
|
||||||
providers = [
|
|
||||||
{
|
|
||||||
name = "default";
|
|
||||||
type = "file";
|
|
||||||
options.path = "/var/lib/grafana/dashboards";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
caddy.virtualHosts."monitoring.darksailor.dev".extraConfig = ''
|
|
||||||
reverse_proxy localhost:${builtins.toString config.services.grafana.settings.server.http_port}
|
|
||||||
'';
|
|
||||||
|
|
||||||
authelia = {
|
|
||||||
instances.darksailor = {
|
|
||||||
settings = {
|
|
||||||
identity_providers = {
|
|
||||||
oidc = {
|
|
||||||
claims_policies = {
|
|
||||||
grafana = {
|
|
||||||
id_token = [
|
|
||||||
"email"
|
|
||||||
"name"
|
|
||||||
"groups"
|
|
||||||
"preferred_username"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
clients = [
|
|
||||||
{
|
|
||||||
client_name = "Grafana";
|
|
||||||
client_id = "grafana";
|
|
||||||
claims_policy = "grafana";
|
|
||||||
client_secret = ''{{ secret "${config.sops.secrets.oauth-client-secret-grafana-authelia.path}" }}'';
|
|
||||||
public = false;
|
|
||||||
authorization_policy = "one_factor";
|
|
||||||
require_pkce = true;
|
|
||||||
pkce_challenge_method = "S256";
|
|
||||||
redirect_uris = [
|
|
||||||
"https://monitoring.darksailor.dev/login/generic_oauth"
|
|
||||||
];
|
|
||||||
scopes = [
|
|
||||||
"openid"
|
|
||||||
"profile"
|
|
||||||
"email"
|
|
||||||
"groups"
|
|
||||||
];
|
|
||||||
response_types = ["code"];
|
|
||||||
grant_types = ["authorization_code"];
|
|
||||||
userinfo_signed_response_alg = "none";
|
|
||||||
id_token_signed_response_alg = "RS256";
|
|
||||||
access_token_signed_response_alg = "RS256";
|
|
||||||
token_endpoint_auth_method = "client_secret_basic";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# SOPS secrets for Grafana
|
|
||||||
|
|
||||||
# Create dashboard directory and copy dashboards
|
|
||||||
systemd.tmpfiles.rules = [
|
|
||||||
"d /var/lib/grafana/dashboards 0755 grafana grafana"
|
|
||||||
"C /var/lib/grafana/dashboards/tsuba-monitoring.json 0644 grafana grafana - ${./dashboards/tsuba-monitoring.json}"
|
|
||||||
"C /var/lib/grafana/dashboards/ryu-monitoring.json 0644 grafana grafana - ${./dashboards/ryu-monitoring.json}"
|
|
||||||
"C /var/lib/grafana/dashboards/mirai-monitoring.json 0644 grafana grafana - ${./dashboards/mirai-monitoring.json}"
|
|
||||||
"C /var/lib/grafana/dashboards/overview-monitoring.json 0644 grafana grafana - ${./dashboards/overview-monitoring.json}"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Open firewall ports
|
|
||||||
networking.firewall = {
|
|
||||||
allowedTCPPorts = [
|
|
||||||
3000 # Grafana
|
|
||||||
9090 # Prometheus
|
|
||||||
9100 # Node exporter
|
|
||||||
9256 # Process exporter
|
|
||||||
];
|
|
||||||
# Allow Tailscale traffic for metrics scraping
|
|
||||||
trustedInterfaces = ["tailscale0"];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Ensure Grafana service starts after PostgreSQL
|
|
||||||
# systemd.services.grafana.after = ["postgresql.service"];
|
|
||||||
# systemd.services.grafana.requires = ["postgresql.service"];
|
|
||||||
}
|
|
||||||
12
nixos/mirai/services/shitpost.nix
Normal file
12
nixos/mirai/services/shitpost.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{pkgs, ...}: let
|
||||||
|
src = pkgs.fetchgit {
|
||||||
|
url = "https://git.darksailor.dev/servius/adarkdayinmylife.public";
|
||||||
|
rev = "68d972f68cab8f68916b94df05b7ab6a7da4a1da";
|
||||||
|
sha256 = "sha256-EVis06rmHq1jJK0FVsbgi7TOru7GtEUpbx0PjU2AKEo=";
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
services.caddy.virtualHosts."adarkdayinmy.life".extraConfig = ''
|
||||||
|
root * ${src}/
|
||||||
|
file_server
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
{...}: {
|
{masterPkgs, ...}: {
|
||||||
services.tailscale = {
|
services.tailscale = {
|
||||||
enable = true;
|
enable = true;
|
||||||
useRoutingFeatures = "server";
|
useRoutingFeatures = "server";
|
||||||
extraUpFlags = "--advertise-exit-node";
|
extraUpFlags = "--advertise-exit-node";
|
||||||
|
package = masterPkgs.tailscale;
|
||||||
};
|
};
|
||||||
networking.firewall.trustedInterfaces = [
|
networking.firewall.trustedInterfaces = [
|
||||||
"tailscale0"
|
"tailscale0"
|
||||||
|
|||||||
@@ -6,5 +6,6 @@
|
|||||||
imports = [
|
imports = [
|
||||||
# ./alvr.nix
|
# ./alvr.nix
|
||||||
./easyeffects.nix
|
./easyeffects.nix
|
||||||
|
./vr.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
9
nixos/ryu/apps/vr.nix
Normal file
9
nixos/ryu/apps/vr.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
wlx-overlay-s
|
||||||
|
wayvr-dashboard
|
||||||
|
bs-manager
|
||||||
|
monado-vulkan-layers
|
||||||
|
envision
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -10,14 +10,9 @@
|
|||||||
./programs
|
./programs
|
||||||
./containers
|
./containers
|
||||||
./apps
|
./apps
|
||||||
|
# ./vms
|
||||||
];
|
];
|
||||||
|
|
||||||
# sops = {
|
|
||||||
# defaultSopsFile = ../../secrets/secrets.yaml;
|
|
||||||
# defaultSopsFormat = "yaml";
|
|
||||||
# age.keyFile = "/home/${device.user}/.config/sops/age/keys.txt";
|
|
||||||
# };
|
|
||||||
|
|
||||||
security.tpm2 = {
|
security.tpm2 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
pkcs11.enable = true;
|
pkcs11.enable = true;
|
||||||
@@ -27,7 +22,7 @@
|
|||||||
programs = {
|
programs = {
|
||||||
hyprland = {
|
hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# withUWSM = true;
|
withUWSM = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -45,15 +40,19 @@
|
|||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
max-jobs = 1;
|
max-jobs = 1;
|
||||||
cores = 12;
|
cores = 24;
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
extra-experimental-features = "nix-command flakes auto-allocate-uids";
|
extra-experimental-features = "nix-command flakes auto-allocate-uids";
|
||||||
trusted-users = ["root" "servius"];
|
trusted-users = [device.user];
|
||||||
trusted-substituters = [
|
trusted-substituters = [
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
"https://nixos-raspberrypi.cachix.org"
|
"https://nixos-raspberrypi.cachix.org"
|
||||||
|
"https://llama-cpp.cachix.org"
|
||||||
|
"https://cuda-maintainers.cachix.org"
|
||||||
];
|
];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
|
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||||||
|
"llama-cpp.cachix.org-1:H75X+w83wUKTIPSO1KWy9ADUrzThyGs8P5tmAbkWhQc="
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
"nixos-raspberrypi.cachix.org-1:4iMO9LXa8BqhU+Rpg6LQKiGa2lsNh/j2oiYLNOQ5sPI="
|
"nixos-raspberrypi.cachix.org-1:4iMO9LXa8BqhU+Rpg6LQKiGa2lsNh/j2oiYLNOQ5sPI="
|
||||||
];
|
];
|
||||||
@@ -68,9 +67,9 @@
|
|||||||
dates = "daily";
|
dates = "daily";
|
||||||
options = "--delete-older-than +5";
|
options = "--delete-older-than +5";
|
||||||
};
|
};
|
||||||
package = pkgs.nixVersions.nix_2_31; # deploy-rs doesn't work with nix >= 2.32
|
package = pkgs.nixVersions.latest; # deploy-rs doesn't work with nix >= 2.32
|
||||||
buildMachines = [
|
buildMachines = [
|
||||||
../../builders/mirai.nix
|
../../builders/tako.nix
|
||||||
../../builders/shiro.nix
|
../../builders/shiro.nix
|
||||||
# ../../builders/tsuba.nix
|
# ../../builders/tsuba.nix
|
||||||
];
|
];
|
||||||
@@ -79,7 +78,7 @@
|
|||||||
|
|
||||||
users.users.${device.user} = {
|
users.users.${device.user} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = ["wheel" "audio" "i2c" "media" "openrazer" "video" "tss"];
|
extraGroups = ["wheel" "audio" "i2c" "media" "video" "tss"];
|
||||||
openssh.authorizedKeys.keyFiles = [
|
openssh.authorizedKeys.keyFiles = [
|
||||||
../../secrets/id_ed25519.pub
|
../../secrets/id_ed25519.pub
|
||||||
../../secrets/id_ios.pub
|
../../secrets/id_ios.pub
|
||||||
@@ -104,7 +103,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
displayManager.gdm.enable = true;
|
displayManager.gdm.enable = true;
|
||||||
desktopManager.gnome.enable = true;
|
# desktopManager.gnome.enable = true;
|
||||||
pipewire = {
|
pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
@@ -169,8 +168,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.openssh.enable = true;
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
interfaces.eno1.wakeOnLan = {
|
interfaces.eno1.wakeOnLan = {
|
||||||
policy = ["magic"];
|
policy = ["magic"];
|
||||||
@@ -194,20 +191,38 @@
|
|||||||
# firewall.allowedTCPPorts = [ ... ];
|
# firewall.allowedTCPPorts = [ ... ];
|
||||||
# firewall.allowedUDPPorts = [ ... ];
|
# firewall.allowedUDPPorts = [ ... ];
|
||||||
# firewall.enable = false;
|
# firewall.enable = false;
|
||||||
|
nftables.enable = true;
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = true;
|
enable = false;
|
||||||
|
trustedInterfaces = [
|
||||||
|
"tailscale0"
|
||||||
|
];
|
||||||
|
allowedUDPPorts = [
|
||||||
|
9 # Wake on LAN
|
||||||
|
4950 # Warframe
|
||||||
|
4955 # Warframe
|
||||||
|
3113 # Other
|
||||||
|
];
|
||||||
allowedTCPPortRanges = [
|
allowedTCPPortRanges = [
|
||||||
{
|
{
|
||||||
from = 1714;
|
from = 1714;
|
||||||
to = 1764;
|
to = 1764;
|
||||||
} # KDE Connect
|
}
|
||||||
];
|
];
|
||||||
allowedUDPPortRanges = [
|
allowedUDPPortRanges = [
|
||||||
{
|
{
|
||||||
from = 1714;
|
from = 1714;
|
||||||
to = 1764;
|
to = 1764;
|
||||||
} # KDE Connect
|
}
|
||||||
];
|
];
|
||||||
|
# extraInputRules = ''
|
||||||
|
# table inet mullvad_tailscale {
|
||||||
|
# chain output {
|
||||||
|
# type route hook output priority 0; policy accept;
|
||||||
|
# ip daddr 100.64.0.0/10 ct mark set 0x00000f41 meta mark set 0x6d6f6c65;
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
# '';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -259,7 +274,7 @@
|
|||||||
gparted
|
gparted
|
||||||
nvtopPackages.nvidia
|
nvtopPackages.nvidia
|
||||||
quickemu
|
quickemu
|
||||||
(nixvim.makeNixvim (import ../../neovim))
|
# (nixvim.makeNixvim (import ../../neovim))
|
||||||
qpwgraph
|
qpwgraph
|
||||||
hyprland
|
hyprland
|
||||||
xorg.xhost
|
xorg.xhost
|
||||||
@@ -283,23 +298,23 @@
|
|||||||
NIXOS_OZONE_WL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
};
|
};
|
||||||
# etc
|
# etc
|
||||||
gnome.excludePackages = with pkgs; [
|
# gnome.excludePackages = with pkgs; [
|
||||||
atomix # puzzle game
|
# atomix # puzzle game
|
||||||
cheese # webcam tool
|
# cheese # webcam tool
|
||||||
epiphany # web browser
|
# epiphany # web browser
|
||||||
evince # document viewer
|
# evince # document viewer
|
||||||
geary # email reader
|
# geary # email reader
|
||||||
gedit # text editor
|
# gedit # text editor
|
||||||
gnome-characters
|
# gnome-characters
|
||||||
gnome-music
|
# gnome-music
|
||||||
gnome-photos
|
# gnome-photos
|
||||||
gnome-terminal
|
# gnome-terminal
|
||||||
gnome-tour
|
# gnome-tour
|
||||||
hitori # sudoku game
|
# hitori # sudoku game
|
||||||
iagno # go game
|
# iagno # go game
|
||||||
tali # poker game
|
# tali # poker game
|
||||||
totem # video player
|
# totem # video player
|
||||||
];
|
# ];
|
||||||
};
|
};
|
||||||
|
|
||||||
musnix.enable = true;
|
musnix.enable = true;
|
||||||
|
|||||||
@@ -8,5 +8,6 @@
|
|||||||
./obs-studio.nix
|
./obs-studio.nix
|
||||||
./gnome-disks.nix
|
./gnome-disks.nix
|
||||||
./nix-ld.nix
|
./nix-ld.nix
|
||||||
|
./gamemode.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
24
nixos/ryu/programs/gamemode.nix
Normal file
24
nixos/ryu/programs/gamemode.nix
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
device,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
programs.gamemode = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
general = {
|
||||||
|
renice = 10;
|
||||||
|
};
|
||||||
|
custom = {
|
||||||
|
start = let
|
||||||
|
out = pkgs.writeScriptBin "gamemode-start" ''
|
||||||
|
${pkgs.lmstudio}/bin/lms unload
|
||||||
|
${pkgs.libnotify}/bin/notify-send 'GameMode started'
|
||||||
|
'';
|
||||||
|
in "${out}/bin/gamemode-start";
|
||||||
|
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
users.users.${device.user}.extraGroups = ["gamemode"];
|
||||||
|
}
|
||||||
@@ -5,7 +5,9 @@
|
|||||||
enableVirtualCamera = true;
|
enableVirtualCamera = true;
|
||||||
plugins = [
|
plugins = [
|
||||||
pkgs.obs-studio-plugins.wlrobs
|
pkgs.obs-studio-plugins.wlrobs
|
||||||
pkgs.obs-studio-plugins.droidcam-obs
|
pkgs.obs-studio-plugins.input-overlay
|
||||||
|
pkgs.obs-studio-plugins.obs-vkcapture
|
||||||
|
# pkgs.obs-studio-plugins.droidcam-obs
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,10 +4,17 @@
|
|||||||
gamescopeSession.enable = true;
|
gamescopeSession.enable = true;
|
||||||
remotePlay.openFirewall = true;
|
remotePlay.openFirewall = true;
|
||||||
dedicatedServer.openFirewall = true;
|
dedicatedServer.openFirewall = true;
|
||||||
|
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
||||||
extraCompatPackages = [
|
extraCompatPackages = [
|
||||||
pkgs.proton-ge-bin
|
pkgs.proton-ge-bin
|
||||||
|
pkgs.gamescope
|
||||||
|
pkgs.mangohud
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
programs.gamescope = {
|
||||||
|
enable = true;
|
||||||
|
capSysNice = true;
|
||||||
|
};
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.protonup-qt
|
pkgs.protonup-qt
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -17,10 +17,13 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
enable32Bit = true;
|
enable32Bit = true;
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
# intel-vaapi-driver
|
vpl-gpu-rt
|
||||||
|
intel-media-driver
|
||||||
nvidia-vaapi-driver
|
nvidia-vaapi-driver
|
||||||
|
cudatoolkit
|
||||||
# vaapiVdpau
|
# vaapiVdpau
|
||||||
# libvdpau-va-gl
|
# libvdpau-va-gl
|
||||||
|
# nvidia-utils
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
nvidia = {
|
nvidia = {
|
||||||
@@ -47,20 +50,15 @@
|
|||||||
# nixpkgs.localSystem = {system = "x86_64-linux";};
|
# nixpkgs.localSystem = {system = "x86_64-linux";};
|
||||||
# nixpkgs.crossSystem = {system = "aarch64-linux";};
|
# nixpkgs.crossSystem = {system = "aarch64-linux";};
|
||||||
boot.binfmt.emulatedSystems = ["aarch64-linux"];
|
boot.binfmt.emulatedSystems = ["aarch64-linux"];
|
||||||
services.fprintd.enable = true;
|
|
||||||
services.sshd.enable = true;
|
|
||||||
boot.loader.systemd-boot.consoleMode = "max";
|
boot.loader.systemd-boot.consoleMode = "max";
|
||||||
|
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
# LIBVA_DRIVER_NAME = "i965";
|
|
||||||
# __EGL_VENDOR_LIBRARY_FILENAMES = "/run/opengl-driver/share/glvnd/egl_vendor.d/50_mesa.json";
|
|
||||||
LIBVA_DRIVER_NAME = "nvidia";
|
LIBVA_DRIVER_NAME = "nvidia";
|
||||||
NVD_BACKEND = "direct";
|
NVD_BACKEND = "direct";
|
||||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||||
NIXOS_OZONE_WL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.libvirtd.enable = true;
|
|
||||||
users.extraUsers.servius.extraGroups = ["libvirtd" "adbusers" "kvm"];
|
users.extraUsers.servius.extraGroups = ["libvirtd" "adbusers" "kvm"];
|
||||||
|
|
||||||
boot.extraModprobeConfig = ''
|
boot.extraModprobeConfig = ''
|
||||||
@@ -87,6 +85,7 @@
|
|||||||
"nvidia_modeset"
|
"nvidia_modeset"
|
||||||
"nvidia_drm"
|
"nvidia_drm"
|
||||||
"dm-snapshot"
|
"dm-snapshot"
|
||||||
|
"dm-mirror"
|
||||||
];
|
];
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
"intel_iommu=on"
|
"intel_iommu=on"
|
||||||
@@ -101,20 +100,19 @@
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/11d8beef-2a63-4231-af35-b9b8d3a17e9b";
|
device = "/dev/disk/by-uuid/7b488da9-49d3-44d1-b11b-bc6dcd418b1d";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" = {
|
fileSystems."/nix" = {
|
||||||
device = "/dev/disk/by-uuid/64099f91-d4d6-44fa-92d4-9e905b3e7829";
|
device = "/dev/disk/by-uuid/ef734595-a856-4207-8da1-1f0bde4bad61";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
neededForBoot = true;
|
|
||||||
options = ["noatime"];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-uuid/4E27-DAC0";
|
device = "/dev/disk/by-uuid/4E27-DAC0";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
|
options = ["fmask=0007" "dmask=0007"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" = {
|
fileSystems."/home" = {
|
||||||
@@ -123,18 +121,18 @@
|
|||||||
neededForBoot = true;
|
neededForBoot = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# fileSystems."/media" = {
|
|
||||||
# device = "/dev/storage/media";
|
|
||||||
# fsType = "ext4";
|
|
||||||
# options = ["users" "nofail"];
|
|
||||||
# };
|
|
||||||
|
|
||||||
fileSystems."/games" = {
|
fileSystems."/games" = {
|
||||||
device = "/dev/storage/games";
|
device = "/dev/storage/games";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
options = ["nofail"];
|
options = ["nofail"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/volumes/windows-games" = {
|
||||||
|
device = "/dev/disk/by-partuuid/56359fb7-7d33-44d2-bebd-b0c53daeeb73";
|
||||||
|
fsType = "ntfs3";
|
||||||
|
options = ["nofail"];
|
||||||
|
};
|
||||||
|
|
||||||
swapDevices = [];
|
swapDevices = [];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
sops = {
|
sops = {
|
||||||
secrets."hetzner/api_key".owner = config.services.caddy.user;
|
secrets."cloudflare/api_key".owner = config.services.caddy.user;
|
||||||
templates = {
|
templates = {
|
||||||
"HETZNER_API_KEY.env".content = ''
|
"CLOUDFLARE_API_KEY.env".content = ''
|
||||||
HETZNER_API_KEY=${config.sops.placeholder."hetzner/api_key"}
|
CLOUDFLARE_API_KEY=${config.sops.placeholder."cloudflare/api_key"}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -15,28 +15,22 @@
|
|||||||
caddy = {
|
caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
(hetzner) {
|
(cloudflare) {
|
||||||
tls {
|
tls {
|
||||||
propagation_timeout -1
|
propagation_timeout -1
|
||||||
propagation_delay 120s
|
propagation_delay 120s
|
||||||
dns hetzner {env.HETZNER_API_KEY}
|
dns cloudflare {env.CLOUDFLARE_API_KEY}
|
||||||
resolvers 1.1.1.1
|
resolvers 1.1.1.1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
package = pkgs.caddyWithHetzner;
|
package = pkgs.caddyWithCloudflare;
|
||||||
# package = pkgs.caddy.withPlugins {
|
|
||||||
# plugins = ["github.com/caddy-dns/hetzner@v1.0.0"];
|
|
||||||
# # hash = "sha256-9ea0CfOHG7JhejB73HjfXQpnonn+ZRBqLNz1fFRkcDQ=";
|
|
||||||
# # hash = "sha256-9ea0CfOHG7JhejB73HjfXQpnonn+ZRBqLNz1fFRkcDQ="
|
|
||||||
# hash = "sha256-YUrprDZQL+cX3P8fVLKHouXTMG4rw3sCaQdGqiq37uA=";
|
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.services.caddy = {
|
systemd.services.caddy = {
|
||||||
after = ["sops-install-secrets.service"];
|
after = ["sops-install-secrets.service"];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
EnvironmentFile = config.sops.templates."HETZNER_API_KEY.env".path;
|
EnvironmentFile = config.sops.templates."CLOUDFLARE_API_KEY.env".path;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
# ./sunshine.nix
|
# ./sunshine.nix
|
||||||
# ./zerotier.nix
|
# ./zerotier.nix
|
||||||
# ./dnscrypt.nix
|
# ./dnscrypt.nix
|
||||||
./ollama.nix
|
# ./ollama.nix
|
||||||
./llama.nix
|
./llama.nix
|
||||||
./tailscale.nix
|
./tailscale.nix
|
||||||
./samba.nix
|
./samba.nix
|
||||||
@@ -16,5 +16,12 @@
|
|||||||
./fwupd.nix
|
./fwupd.nix
|
||||||
./caddy.nix
|
./caddy.nix
|
||||||
./monitoring.nix
|
./monitoring.nix
|
||||||
|
./wivrn.nix
|
||||||
|
./sshd.nix
|
||||||
|
./fprintd.nix
|
||||||
|
./handoff.nix
|
||||||
|
./gstreamer.nix
|
||||||
|
./dualsense.nix
|
||||||
|
./openssh.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
11
nixos/ryu/services/dualsense.nix
Normal file
11
nixos/ryu/services/dualsense.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
dualsensectl
|
||||||
|
];
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
# USB
|
||||||
|
ATTRS{name}=="Sony Interactive Entertainment DualSense Wireless Controller Touchpad", ENV{LIBINPUT_IGNORE_DEVICE}="1"
|
||||||
|
# Bluetooth
|
||||||
|
ATTRS{name}=="DualSense Wireless Controller", ENV{LIBINPUT_IGNORE_DEVICE}="1"
|
||||||
|
'';
|
||||||
|
}
|
||||||
3
nixos/ryu/services/fprintd.nix
Normal file
3
nixos/ryu/services/fprintd.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{...}: {
|
||||||
|
services.fprintd.enable = true;
|
||||||
|
}
|
||||||
22
nixos/ryu/services/gstreamer.nix
Normal file
22
nixos/ryu/services/gstreamer.nix
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
environment = {
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
gst_all_1.gst-libav
|
||||||
|
gst_all_1.gst-plugins-bad
|
||||||
|
gst_all_1.gst-plugins-base
|
||||||
|
gst_all_1.gst-plugins-good
|
||||||
|
gst_all_1.gst-plugins-rs
|
||||||
|
gst_all_1.gst-plugins-ugly
|
||||||
|
gst_all_1.gstreamer
|
||||||
|
gst_all_1.gstreamermm
|
||||||
|
gst_all_1.gst-rtsp-server
|
||||||
|
gst_all_1.gst-vaapi
|
||||||
|
# gst_all_1.icamerasrc-ipu6
|
||||||
|
# gst_all_1.icamerasrc-ipu6ep
|
||||||
|
# gst_all_1.icamerasrc-ipu6epmtl
|
||||||
|
];
|
||||||
|
sessionVariables = {
|
||||||
|
GST_PLUGIN_PATH = "/run/current-system/sw/lib/gstreamer-1.0/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
nixos/ryu/services/handoff.nix
Normal file
7
nixos/ryu/services/handoff.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{...}: {
|
||||||
|
services.airpods-handoff = {
|
||||||
|
enable = true;
|
||||||
|
user = "servius";
|
||||||
|
macAddress = "14:14:7D:E5:1A:AC";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,25 +1,38 @@
|
|||||||
{
|
{
|
||||||
inputs,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
|
inputs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
services = {
|
services = {
|
||||||
llama-cpp = {
|
llama-cpp = {
|
||||||
enable = false;
|
enable = false;
|
||||||
port = 11435;
|
port = 11345;
|
||||||
|
# model = "/nix/store/ch6z9di3l0k54ad29pzv8k3zv47q30d1-Qwen3-Coder-30B-A3B-Instruct-Q4_K_M.gguf";
|
||||||
model = pkgs.fetchurl {
|
model = pkgs.fetchurl {
|
||||||
url = "https://huggingface.co/lmstudio-community/gpt-oss-20b-GGUF/resolve/main/gpt-oss-20b-MXFP4.gguf";
|
# url = "https://huggingface.co/lmstudio-community/gpt-oss-20b-GGUF/resolve/main/gpt-oss-20b-MXFP4.gguf";
|
||||||
sha256 = "65d06d31a3977d553cb3af137b5c26b5f1e9297a6aaa29ae7caa98788cde53ab";
|
# sha256 = "65d06d31a3977d553cb3af137b5c26b5f1e9297a6aaa29ae7caa98788cde53ab";
|
||||||
|
url = "https://huggingface.co/lmstudio-community/Qwen3-Coder-30B-A3B-Instruct-GGUF/resolve/main/Qwen3-Coder-30B-A3B-Instruct-Q4_K_M.gguf";
|
||||||
|
sha256 = "79ad15a5ee3caddc3f4ff0db33a14454a5a3eb503d7fa1c1e35feafc579de486";
|
||||||
};
|
};
|
||||||
# package = pkgs.ik_llama;
|
extraFlags = [
|
||||||
|
"-c"
|
||||||
|
"98304"
|
||||||
|
"--jinja"
|
||||||
|
"--chat-template-file"
|
||||||
|
"${../../../assets/chat.hbs}"
|
||||||
|
# "/nix/store/4zk1p50hrzghp3jzzysz96pa64i2kmjl-promp.hbs"
|
||||||
|
];
|
||||||
|
# package = inputs.llama-cpp.packages.${pkgs.system}.cuda;
|
||||||
};
|
};
|
||||||
caddy = {
|
caddy = {
|
||||||
virtualHosts."llama.ryu.darksailor.dev".extraConfig = ''
|
virtualHosts."llama.ryu.darksailor.dev".extraConfig = ''
|
||||||
import hetzner
|
import cloudflare
|
||||||
reverse_proxy localhost:${builtins.toString config.services.llama-cpp.port}
|
reverse_proxy localhost:${builtins.toString config.services.llama-cpp.port}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
llama-cpp
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
services = {
|
services = {
|
||||||
prometheus = {
|
prometheus = {
|
||||||
exporters = {
|
exporters = {
|
||||||
|
systemd = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
nvidia-gpu.enable = true;
|
||||||
node = {
|
node = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enabledCollectors = [
|
enabledCollectors = [
|
||||||
@@ -16,7 +20,6 @@
|
|||||||
"uname"
|
"uname"
|
||||||
"vmstat"
|
"vmstat"
|
||||||
];
|
];
|
||||||
port = 9100;
|
|
||||||
};
|
};
|
||||||
process = {
|
process = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -30,12 +33,4 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Open firewall ports for Prometheus exporters
|
|
||||||
networking.firewall = {
|
|
||||||
allowedTCPPorts = [
|
|
||||||
9100 # node exporter
|
|
||||||
9256 # process exporter
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
enable = false;
|
enable = false;
|
||||||
host = "0.0.0.0";
|
host = "0.0.0.0";
|
||||||
# loadModels = ["deepseek-r1:7b" "deepseek-r1:14b" "RobinBially/nomic-embed-text-8k" "qwen3:8b" "qwen3:14b"];
|
# loadModels = ["deepseek-r1:7b" "deepseek-r1:14b" "RobinBially/nomic-embed-text-8k" "qwen3:8b" "qwen3:14b"];
|
||||||
|
# loadModels = ["deepseek-r1:7b" "deepseek-r1:14b" "RobinBially/nomic-embed-text-8k" "qwen3:8b" "qwen3:14b"];
|
||||||
port = 11434;
|
port = 11434;
|
||||||
acceleration = "cuda";
|
acceleration = "cuda";
|
||||||
environmentVariables = {
|
environmentVariables = {
|
||||||
@@ -17,18 +18,18 @@
|
|||||||
LD_LIBRARY_PATH = "run/opengl-driver/lib";
|
LD_LIBRARY_PATH = "run/opengl-driver/lib";
|
||||||
HTTP_PROXY = "https://ollama.ryu.darksailor.dev";
|
HTTP_PROXY = "https://ollama.ryu.darksailor.dev";
|
||||||
};
|
};
|
||||||
package = pkgs.ollama.overrideAttrs {
|
# package = pkgs.ollama.overrideAttrs {
|
||||||
version = "0.11.0";
|
# version = "0.11.0";
|
||||||
src = pkgs.fetchFromGitHub {
|
# src = pkgs.fetchFromGitHub {
|
||||||
owner = "ollama";
|
# owner = "ollama";
|
||||||
repo = "ollama";
|
# repo = "ollama";
|
||||||
tag = "v0.11.0";
|
# tag = "v0.11.0";
|
||||||
hash = "sha256-po7BxJAj9eOpOaXsLDmw6/1RyjXPtXza0YUv0pVojZ0=";
|
# hash = "sha256-po7BxJAj9eOpOaXsLDmw6/1RyjXPtXza0YUv0pVojZ0=";
|
||||||
fetchSubmodules = true;
|
# fetchSubmodules = true;
|
||||||
};
|
# };
|
||||||
doCheck = false;
|
# doCheck = false;
|
||||||
vendorHash = "sha256-SlaDsu001TUW+t9WRp7LqxUSQSGDF1Lqu9M1bgILoX4=";
|
# vendorHash = "sha256-SlaDsu001TUW+t9WRp7LqxUSQSGDF1Lqu9M1bgILoX4=";
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
# open-webui = {
|
# open-webui = {
|
||||||
# enable = false;
|
# enable = false;
|
||||||
@@ -40,15 +41,15 @@
|
|||||||
# };
|
# };
|
||||||
caddy = {
|
caddy = {
|
||||||
# virtualHosts."llama.ryu.darksailor.dev".extraConfig = ''
|
# virtualHosts."llama.ryu.darksailor.dev".extraConfig = ''
|
||||||
# import hetzner
|
# import cloudflare
|
||||||
# forward_auth mirai:5555 {
|
# forward_auth tako:5555 {
|
||||||
# uri /api/authz/forward-auth
|
# uri /api/authz/forward-auth
|
||||||
# copy_headers Remote-User Remote-Groups Remote-Email Remote-Name
|
# copy_headers Remote-User Remote-Groups Remote-Email Remote-Name
|
||||||
# }
|
# }
|
||||||
# reverse_proxy localhost:${builtins.toString config.services.open-webui.port}
|
# reverse_proxy localhost:${builtins.toString config.services.open-webui.port}
|
||||||
# '';
|
# '';
|
||||||
virtualHosts."ollama.ryu.darksailor.dev".extraConfig = ''
|
virtualHosts."ollama.ryu.darksailor.dev".extraConfig = ''
|
||||||
import hetzner
|
import cloudflare
|
||||||
reverse_proxy localhost:${builtins.toString config.services.ollama.port}
|
reverse_proxy localhost:${builtins.toString config.services.ollama.port}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
7
nixos/ryu/services/openssh.nix
Normal file
7
nixos/ryu/services/openssh.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{...}: {
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
settings.PasswordAuthentication = false;
|
||||||
|
settings.PermitRootLogin = "prohibit-password";
|
||||||
|
};
|
||||||
|
}
|
||||||
3
nixos/ryu/services/sshd.nix
Normal file
3
nixos/ryu/services/sshd.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{...}: {
|
||||||
|
services.sshd.enable = true;
|
||||||
|
}
|
||||||
@@ -1,22 +1,8 @@
|
|||||||
{
|
{masterPkgs, ...}: {
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
services = {
|
services = {
|
||||||
tailscale = {
|
tailscale = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# useRoutingFeatures = "both";
|
package = masterPkgs.tailscale;
|
||||||
# extraUpFlags = ["--advertise-routes=192.168.0.0/24"];
|
|
||||||
};
|
};
|
||||||
# networkd-dispatcher = {
|
|
||||||
# enable = true;
|
|
||||||
# rules."50-tailscale" = {
|
|
||||||
# onState = ["routable"];
|
|
||||||
# script = ''
|
|
||||||
# ${lib.getExe pkgs.ethtool} -K en01 rx-udp-gro-forwarding on rg-xgro-list off
|
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
13
nixos/ryu/services/wivrn.nix
Normal file
13
nixos/ryu/services/wivrn.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
services.wivrn = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
defaultRuntime = true;
|
||||||
|
autoStart = true;
|
||||||
|
steam = {
|
||||||
|
importOXRRuntimes = true;
|
||||||
|
};
|
||||||
|
highPriority = true;
|
||||||
|
# package = pkgs.wivrn;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,4 +1,16 @@
|
|||||||
{
|
{
|
||||||
|
virtualisation = {
|
||||||
|
libvirtd = {
|
||||||
|
enable = true;
|
||||||
|
qemu = {
|
||||||
|
runAsRoot = true;
|
||||||
|
swtpm.enable = true;
|
||||||
|
# ovmf = {
|
||||||
|
# enable = true;
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
imports = [
|
imports = [
|
||||||
./win11.nix
|
./win11.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -4,10 +4,6 @@
|
|||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
virtualisation.libvirtd.enable = true;
|
|
||||||
virtualisation.libvirtd.qemu.ovmf.enable = true;
|
|
||||||
virtualisation.libvirtd.qemu.swtpm.enable = true;
|
|
||||||
|
|
||||||
# IOMMU and VFIO settings
|
# IOMMU and VFIO settings
|
||||||
# boot.kernelParams = [
|
# boot.kernelParams = [
|
||||||
# "amd_iommu=on" # Use "intel_iommu=on" for Intel CPUs
|
# "amd_iommu=on" # Use "intel_iommu=on" for Intel CPUs
|
||||||
|
|||||||
186
nixos/tako/configuration.nix
Normal file
186
nixos/tako/configuration.nix
Normal file
@@ -0,0 +1,186 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
device,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
# Include the results of the hardware scan.
|
||||||
|
./services
|
||||||
|
./tako.nix
|
||||||
|
# ./docker.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
# virtualisation.podman = {
|
||||||
|
# enable = true;
|
||||||
|
# dockerSocket.enable = true;
|
||||||
|
# defaultNetwork.dnsname.enable = true;
|
||||||
|
# };
|
||||||
|
users.extraUsers.${device.user}.extraGroups = ["docker"];
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
arion
|
||||||
|
];
|
||||||
|
|
||||||
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
sops = {
|
||||||
|
secrets."builder/mirai/cache/private" = {};
|
||||||
|
secrets.users = {
|
||||||
|
sopsFile = ../../secrets/users.yaml;
|
||||||
|
format = "yaml";
|
||||||
|
key = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
settings = {
|
||||||
|
max-jobs = 1;
|
||||||
|
cores = 8;
|
||||||
|
auto-optimise-store = true;
|
||||||
|
extra-experimental-features = "nix-command flakes auto-allocate-uids";
|
||||||
|
trusted-users = [device.user "remotebuilder"];
|
||||||
|
trusted-substituters = [
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
"https://nixos-raspberrypi.cachix.org"
|
||||||
|
# "https://sh.darksailor.dev"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
"nixos-raspberrypi.cachix.org-1:4iMO9LXa8BqhU+Rpg6LQKiGa2lsNh/j2oiYLNOQ5sPI="
|
||||||
|
# "tako:bcVPoFGBZ0i7JAKMXIqLj2GY3CulLC4kP7rQyqes1RM="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
extraOptions = ''
|
||||||
|
build-users-group = nixbld
|
||||||
|
extra-nix-path = nixpkgs=flake:nixpkgs
|
||||||
|
builders-use-substitutes = true
|
||||||
|
secret-key-files = ${config.sops.secrets."builder/mirai/cache/private".path}
|
||||||
|
'';
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "daily";
|
||||||
|
options = "--delete-older-than 5d";
|
||||||
|
};
|
||||||
|
package = pkgs.nixVersions.latest; # deploy-rs doesn't work with nix >= 2.32
|
||||||
|
distributedBuilds = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.${device.user} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = ["wheel" "docker" "media"];
|
||||||
|
openssh.authorizedKeys.keyFiles = [
|
||||||
|
../../secrets/id_ed25519.pub
|
||||||
|
../../secrets/id_ios.pub
|
||||||
|
];
|
||||||
|
};
|
||||||
|
users.users.remotebuilder = {
|
||||||
|
isNormalUser = true;
|
||||||
|
openssh.authorizedKeys.keyFiles = [
|
||||||
|
../../secrets/id_ed25519.pub
|
||||||
|
];
|
||||||
|
};
|
||||||
|
users.groups.media = {};
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
networking.hostName = "tako"; # Define your hostname.
|
||||||
|
# Pick only one of the below networking options.
|
||||||
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "Asia/Singapore";
|
||||||
|
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
# i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
# console = {
|
||||||
|
# font = "Lat2-Terminus16";
|
||||||
|
# keyMap = "us";
|
||||||
|
# useXkbConfig = true; # use xkb.options in tty.
|
||||||
|
# };
|
||||||
|
|
||||||
|
# Enable the X11 windowing system.
|
||||||
|
# services.xserver.enable = true;
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
# services.xserver.xkb.layout = "us";
|
||||||
|
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
# services.printing.enable = true;
|
||||||
|
|
||||||
|
# Enable sound.
|
||||||
|
# hardware.pulseaudio.enable = true;
|
||||||
|
# OR
|
||||||
|
# services.pipewire = {
|
||||||
|
# enable = true;
|
||||||
|
# pulse.enable = true;
|
||||||
|
# };
|
||||||
|
|
||||||
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
|
# services.libinput.enable = true;
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
# users.users.alice = {
|
||||||
|
# isNormalUser = true;
|
||||||
|
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||||
|
# packages = with pkgs; [
|
||||||
|
# firefox
|
||||||
|
# tree
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
|
||||||
|
# List packages installed in system profile. To search, run:
|
||||||
|
# $ nix search wget
|
||||||
|
# environment.systemPackages = with pkgs; [
|
||||||
|
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||||
|
# wget
|
||||||
|
# ];
|
||||||
|
|
||||||
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
|
# started in user sessions.
|
||||||
|
# programs.mtr.enable = true;
|
||||||
|
# programs.gnupg.agent = {
|
||||||
|
# enable = true;
|
||||||
|
# enableSSHSupport = true;
|
||||||
|
# };
|
||||||
|
|
||||||
|
# List services that you want to enable:
|
||||||
|
|
||||||
|
# Enable the OpenSSH daemon.
|
||||||
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
# Open ports in the firewall.
|
||||||
|
networking.firewall.allowedTCPPorts = [22 80 443];
|
||||||
|
|
||||||
|
# Copy the NixOS configuration file and link it from the resulting system
|
||||||
|
# (/run/current-system/configuration.nix). This is useful in case you
|
||||||
|
# accidentally delete configuration.nix.
|
||||||
|
# system.copySystemConfiguration = true;
|
||||||
|
|
||||||
|
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||||
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||||
|
#
|
||||||
|
# Most users should NEVER change this value after the initial install, for any reason,
|
||||||
|
# even if you've upgraded your system to a new NixOS release.
|
||||||
|
#
|
||||||
|
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||||
|
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||||||
|
# to actually do that.
|
||||||
|
#
|
||||||
|
# This value being lower than the current NixOS release does NOT mean your system is
|
||||||
|
# out of date, out of support, or vulnerable.
|
||||||
|
#
|
||||||
|
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||||
|
# and migrated your data accordingly.
|
||||||
|
#
|
||||||
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||||
|
system.stateVersion = "24.11"; # Did you read the comment?
|
||||||
|
}
|
||||||
96
nixos/tako/disk-config.nix
Normal file
96
nixos/tako/disk-config.nix
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
{...}: {
|
||||||
|
disko.devices = {
|
||||||
|
disk = {
|
||||||
|
one = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/sda";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
ESP = {
|
||||||
|
priority = 1;
|
||||||
|
name = "ESP";
|
||||||
|
size = "1G";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
mountOptions = ["umask=0077"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
primary = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "lvm_pv";
|
||||||
|
vg = "pool";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
two = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/sdb";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
primary = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "lvm_pv";
|
||||||
|
vg = "pool";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
lvm_vg = {
|
||||||
|
pool = {
|
||||||
|
type = "lvm_vg";
|
||||||
|
lvs = {
|
||||||
|
root = {
|
||||||
|
size = "128G";
|
||||||
|
lvm_type = "mirror";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "ext4";
|
||||||
|
mountpoint = "/";
|
||||||
|
mountOptions = [
|
||||||
|
"defaults"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nix = {
|
||||||
|
size = "256G";
|
||||||
|
lvm_type = "raid0";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "ext4";
|
||||||
|
mountpoint = "/nix";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home = {
|
||||||
|
size = "64G";
|
||||||
|
lvm_type = "raid0";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "ext4";
|
||||||
|
mountpoint = "/home";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
media = {
|
||||||
|
size = "100%";
|
||||||
|
lvm_type = "raid0";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "ext4";
|
||||||
|
mountpoint = "/media";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
69
nixos/tako/docker.nix
Normal file
69
nixos/tako/docker.nix
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# virtualisation = {
|
||||||
|
# docker.enable = true;
|
||||||
|
# podman.enable = true;
|
||||||
|
# oci-containers = {
|
||||||
|
# backend = "podman";
|
||||||
|
# containers.homeassistant = {
|
||||||
|
# volumes = ["home-assistant:/config"];
|
||||||
|
# environment.TZ = "Asia/Kolkata";
|
||||||
|
# image = "ghcr.io/home-assistant/home-assistant:stable"; # Warning: if the tag does not change, the image will not be updated
|
||||||
|
# extraOptions = [
|
||||||
|
# "--network=ha-net"
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# networking.firewall.allowedTCPPorts = [8123];
|
||||||
|
# environment.systemPackages = with pkgs; [
|
||||||
|
# docker
|
||||||
|
# podman
|
||||||
|
# ];
|
||||||
|
# services.caddy = {
|
||||||
|
# enable = true;
|
||||||
|
# virtualHosts."home.darksailor.dev".extraConfig = ''
|
||||||
|
# reverse_proxy localhost:8123
|
||||||
|
# '';
|
||||||
|
# };
|
||||||
|
# containers.llama = {
|
||||||
|
# autoStart = true;
|
||||||
|
# privateNetwork = true;
|
||||||
|
# hostAddress = "192.168.100.10";
|
||||||
|
# localAddress = "192.168.100.11";
|
||||||
|
# hostAddress6 = "fc00::1";
|
||||||
|
# localAddress6 = "fc00::2";
|
||||||
|
# config = {
|
||||||
|
# config,
|
||||||
|
# pkgs,
|
||||||
|
# libs,
|
||||||
|
# ...
|
||||||
|
# }: {
|
||||||
|
# system.stateVersion = "24.11";
|
||||||
|
# networking = {
|
||||||
|
# firewall = {
|
||||||
|
# enable = true;
|
||||||
|
# allowedTCPPorts = [4000];
|
||||||
|
# };
|
||||||
|
# # Use systemd-resolved inside the container
|
||||||
|
# # Workaround for bug https://github.com/NixOS/nixpkgs/issues/162686
|
||||||
|
# useHostResolvConf = lib.mkForce false;
|
||||||
|
# };
|
||||||
|
# services.resolved.enable = true;
|
||||||
|
# services.llama-cpp = {
|
||||||
|
# enable = true;
|
||||||
|
# host = "127.0.0.1";
|
||||||
|
# port = 4000;
|
||||||
|
# model = builtins.fetchurl {
|
||||||
|
# name = "qwen_2.5.1_coder_7b_instruct_gguf";
|
||||||
|
# sha256 = "61834b88c1a1ce5c277028a98c4a0c94a564210290992a7ba301bbef96ef8eba";
|
||||||
|
# url = "https://huggingface.co/bartowski/Qwen2.5.1-Coder-7B-Instruct-GGUF/resolve/main/Qwen2.5.1-Coder-7B-Instruct-Q8_0.gguf?download=true";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
}
|
||||||
17
nixos/tako/services/attic.nix
Normal file
17
nixos/tako/services/attic.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{...}: {
|
||||||
|
services = {
|
||||||
|
atticd = {
|
||||||
|
enable = false;
|
||||||
|
listen = "/run/attic.sock";
|
||||||
|
};
|
||||||
|
caddy = {
|
||||||
|
virtualHosts."cache.darksailor.dev".extraConfig = ''
|
||||||
|
reverse_proxy /run/attic.sock {
|
||||||
|
transport http {
|
||||||
|
protocol = "fd"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
13
nixos/tako/services/atuin.nix
Normal file
13
nixos/tako/services/atuin.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{...}: {
|
||||||
|
services = {
|
||||||
|
atuin = {
|
||||||
|
enable = true;
|
||||||
|
openRegistration = false;
|
||||||
|
};
|
||||||
|
caddy = {
|
||||||
|
virtualHosts."atuin.darksailor.dev".extraConfig = ''
|
||||||
|
reverse_proxy localhost:8888
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user