refactoring hosts too big
This commit is contained in:
1 parent
da102d5b47
commit
b5bde292d2
112 files changed
+2270
-1625
No files matched your search
+36
-22
@@ -1,41 +1,55 @@
|
||||
# hosts/
|
||||
|
||||
One NixOS configuration file per managed machine, plus hardware configs and host-specific scripts.
|
||||
One folder per managed machine, plus hardware configs and host-specific scripts.
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
hosts/
|
||||
├── <hostname>.nix # Host configuration (packages, services, options)
|
||||
├── <hostname>.hardware-configuration.nix # Generated by nixos-generate-config — DO NOT EDIT
|
||||
├── <hostname>.disko.nix # Optional: declarative disk layout for `skyg remote install` (nixos-anywhere).
|
||||
│ # Only present for hosts installed/reinstalled this way (currently: hl-fws1)
|
||||
├── <hostname>/ # Per-host folder (default.nix is the entry point)
|
||||
│ ├── default.nix # Main config: skyg options, top-level settings
|
||||
│ ├── packages.nix # environment.systemPackages (large hosts only)
|
||||
│ ├── services.nix # Service configs (tailscale, ollama, steam, …)
|
||||
│ ├── hardware.nix # Kernel params, GPU tuning, boot (large hosts only)
|
||||
│ ├── networking.nix # Firewall, NFS mounts, DNS (large hosts only)
|
||||
│ ├── containers.nix # Container service groups (hl-minipc1, hl-minipc2)
|
||||
│ └── ... # Additional host-specific sub-files as needed
|
||||
├── <hostname>.hardware-configuration.nix # Generated — DO NOT EDIT
|
||||
├── <hostname>.disko.nix # Declarative disk layout (hl-fws1 only)
|
||||
└── scripts/
|
||||
├── fwbook/ # fwbook-specific shell scripts
|
||||
│ ├── functions.sh # ZSH functions sourced at shell startup
|
||||
│ └── functions.nu # NuShell helpers (k8s namespace/secret listing, secret decoding)
|
||||
│ └── functions.nu # NuShell helpers
|
||||
├── fw1/
|
||||
│ └── gs.sh # gamescope/Steam launch wrapper (VRR, HDR, mangoapp overlay)
|
||||
│ └── gs.sh # gamescope/Steam launch wrapper
|
||||
└── hl-minipc1/
|
||||
└── buzz-manage.sh # Buzz stack management CLI (wired as `buzz-manage`)
|
||||
└── buzz-manage.sh # Buzz stack management CLI
|
||||
```
|
||||
|
||||
## Managed Hosts
|
||||
|
||||
| File | Host | Role |
|
||||
| ---------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `fwbook.nix` | fwbook | Framework 13 AMD — personal laptop / daily driver |
|
||||
| `hl-fwdesk.nix` | hl-fwdesk | Framework Desktop AI Max 300 — AI workstation |
|
||||
| `hl-fws1.nix` | hl-fws1 | Framework 11th Intel — K3s server node |
|
||||
| `hl-bigbox1.nix` | hl-bigbox1 | AI/compute server (NVIDIA + AMD) |
|
||||
| `hl-bigbox2.nix` | hl-bigbox2 | NFS storage server |
|
||||
| `hl-minipc1.nix` | hl-minipc1 | Core infra: Gitea, nix-serve, registry, Buzz (docker, `buzz-manage` CLI) |
|
||||
| `hl-minipc2.nix` | hl-minipc2 | Container/media server |
|
||||
| `hl-minipc3.nix` | hl-minipc3 | K3s worker node |
|
||||
| `hl-pi1.nix` | hl-pi1 | Raspberry Pi CM4 (aarch64) — headless server, SSH only. Also buildable as a bootable SD image via the `hl-pi1-sd-image` nixosConfiguration (`skyg build-pi-sd-image`) |
|
||||
| `hl-pi2.nix` | hl-pi2 | Raspberry Pi 4 (aarch64) — headless server, SSH only. Also buildable as a bootable SD image via the `hl-pi2-sd-image` nixosConfiguration |
|
||||
| `hl-terra1.nix` | hl-terra1 | NFS storage + Jellyfin backup |
|
||||
| `iso.nix` | iso | Bootable NixOS installer image |
|
||||
| Folder | Host | Role |
|
||||
| ------------- | ---------- | ------------------------------------------------------------------------ |
|
||||
| `fwbook/` | fwbook | Framework 13 AMD — personal laptop / daily driver |
|
||||
| `hl-fwdesk/` | hl-fwdesk | Framework Desktop AI Max 300 — AI workstation |
|
||||
| `hl-fws1/` | hl-fws1 | Framework 11th Intel — K3s server node |
|
||||
| `hl-bigbox1/` | hl-bigbox1 | AI/compute server (NVIDIA + AMD) |
|
||||
| `hl-bigbox2/` | hl-bigbox2 | NFS storage server |
|
||||
| `hl-minipc1/` | hl-minipc1 | Core infra: Gitea, nix-serve, registry, Buzz (docker, `buzz-manage` CLI) |
|
||||
| `hl-minipc2/` | hl-minipc2 | Container/media server |
|
||||
| `hl-minipc3/` | hl-minipc3 | K3s worker node |
|
||||
| `hl-pi1/` | hl-pi1 | Raspberry Pi CM4 (aarch64) — headless server, SSH only |
|
||||
| `hl-pi2/` | hl-pi2 | Raspberry Pi 4 (aarch64) — headless server, SSH only |
|
||||
| `hl-terra1/` | hl-terra1 | NFS storage + Jellyfin backup |
|
||||
| `iso/` | iso | Bootable NixOS installer image |
|
||||
|
||||
## Rules
|
||||
|
||||
- **Do not add `imports = [...]`** to host files — module composition happens in `flake.nix` via `modules/main.nix`
|
||||
- **Do not edit `*.hardware-configuration.nix`** — these are generated and will be overwritten
|
||||
- Hosts with a `<hostname>.disko.nix` own their `fileSystems` via disko; if a generated `hardware-configuration.nix` still contains its own `fileSystems` stanzas for the same host, that's a conflict the machine's owner needs to resolve by hand (regenerating or trimming it) — not something to script around
|
||||
- Host-specific packages and one-off settings belong here; anything reused across hosts belongs in `modules/`
|
||||
- See `docs/hosts/README.md` for full per-host service/port/package reference
|
||||
|
||||
## Rules
|
||||
|
||||
|
||||
@@ -1,357 +0,0 @@
|
||||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, user
|
||||
, unstablePkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
zshFWBook = builtins.filterSource (p: t: true) ./scripts/fwbook;
|
||||
zshFunctions = zshFWBook + "/functions.sh";
|
||||
openPorts = [
|
||||
8000
|
||||
8001
|
||||
];
|
||||
|
||||
in
|
||||
{
|
||||
# Skyg
|
||||
skyg = {
|
||||
user.enable = true;
|
||||
server.admin.enable = true;
|
||||
core.qemu.enable = true;
|
||||
nixos = {
|
||||
common.hardware = {
|
||||
pipewire.enable = true;
|
||||
laptop-power-mgr = {
|
||||
enable = true;
|
||||
enableTempMonitor = true;
|
||||
};
|
||||
amdgpu.enable = true;
|
||||
};
|
||||
desktop = {
|
||||
enable = true;
|
||||
crypto.enable = true;
|
||||
printers.enable = true;
|
||||
fixes = {
|
||||
airpod-bluetooth.enabled = true;
|
||||
};
|
||||
tiler = {
|
||||
enable = true;
|
||||
apps = {
|
||||
control.enable = true;
|
||||
gnome.enable = true;
|
||||
media.enable = true;
|
||||
};
|
||||
hyprland = {
|
||||
enable = true;
|
||||
tools.enable = true;
|
||||
};
|
||||
noctalia = {
|
||||
enable = true;
|
||||
configLink.enable = true;
|
||||
};
|
||||
quickshell.enable = true;
|
||||
niri = {
|
||||
enable = true;
|
||||
configLink.enable = true;
|
||||
touchscreen-gestures = {
|
||||
enable = true;
|
||||
touchOutput = "eDP-1";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
networkDrives = {
|
||||
enable = false;
|
||||
options = [
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
];
|
||||
};
|
||||
};
|
||||
# Genera settings
|
||||
nix.settings.cores = 4;
|
||||
nix.settings.max-jobs = 10;
|
||||
virtualisation.waydroid.enable = true;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
# QEMU emulation for building aarch64 (e.g. hl-pi1) locally instead of on-device
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
# Tailscale
|
||||
services.tailscale.enable = true;
|
||||
services.tailscale.extraDaemonFlags = [ "--statedir=/var/lib/tailscale" ];
|
||||
# Desktop Env - DankGreeter
|
||||
programs.dms-greeter = {
|
||||
enable = true;
|
||||
compositor.name = "niri";
|
||||
configHome = "/home/${user.name}";
|
||||
};
|
||||
# home manager - only configure if skyg.user.enable is true
|
||||
home-manager.users.${user.name} = lib.mkIf config.skyg.user.enable {
|
||||
# Add Functions
|
||||
programs.zsh.initContent = ''
|
||||
source ${zshFunctions}
|
||||
'';
|
||||
services.blueman-applet.enable = true;
|
||||
};
|
||||
# Firmware updater
|
||||
hardware.framework.enableKmod = true;
|
||||
services.fprintd.enable = true;
|
||||
# Touchscreen
|
||||
services.libinput = {
|
||||
enable = true;
|
||||
};
|
||||
# Graphics
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
};
|
||||
# Yubikey
|
||||
services.yubikey-agent.enable = true;
|
||||
# Bluetooth
|
||||
skyg.nixos.common.hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
# Packages
|
||||
environment.systemPackages =
|
||||
let
|
||||
gdk = pkgs.google-cloud-sdk.withExtraComponents (
|
||||
with pkgs.google-cloud-sdk.components;
|
||||
[
|
||||
gke-gcloud-auth-plugin
|
||||
kubectl
|
||||
]
|
||||
);
|
||||
in
|
||||
(with pkgs; [
|
||||
# Improvement of Life
|
||||
grim
|
||||
slurp
|
||||
wl-clipboard
|
||||
tesseract
|
||||
imagemagick
|
||||
zbar
|
||||
curl
|
||||
translate-shell
|
||||
wl-screenrec
|
||||
ffmpeg
|
||||
gifski
|
||||
libusb1
|
||||
lshw
|
||||
jq
|
||||
parted
|
||||
gparted-full
|
||||
f3
|
||||
nixd
|
||||
kdePackages.qtdeclarative
|
||||
piper-tts
|
||||
ffmpeg
|
||||
oreo-cursors-plus
|
||||
|
||||
# Work
|
||||
postgresql
|
||||
google-cloud-sdk
|
||||
awscli
|
||||
openfortivpn
|
||||
openfortivpn-webview
|
||||
openfortivpn-webview-qt
|
||||
nodejs
|
||||
|
||||
# Emulation
|
||||
wineWow64Packages.stable
|
||||
winetricks
|
||||
wineWow64Packages.waylandFull
|
||||
|
||||
# Video recording & editing
|
||||
obs-studio
|
||||
davinci-resolve
|
||||
grim
|
||||
slurp
|
||||
wl-clipboard
|
||||
tesseract
|
||||
imagemagick
|
||||
zbar
|
||||
curl
|
||||
translate-shell
|
||||
wl-screenrec
|
||||
ffmpeg
|
||||
gifski
|
||||
jq
|
||||
|
||||
# Photo/video Editing
|
||||
krita
|
||||
gimp-with-plugins
|
||||
shotcut
|
||||
simple-scan # scanning photos
|
||||
|
||||
# socials
|
||||
zoom-us
|
||||
betterdiscordctl
|
||||
discord
|
||||
signal-desktop
|
||||
|
||||
# Languages
|
||||
python313
|
||||
python314
|
||||
uv
|
||||
cargo
|
||||
rustc
|
||||
go
|
||||
pipx
|
||||
rust-analyzer
|
||||
|
||||
# Development
|
||||
vscode
|
||||
unstablePkgs.zed-editor-fhs
|
||||
devenv
|
||||
just
|
||||
rpi-imager
|
||||
rpiboot
|
||||
code-cursor-fhs
|
||||
nix-prefetch
|
||||
orca-slicer
|
||||
devcontainer
|
||||
gpu-screen-recorder
|
||||
flox_dev
|
||||
|
||||
# Run macos apps
|
||||
darling-dmg
|
||||
|
||||
# password
|
||||
bitwarden-cli
|
||||
|
||||
# documents
|
||||
onlyoffice-desktopeditors
|
||||
|
||||
# Work
|
||||
gh
|
||||
gdk
|
||||
unstablePkgs.slack
|
||||
|
||||
# IPhone Tethering
|
||||
libimobiledevice
|
||||
ifuse
|
||||
|
||||
# Iphone Management
|
||||
idevicerestore # optional, to mount using 'ifuse'
|
||||
|
||||
# coding agents
|
||||
unstablePkgs.grok-build
|
||||
unstablePkgs.pi-coding-agent
|
||||
unstablePkgs.goose-cli
|
||||
unstablePkgs.claude-agent-acp
|
||||
unstablePkgs.claude-code
|
||||
buzz-desktop
|
||||
bubblewrap
|
||||
herdr
|
||||
superset-desktop
|
||||
|
||||
# My apps
|
||||
skygqts
|
||||
hermenix
|
||||
]);
|
||||
|
||||
# General hardware stuff
|
||||
systemd.services.systemd-udev-settle.enable = false;
|
||||
services.usbmuxd.enable = true;
|
||||
# Tether — iPhone ↔ Linux Wayland bridge
|
||||
programs.tether = {
|
||||
enable = true;
|
||||
wifi = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
bluetooth = {
|
||||
enable = true;
|
||||
adapters = [ "hci0" ];
|
||||
};
|
||||
};
|
||||
services.flatpak.enable = true;
|
||||
services.flatpak.packages = [
|
||||
"io.github.kolunmi.Bazaar"
|
||||
"com.spotify.Client"
|
||||
"org.pipewire.Helvum"
|
||||
"com.cassidyjames.butler"
|
||||
"io.dbeaver.DBeaverCommunity"
|
||||
"com.google.Chrome"
|
||||
"dev.deedles.Trayscale"
|
||||
];
|
||||
# Phone
|
||||
programs.kdeconnect.enable = true;
|
||||
# Gaming
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
extest.enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
programs.gamescope = {
|
||||
enable = true;
|
||||
capSysNice = true;
|
||||
};
|
||||
# Ollama
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
host = "0.0.0.0";
|
||||
port = 11434;
|
||||
package = unstablePkgs.ollama-rocm;
|
||||
environmentVariables = {
|
||||
HSA_OVERRIDE_GFX_VERSION = "11.0.2";
|
||||
};
|
||||
};
|
||||
# # Display Managers
|
||||
services.xserver.videoDrivers = [
|
||||
"modesetting"
|
||||
"fbdev"
|
||||
];
|
||||
# Family Storage
|
||||
fileSystems."/mnt/EightTerra/FamilyStorage" = {
|
||||
device = "tnas1.lab.internal:/mnt/EightTerra/FamilyStorage";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
];
|
||||
};
|
||||
fileSystems."/mnt/EightTerra/k3s-cluster" = {
|
||||
device = "tnas1.lab.internal:/mnt/EightTerra/k3s-cluster";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
];
|
||||
};
|
||||
fileSystems."/mnt/EightTerra/DownloadedTorrents" = {
|
||||
device = "tnas1.lab.internal:/mnt/EightTerra/DownloadedTorrents";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
];
|
||||
};
|
||||
skyg.nixos.common.nh.flake = "/home/ari/nixos-setup";
|
||||
# Firewall
|
||||
networking.firewall.allowedUDPPorts = openPorts;
|
||||
networking.firewall.allowedTCPPorts = openPorts;
|
||||
networking.firewall.extraCommands = ''
|
||||
iptables -I INPUT 1 -s 172.16.0.0/12 -p tcp -d 172.17.0.1 -j ACCEPT
|
||||
iptables -I INPUT 2 -s 172.16.0.0/12 -p udp -d 172.17.0.1 -j ACCEPT
|
||||
'';
|
||||
# random dev work
|
||||
networking.hosts = {
|
||||
"0.0.0.0" = [
|
||||
"auth.me.internal"
|
||||
"me.internal"
|
||||
"me.local"
|
||||
"api.me.internal"
|
||||
];
|
||||
"127.0.0.1" = [
|
||||
"fwbook"
|
||||
"auth.me.internal"
|
||||
"me.internal"
|
||||
"me.local"
|
||||
"api.me.internal"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
{ config, lib, user, ... }:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration
|
||||
./packages.nix
|
||||
./services.nix
|
||||
./networking.nix
|
||||
./hardware.nix
|
||||
./systemd.nix
|
||||
];
|
||||
|
||||
skyg = {
|
||||
user.enable = true;
|
||||
server.admin.enable = true;
|
||||
core.qemu.enable = true;
|
||||
nixos = {
|
||||
common.hardware = {
|
||||
pipewire.enable = true;
|
||||
laptop-power-mgr = {
|
||||
enable = true;
|
||||
enableTempMonitor = true;
|
||||
};
|
||||
amdgpu.enable = true;
|
||||
};
|
||||
desktop = {
|
||||
enable = true;
|
||||
crypto.enable = true;
|
||||
printers.enable = true;
|
||||
fixes = {
|
||||
airpod-bluetooth.enabled = true;
|
||||
};
|
||||
tiler = {
|
||||
enable = true;
|
||||
apps = {
|
||||
control.enable = true;
|
||||
gnome.enable = true;
|
||||
media.enable = true;
|
||||
};
|
||||
hyprland = {
|
||||
enable = true;
|
||||
tools.enable = true;
|
||||
};
|
||||
noctalia = {
|
||||
enable = true;
|
||||
configLink.enable = true;
|
||||
};
|
||||
quickshell.enable = true;
|
||||
niri = {
|
||||
enable = true;
|
||||
configLink.enable = false;
|
||||
touchscreen-gestures = {
|
||||
enable = true;
|
||||
touchOutput = "eDP-1";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
networkDrives = {
|
||||
enable = false;
|
||||
options = [
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nix.settings.cores = 4;
|
||||
nix.settings.max-jobs = 10;
|
||||
skyg.nixos.common.nh.flake = "/home/ari/nixos-setup";
|
||||
virtualisation.waydroid.enable = true;
|
||||
|
||||
programs.dms-greeter = {
|
||||
enable = true;
|
||||
compositor.name = "niri";
|
||||
configHome = "/home/${user.name}";
|
||||
};
|
||||
|
||||
services.usbmuxd.enable = true;
|
||||
|
||||
home-manager.users.${user.name} = lib.mkIf config.skyg.user.enable (import ./home);
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "nvme" "xhci_pci" "thunderbolt" "uas" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"boot.shell_on_fail"
|
||||
"udev.log_priority=3"
|
||||
"rd.systemd.show_status=auto"
|
||||
# Improve s2idle sleep behavior on AMD
|
||||
"rtc_cmos.use_acpi_alarm=1"
|
||||
"acpi.prefer_microsoft_dsm_guid=1"
|
||||
"amd_pstate=active"
|
||||
# Disable the old and new display power-saving features (PSR and Panel Replay).
|
||||
"amdgpu.dcdebugmask=0x410"
|
||||
];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
};
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.tmp.useTmpfs = true;
|
||||
boot.consoleLogLevel = 3;
|
||||
boot.initrd.verbose = false;
|
||||
boot.extraModprobeConfig = ''
|
||||
options snd_hda_intel power_save=0
|
||||
'';
|
||||
|
||||
boot.kernel.sysctl = {
|
||||
"vm.swappiness" = 150;
|
||||
"vm.page-cluster" = 0;
|
||||
};
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, user, ... }:
|
||||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
./file-system.nix
|
||||
];
|
||||
}
|
||||
+4
-45
@@ -1,40 +1,8 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "nvme" "xhci_pci" "thunderbolt" "uas" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"boot.shell_on_fail"
|
||||
"udev.log_priority=3"
|
||||
"rd.systemd.show_status=auto"
|
||||
# Improve s2idle sleep behavior on AMD
|
||||
"rtc_cmos.use_acpi_alarm=1"
|
||||
"acpi.prefer_microsoft_dsm_guid=1"
|
||||
"amd_pstate=active"
|
||||
# Disable the old and new display power-saving features (PSR and Panel Replay).
|
||||
"amdgpu.dcdebugmask=0x410"
|
||||
];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
};
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.tmp.useTmpfs = true;
|
||||
boot.consoleLogLevel = 3;
|
||||
boot.initrd.verbose = false;
|
||||
boot.extraModprobeConfig = ''
|
||||
options snd_hda_intel power_save=0
|
||||
'';
|
||||
fileSystems."/" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/adaad601-f79c-4342-ba3a-9eab53ec4cd1";
|
||||
@@ -88,15 +56,6 @@
|
||||
algorithm = "zstd";
|
||||
memoryPercent = 50;
|
||||
};
|
||||
boot.kernel.sysctl = {
|
||||
"vm.swappiness" = 150;
|
||||
"vm.page-cluster" = 0;
|
||||
};
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
# BTRFS Stuff
|
||||
services.btrfs.autoScrub.enable = true;
|
||||
services.snapper = {
|
||||
@@ -0,0 +1,15 @@
|
||||
{ ... }:
|
||||
{
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
hardware.framework.enableKmod = true;
|
||||
hardware.graphics.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
|
||||
services.fprintd.enable = true;
|
||||
services.libinput.enable = true;
|
||||
services.yubikey-agent.enable = true;
|
||||
|
||||
skyg.nixos.common.hardware.bluetooth.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
{ ... }:
|
||||
let
|
||||
zshFWBook = builtins.filterSource (p: t: true) ../../scripts/fwbook;
|
||||
zshFunctions = zshFWBook + "/functions.sh";
|
||||
in
|
||||
{
|
||||
programs.zsh.initContent = ''
|
||||
source ${zshFunctions}
|
||||
'';
|
||||
services.blueman-applet.enable = true;
|
||||
xdg.mimeApps.enable = true;
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"x-scheme-handler/about" = "chromium-browser.desktop";
|
||||
"x-scheme-handler/chrome" = "chromium-browser.desktop";
|
||||
"x-scheme-handler/http" = "chromium-browser.desktop";
|
||||
"x-scheme-handler/https" = "chromium-browser.desktop";
|
||||
"x-scheme-handler/unknown" = "chromium-browser.desktop";
|
||||
"x-scheme-handler/geo" = "google-maps-geo-handler.desktop";
|
||||
"x-scheme-handler/mailto" = "chromium-browser.desktop";
|
||||
"x-scheme-handler/sgnl" = "signal.desktop";
|
||||
"x-scheme-handler/signalcaptcha" = "signal.desktop";
|
||||
"x-scheme-handler/slack" = "slack.desktop";
|
||||
"x-scheme-handler/terminal" = "com.mitchellh.ghostty.desktop";
|
||||
"application/pdf" = "chromium-browser.desktop";
|
||||
"application/xhtml+xml" = "chromium-browser.desktop";
|
||||
"text/html" = "chromium-browser.desktop";
|
||||
"application/x-terminal-emulator" = "com.mitchellh.ghostty.desktop";
|
||||
"inode/directory" = "org.gnome.Nautilus.desktop";
|
||||
"image/avif" = "org.gnome.eog.desktop";
|
||||
"image/bmp" = "org.gnome.eog.desktop";
|
||||
"image/gif" = "org.gnome.eog.desktop";
|
||||
"image/heif" = "org.gnome.eog.desktop";
|
||||
"image/jpeg" = "org.gnome.eog.desktop";
|
||||
"image/png" = "org.gnome.eog.desktop";
|
||||
"image/svg+xml" = "org.gnome.eog.desktop";
|
||||
"image/tiff" = "org.gnome.eog.desktop";
|
||||
"image/webp" = "org.gnome.eog.desktop";
|
||||
"application/x-matroska" = "vlc.desktop";
|
||||
"audio/aac" = "vlc.desktop";
|
||||
"audio/flac" = "vlc.desktop";
|
||||
"audio/m4a" = "vlc.desktop";
|
||||
"audio/mpeg" = "vlc.desktop";
|
||||
"audio/ogg" = "vlc.desktop";
|
||||
"audio/wav" = "vlc.desktop";
|
||||
"audio/x-flac" = "vlc.desktop";
|
||||
"video/avi" = "vlc.desktop";
|
||||
"video/mp4" = "vlc.desktop";
|
||||
"video/mpeg" = "vlc.desktop";
|
||||
"video/ogg" = "vlc.desktop";
|
||||
"video/quicktime" = "vlc.desktop";
|
||||
"video/webm" = "vlc.desktop";
|
||||
"video/x-matroska" = "vlc.desktop";
|
||||
"application/javascript" = "code.desktop";
|
||||
"application/json" = "nvim.desktop";
|
||||
"application/x-docbook+xml" = "nvim.desktop";
|
||||
"application/x-httpd-php3" = "dev.zed.Zed.desktop";
|
||||
"application/x-httpd-php4" = "dev.zed.Zed.desktop";
|
||||
"application/x-httpd-php5" = "dev.zed.Zed.desktop";
|
||||
"application/x-m4" = "dev.zed.Zed.desktop";
|
||||
"application/x-php" = "dev.zed.Zed.desktop";
|
||||
"application/x-ruby" = "dev.zed.Zed.desktop";
|
||||
"application/x-shellscript" = "nvim.desktop";
|
||||
"application/x-yaml" = "nvim.desktop";
|
||||
"application/xml" = "nvim.desktop";
|
||||
"text/css" = "dev.zed.Zed.desktop";
|
||||
"text/markdown" = "nvim.desktop";
|
||||
"text/plain" = "nvim.desktop";
|
||||
"text/turtle" = "dev.zed.Zed.desktop";
|
||||
"text/x-c++hdr" = "dev.zed.Zed.desktop";
|
||||
"text/x-c++src" = "dev.zed.Zed.desktop";
|
||||
"text/x-chdr" = "dev.zed.Zed.desktop";
|
||||
"text/x-cmake" = "dev.zed.Zed.desktop";
|
||||
"text/x-csharp" = "dev.zed.Zed.desktop";
|
||||
"text/x-csrc" = "dev.zed.Zed.desktop";
|
||||
"text/x-diff" = "dev.zed.Zed.desktop";
|
||||
"text/x-dsrc" = "dev.zed.Zed.desktop";
|
||||
"text/x-fortran" = "dev.zed.Zed.desktop";
|
||||
"text/x-java" = "dev.zed.Zed.desktop";
|
||||
"text/x-makefile" = "dev.zed.Zed.desktop";
|
||||
"text/x-pascal" = "dev.zed.Zed.desktop";
|
||||
"text/x-perl" = "dev.zed.Zed.desktop";
|
||||
"text/x-python" = "dev.zed.Zed.desktop";
|
||||
"text/x-sql" = "dev.zed.Zed.desktop";
|
||||
"text/x-vb" = "dev.zed.Zed.desktop";
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.presentation" = "onlyoffice-desktopeditors.desktop";
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" = "onlyoffice-desktopeditors.desktop";
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = "onlyoffice-desktopeditors.desktop";
|
||||
"text/csv" = "onlyoffice-desktopeditors.desktop";
|
||||
};
|
||||
xdg.mimeApps.associations.added = {
|
||||
"application/json" = "nvim.desktop;dev.zed.Zed.desktop;";
|
||||
"application/pdf" = "chromium-browser.desktop;onlyoffice-desktopeditors.desktop;";
|
||||
"audio/mpeg" = "vlc.desktop;mpv.desktop;";
|
||||
"image/png" = "org.gnome.eog.desktop;gimp.desktop;";
|
||||
"text/plain" = "dev.zed.Zed.desktop;nvim.desktop;code.desktop;";
|
||||
"video/mp4" = "vlc.desktop;mpv.desktop;";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{ ... }:
|
||||
let
|
||||
openPorts = [
|
||||
8000
|
||||
8001
|
||||
];
|
||||
in
|
||||
{
|
||||
fileSystems."/mnt/EightTerra/FamilyStorage" = {
|
||||
device = "tnas1.lab.internal:/mnt/EightTerra/FamilyStorage";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" ];
|
||||
};
|
||||
networking.firewall.allowedUDPPorts = openPorts;
|
||||
networking.firewall.allowedTCPPorts = openPorts;
|
||||
networking.hosts = {
|
||||
"0.0.0.0" = [
|
||||
"auth.me.internal"
|
||||
"me.internal"
|
||||
"me.local"
|
||||
"api.me.internal"
|
||||
];
|
||||
"127.0.0.1" = [
|
||||
"fwbook"
|
||||
"auth.me.internal"
|
||||
"me.internal"
|
||||
"me.local"
|
||||
"api.me.internal"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
{ pkgs, unstablePkgs, ... }:
|
||||
{
|
||||
environment.systemPackages =
|
||||
let
|
||||
gdk = pkgs.google-cloud-sdk.withExtraComponents (
|
||||
with pkgs.google-cloud-sdk.components;
|
||||
[
|
||||
gke-gcloud-auth-plugin
|
||||
kubectl
|
||||
]
|
||||
);
|
||||
in
|
||||
(with pkgs; [
|
||||
grim
|
||||
slurp
|
||||
wl-clipboard
|
||||
tesseract
|
||||
imagemagick
|
||||
zbar
|
||||
curl
|
||||
translate-shell
|
||||
wl-screenrec
|
||||
ffmpeg
|
||||
gifski
|
||||
libusb1
|
||||
lshw
|
||||
jq
|
||||
parted
|
||||
gparted-full
|
||||
f3
|
||||
nixd
|
||||
kdePackages.qtdeclarative
|
||||
piper-tts
|
||||
ffmpeg
|
||||
oreo-cursors-plus
|
||||
|
||||
postgresql
|
||||
google-cloud-sdk
|
||||
awscli
|
||||
openfortivpn
|
||||
openfortivpn-webview
|
||||
openfortivpn-webview-qt
|
||||
nodejs
|
||||
|
||||
wineWow64Packages.stable
|
||||
winetricks
|
||||
wineWow64Packages.waylandFull
|
||||
|
||||
obs-studio
|
||||
davinci-resolve
|
||||
grim
|
||||
slurp
|
||||
wl-clipboard
|
||||
tesseract
|
||||
imagemagick
|
||||
zbar
|
||||
curl
|
||||
translate-shell
|
||||
wl-screenrec
|
||||
ffmpeg
|
||||
gifski
|
||||
jq
|
||||
|
||||
krita
|
||||
gimp-with-plugins
|
||||
shotcut
|
||||
simple-scan
|
||||
|
||||
zoom-us
|
||||
betterdiscordctl
|
||||
discord
|
||||
signal-desktop
|
||||
|
||||
python313
|
||||
python314
|
||||
uv
|
||||
cargo
|
||||
rustc
|
||||
go
|
||||
pipx
|
||||
rust-analyzer
|
||||
|
||||
vscode
|
||||
unstablePkgs.zed-editor-fhs
|
||||
devenv
|
||||
just
|
||||
rpi-imager
|
||||
rpiboot
|
||||
code-cursor-fhs
|
||||
nix-prefetch
|
||||
orca-slicer
|
||||
devcontainer
|
||||
gpu-screen-recorder
|
||||
flox_dev
|
||||
|
||||
darling-dmg
|
||||
|
||||
bitwarden-cli
|
||||
|
||||
onlyoffice-desktopeditors
|
||||
|
||||
gh
|
||||
gdk
|
||||
unstablePkgs.slack
|
||||
|
||||
libimobiledevice
|
||||
ifuse
|
||||
|
||||
idevicerestore
|
||||
|
||||
unstablePkgs.grok-build
|
||||
unstablePkgs.pi-coding-agent
|
||||
unstablePkgs.goose-cli
|
||||
unstablePkgs.claude-agent-acp
|
||||
unstablePkgs.claude-code
|
||||
buzz-desktop
|
||||
bubblewrap
|
||||
herdr
|
||||
superset-desktop
|
||||
|
||||
skygqts
|
||||
hermenix
|
||||
]);
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
{ pkgs, unstablePkgs, config, ... }:
|
||||
{
|
||||
services.tailscale.enable = true;
|
||||
services.tailscale.extraDaemonFlags = [ "--statedir=/var/lib/tailscale" ];
|
||||
|
||||
programs.tether = {
|
||||
enable = true;
|
||||
wifi = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
bluetooth = {
|
||||
enable = true;
|
||||
adapters = [ "hci0" ];
|
||||
};
|
||||
};
|
||||
|
||||
services.flatpak.enable = true;
|
||||
services.flatpak.packages = [
|
||||
"io.github.kolunmi.Bazaar"
|
||||
"com.spotify.Client"
|
||||
"org.pipewire.Helvum"
|
||||
"com.cassidyjames.butler"
|
||||
"io.dbeaver.DBeaverCommunity"
|
||||
"com.google.Chrome"
|
||||
"dev.deedles.Trayscale"
|
||||
];
|
||||
|
||||
programs.kdeconnect.enable = true;
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
extest.enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
programs.gamescope = {
|
||||
enable = true;
|
||||
capSysNice = true;
|
||||
};
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
host = "0.0.0.0";
|
||||
port = 11434;
|
||||
package = unstablePkgs.ollama-rocm;
|
||||
environmentVariables = {
|
||||
HSA_OVERRIDE_GFX_VERSION = "11.0.2";
|
||||
};
|
||||
};
|
||||
services.xserver.videoDrivers = [
|
||||
"modesetting"
|
||||
"fbdev"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
systemd.services.systemd-udev-settle.enable = false;
|
||||
}
|
||||
@@ -1,150 +0,0 @@
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
skyg = {
|
||||
user.enable = true;
|
||||
server.admin.enable = true;
|
||||
server.exporters.enable = true;
|
||||
server.timers = {
|
||||
jellyfin-backups = {
|
||||
OnCalendar = "daily";
|
||||
wantedBy = [
|
||||
"homelab-terra1-Data-apps.mount"
|
||||
];
|
||||
script = ''
|
||||
set -eu
|
||||
${pkgs.rsync}/bin/rsync -avpzP --delete /opt/jellyfin /homelab/terra1/Data/apps/
|
||||
'';
|
||||
};
|
||||
};
|
||||
nixos = {
|
||||
desktop = {
|
||||
enable = false;
|
||||
gnome.enable = false;
|
||||
};
|
||||
common.ssh-server.enable = true;
|
||||
common.containers.openMetricsPort = true;
|
||||
common.hardware = {
|
||||
nvidia.enable = true;
|
||||
amdgpu.enable = true;
|
||||
udevrules.coraltpu.enable = true;
|
||||
};
|
||||
server.services = {
|
||||
ai.enable = true;
|
||||
};
|
||||
};
|
||||
networkDrives.enable = true;
|
||||
};
|
||||
|
||||
# Portainer Edge Agent
|
||||
age.secrets.portainer-agent-bigbox1.file = ../secrets/portainer-agent-bigbox1.age;
|
||||
skyg.nixos.server.portainer = {
|
||||
enable = true;
|
||||
mode = "agent";
|
||||
agent.edgeKeySecretName = "portainer-agent-bigbox1";
|
||||
};
|
||||
|
||||
# Jellyfin container service group
|
||||
skyg.nixos.common.container-services.jellyfin = {
|
||||
enable = true;
|
||||
autoUpdate.enable = true;
|
||||
services = {
|
||||
jellyfin = {
|
||||
image = "jellyfin/jellyfin";
|
||||
deploy = {
|
||||
resources = {
|
||||
reservations = {
|
||||
devices = [
|
||||
{
|
||||
driver = "cdi";
|
||||
device_ids = [ "nvidia.com/gpu=all" ];
|
||||
capabilities = [ "gpu" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
volumes = [
|
||||
"/opt/jellyfin:/mnt/apps/jellyfin"
|
||||
"torrents:/torrents"
|
||||
"family-videos:/family-videos"
|
||||
];
|
||||
devices = [ "/dev/dri:/dev/dri" ];
|
||||
restart = "always";
|
||||
healthcheck = {
|
||||
test = "curl --fail http://0.0.0.0:8096 || exit 1";
|
||||
interval = "60s";
|
||||
timeout = "20s";
|
||||
start_period = "30s";
|
||||
};
|
||||
environment = {
|
||||
JELLYFIN_DATA_DIR = "/mnt/apps/jellyfin/data";
|
||||
JELLYFIN_CACHE_DIR = "/mnt/apps/jellyfin/cache";
|
||||
JELLYFIN_CONFIG_DIR = "/mnt/apps/jellyfin/config";
|
||||
NVIDIA_VISIBLE_DEVICES = "all";
|
||||
};
|
||||
ports = [ "8096:8096" ];
|
||||
};
|
||||
};
|
||||
volumes = {
|
||||
torrents = {
|
||||
driver_opts = {
|
||||
"type" = "nfs";
|
||||
"o" = "addr=tnas1.lab.internal,nfsvers=4";
|
||||
"device" = ":/mnt/EightTerra/DownloadedTorrents";
|
||||
};
|
||||
};
|
||||
family-videos = {
|
||||
driver_opts = {
|
||||
"type" = "nfs";
|
||||
"o" = "addr=tnas1.lab.internal,nfsvers=4";
|
||||
"device" = ":/mnt/EightTerra/FamilyStorage/Video";
|
||||
};
|
||||
};
|
||||
jellyfin = {
|
||||
driver_opts = {
|
||||
"type" = "nfs";
|
||||
"o" = "addr=tnas1.lab.internal,nfsvers=4";
|
||||
"device" = ":/mnt/Data/apps/jellyfin";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.displayManager.defaultSession = "gnome";
|
||||
services.displayManager.autoLogin = {
|
||||
enable = true;
|
||||
user = config.skyg.user.name;
|
||||
};
|
||||
systemd.services."getty@tty1".enable = false;
|
||||
systemd.services."autovt@tty1".enable = false;
|
||||
# Disable auto-suspend
|
||||
systemd.targets.sleep.enable = false;
|
||||
systemd.targets.suspend.enable = false;
|
||||
systemd.targets.hibernate.enable = false;
|
||||
systemd.targets.hybrid-sleep.enable = false;
|
||||
services.displayManager.gdm.autoSuspend = false;
|
||||
services.displayManager.gdm.autoLogin.delay = 0;
|
||||
# Firewall & permissions
|
||||
networking.firewall.enable = false;
|
||||
users.users.ari.extraGroups = [ "input" ];
|
||||
# firmware updater
|
||||
services.fwupd.enable = true;
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.tmp.useTmpfs = true;
|
||||
# QEMU emulation for building aarch64 (e.g. hl-pi1) as a remote build machine
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
# linuxPackages_hardened was removed in 26.05; _latest is 7.2 and NVIDIA 595 cannot build against it
|
||||
boot.kernelPackages = pkgs.linuxPackages;
|
||||
# Wake on Lan
|
||||
networking.interfaces.enp4s0.wakeOnLan.enable = true;
|
||||
networking.interfaces.lo.wakeOnLan.enable = true;
|
||||
# Extra Packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
nvidia-container-toolkit
|
||||
libnvidia-container
|
||||
docker
|
||||
runc
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./services
|
||||
./hardware-configuration
|
||||
./hardware.nix
|
||||
./systemd.nix
|
||||
];
|
||||
|
||||
skyg = {
|
||||
user.enable = true;
|
||||
server.admin.enable = true;
|
||||
server.exporters.enable = true;
|
||||
nixos = {
|
||||
desktop = {
|
||||
enable = false;
|
||||
gnome.enable = false;
|
||||
};
|
||||
common.ssh-server.enable = true;
|
||||
common.containers.openMetricsPort = true;
|
||||
common.hardware = {
|
||||
nvidia.enable = true;
|
||||
amdgpu.enable = true;
|
||||
udevrules.coraltpu.enable = true;
|
||||
};
|
||||
server.services.ai.enable = true;
|
||||
};
|
||||
networkDrives.enable = true;
|
||||
};
|
||||
|
||||
services.displayManager.defaultSession = "gnome";
|
||||
services.displayManager.autoLogin = {
|
||||
enable = true;
|
||||
user = config.skyg.user.name;
|
||||
};
|
||||
services.displayManager.gdm.autoSuspend = false;
|
||||
services.displayManager.gdm.autoLogin.delay = 0;
|
||||
|
||||
networking.firewall.enable = false;
|
||||
users.users.ari.extraGroups = [ "input" ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nvidia-container-toolkit
|
||||
libnvidia-container
|
||||
docker
|
||||
runc
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
boot.kernel.sysctl."kernel.unprivileged_userns_clone" = 1;
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
./file-system.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/6302dadf-57b7-4213-a7a5-2ba97f941e49";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/mnt/Data" = {
|
||||
device = "/dev/disk/by-uuid/b1c83d70-4d81-4d0f-a61a-38a78b943bd8";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/BBF9-1744";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
swapDevices = [{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 32 * 1024;
|
||||
}];
|
||||
zramSwap.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.fwupd.enable = true;
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
boot.kernelPackages = pkgs.linuxPackages;
|
||||
networking.interfaces.enp4s0.wakeOnLan.enable = true;
|
||||
networking.interfaces.lo.wakeOnLan.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
imports = [
|
||||
./jellyfin.nix
|
||||
./portainer.nix
|
||||
./timers.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
skyg.nixos.common.container-services.jellyfin = {
|
||||
enable = true;
|
||||
autoUpdate.enable = true;
|
||||
services.jellyfin = {
|
||||
image = "jellyfin/jellyfin";
|
||||
deploy.resources.reservations.devices = [
|
||||
{
|
||||
driver = "cdi";
|
||||
device_ids = [ "nvidia.com/gpu=all" ];
|
||||
capabilities = [ "gpu" ];
|
||||
}
|
||||
];
|
||||
volumes = [
|
||||
"/opt/jellyfin:/mnt/apps/jellyfin"
|
||||
"torrents:/torrents"
|
||||
"family-videos:/family-videos"
|
||||
];
|
||||
devices = [ "/dev/dri:/dev/dri" ];
|
||||
restart = "always";
|
||||
healthcheck = {
|
||||
test = "curl --fail http://0.0.0.0:8096 || exit 1";
|
||||
interval = "60s";
|
||||
timeout = "20s";
|
||||
start_period = "30s";
|
||||
};
|
||||
environment = {
|
||||
JELLYFIN_DATA_DIR = "/mnt/apps/jellyfin/data";
|
||||
JELLYFIN_CACHE_DIR = "/mnt/apps/jellyfin/cache";
|
||||
JELLYFIN_CONFIG_DIR = "/mnt/apps/jellyfin/config";
|
||||
NVIDIA_VISIBLE_DEVICES = "all";
|
||||
};
|
||||
ports = [ "8096:8096" ];
|
||||
};
|
||||
volumes = {
|
||||
torrents = {
|
||||
driver_opts = {
|
||||
type = "nfs";
|
||||
o = "addr=tnas1.lab.internal,nfsvers=4";
|
||||
device = ":/mnt/EightTerra/DownloadedTorrents";
|
||||
};
|
||||
};
|
||||
family-videos = {
|
||||
driver_opts = {
|
||||
type = "nfs";
|
||||
o = "addr=tnas1.lab.internal,nfsvers=4";
|
||||
device = ":/mnt/EightTerra/FamilyStorage/Video";
|
||||
};
|
||||
};
|
||||
jellyfin = {
|
||||
driver_opts = {
|
||||
type = "nfs";
|
||||
o = "addr=tnas1.lab.internal,nfsvers=4";
|
||||
device = ":/mnt/Data/apps/jellyfin";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ ... }:
|
||||
{
|
||||
age.secrets.portainer-agent-bigbox1.file = ../secrets/portainer-agent-bigbox1.age;
|
||||
|
||||
skyg.nixos.server.portainer = {
|
||||
enable = true;
|
||||
mode = "agent";
|
||||
agent.edgeKeySecretName = "portainer-agent-bigbox1";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
skyg.server.timers.jellyfin-backups = {
|
||||
OnCalendar = "daily";
|
||||
wantedBy = [ "homelab-terra1-Data-apps.mount" ];
|
||||
script = ''
|
||||
set -eu
|
||||
${pkgs.rsync}/bin/rsync -avpzP --delete /opt/jellyfin /homelab/terra1/Data/apps/
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{ ... }:
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.tmp.useTmpfs = true;
|
||||
|
||||
systemd.services."getty@tty1".enable = false;
|
||||
systemd.services."autovt@tty1".enable = false;
|
||||
systemd.targets.sleep.enable = false;
|
||||
systemd.targets.suspend.enable = false;
|
||||
systemd.targets.hibernate.enable = false;
|
||||
systemd.targets.hybrid-sleep.enable = false;
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
ports = {
|
||||
nixServe = 5000;
|
||||
lockdPort = 4001;
|
||||
mountdPort = 4002;
|
||||
statdPort = 4000;
|
||||
};
|
||||
openPorts = builtins.attrValues ports;
|
||||
in
|
||||
{
|
||||
# BIOS GRUB must land on the MBR Kingston disk that holds /boot.
|
||||
# hardware-config still says /dev/sda (GPT home disk) which cannot embed GRUB.
|
||||
boot.loader.grub.device = lib.mkForce "/dev/disk/by-id/ata-KINGSTON_SA400S37240G_50026B7785904215";
|
||||
# Longer retention than the fleet default: bigbox2 is the shared cache store.
|
||||
programs.nh.clean.extraArgs = "--keep-since 30d --keep 5";
|
||||
skyg = {
|
||||
user.enable = true;
|
||||
nixos.common = {
|
||||
ssh-server.enable = true;
|
||||
containers.openMetricsPort = true;
|
||||
};
|
||||
server.exporters.enable = true;
|
||||
networkDrives = {
|
||||
enable = true;
|
||||
bigBox2.enable = false;
|
||||
};
|
||||
};
|
||||
# Nix binary cache server (bigbox2 is the cache store for all builds)
|
||||
services.nix-serve = {
|
||||
enable = true;
|
||||
secretKeyFile = "/home/ari/cache-keys/cache-priv-key.pem";
|
||||
port = ports.nixServe;
|
||||
};
|
||||
# bigbox2 is the cache itself — don't push builds back to itself.
|
||||
skyg.nixos.common.cachePush.enable = false;
|
||||
# firmware updater
|
||||
services.fwupd.enable = true;
|
||||
skyg.nixos.common.networking.nfsServer.enable = true;
|
||||
services.nfs.server = {
|
||||
lockdPort = ports.lockdPort;
|
||||
mountdPort = ports.mountdPort;
|
||||
statdPort = ports.statdPort;
|
||||
extraNfsdConfig = '''';
|
||||
exports = ''
|
||||
/data/fourTerra 10.0.0.0/16(rw,wdelay,insecure,no_root_squash,no_subtree_check,sec=sys,rw,insecure,no_root_squash,no_all_squash)
|
||||
'';
|
||||
};
|
||||
networking.firewall.allowedUDPPorts = openPorts;
|
||||
networking.firewall.allowedTCPPorts = openPorts;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
ports = {
|
||||
nixServe = 5000;
|
||||
lockdPort = 4001;
|
||||
mountdPort = 4002;
|
||||
statdPort = 4000;
|
||||
};
|
||||
openPorts = builtins.attrValues ports;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./services.nix
|
||||
./hardware-configuration
|
||||
./hardware.nix
|
||||
];
|
||||
|
||||
boot.loader.grub.device = lib.mkForce "/dev/disk/by-id/ata-KINGSTON_SA400S37240G_50026B7785904215";
|
||||
programs.nh.clean.extraArgs = "--keep-since 30d --keep 5";
|
||||
|
||||
skyg = {
|
||||
user.enable = true;
|
||||
nixos.common = {
|
||||
ssh-server.enable = true;
|
||||
containers.openMetricsPort = true;
|
||||
};
|
||||
server.exporters.enable = true;
|
||||
networkDrives = {
|
||||
enable = true;
|
||||
bigBox2.enable = false;
|
||||
};
|
||||
};
|
||||
|
||||
skyg.nixos.common.cachePush.enable = false;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "ohci_pci" "ehci_pci" "pata_atiixp" "xhci_pci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/sda";
|
||||
efiSupport = false;
|
||||
};
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
./file-system.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/5bf4a352-412f-47e1-9455-68f3aa629722";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@root" "compress=zstd" "noatime" ];
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/ccc80fd2-b38b-412b-9988-12a3194a5b57";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/var" = {
|
||||
device = "/dev/disk/by-uuid/5bf4a352-412f-47e1-9455-68f3aa629722";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd" "subvol=@var" "noatime" ];
|
||||
};
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-uuid/8cd6e560-4db9-4cf1-8048-27a7c6308965";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd" "subvol=@nix" "noatime" ];
|
||||
};
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-uuid/6f4b2adc-5818-41ea-a4ba-720fb96b8f98";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd" "subvol=@home" "noatime" ];
|
||||
};
|
||||
fileSystems."/data/fourTerra" = {
|
||||
device = "/dev/sde1";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd" "subvol=@data" "noatime" ];
|
||||
};
|
||||
swapDevices = [ ];
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
services.fwupd.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{ ... }:
|
||||
let
|
||||
ports = {
|
||||
nixServe = 5000;
|
||||
lockdPort = 4001;
|
||||
mountdPort = 4002;
|
||||
statdPort = 4000;
|
||||
};
|
||||
openPorts = builtins.attrValues ports;
|
||||
in
|
||||
{
|
||||
services.nix-serve = {
|
||||
enable = true;
|
||||
secretKeyFile = "/home/ari/cache-keys/cache-priv-key.pem";
|
||||
port = ports.nixServe;
|
||||
};
|
||||
|
||||
skyg.nixos.common.networking.nfsServer.enable = true;
|
||||
services.nfs.server = {
|
||||
lockdPort = ports.lockdPort;
|
||||
mountdPort = ports.mountdPort;
|
||||
statdPort = ports.statdPort;
|
||||
extraNfsdConfig = '''';
|
||||
exports = ''
|
||||
/data/fourTerra 10.0.0.0/16(rw,wdelay,insecure,no_root_squash,no_subtree_check,sec=sys,rw,insecure,no_root_squash,no_all_squash)
|
||||
'';
|
||||
};
|
||||
|
||||
networking.firewall.allowedUDPPorts = openPorts;
|
||||
networking.firewall.allowedTCPPorts = openPorts;
|
||||
}
|
||||
@@ -1,312 +0,0 @@
|
||||
{ pkgs
|
||||
, unstablePkgs
|
||||
, myPkgs
|
||||
, my-nixpkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
ports = {
|
||||
tabby = 11029;
|
||||
ollama = 11434;
|
||||
piper = 10200;
|
||||
fastWhisper = 10300;
|
||||
wyoming = 10400;
|
||||
comfyui = 8188;
|
||||
libretranslate = 5000;
|
||||
ds4 = 8000;
|
||||
colibri = 8001;
|
||||
hermes = 8642;
|
||||
hermesDashboard = 9119;
|
||||
hermesCache = 5001;
|
||||
vnc = 5930;
|
||||
};
|
||||
openPorts = [
|
||||
ports.ollama
|
||||
ports.tabby
|
||||
ports.fastWhisper
|
||||
ports.piper
|
||||
ports.wyoming
|
||||
ports.comfyui
|
||||
ports.libretranslate
|
||||
ports.ds4
|
||||
ports.vnc
|
||||
];
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./hl-fwdesk.hardware-configuration.nix
|
||||
"${my-nixpkgs}/nixos/modules/services/misc/ds4.nix"
|
||||
];
|
||||
# Skyg
|
||||
environment.sessionVariables.ELECTRON_OZONE_PLATFORM_HINT = "wayland";
|
||||
skyg = {
|
||||
user.enable = true;
|
||||
core.qemu.enable = true;
|
||||
nixos = {
|
||||
common.ssh-server.enable = true;
|
||||
common.cachePush.enable = true;
|
||||
common.hardware = {
|
||||
pipewire.enable = true;
|
||||
amdgpu.enable = true;
|
||||
};
|
||||
desktop = {
|
||||
enable = true;
|
||||
tiler = {
|
||||
enable = true;
|
||||
noctalia = {
|
||||
enable = true;
|
||||
};
|
||||
hyprland = {
|
||||
enable = true;
|
||||
tools.enable = true;
|
||||
configLink = {
|
||||
enable = true;
|
||||
mountAsSource = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
server.services.comfyui = {
|
||||
enable = true;
|
||||
mode = "rocm";
|
||||
port = ports.comfyui;
|
||||
rocm = {
|
||||
dataDir = "/data/comfyui";
|
||||
};
|
||||
};
|
||||
server.services.colibri = {
|
||||
enable = false;
|
||||
package = pkgs.colibri-rocm;
|
||||
model = "/var/lib/colibri/glm52_i4";
|
||||
host = "0.0.0.0";
|
||||
port = ports.colibri;
|
||||
autoStart = false;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
networkDrives = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
# DwarfStar (antirez/ds4) inference server — services.ds4 module from
|
||||
# asosnovsky/nixpkgs (ds4-init fork branch); package is the fork's ROCm
|
||||
# build for Strix Halo (gfx1151), see flake.nix:
|
||||
services.ds4 = {
|
||||
enable = true;
|
||||
# Strix Halo == gfx1151. Pin explicitly: the fork package's auto-detected
|
||||
package = (myPkgs.ds4-rocm.override { rocmArch = "gfx1151"; });
|
||||
|
||||
user = "ari";
|
||||
group = "users";
|
||||
model = "/var/lib/ds4/ds4flash.gguf";
|
||||
host = "0.0.0.0";
|
||||
port = ports.ds4;
|
||||
ctx = 100000;
|
||||
kvDiskDir = "/var/lib/ds4/kv";
|
||||
kvDiskSpaceMb = 8192;
|
||||
cors = true;
|
||||
environment = {
|
||||
HSA_ENABLE_SDMA = "0";
|
||||
};
|
||||
openFirewall = true;
|
||||
autoStart = false;
|
||||
# Not a services.ds4 option in the fork module yet; pass the flag through.
|
||||
extraArgs = [ "--kv-cache-reject-different-quant" ];
|
||||
extraServiceConfig = {
|
||||
TimeoutStopSec = "300";
|
||||
};
|
||||
};
|
||||
users.users.ari.extraGroups = [
|
||||
"input"
|
||||
"wheel"
|
||||
"tty"
|
||||
"dialout"
|
||||
"uucp"
|
||||
"render"
|
||||
"video"
|
||||
"docker"
|
||||
];
|
||||
# Boot
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
# QEMU emulation for building aarch64 (e.g. hl-pi1) as a remote build machine
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
# Tailscale
|
||||
services.tailscale.enable = true;
|
||||
# Desktop Env - DankGreeter
|
||||
programs.dms-greeter = {
|
||||
enable = true;
|
||||
compositor.name = "hyprland";
|
||||
configHome = "/home/ari";
|
||||
};
|
||||
# Boot straight into the Hyprland desktop as ari, no password (Steam Big Picture auto-starts)
|
||||
services.displayManager.defaultSession = "hyprland";
|
||||
services.displayManager.autoLogin = {
|
||||
enable = true;
|
||||
user = "ari";
|
||||
};
|
||||
# Firmware updater
|
||||
services.fwupd.enable = true;
|
||||
# Bluetooth
|
||||
skyg.nixos.common.hardware.bluetooth.enable = true;
|
||||
# Bootloader.
|
||||
environment.systemPackages =
|
||||
(with pkgs; [
|
||||
# languages
|
||||
# cargo
|
||||
rustc
|
||||
go
|
||||
pipx
|
||||
uv
|
||||
|
||||
# development
|
||||
zed-editor-fhs
|
||||
nix-prefetch
|
||||
herdr
|
||||
|
||||
# Steam
|
||||
mangohud
|
||||
|
||||
# LLM Stuff
|
||||
unstablePkgs.ollama-rocm
|
||||
unstablePkgs.grok-build
|
||||
unstablePkgs.goose-cli
|
||||
# stable-diffusion-cpp-rocm
|
||||
lmstudio
|
||||
# Hermes gateway - Signal bridge (used to link the device + run the daemon)
|
||||
signal-cli
|
||||
|
||||
# bluetooth
|
||||
blueman
|
||||
|
||||
])
|
||||
++ [ myPkgs.ds4-rocm ];
|
||||
services.usbmuxd.enable = true;
|
||||
# Steam
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
extest.enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
boot.kernelPackages = pkgs.linuxPackages; # (this is the default) some amdgpu issues on 6.10
|
||||
# Strix Halo GTT memory tuning so the full 128 GB unified memory is GPU-visible
|
||||
# (required by ds4-rocm / large models per upstream STRIXHALO.md).
|
||||
boot.kernelParams = [
|
||||
"amd_iommu=off"
|
||||
"amdgpu.gttsize=126976"
|
||||
"ttm.pages_limit=32505856"
|
||||
"ttm.page_pool_size=32505856"
|
||||
];
|
||||
programs = {
|
||||
gamescope = {
|
||||
enable = true;
|
||||
capSysNice = true;
|
||||
};
|
||||
};
|
||||
hardware.xone.enable = true; # support for the xbox controller USB dongle
|
||||
# Ollama
|
||||
services.open-webui.enable = true;
|
||||
users.users.ollama = {
|
||||
enable = true;
|
||||
home = "/var/lib/ollama";
|
||||
extraGroups = [
|
||||
"render"
|
||||
"video"
|
||||
];
|
||||
};
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
host = "0.0.0.0";
|
||||
port = ports.ollama;
|
||||
package = unstablePkgs.ollama-rocm;
|
||||
user = "ollama";
|
||||
home = "/var/lib/ollama";
|
||||
environmentVariables = {
|
||||
HSA_ENABLE_SDMA = "0";
|
||||
OLLAMA_FLASH_ATTENTION = "1";
|
||||
OLLAMA_KV_CACHE_TYPE = "q8_0";
|
||||
OLLAMA_KEEP_ALIVE = "24h";
|
||||
};
|
||||
};
|
||||
# Libretranslate
|
||||
services.libretranslate = {
|
||||
enable = true;
|
||||
host = "0.0.0.0";
|
||||
port = ports.libretranslate;
|
||||
threads = 10;
|
||||
};
|
||||
systemd.services.libretranslate.environment.ARGOS_DEVICE_TYPE = "cpu";
|
||||
|
||||
# Hermes Agent — hardened, self-managing NixOS VM
|
||||
services.hermenix = {
|
||||
enable = true;
|
||||
disk.baseDir = "/var/lib/hermes-vm";
|
||||
disk.stateSize = "60G";
|
||||
network = {
|
||||
bridged = false;
|
||||
externalInterface = "enp191s0";
|
||||
lanAddress = "10.0.101.101"; # the guest's fixed LAN IP
|
||||
hostLanAddress = "10.0.10.11"; # this host's current LAN IP (pick up the router reservation)
|
||||
lanGateway = "10.0.0.1";
|
||||
};
|
||||
vcpu = 3;
|
||||
mem = 5000;
|
||||
hermesHome = "/var/lib/hermes/.hermes";
|
||||
hostCache.port = ports.hermesCache;
|
||||
hostAccess = [
|
||||
{ port = ports.ollama; }
|
||||
{ port = ports.ds4; }
|
||||
];
|
||||
lanAccess = [
|
||||
{ address = "10.0.12.1"; port = 80; } # Home Assistant
|
||||
# *.app.internal apps on the macvlan lab subnet (drawdb, audiobooks, ...)
|
||||
{ address = "10.0.101.0/24"; port = 80; }
|
||||
{ address = "10.0.101.0/24"; port = 443; }
|
||||
# Buzz relay — its own IP, not the whole subnet
|
||||
{ address = "10.0.101.3"; port = 3000; } # relay
|
||||
{ address = "10.0.101.3"; port = 8080; } # health
|
||||
{ address = "10.0.101.3"; port = 9102; } # metrics
|
||||
# Gitea
|
||||
{ address = "10.0.10.6"; port = 3000; }
|
||||
];
|
||||
publish = [
|
||||
{ hostPort = ports.hermes; guestPort = 8642; }
|
||||
{ hostPort = ports.hermesDashboard; guestPort = 9119; }
|
||||
];
|
||||
};
|
||||
hardware.enableAllFirmware = true;
|
||||
hardware.amdgpu = {
|
||||
opencl.enable = true;
|
||||
};
|
||||
skyg.nixos.common.nh.flake = "/home/ari/nixos-setup";
|
||||
networking.firewall.allowedUDPPorts = openPorts;
|
||||
networking.firewall.allowedTCPPorts = openPorts;
|
||||
services.wyoming = {
|
||||
openwakeword = {
|
||||
enable = true;
|
||||
uri = "tcp://0.0.0.0:${toString ports.wyoming}";
|
||||
};
|
||||
piper.servers.peta = {
|
||||
enable = true;
|
||||
uri = "tcp://0.0.0.0:${toString ports.piper}";
|
||||
voice = "en_US-danny-low";
|
||||
};
|
||||
faster-whisper.servers.todd = {
|
||||
enable = true;
|
||||
uri = "tcp://0.0.0.0:${toString ports.fastWhisper}";
|
||||
model = "tiny.en";
|
||||
language = "en";
|
||||
device = "auto";
|
||||
};
|
||||
};
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
daemon.settings = {
|
||||
"default-runtime" = "runc";
|
||||
};
|
||||
};
|
||||
services.flatpak.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
{ pkgs, unstablePkgs, myPkgs, my-nixpkgs, ... }:
|
||||
let
|
||||
ports = {
|
||||
tabby = 11029;
|
||||
ollama = 11434;
|
||||
piper = 10200;
|
||||
fastWhisper = 10300;
|
||||
wyoming = 10400;
|
||||
comfyui = 8188;
|
||||
libretranslate = 5000;
|
||||
ds4 = 8000;
|
||||
colibri = 8001;
|
||||
hermes = 8642;
|
||||
hermesDashboard = 9119;
|
||||
hermesCache = 5001;
|
||||
vnc = 5930;
|
||||
};
|
||||
openPorts = [
|
||||
ports.ollama
|
||||
ports.tabby
|
||||
ports.fastWhisper
|
||||
ports.piper
|
||||
ports.wyoming
|
||||
ports.comfyui
|
||||
ports.libretranslate
|
||||
ports.ds4
|
||||
ports.vnc
|
||||
];
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./packages.nix
|
||||
./services
|
||||
./hardware-configuration
|
||||
./hardware.nix
|
||||
./systemd.nix
|
||||
./networking.nix
|
||||
"${my-nixpkgs}/nixos/modules/services/misc/ds4.nix"
|
||||
];
|
||||
|
||||
environment.sessionVariables.ELECTRON_OZONE_PLATFORM_HINT = "wayland";
|
||||
|
||||
skyg = {
|
||||
user.enable = true;
|
||||
core.qemu.enable = true;
|
||||
nixos = {
|
||||
common.ssh-server.enable = true;
|
||||
common.cachePush.enable = true;
|
||||
common.hardware = {
|
||||
pipewire.enable = true;
|
||||
amdgpu.enable = true;
|
||||
};
|
||||
desktop = {
|
||||
enable = true;
|
||||
tiler = {
|
||||
enable = true;
|
||||
noctalia.enable = true;
|
||||
hyprland = {
|
||||
enable = true;
|
||||
tools.enable = true;
|
||||
configLink = {
|
||||
enable = true;
|
||||
mountAsSource = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
server.services.comfyui = {
|
||||
enable = true;
|
||||
mode = "rocm";
|
||||
port = ports.comfyui;
|
||||
rocm.dataDir = "/data/comfyui";
|
||||
};
|
||||
server.services.colibri = {
|
||||
enable = false;
|
||||
package = pkgs.colibri-rocm;
|
||||
model = "/var/lib/colibri/glm52_i4";
|
||||
host = "0.0.0.0";
|
||||
port = ports.colibri;
|
||||
autoStart = false;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
networkDrives.enable = true;
|
||||
};
|
||||
|
||||
users.users.ari.extraGroups = [
|
||||
"input"
|
||||
"wheel"
|
||||
"tty"
|
||||
"dialout"
|
||||
"uucp"
|
||||
"render"
|
||||
"video"
|
||||
"docker"
|
||||
];
|
||||
|
||||
programs.dms-greeter = {
|
||||
enable = true;
|
||||
compositor.name = "hyprland";
|
||||
configHome = "/home/ari";
|
||||
};
|
||||
services.displayManager.defaultSession = "hyprland";
|
||||
services.displayManager.autoLogin = {
|
||||
enable = true;
|
||||
user = "ari";
|
||||
};
|
||||
|
||||
services.fwupd.enable = true;
|
||||
skyg.nixos.common.hardware.bluetooth.enable = true;
|
||||
|
||||
services.usbmuxd.enable = true;
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
daemon.settings."default-runtime" = "runc";
|
||||
};
|
||||
services.flatpak.enable = true;
|
||||
|
||||
skyg.nixos.common.nh.flake = "/home/ari/nixos-setup";
|
||||
networking.firewall.allowedUDPPorts = openPorts;
|
||||
networking.firewall.allowedTCPPorts = openPorts;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
./file-system.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/e903eb56-160d-4b77-ba66-ef54a18207f2";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=root" ];
|
||||
};
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-uuid/e903eb56-160d-4b77-ba66-ef54a18207f2";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=home" ];
|
||||
};
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-uuid/e903eb56-160d-4b77-ba66-ef54a18207f2";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix" ];
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/1D9A-20EC";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
fileSystems."/data" = {
|
||||
device = "/dev/disk/by-uuid/f241ec6e-939c-4f10-bc72-3094b99de4eb";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=data" ];
|
||||
};
|
||||
swapDevices = [ ];
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
boot.kernelPackages = pkgs.linuxPackages;
|
||||
boot.kernelParams = [
|
||||
"amd_iommu=off"
|
||||
"amdgpu.gttsize=126976"
|
||||
"ttm.pages_limit=32505856"
|
||||
"ttm.page_pool_size=32505856"
|
||||
];
|
||||
hardware.enableAllFirmware = true;
|
||||
hardware.amdgpu.opencl.enable = true;
|
||||
|
||||
services.fwupd.enable = true;
|
||||
skyg.nixos.common.hardware.bluetooth.enable = true;
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
services.tailscale.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{ pkgs, unstablePkgs, myPkgs, ... }:
|
||||
{
|
||||
environment.systemPackages =
|
||||
(with pkgs; [
|
||||
rustc
|
||||
go
|
||||
pipx
|
||||
uv
|
||||
zed-editor-fhs
|
||||
nix-prefetch
|
||||
herdr
|
||||
mangohud
|
||||
unstablePkgs.ollama-rocm
|
||||
unstablePkgs.grok-build
|
||||
unstablePkgs.goose-cli
|
||||
lmstudio
|
||||
signal-cli
|
||||
blueman
|
||||
])
|
||||
++ [ myPkgs.ds4-rocm ];
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
imports = [
|
||||
./ds4.nix
|
||||
./ollama.nix
|
||||
./libretranslate.nix
|
||||
./hermenix.nix
|
||||
./wyoming.nix
|
||||
./steam.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{ myPkgs, ... }:
|
||||
let
|
||||
ports = { ds4 = 8000; };
|
||||
in
|
||||
{
|
||||
services.ds4 = {
|
||||
enable = true;
|
||||
package = (myPkgs.ds4-rocm.override { rocmArch = "gfx1151"; });
|
||||
user = "ari";
|
||||
group = "users";
|
||||
model = "/var/lib/ds4/ds4flash.gguf";
|
||||
host = "0.0.0.0";
|
||||
port = ports.ds4;
|
||||
ctx = 100000;
|
||||
kvDiskDir = "/var/lib/ds4/kv";
|
||||
kvDiskSpaceMb = 8192;
|
||||
cors = true;
|
||||
environment.HSA_ENABLE_SDMA = "0";
|
||||
openFirewall = true;
|
||||
autoStart = false;
|
||||
extraArgs = [ "--kv-cache-reject-different-quant" ];
|
||||
extraServiceConfig.TimeoutStopSec = "300";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{ ... }:
|
||||
let
|
||||
ports = {
|
||||
hermes = 8642;
|
||||
hermesDashboard = 9119;
|
||||
hermesCache = 5001;
|
||||
ollama = 11434;
|
||||
ds4 = 8000;
|
||||
};
|
||||
in
|
||||
{
|
||||
services.hermenix = {
|
||||
enable = true;
|
||||
disk.baseDir = "/var/lib/hermes-vm";
|
||||
disk.stateSize = "60G";
|
||||
network = {
|
||||
bridged = false;
|
||||
externalInterface = "enp191s0";
|
||||
lanAddress = "10.0.101.101";
|
||||
hostLanAddress = "10.0.10.11";
|
||||
lanGateway = "10.0.0.1";
|
||||
};
|
||||
vcpu = 3;
|
||||
mem = 5000;
|
||||
hermesHome = "/var/lib/hermes/.hermes";
|
||||
hostCache.port = ports.hermesCache;
|
||||
hostAccess = [
|
||||
{ port = ports.ollama; }
|
||||
{ port = ports.ds4; }
|
||||
];
|
||||
lanAccess = [
|
||||
{ address = "10.0.12.1"; port = 80; }
|
||||
{ address = "10.0.101.0/24"; port = 80; }
|
||||
{ address = "10.0.101.0/24"; port = 443; }
|
||||
{ address = "10.0.101.3"; port = 3000; }
|
||||
{ address = "10.0.101.3"; port = 8080; }
|
||||
{ address = "10.0.101.3"; port = 9102; }
|
||||
{ address = "10.0.10.6"; port = 3000; }
|
||||
];
|
||||
publish = [
|
||||
{ hostPort = ports.hermes; guestPort = 8642; }
|
||||
{ hostPort = ports.hermesDashboard; guestPort = 9119; }
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{ ... }:
|
||||
let
|
||||
ports = { libretranslate = 5000; };
|
||||
in
|
||||
{
|
||||
services.libretranslate = {
|
||||
enable = true;
|
||||
host = "0.0.0.0";
|
||||
port = ports.libretranslate;
|
||||
threads = 10;
|
||||
};
|
||||
systemd.services.libretranslate.environment.ARGOS_DEVICE_TYPE = "cpu";
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{ unstablePkgs, ... }:
|
||||
let
|
||||
ports = { ollama = 11434; };
|
||||
in
|
||||
{
|
||||
services.open-webui.enable = true;
|
||||
|
||||
users.users.ollama = {
|
||||
enable = true;
|
||||
home = "/var/lib/ollama";
|
||||
extraGroups = [ "render" "video" ];
|
||||
};
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
host = "0.0.0.0";
|
||||
port = ports.ollama;
|
||||
package = unstablePkgs.ollama-rocm;
|
||||
user = "ollama";
|
||||
home = "/var/lib/ollama";
|
||||
environmentVariables = {
|
||||
HSA_ENABLE_SDMA = "0";
|
||||
OLLAMA_FLASH_ATTENTION = "1";
|
||||
OLLAMA_KV_CACHE_TYPE = "q8_0";
|
||||
OLLAMA_KEEP_ALIVE = "24h";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
extest.enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
programs.gamescope = {
|
||||
enable = true;
|
||||
capSysNice = true;
|
||||
};
|
||||
hardware.xone.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{ ... }:
|
||||
let
|
||||
ports = {
|
||||
wyoming = 10400;
|
||||
piper = 10200;
|
||||
fastWhisper = 10300;
|
||||
};
|
||||
in
|
||||
{
|
||||
services.wyoming = {
|
||||
openwakeword = {
|
||||
enable = true;
|
||||
uri = "tcp://0.0.0.0:${toString ports.wyoming}";
|
||||
};
|
||||
piper.servers.peta = {
|
||||
enable = true;
|
||||
uri = "tcp://0.0.0.0:${toString ports.piper}";
|
||||
voice = "en_US-danny-low";
|
||||
};
|
||||
faster-whisper.servers.todd = {
|
||||
enable = true;
|
||||
uri = "tcp://0.0.0.0:${toString ports.fastWhisper}";
|
||||
model = "tiny.en";
|
||||
language = "en";
|
||||
device = "auto";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{ ... }:
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
}
|
||||
@@ -1,127 +0,0 @@
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
skyg = {
|
||||
user.enable = true;
|
||||
nixos = {
|
||||
common.ssh-server.enable = true;
|
||||
common.hardware = {
|
||||
pipewire.enable = true;
|
||||
};
|
||||
desktop = {
|
||||
enable = true;
|
||||
tiler = {
|
||||
enable = true;
|
||||
hyprland.enable = true;
|
||||
hyprland.configLink = {
|
||||
enable = true;
|
||||
mountAsSource = true;
|
||||
};
|
||||
quickshell = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# dms
|
||||
programs.dank-material-shell = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
restartIfChanged = true;
|
||||
};
|
||||
};
|
||||
# firmware updater
|
||||
services.fwupd.enable = true;
|
||||
hardware.framework.enableKmod = true;
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.tmp.useTmpfs = true;
|
||||
|
||||
# Greeter
|
||||
programs.dms-greeter = {
|
||||
enable = true;
|
||||
compositor.name = "hyprland";
|
||||
configHome = "/home/${config.skyg.user.name}";
|
||||
};
|
||||
services.displayManager.autoLogin = {
|
||||
enable = true;
|
||||
user = config.skyg.user.name;
|
||||
};
|
||||
services.displayManager.defaultSession = "hyprland";
|
||||
|
||||
# environment
|
||||
environment.systemPackages = with pkgs; [
|
||||
# my goodies
|
||||
skygqts
|
||||
# hdmi cec
|
||||
v4l-utils
|
||||
libcec
|
||||
# sound control
|
||||
playerctl
|
||||
];
|
||||
|
||||
# Flatpaks
|
||||
services.flatpak.enable = true;
|
||||
services.flatpak.packages = [
|
||||
"com.spotify.Client"
|
||||
];
|
||||
|
||||
# Chromium Configuration
|
||||
programs.chromium.enable = true;
|
||||
programs.chromium.extraOpts = {
|
||||
"DeveloperToolsAvailability" = 2;
|
||||
};
|
||||
|
||||
services.pipewire = {
|
||||
extraConfig.pipewire-pulse."10-raop-discover" = {
|
||||
context.modules = [
|
||||
{ name = "libpipewire-module-raop-discover"; }
|
||||
];
|
||||
};
|
||||
wireplumber.extraConfig."51-hdmi-tv" = {
|
||||
# Stop remembering the analog profile between boots — always prefer HDMI.
|
||||
"wireplumber.settings" = {
|
||||
"device.restore-profile" = false;
|
||||
"device.restore-routes" = false;
|
||||
};
|
||||
# ACP ranks analog-stereo (6565) above hdmi-stereo (5900) by default;
|
||||
# override that so the LG TV (hdmi-output-0, confirmed via ELD) wins.
|
||||
"device.profile.priority.rules" = [
|
||||
{
|
||||
matches = [{ "device.name" = "alsa_card.pci-0000_00_1f.3"; }];
|
||||
actions.update-props.priorities = [ "output:hdmi-stereo" ];
|
||||
}
|
||||
];
|
||||
# Make the resulting HDMI sink win the default-sink vote too.
|
||||
"monitor.alsa.rules" = [
|
||||
{
|
||||
matches = [{ "node.name" = "~alsa_output.*hdmi.*"; }];
|
||||
actions.update-props."priority.session" = 2000;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
|
||||
# Let the logged-in session (not just root) open the CEC device, so
|
||||
# Hyprland can drive the TV without sudo.
|
||||
services.udev.extraRules = ''
|
||||
SUBSYSTEM=="cec", MODE="0664", TAG+="uaccess"
|
||||
'';
|
||||
|
||||
# Disable auto-suspend/hibernate — always-on TV box
|
||||
systemd.targets.sleep.enable = false;
|
||||
systemd.targets.suspend.enable = false;
|
||||
systemd.targets.hibernate.enable = false;
|
||||
systemd.targets.hybrid-sleep.enable = false;
|
||||
|
||||
# AirPlay receiver
|
||||
services.shairport-sync = {
|
||||
enable = true;
|
||||
arguments = "-o pipewire";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./services.nix
|
||||
./hardware-configuration
|
||||
./hardware.nix
|
||||
./systemd.nix
|
||||
];
|
||||
|
||||
skyg = {
|
||||
user.enable = true;
|
||||
nixos = {
|
||||
common.ssh-server.enable = true;
|
||||
common.hardware.pipewire.enable = true;
|
||||
desktop = {
|
||||
enable = true;
|
||||
tiler = {
|
||||
enable = true;
|
||||
hyprland.enable = true;
|
||||
hyprland.configLink = {
|
||||
enable = true;
|
||||
mountAsSource = true;
|
||||
};
|
||||
quickshell.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.dank-material-shell = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
restartIfChanged = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.dms-greeter = {
|
||||
enable = true;
|
||||
compositor.name = "hyprland";
|
||||
configHome = "/home/${config.skyg.user.name}";
|
||||
};
|
||||
services.displayManager.autoLogin = {
|
||||
enable = true;
|
||||
user = config.skyg.user.name;
|
||||
};
|
||||
services.displayManager.defaultSession = "hyprland";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
skygqts
|
||||
v4l-utils
|
||||
libcec
|
||||
playerctl
|
||||
];
|
||||
|
||||
services.flatpak.enable = true;
|
||||
services.flatpak.packages = [ "com.spotify.Client" ];
|
||||
|
||||
programs.chromium.enable = true;
|
||||
programs.chromium.extraOpts.DeveloperToolsAvailability = 2;
|
||||
|
||||
services.udev.extraRules = ''
|
||||
SUBSYSTEM=="cec", MODE="0664", TAG+="uaccess"
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{ ... }:
|
||||
{
|
||||
services.fwupd.enable = true;
|
||||
hardware.framework.enableKmod = true;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{ ... }:
|
||||
{
|
||||
services.pipewire = {
|
||||
extraConfig.pipewire-pulse."10-raop-discover" = {
|
||||
context.modules = [
|
||||
{ name = "libpipewire-module-raop-discover"; }
|
||||
];
|
||||
};
|
||||
wireplumber.extraConfig."51-hdmi-tv" = {
|
||||
"wireplumber.settings" = {
|
||||
"device.restore-profile" = false;
|
||||
"device.restore-routes" = false;
|
||||
};
|
||||
"device.profile.priority.rules" = [
|
||||
{
|
||||
matches = [{ "device.name" = "alsa_card.pci-0000_00_1f.3"; }];
|
||||
actions.update-props.priorities = [ "output:hdmi-stereo" ];
|
||||
}
|
||||
];
|
||||
"monitor.alsa.rules" = [
|
||||
{
|
||||
matches = [{ "node.name" = "~alsa_output.*hdmi.*"; }];
|
||||
actions.update-props."priority.session" = 2000;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
|
||||
services.shairport-sync = {
|
||||
enable = true;
|
||||
arguments = "-o pipewire";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{ ... }:
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.tmp.useTmpfs = true;
|
||||
|
||||
systemd.targets.sleep.enable = false;
|
||||
systemd.targets.suspend.enable = false;
|
||||
systemd.targets.hibernate.enable = false;
|
||||
systemd.targets.hybrid-sleep.enable = false;
|
||||
}
|
||||
@@ -1,29 +1,12 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
ports = {
|
||||
nixServe = 5000;
|
||||
dockerRegistry = 5001;
|
||||
postgresIU = 7491;
|
||||
ssh = 22;
|
||||
iu = 1947;
|
||||
nfsVolume = exportPath: {
|
||||
driver_opts = {
|
||||
type = "nfs";
|
||||
o = "addr=tnas1.lab.internal,rw,nfsvers=4.0,nolock,hard,noatime";
|
||||
device = ":${exportPath}";
|
||||
};
|
||||
};
|
||||
gitea = {
|
||||
user = "gitea";
|
||||
group = "gitea";
|
||||
stateDir = "/var/lib/sosnovsky/gitea";
|
||||
sshPort = 2222;
|
||||
httpPort = 3000;
|
||||
};
|
||||
openPorts = [
|
||||
ports.nixServe
|
||||
ports.dockerRegistry
|
||||
gitea.sshPort
|
||||
gitea.httpPort
|
||||
ports.postgresIU
|
||||
ports.ssh
|
||||
ports.iu
|
||||
];
|
||||
# Audiobookshelf stack
|
||||
audiobookshelf = {
|
||||
domain = "audiobooks.app.internal";
|
||||
ip = "10.0.101.4";
|
||||
@@ -31,13 +14,10 @@ let
|
||||
image = "ghcr.io/advplyr/audiobookshelf:latest";
|
||||
dataDir = "/mnt/Data/audiobookshelf";
|
||||
};
|
||||
# Buzz stack
|
||||
buzz = {
|
||||
domain = "buzz.app.internal";
|
||||
# Public name with a Let's Encrypt cert (skyg.server.acme) — what clients use.
|
||||
publicDomain = "buzz.home.sosnovsky.ca";
|
||||
port = 3000;
|
||||
# Caddy's macvlan IP — buzz.app.internal resolves here; the relay is internal-only.
|
||||
ip = "10.0.101.3";
|
||||
bucket = "buzz-media";
|
||||
images = {
|
||||
@@ -49,81 +29,22 @@ let
|
||||
mc = "quay.io/minio/mc:RELEASE.2025-08-13T08-35-41Z@sha256:a7fe349ef4bd8521fb8497f55c6042871b2ae640607cf99d9bede5e9bdf11727";
|
||||
};
|
||||
};
|
||||
# NFS-backed volume on tnas1 (compose volume with nfs driver_opts).
|
||||
# Docker's `local` driver calls mount(2) itself, so it cannot resolve a
|
||||
# `host:/path` device: the server belongs in `o = addr=...` (the daemon
|
||||
# resolves that name) and `device` must be the bare `:/export/path`.
|
||||
nfsVolume = exportPath: {
|
||||
driver_opts = {
|
||||
type = "nfs";
|
||||
o = "addr=tnas1.lab.internal,rw,nfsvers=4.0,nolock,hard,noatime";
|
||||
device = ":${exportPath}";
|
||||
};
|
||||
ports = {
|
||||
postgresIU = 7491;
|
||||
iu = 1947;
|
||||
};
|
||||
# Buzz management CLI — upstream deploy/compose/run.sh ported to this
|
||||
# deployment; the logic lives in scripts/hl-minipc1/buzz-manage.sh.
|
||||
buzz-manage = pkgs.writeShellScriptBin "buzz-manage" ''
|
||||
export BUZZ_ENV_FILE="${config.age.secrets.buzz-env.path}"
|
||||
export BUZZ_COMPOSE_BIN="${pkgs.docker-compose}/bin/docker-compose"
|
||||
${builtins.readFile ./scripts/hl-minipc1/buzz-manage.sh}
|
||||
'';
|
||||
in
|
||||
{
|
||||
skyg.user.enable = true;
|
||||
skyg.nixos.common.ssh-server.enable = true;
|
||||
skyg.server.dns.routing = {
|
||||
enable = false;
|
||||
openFirewall = true;
|
||||
addressesSecretName = "dns-addresses.conf";
|
||||
};
|
||||
skyg.nixos.common.containers.runtime = "docker";
|
||||
skyg.nixos.common.containers.openMetricsPort = true;
|
||||
|
||||
# One shared ipvlan network, created once at boot.
|
||||
skyg.nixos.common.containers.networks.ipvlanLab = {
|
||||
enable = true;
|
||||
parent = "eno1";
|
||||
ipRange = "10.0.101.16/28";
|
||||
};
|
||||
skyg.server.admin.enable = true;
|
||||
skyg.server.exporters.enable = true;
|
||||
skyg.nixos.server.k3s.enable = false;
|
||||
skyg.networkDrives = {
|
||||
enable = true;
|
||||
};
|
||||
services.tailscale.enable = false;
|
||||
services.tailscale.disableTaildrop = true;
|
||||
services.tailscale.useRoutingFeatures = "both";
|
||||
services.tailscale.openFirewall = true;
|
||||
|
||||
# # Nix Stores
|
||||
services.nix-serve = {
|
||||
enable = true;
|
||||
secretKeyFile = "/home/ari/cache-keys/minipc1.lab.internal.private";
|
||||
port = ports.nixServe;
|
||||
};
|
||||
# firmware updater
|
||||
services.fwupd.enable = true;
|
||||
# # Services
|
||||
# Audiobookshelf — containerised, own macvlan IP, reachable as
|
||||
# http://audiobooks.app.internal
|
||||
skyg.nixos.common.container-services.audiobookshelf = {
|
||||
enable = true;
|
||||
autoUpdate.enable = true;
|
||||
|
||||
networks.lan = config.skyg.nixos.common.containers.networks.ipvlanLab.compose;
|
||||
|
||||
volumes = {
|
||||
books = nfsVolume "/mnt/EightTerra/DownloadedTorrents/books";
|
||||
};
|
||||
|
||||
volumes.books = nfsVolume "/mnt/EightTerra/DownloadedTorrents/books";
|
||||
services.audiobookshelf = {
|
||||
image = audiobookshelf.image;
|
||||
networks.lan.ipv4_address = audiobookshelf.ip;
|
||||
dns.names = [ audiobookshelf.domain ];
|
||||
environment = {
|
||||
PORT = toString audiobookshelf.port;
|
||||
};
|
||||
environment.PORT = toString audiobookshelf.port;
|
||||
volumes = [
|
||||
"${audiobookshelf.dataDir}/config:/config"
|
||||
"${audiobookshelf.dataDir}/metadata:/metadata"
|
||||
@@ -132,170 +53,91 @@ in
|
||||
];
|
||||
};
|
||||
};
|
||||
services.dockerRegistry = {
|
||||
enable = true;
|
||||
storagePath = "/mnt/Data/docker-registry";
|
||||
port = ports.dockerRegistry;
|
||||
openFirewall = true;
|
||||
listenAddress = "0.0.0.0";
|
||||
enableDelete = true;
|
||||
};
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
appName = "Sosnovsky gitea";
|
||||
stateDir = gitea.stateDir;
|
||||
user = gitea.user;
|
||||
group = gitea.group;
|
||||
settings = {
|
||||
server = {
|
||||
SSH_USER = gitea.user;
|
||||
DOMAIN = "minipc1.lab.internal";
|
||||
HTTP_PORT = gitea.httpPort;
|
||||
SSH_PORT = gitea.sshPort;
|
||||
DISABLE_SSH = false;
|
||||
};
|
||||
service = {
|
||||
DISABLE_REGISTRATION = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
skyg.nixos.common.container-services.iu = {
|
||||
services = {
|
||||
db = {
|
||||
image = "postgres:18";
|
||||
ports = [
|
||||
"${toString ports.postgresIU}:5432"
|
||||
];
|
||||
volumes = [
|
||||
"/var/lib/iu-postgres:/var/lib/postgresql/data"
|
||||
];
|
||||
ports = [ "${toString ports.postgresIU}:5432" ];
|
||||
volumes = [ "/var/lib/iu-postgres:/var/lib/postgresql/data" ];
|
||||
environmentFiles = [ config.age.secrets.iu-project.path ];
|
||||
networks = [ "main" ];
|
||||
};
|
||||
iu = {
|
||||
image = "minipc1.lab.internal:5001/iu:2026.07.12-ac2c604";
|
||||
ports = [
|
||||
"${toString ports.iu}:1947"
|
||||
];
|
||||
# Explicit command matches the Containerfile ENTRYPOINT + CMD
|
||||
command = [
|
||||
"-config"
|
||||
"/app/config.toml"
|
||||
"-mode"
|
||||
"worker+webapp"
|
||||
];
|
||||
volumes = [
|
||||
];
|
||||
environmentFiles = [
|
||||
config.age.secrets.iu-project.path
|
||||
];
|
||||
networks = [
|
||||
"main"
|
||||
];
|
||||
ports = [ "${toString ports.iu}:1947" ];
|
||||
command = [ "-config" "/app/config.toml" "-mode" "worker+webapp" ];
|
||||
environmentFiles = [ config.age.secrets.iu-project.path ];
|
||||
networks = [ "main" ];
|
||||
dependsOn = [ "db" ];
|
||||
files = {
|
||||
"/app/config.toml" = ''
|
||||
[web]
|
||||
host = "0.0.0.0"
|
||||
port = 1947
|
||||
|
||||
[features]
|
||||
publish_alt_translations = true
|
||||
enable_favourite_marking = true
|
||||
|
||||
[database]
|
||||
driver = "postgres"
|
||||
dsn = "postgres://postgres@db:5432/iu?sslmode=disable"
|
||||
password_env = "POSTGRES_PASSWORD"
|
||||
|
||||
[worker]
|
||||
poll_interval_seconds = 1
|
||||
job_timeout_seconds = 1200
|
||||
|
||||
[worker.job.ingest]
|
||||
enabled = true
|
||||
interval_seconds = 21600
|
||||
|
||||
[worker.job.classify_scan]
|
||||
enabled = true
|
||||
|
||||
[worker.job.classify]
|
||||
enabled = true
|
||||
|
||||
[worker.queue.translate]
|
||||
enabled = true
|
||||
|
||||
[worker.queue.rewrite]
|
||||
enabled = true
|
||||
|
||||
[worker.queue.term_remap]
|
||||
enabled = true
|
||||
|
||||
[worker.queue.reason_backfill]
|
||||
enabled = true
|
||||
|
||||
[worker.queue.scan]
|
||||
enabled = true
|
||||
interval_seconds = 21600
|
||||
|
||||
[data-science.ollama]
|
||||
base_url = "http://fwdesk.lab.internal"
|
||||
port = 11434
|
||||
timeout_seconds = 120
|
||||
|
||||
[data-science.ollama.models]
|
||||
rewrite_heb = "aya-expanse"
|
||||
rewrite_ru = "aya-expanse"
|
||||
rewrite_en = "aya-expanse"
|
||||
|
||||
[data-science.libretranslate]
|
||||
endpoint = "http://fwdesk.lab.internal:5000/translate"
|
||||
timeout_seconds = 120
|
||||
|
||||
[data-science.classifier]
|
||||
model_path = "data/classifier.json"
|
||||
|
||||
[data-science.grok_models.models]
|
||||
rewrite_heb = "grok-4.3"
|
||||
rewrite_en = "grok-4.3"
|
||||
rewrite_ru = "grok-4.3"
|
||||
'';
|
||||
};
|
||||
files."/app/config.toml" = ''
|
||||
[web]
|
||||
host = "0.0.0.0"
|
||||
port = 1947
|
||||
[features]
|
||||
publish_alt_translations = true
|
||||
enable_favourite_marking = true
|
||||
[database]
|
||||
driver = "postgres"
|
||||
dsn = "postgres://postgres@db:5432/iu?sslmode=disable"
|
||||
password_env = "POSTGRES_PASSWORD"
|
||||
[worker]
|
||||
poll_interval_seconds = 1
|
||||
job_timeout_seconds = 1200
|
||||
[worker.job.ingest]
|
||||
enabled = true
|
||||
interval_seconds = 21600
|
||||
[worker.job.classify_scan]
|
||||
enabled = true
|
||||
[worker.job.classify]
|
||||
enabled = true
|
||||
[worker.queue.translate]
|
||||
enabled = true
|
||||
[worker.queue.rewrite]
|
||||
enabled = true
|
||||
[worker.queue.term_remap]
|
||||
enabled = true
|
||||
[worker.queue.reason_backfill]
|
||||
enabled = true
|
||||
[worker.queue.scan]
|
||||
enabled = true
|
||||
interval_seconds = 21600
|
||||
[data-science.ollama]
|
||||
base_url = "http://fwdesk.lab.internal"
|
||||
port = 11434
|
||||
timeout_seconds = 120
|
||||
[data-science.ollama.models]
|
||||
rewrite_heb = "aya-expanse"
|
||||
rewrite_ru = "aya-expanse"
|
||||
rewrite_en = "aya-expanse"
|
||||
[data-science.libretranslate]
|
||||
endpoint = "http://fwdesk.lab.internal:5000/translate"
|
||||
timeout_seconds = 120
|
||||
[data-science.classifier]
|
||||
model_path = "data/classifier.json"
|
||||
[data-science.grok_models.models]
|
||||
rewrite_heb = "grok-4.3"
|
||||
rewrite_en = "grok-4.3"
|
||||
rewrite_ru = "grok-4.3"
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Buzz — relay + postgres + redis + minio (S3).
|
||||
age.secrets.buzz-env.file = ../secrets/buzz-env.age;
|
||||
|
||||
age.secrets.cloudflare-dns.file = ../secrets/cloudflare-dns.age;
|
||||
skyg.server.acme = {
|
||||
enable = true;
|
||||
credentialsFile = config.age.secrets.cloudflare-dns.path;
|
||||
certs."${buzz.publicDomain}" = {
|
||||
postRun = "${pkgs.docker}/bin/docker restart buzz-caddy-1";
|
||||
orderBefore = [ "container-services-buzz" ];
|
||||
};
|
||||
};
|
||||
|
||||
skyg.nixos.common.container-services.buzz = {
|
||||
enable = true;
|
||||
autoUpdate.enable = true;
|
||||
timeoutStartSec = 600;
|
||||
|
||||
networks = {
|
||||
internal = { driver = "bridge"; };
|
||||
lan = config.skyg.nixos.common.containers.networks.ipvlanLab.compose;
|
||||
};
|
||||
|
||||
volumes = {
|
||||
buzz-postgres = nfsVolume "/mnt/SmallG/buzz/postgres";
|
||||
buzz-redis = nfsVolume "/mnt/SmallG/buzz/redis";
|
||||
s3 = nfsVolume "/mnt/SmallG/buzz/s3";
|
||||
buzz-git = nfsVolume "/mnt/SmallG/buzz/git";
|
||||
};
|
||||
|
||||
services = {
|
||||
relay = {
|
||||
image = buzz.images.relay;
|
||||
@@ -326,17 +168,13 @@ in
|
||||
};
|
||||
volumes = [ "buzz-git:/data/git" ];
|
||||
healthcheck = {
|
||||
test = [
|
||||
"CMD-SHELL"
|
||||
"bash -ec 'exec 3<>/dev/tcp/127.0.0.1/8080; printf \"GET /_readiness HTTP/1.1\\r\\nHost: 127.0.0.1\\r\\nConnection: close\\r\\n\\r\\n\" >&3; grep -q \"200 OK\" <&3'"
|
||||
];
|
||||
test = [ "CMD-SHELL" "bash -ec 'exec 3<>/dev/tcp/127.0.0.1/8080; printf \"GET /_readiness HTTP/1.1\\r\\nHost: 127.0.0.1\\r\\nConnection: close\\r\\n\\r\\n\" >&3; grep -q \"200 OK\" <&3'" ];
|
||||
interval = "10s";
|
||||
timeout = "3s";
|
||||
retries = 12;
|
||||
start_period = "30s";
|
||||
};
|
||||
};
|
||||
|
||||
caddy = {
|
||||
image = buzz.images.caddy;
|
||||
extraConfig.depends_on.relay.condition = "service_healthy";
|
||||
@@ -351,20 +189,15 @@ in
|
||||
encode zstd gzip
|
||||
reverse_proxy relay:${toString buzz.port}
|
||||
}
|
||||
|
||||
# Old internal name -> public one (plain :3000 below still serves it).
|
||||
http://${buzz.domain} {
|
||||
redir https://${buzz.publicDomain}{uri} permanent
|
||||
}
|
||||
|
||||
:${toString buzz.port} {
|
||||
reverse_proxy relay:${toString buzz.port}
|
||||
}
|
||||
|
||||
:8080 {
|
||||
reverse_proxy relay:8080
|
||||
}
|
||||
|
||||
:9102 {
|
||||
reverse_proxy relay:9102
|
||||
}
|
||||
@@ -374,7 +207,6 @@ in
|
||||
"/var/lib/acme/${buzz.publicDomain}/key.pem:/etc/caddy/tls/key.pem:ro"
|
||||
];
|
||||
};
|
||||
|
||||
postgres = {
|
||||
image = buzz.images.posgres;
|
||||
networks = [ "internal" ];
|
||||
@@ -393,7 +225,6 @@ in
|
||||
start_period = "10s";
|
||||
};
|
||||
};
|
||||
|
||||
redis = {
|
||||
image = buzz.images.redis;
|
||||
networks = [ "internal" ];
|
||||
@@ -406,7 +237,6 @@ in
|
||||
'';
|
||||
command = [ "sh" "/usr/local/bin/redis-entrypoint.sh" ];
|
||||
healthcheck = {
|
||||
# $$ survives compose interpolation so the container shell expands it.
|
||||
test = [ "CMD-SHELL" ''redis-cli -a "$''${REDIS_PASSWORD}" ping | grep -q PONG'' ];
|
||||
interval = "5s";
|
||||
timeout = "3s";
|
||||
@@ -414,7 +244,6 @@ in
|
||||
start_period = "5s";
|
||||
};
|
||||
};
|
||||
|
||||
minio = {
|
||||
image = buzz.images.minio;
|
||||
networks = [ "internal" ];
|
||||
@@ -429,16 +258,11 @@ in
|
||||
start_period = "10s";
|
||||
};
|
||||
};
|
||||
|
||||
minio-init = {
|
||||
image = buzz.images.mc;
|
||||
networks = [ "internal" ];
|
||||
environmentFiles = [ config.age.secrets.buzz-env.path ];
|
||||
environment = {
|
||||
BUZZ_S3_BUCKET = buzz.bucket;
|
||||
};
|
||||
# The image ENTRYPOINT is ["mc"], so the upstream bootstrap sequence is
|
||||
# shipped as a script and the entrypoint is overridden to run it.
|
||||
environment.BUZZ_S3_BUCKET = buzz.bucket;
|
||||
files."/usr/local/bin/minio-init.sh" = ''
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
@@ -455,22 +279,6 @@ in
|
||||
};
|
||||
restart = "no";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
# Portainer Edge Agent
|
||||
age.secrets.portainer-agent-minipc1.file = ../secrets/portainer-agent-minipc1.age;
|
||||
skyg.nixos.server.portainer = {
|
||||
enable = true;
|
||||
mode = "agent";
|
||||
agent.edgeKeySecretName = "portainer-agent-minipc1";
|
||||
};
|
||||
|
||||
# Buzz management CLI.
|
||||
environment.systemPackages = [ buzz-manage ];
|
||||
|
||||
# Firewall
|
||||
networking.firewall.allowedUDPPorts = openPorts;
|
||||
networking.firewall.allowedTCPPorts = openPorts;
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
ports = {
|
||||
nixServe = 5000;
|
||||
dockerRegistry = 5001;
|
||||
postgresIU = 7491;
|
||||
ssh = 22;
|
||||
iu = 1947;
|
||||
};
|
||||
gitea = {
|
||||
user = "gitea";
|
||||
group = "gitea";
|
||||
stateDir = "/var/lib/sosnovsky/gitea";
|
||||
sshPort = 2222;
|
||||
httpPort = 3000;
|
||||
};
|
||||
openPorts = [
|
||||
ports.nixServe
|
||||
ports.dockerRegistry
|
||||
gitea.sshPort
|
||||
gitea.httpPort
|
||||
ports.postgresIU
|
||||
ports.ssh
|
||||
ports.iu
|
||||
];
|
||||
buzz-manage = pkgs.writeShellScriptBin "buzz-manage" ''
|
||||
export BUZZ_ENV_FILE="${config.age.secrets.buzz-env.path}"
|
||||
export BUZZ_COMPOSE_BIN="${pkgs.docker-compose}/bin/docker-compose"
|
||||
${builtins.readFile ../scripts/hl-minipc1/buzz-manage.sh}
|
||||
'';
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./containers.nix
|
||||
./services
|
||||
./hardware-configuration
|
||||
./hardware.nix
|
||||
];
|
||||
|
||||
skyg.user.enable = true;
|
||||
skyg.nixos.common.ssh-server.enable = true;
|
||||
skyg.server.dns.routing = {
|
||||
enable = false;
|
||||
openFirewall = true;
|
||||
addressesSecretName = "dns-addresses.conf";
|
||||
};
|
||||
skyg.nixos.common.containers.runtime = "docker";
|
||||
skyg.nixos.common.containers.openMetricsPort = true;
|
||||
skyg.nixos.common.containers.networks.ipvlanLab = {
|
||||
enable = true;
|
||||
parent = "eno1";
|
||||
ipRange = "10.0.101.16/28";
|
||||
};
|
||||
skyg.server.admin.enable = true;
|
||||
skyg.server.exporters.enable = true;
|
||||
skyg.nixos.server.k3s.enable = false;
|
||||
skyg.networkDrives.enable = true;
|
||||
|
||||
age.secrets.buzz-env.file = ../secrets/buzz-env.age;
|
||||
|
||||
environment.systemPackages = [ buzz-manage ];
|
||||
|
||||
networking.firewall.allowedUDPPorts = openPorts;
|
||||
networking.firewall.allowedTCPPorts = openPorts;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, modulesPath, ... }:
|
||||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
./file-system.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/142c88f4-b1bc-4ed9-92ee-2c52cdfa4274";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/01FE-EDCC";
|
||||
fsType = "vfat";
|
||||
};
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-uuid/ee4a60a8-b0d1-4f5c-a554-1d1d84c89e34";
|
||||
fsType = "ext4";
|
||||
neededForBoot = true;
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
swapDevices = [ ];
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
services.fwupd.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
age.secrets.cloudflare-dns.file = ../secrets/cloudflare-dns.age;
|
||||
|
||||
skyg.server.acme = {
|
||||
enable = true;
|
||||
credentialsFile = config.age.secrets.cloudflare-dns.path;
|
||||
certs."buzz.home.sosnovsky.ca" = {
|
||||
postRun = "${pkgs.docker}/bin/docker restart buzz-caddy-1";
|
||||
orderBefore = [ "container-services-buzz" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
imports = [
|
||||
./tailscale.nix
|
||||
./nix-serve.nix
|
||||
./docker-registry.nix
|
||||
./gitea.nix
|
||||
./acme.nix
|
||||
./portainer.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{ ... }:
|
||||
let
|
||||
ports = { dockerRegistry = 5001; };
|
||||
in
|
||||
{
|
||||
services.dockerRegistry = {
|
||||
enable = true;
|
||||
storagePath = "/mnt/Data/docker-registry";
|
||||
port = ports.dockerRegistry;
|
||||
openFirewall = true;
|
||||
listenAddress = "0.0.0.0";
|
||||
enableDelete = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{ ... }:
|
||||
let
|
||||
gitea = {
|
||||
user = "gitea";
|
||||
group = "gitea";
|
||||
stateDir = "/var/lib/sosnovsky/gitea";
|
||||
sshPort = 2222;
|
||||
httpPort = 3000;
|
||||
};
|
||||
in
|
||||
{
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
appName = "Sosnovsky gitea";
|
||||
stateDir = gitea.stateDir;
|
||||
user = gitea.user;
|
||||
group = gitea.group;
|
||||
settings = {
|
||||
server = {
|
||||
SSH_USER = gitea.user;
|
||||
DOMAIN = "minipc1.lab.internal";
|
||||
HTTP_PORT = gitea.httpPort;
|
||||
SSH_PORT = gitea.sshPort;
|
||||
DISABLE_SSH = false;
|
||||
};
|
||||
service.DISABLE_REGISTRATION = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{ ... }:
|
||||
let
|
||||
ports = { nixServe = 5000; };
|
||||
in
|
||||
{
|
||||
services.nix-serve = {
|
||||
enable = true;
|
||||
secretKeyFile = "/home/ari/cache-keys/minipc1.lab.internal.private";
|
||||
port = ports.nixServe;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ ... }:
|
||||
{
|
||||
age.secrets.portainer-agent-minipc1.file = ../secrets/portainer-agent-minipc1.age;
|
||||
|
||||
skyg.nixos.server.portainer = {
|
||||
enable = true;
|
||||
mode = "agent";
|
||||
agent.edgeKeySecretName = "portainer-agent-minipc1";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
{
|
||||
services.tailscale.enable = false;
|
||||
services.tailscale.disableTaildrop = true;
|
||||
services.tailscale.useRoutingFeatures = "both";
|
||||
services.tailscale.openFirewall = true;
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
{ pkgs, config, ... }:
|
||||
let
|
||||
staticIp = ip: {
|
||||
lan = {
|
||||
ipv4_address = ip;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
skyg.user.enable = true;
|
||||
skyg.nixos.common.ssh-server.enable = true;
|
||||
skyg.server.dns.routing = {
|
||||
enable = false;
|
||||
openFirewall = true;
|
||||
addressesSecretName = "dns-addresses.conf";
|
||||
};
|
||||
skyg.nixos.common.containers.networks.ipvlanLab = {
|
||||
enable = true;
|
||||
parent = "enp2s0";
|
||||
ipRange = "10.0.101.240/28";
|
||||
};
|
||||
skyg.nixos.common.containers.openMetricsPort = true;
|
||||
skyg.server.exporters.enable = true;
|
||||
skyg.networkDrives = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# firmware updater
|
||||
services.fwupd.enable = true;
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
# Disable firewall
|
||||
networking.firewall.enable = false;
|
||||
|
||||
# Scrypted container service group
|
||||
skyg.nixos.common.container-services.scrypted = {
|
||||
enable = true;
|
||||
autoUpdate.enable = true;
|
||||
services.scrypted = {
|
||||
image = "ghcr.io/koush/scrypted";
|
||||
volumes = [
|
||||
"/var/run/dbus:/var/run/dbus"
|
||||
"/var/run/avahi-daemon/socket:/var/run/avahi-daemon/socket"
|
||||
"/opt/homelab/scrypted/db:/server/volume"
|
||||
"scrypted-nvr:/nvr"
|
||||
];
|
||||
environment.SCRYPTED_NVR_VOLUME = "/nvr";
|
||||
network_mode = "host";
|
||||
};
|
||||
volumes = {
|
||||
scrypted-nvr = {
|
||||
driver = "local";
|
||||
driver_opts = {
|
||||
type = "nfs";
|
||||
o = "addr=tnas1.lab.internal,rw,nfsvers=4.0,nolock,hard,noatime";
|
||||
device = ":/mnt/OneT/NVR";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Drawdb
|
||||
skyg.nixos.common.container-services.drawdb = {
|
||||
enable = true;
|
||||
autoUpdate.enable = true;
|
||||
services.drawdb = {
|
||||
image = "ghcr.io/drawdb-io/drawdb:latest";
|
||||
environment = {
|
||||
PORT = "80";
|
||||
};
|
||||
networks = staticIp "10.0.101.2";
|
||||
dns.names = [ "drawdb" ];
|
||||
};
|
||||
networks.lan = config.skyg.nixos.common.containers.networks.ipvlanLab.compose;
|
||||
};
|
||||
|
||||
# Portainer Server
|
||||
age.secrets.portainer-tls-key.file = ../secrets/portainer-tls-key.age;
|
||||
skyg.nixos.server.portainer = {
|
||||
enable = true;
|
||||
mode = "server";
|
||||
server.tls = {
|
||||
enable = true;
|
||||
cert = builtins.readFile ../configs/pki/portainer.app.internal.crt;
|
||||
keySecretName = "portainer-tls-key";
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets.stack1.file = ../secrets/stack1.age;
|
||||
skyg.nixos.common.container-services.stack1 = {
|
||||
enable = true;
|
||||
autoUpdate.enable = true;
|
||||
composeFile = config.age.secrets.stack1.path;
|
||||
# networks = macvlanNetwork;
|
||||
};
|
||||
age.secrets.stack2.file = ../secrets/stack2.age;
|
||||
skyg.nixos.common.container-services.stack2 = {
|
||||
enable = true;
|
||||
autoUpdate.enable = true;
|
||||
composeFile = config.age.secrets.stack2.path;
|
||||
# networks = macvlanNetwork;
|
||||
};
|
||||
|
||||
# Scrypted backup timer (image auto-update handled by container-services autoUpdate)
|
||||
skyg.server.timers = {
|
||||
scrypted-backups = {
|
||||
OnCalendar = "daily";
|
||||
wantedBy = [ "homelab-terra1-Data-apps.mount" ];
|
||||
script = ''
|
||||
set -eu
|
||||
${pkgs.rsync}/bin/rsync -avpzP --delete /opt/homelab/scrypted /homelab/terra1/Data/apps/
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{ pkgs, config, ... }:
|
||||
let
|
||||
staticIp = ip: {
|
||||
lan = { ipv4_address = ip; };
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./services
|
||||
./hardware-configuration
|
||||
./hardware.nix
|
||||
./systemd.nix
|
||||
];
|
||||
|
||||
skyg.user.enable = true;
|
||||
skyg.nixos.common.ssh-server.enable = true;
|
||||
skyg.server.dns.routing = {
|
||||
enable = false;
|
||||
openFirewall = true;
|
||||
addressesSecretName = "dns-addresses.conf";
|
||||
};
|
||||
skyg.nixos.common.containers.networks.ipvlanLab = {
|
||||
enable = true;
|
||||
parent = "enp2s0";
|
||||
ipRange = "10.0.101.240/28";
|
||||
};
|
||||
skyg.nixos.common.containers.openMetricsPort = true;
|
||||
skyg.server.exporters.enable = true;
|
||||
skyg.networkDrives.enable = true;
|
||||
|
||||
networking.firewall.enable = false;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
./file-system.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/2c1a9e86-5b82-4545-bea1-c1b6b688fdf8";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/6583-1C43";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
swapDevices = [ ];
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
services.fwupd.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
imports = [
|
||||
./scrypted.nix
|
||||
./drawdb.nix
|
||||
./portainer.nix
|
||||
./stack1.nix
|
||||
./stack2.nix
|
||||
./timers.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
skyg.nixos.common.container-services.drawdb = {
|
||||
enable = true;
|
||||
autoUpdate.enable = true;
|
||||
services.drawdb = {
|
||||
image = "ghcr.io/drawdb-io/drawdb:latest";
|
||||
environment.PORT = "80";
|
||||
networks.lan.ipv4_address = "10.0.101.2";
|
||||
dns.names = [ "drawdb" ];
|
||||
};
|
||||
networks.lan = config.skyg.nixos.common.containers.networks.ipvlanLab.compose;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{ ... }:
|
||||
{
|
||||
age.secrets.portainer-tls-key.file = ../secrets/portainer-tls-key.age;
|
||||
|
||||
skyg.nixos.server.portainer = {
|
||||
enable = true;
|
||||
mode = "server";
|
||||
server.tls = {
|
||||
enable = true;
|
||||
cert = builtins.readFile ../configs/pki/portainer.app.internal.crt;
|
||||
keySecretName = "portainer-tls-key";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
skyg.nixos.common.container-services.scrypted = {
|
||||
enable = true;
|
||||
autoUpdate.enable = true;
|
||||
services.scrypted = {
|
||||
image = "ghcr.io/koush/scrypted";
|
||||
volumes = [
|
||||
"/var/run/dbus:/var/run/dbus"
|
||||
"/var/run/avahi-daemon/socket:/var/run/avahi-daemon/socket"
|
||||
"/opt/homelab/scrypted/db:/server/volume"
|
||||
"scrypted-nvr:/nvr"
|
||||
];
|
||||
environment.SCRYPTED_NVR_VOLUME = "/nvr";
|
||||
network_mode = "host";
|
||||
};
|
||||
volumes.scrypted-nvr = {
|
||||
driver = "local";
|
||||
driver_opts = {
|
||||
type = "nfs";
|
||||
o = "addr=tnas1.lab.internal,rw,nfsvers=4.0,nolock,hard,noatime";
|
||||
device = ":/mnt/OneT/NVR";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
age.secrets.stack1.file = ../secrets/stack1.age;
|
||||
skyg.nixos.common.container-services.stack1 = {
|
||||
enable = true;
|
||||
autoUpdate.enable = true;
|
||||
composeFile = config.age.secrets.stack1.path;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
age.secrets.stack2.file = ../secrets/stack2.age;
|
||||
skyg.nixos.common.container-services.stack2 = {
|
||||
enable = true;
|
||||
autoUpdate.enable = true;
|
||||
composeFile = config.age.secrets.stack2.path;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
skyg.server.timers.scrypted-backups = {
|
||||
OnCalendar = "daily";
|
||||
wantedBy = [ "homelab-terra1-Data-apps.mount" ];
|
||||
script = ''
|
||||
set -eu
|
||||
${pkgs.rsync}/bin/rsync -avpzP --delete /opt/homelab/scrypted /homelab/terra1/Data/apps/
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{ ... }:
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
}
|
||||
@@ -1,6 +1,11 @@
|
||||
{ ...
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration
|
||||
./hardware.nix
|
||||
./systemd.nix
|
||||
];
|
||||
|
||||
skyg.user.enable = true;
|
||||
skyg.nixos.common.ssh-server.enable = true;
|
||||
skyg.server.dns.routing = {
|
||||
@@ -14,7 +19,7 @@
|
||||
enable = true;
|
||||
envPath = "/opt/k3s/k3s.env";
|
||||
};
|
||||
# Portainer Edge Agent (k3s deployment)
|
||||
|
||||
age.secrets.portainer-agent-minipc3.file = ../secrets/portainer-agent-minipc3.age;
|
||||
skyg.nixos.server.portainer = {
|
||||
enable = true;
|
||||
@@ -24,11 +29,6 @@
|
||||
edgeKeySecretName = "portainer-agent-minipc3";
|
||||
};
|
||||
};
|
||||
# firmware updater
|
||||
services.fwupd.enable = true;
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
# Disable firewall
|
||||
|
||||
networking.firewall.enable = false;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, modulesPath, ... }:
|
||||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
./file-system.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ config, lib, modulesPath, ... }:
|
||||
{
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/5a468faa-b149-4ae2-9106-f0b5216d6d95";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/6CC4-8800";
|
||||
fsType = "vfat";
|
||||
};
|
||||
swapDevices = [{ device = "/dev/disk/by-uuid/e847bdf2-e049-428b-a203-8a1eae77ce56"; }];
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
services.fwupd.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{ ... }:
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
{ lib
|
||||
, pkgs
|
||||
, config
|
||||
, determinate
|
||||
, ...
|
||||
}:
|
||||
{ lib, pkgs, config, determinate, ... }:
|
||||
{
|
||||
skyg = {
|
||||
imports = [
|
||||
./hardware-configuration
|
||||
./hardware.nix
|
||||
./systemd.nix
|
||||
];
|
||||
|
||||
skyg.user.enable
|
||||
skyg = {
|
||||
user.enable = false;
|
||||
nixos = {
|
||||
common = {
|
||||
@@ -14,9 +16,7 @@
|
||||
ssh-server.enable = true;
|
||||
containers.enable = false;
|
||||
networking.nfsServer.enable = false;
|
||||
hardware = {
|
||||
pipewire.enable = true;
|
||||
};
|
||||
hardware.pipewire.enable = true;
|
||||
};
|
||||
desktop = {
|
||||
enable = true;
|
||||
@@ -35,27 +35,12 @@
|
||||
};
|
||||
};
|
||||
|
||||
# Determinate Nix builds its own Nix from source (no aarch64-linux binary
|
||||
# cache hit for us), and its test suite fails under QEMU emulation because
|
||||
# nested seccomp doesn't work through the translation layer. Skip the test
|
||||
# suite for this build only — Determinate Nix itself stays enabled.
|
||||
nix.package = lib.mkForce (
|
||||
determinate.inputs.nix.packages.${pkgs.stdenv.hostPlatform.system}.default.overrideAttrs (old: {
|
||||
doCheck = false;
|
||||
})
|
||||
);
|
||||
|
||||
# CM4 boots via Pi firmware + U-Boot reading extlinux.conf (set up by the
|
||||
# official NixOS SD image) — not systemd-boot/EFI like the other hosts.
|
||||
boot.loader.grub.enable = false;
|
||||
boot.loader.generic-extlinux-compatible.enable = true;
|
||||
|
||||
# Serial console, useful for headless debugging over UART.
|
||||
boot.kernelParams = [ "console=ttyS0,115200n8" "console=tty0" ];
|
||||
|
||||
# SD image has no swap partition; use compressed RAM swap instead.
|
||||
zramSwap.enable = true;
|
||||
|
||||
programs.dms-greeter = {
|
||||
enable = true;
|
||||
compositor.name = "hyprland";
|
||||
@@ -66,7 +51,6 @@
|
||||
user = config.skyg.user.name;
|
||||
};
|
||||
services.displayManager.defaultSession = "hyprland";
|
||||
environment.systemPackages = with pkgs; [
|
||||
foot
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [ foot ];
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ lib, modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "usbhid" "usb_storage" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ lib, modulesPath, ... }:
|
||||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
./file-system.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ lib, modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/boot/firmware" = {
|
||||
device = "/dev/disk/by-label/FIRMWARE";
|
||||
fsType = "vfat";
|
||||
options = [ "nofail" "noauto" ];
|
||||
};
|
||||
swapDevices = [ ];
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
boot.kernelParams = [ "console=ttyS0,115200n8" "console=tty0" ];
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{ ... }:
|
||||
{
|
||||
boot.loader.grub.enable = false;
|
||||
boot.loader.generic-extlinux-compatible.enable = true;
|
||||
zramSwap.enable = true;
|
||||
}
|
||||
@@ -1,12 +1,17 @@
|
||||
{ lib, pkgs, config, determinate, ... }:
|
||||
{
|
||||
skyg = {
|
||||
imports = [
|
||||
./hardware-configuration
|
||||
./hardware.nix
|
||||
./systemd.nix
|
||||
];
|
||||
|
||||
skyg.user.enable
|
||||
skyg = {
|
||||
user.enable = true;
|
||||
nixos = {
|
||||
common.ssh-server.enable = true;
|
||||
common.hardware = {
|
||||
pipewire.enable = true;
|
||||
};
|
||||
common.hardware.pipewire.enable = true;
|
||||
desktop = {
|
||||
enable = true;
|
||||
tiler = {
|
||||
@@ -20,25 +25,12 @@
|
||||
};
|
||||
};
|
||||
|
||||
# Determinate Nix builds its own Nix from source (no aarch64-linux binary
|
||||
# cache hit for us), and its test suite fails under QEMU emulation because
|
||||
# nested seccomp doesn't work through the translation layer. Skip the test
|
||||
# suite for this build only — Determinate Nix itself stays enabled.
|
||||
nix.package = lib.mkForce (
|
||||
determinate.inputs.nix.packages.${pkgs.stdenv.hostPlatform.system}.default.overrideAttrs (old: {
|
||||
doCheck = false;
|
||||
})
|
||||
);
|
||||
|
||||
# Pi 4 boots via Pi firmware + U-Boot reading extlinux.conf (set up by the
|
||||
# official NixOS SD image) — not systemd-boot/EFI like the other hosts.
|
||||
boot.loader.grub.enable = false;
|
||||
boot.loader.generic-extlinux-compatible.enable = true;
|
||||
|
||||
# Serial console, useful for headless debugging over UART.
|
||||
boot.kernelParams = [ "console=ttyS0,115200n8" "console=tty0" ];
|
||||
|
||||
zramSwap.enable = true;
|
||||
programs.dms-greeter = {
|
||||
enable = true;
|
||||
compositor.name = "hyprland";
|
||||
@@ -49,7 +41,6 @@
|
||||
user = config.skyg.user.name;
|
||||
};
|
||||
services.displayManager.defaultSession = "hyprland";
|
||||
environment.systemPackages = with pkgs; [
|
||||
foot
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [ foot ];
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ lib, modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "usbhid" "usb_storage" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.zfs.forceImportRoot = false;
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ lib, modulesPath, ... }:
|
||||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
./file-system.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Clanker ! Do not modify this file!
|
||||
#
|
||||
{ lib, modulesPath, ... }:
|
||||
{
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/boot/firmware" = {
|
||||
device = "/dev/disk/by-label/FIRMWARE";
|
||||
fsType = "vfat";
|
||||
options = [ "nofail" "noauto" ];
|
||||
};
|
||||
swapDevices = [ ];
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
boot.kernelParams = [ "console=ttyS0,115200n8" "console=tty0" ];
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{ ... }:
|
||||
{
|
||||
boot.loader.grub.enable = false;
|
||||
boot.loader.generic-extlinux-compatible.enable = true;
|
||||
zramSwap.enable = true;
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
openPorts = [
|
||||
# nfs
|
||||
111
|
||||
2049
|
||||
4000 # statdPort
|
||||
4001 # lockdPort
|
||||
4002 # mountdPort;
|
||||
20048
|
||||
# ssh
|
||||
22
|
||||
# prometheus
|
||||
9090
|
||||
];
|
||||
in
|
||||
{
|
||||
skyg.user.enable = true;
|
||||
skyg.nixos.common.ssh-server.enable = true;
|
||||
skyg.server.dns.routing = {
|
||||
enable = false;
|
||||
openFirewall = true;
|
||||
addressesSecretName = "dns-addresses.conf";
|
||||
};
|
||||
skyg.nixos.desktop.enable = false;
|
||||
skyg.server.admin.enable = true;
|
||||
skyg.server.exporters.enable = true;
|
||||
|
||||
# firmware updater
|
||||
services.fwupd.enable = true;
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
btrfs-progs
|
||||
];
|
||||
# Firewall
|
||||
networking.firewall.allowedUDPPorts = openPorts;
|
||||
networking.firewall.allowedTCPPorts = openPorts;
|
||||
# NFS
|
||||
skyg.nixos.common.networking.nfsServer.enable = true;
|
||||
services.nfs.server = {
|
||||
lockdPort = 4001;
|
||||
mountdPort = 4002;
|
||||
statdPort = 4000;
|
||||
extraNfsdConfig = '''';
|
||||
exports = ''
|
||||
/mnt/Data/apps 10.0.0.0/16(rw,wdelay,insecure,no_root_squash,no_subtree_check,sec=sys,rw,insecure,no_root_squash,no_all_squash)
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
openPorts = [
|
||||
111
|
||||
2049
|
||||
4000
|
||||
4001
|
||||
4002
|
||||
20048
|
||||
22
|
||||
9090
|
||||
];
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./services.nix
|
||||
./hardware-configuration
|
||||
./hardware.nix
|
||||
./systemd.nix
|
||||
];
|
||||
|
||||
skyg.user.enable = true;
|
||||
skyg.nixos.common.ssh-server.enable = true;
|
||||
skyg.server.dns.routing = {
|
||||
enable = false;
|
||||
openFirewall = true;
|
||||
addressesSecretName = "dns-addresses.conf";
|
||||
};
|
||||
skyg.nixos.desktop.enable = false;
|
||||
skyg.server.admin.enable = true;
|
||||
skyg.server.exporters.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [ btrfs-progs ];
|
||||
|
||||
networking.firewall.allowedUDPPorts = openPorts;
|
||||
networking.firewall.allowedTCPPorts = openPorts;
|
||||
}
|
||||
Loaded 100 of 112 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user