Compare commits
12 Commits
fix/honcho
...
feat/temp-
| Author | SHA1 | Date | |
|---|---|---|---|
| 7a3885a036 | |||
| 44b8121edb | |||
| 5aca97e057 | |||
| a51e095717 | |||
| 9ebbb1c0c6 | |||
| 7f11da1878 | |||
| 29cc20bb04 | |||
| 1617ac9149 | |||
| 24f15c98cd | |||
| bdd6d03739 | |||
| a0a6663793 | |||
| b66ffadb79 |
Submodule assets/compose updated: d3f2e3b7b9...dab158da0a
@@ -17,7 +17,7 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nixos-raspberrypi = {
|
nixos-raspberrypi = {
|
||||||
url = "github:nvmd/nixos-raspberrypi/v1.20260317.0";
|
url = "github:nvmd/nixos-raspberrypi/v1.20260517.0";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
self.submodules = true;
|
self.submodules = true;
|
||||||
@@ -65,6 +65,7 @@
|
|||||||
./hosts/lazyworkhorse/configuration.nix
|
./hosts/lazyworkhorse/configuration.nix
|
||||||
./hosts/lazyworkhorse/hardware-configuration.nix
|
./hosts/lazyworkhorse/hardware-configuration.nix
|
||||||
./modules/nixos/filesystem/hoardingcow-mount.nix
|
./modules/nixos/filesystem/hoardingcow-mount.nix
|
||||||
|
./modules/nixos/filesystem/poup-16t-disk.nix
|
||||||
./modules/nixos/services/docker_manager.nix
|
./modules/nixos/services/docker_manager.nix
|
||||||
./modules/nixos/services/open_code_server.nix
|
./modules/nixos/services/open_code_server.nix
|
||||||
./modules/nixos/services/ollama_init_custom_models.nix
|
./modules/nixos/services/ollama_init_custom_models.nix
|
||||||
|
|||||||
@@ -8,9 +8,21 @@
|
|||||||
# NAS Mounting
|
# NAS Mounting
|
||||||
hoardingcow-mount.enable = true;
|
hoardingcow-mount.enable = true;
|
||||||
|
|
||||||
|
# 16TB btrfs storage disk (WD Red Pro — Poup_16T — LUKS2 + btrfs + btrbk snapshots)
|
||||||
|
# ⚠ SETUP REQUIRED: Connect the disk, get the LUKS UUID with 'blkid /dev/sdb',
|
||||||
|
# then set gortium.poup16t.luksUuid here and deploy.
|
||||||
|
# gortium.poup16t = {
|
||||||
|
# enable = true;
|
||||||
|
# luksUuid = "REPLACE_ME_WITH_REAL_UUID";
|
||||||
|
# };
|
||||||
|
|
||||||
# Flakesss
|
# Flakesss
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" "flake-self-attrs" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" "flake-self-attrs" ];
|
||||||
nix.settings.trusted-users = [ "root" "gortium" ];
|
nix.settings.trusted-users = [ "root" "gortium" ];
|
||||||
|
nix.settings.extra-platforms = [ "aarch64-linux" ];
|
||||||
|
|
||||||
|
# QEMU binfmt for cross-building aarch64 NixOS targets
|
||||||
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||||
|
|
||||||
# Garbage collection
|
# Garbage collection
|
||||||
nix.gc = {
|
nix.gc = {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, paths, self, ... }:
|
{ config, lib, pkgs, paths, self, keys, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# Basic Host Info
|
# Basic Host Info
|
||||||
@@ -9,15 +9,17 @@
|
|||||||
# System State
|
# System State
|
||||||
system.stateVersion = "25.05";
|
system.stateVersion = "25.05";
|
||||||
|
|
||||||
# Boot & Hardware (uconsole-cm5 module handles boot.loader)
|
# Boot & Hardware (migrated to kernel bootloader per nixos-raspberrypi deprecation notice)
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.loader.raspberry-pi.bootloader = "kernel";
|
||||||
|
# kernel managed by nixos-raspberrypi module — don't override, patches are version-specific
|
||||||
|
# boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
# Networking
|
# Networking
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.PermitRootLogin = "prohibit-password";
|
settings.PermitRootLogin = lib.mkForce "prohibit-password";
|
||||||
settings.PasswordAuthentication = false;
|
settings.PasswordAuthentication = lib.mkForce false;
|
||||||
};
|
};
|
||||||
|
|
||||||
# User
|
# User
|
||||||
@@ -106,6 +108,7 @@
|
|||||||
# ============================================================
|
# ============================================================
|
||||||
systemd.services.rnsd = {
|
systemd.services.rnsd = {
|
||||||
description = "Reticulum Network Stack Daemon";
|
description = "Reticulum Network Stack Daemon";
|
||||||
|
wants = [ "network-online.target" ];
|
||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
@@ -123,6 +126,7 @@
|
|||||||
# ============================================================
|
# ============================================================
|
||||||
systemd.services.kismet = {
|
systemd.services.kismet = {
|
||||||
description = "Kismet Wi-Fi Monitor & IDS";
|
description = "Kismet Wi-Fi Monitor & IDS";
|
||||||
|
wants = [ "network-online.target" ];
|
||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
|||||||
121
modules/nixos/filesystem/poup-16t-disk.nix
Normal file
121
modules/nixos/filesystem/poup-16t-disk.nix
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.gortium.poup16t;
|
||||||
|
luksName = cfg.luksName;
|
||||||
|
in
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
{
|
||||||
|
options.gortium.poup16t = {
|
||||||
|
enable = mkEnableOption "Poup_16T storage disk (btrfs + LUKS + btrbk snapshots)";
|
||||||
|
|
||||||
|
luksUuid = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = ''
|
||||||
|
UUID of the LUKS partition on the 16TB disk (WD Red Pro).
|
||||||
|
|
||||||
|
Find this by running as root when the disk is connected:
|
||||||
|
blkid /dev/sdb # or wherever the disk appears
|
||||||
|
lsblk -o NAME,SIZE,FSTYPE,UUID
|
||||||
|
|
||||||
|
Since btrfs is inside LUKS, the FS UUID is hidden — use the
|
||||||
|
LUKS partition UUID from blkid (it'll show TYPE=\"crypto_LUKS\").
|
||||||
|
'';
|
||||||
|
example = "00000000-0000-0000-0000-000000000000";
|
||||||
|
};
|
||||||
|
|
||||||
|
luksName = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "poup_16t";
|
||||||
|
description = "Name for the LUKS /dev/mapper/ mapping";
|
||||||
|
};
|
||||||
|
|
||||||
|
mountPoint = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "/mnt/Poup_16T";
|
||||||
|
description = "Mount point for the 16TB data disk";
|
||||||
|
};
|
||||||
|
|
||||||
|
btrfsOptions = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [ "defaults" "noatime" "compress=zstd:3" "nofail" ];
|
||||||
|
description = "Mount options for the btrfs filesystem. 'nofail' ensures boot succeeds when disk is disconnected.";
|
||||||
|
};
|
||||||
|
|
||||||
|
btrbk = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "Enable btrbk snapshot management on this volume";
|
||||||
|
};
|
||||||
|
|
||||||
|
schedule = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "daily";
|
||||||
|
description = "systemd calendar event for btrbk (e.g. 'daily', 'hourly', '*-*-* 00:00:00')";
|
||||||
|
};
|
||||||
|
|
||||||
|
preserveMin = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "2d";
|
||||||
|
description = "btrbk snapshot_preserve_min — minimum age before pruning";
|
||||||
|
};
|
||||||
|
|
||||||
|
preserve = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "14d 4w 3m";
|
||||||
|
description = "btrbk snapshot_preserve — retention policy (daily, weekly, monthly)";
|
||||||
|
};
|
||||||
|
|
||||||
|
snapshotDir = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = ".snapshots";
|
||||||
|
description = "Directory name for snapshots relative to volume root";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
# Enable btrfs kernel support (no DKMS needed — it's in-tree)
|
||||||
|
boot.supportedFilesystems = [ "btrfs" ];
|
||||||
|
|
||||||
|
# Install btrfs administration tools
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
btrfs-progs # mkfs.btrfs, btrfs, fsck, balance, scrub
|
||||||
|
btrbk # Snapshot management + rotation
|
||||||
|
];
|
||||||
|
|
||||||
|
# LUKS2 unlock at boot (uses keyfile or prompts if unavailable)
|
||||||
|
# Since the disk may be disconnected, initrd times out gracefully (~30s)
|
||||||
|
boot.initrd.luks.devices.${luksName} = {
|
||||||
|
device = "/dev/disk/by-uuid/${cfg.luksUuid}";
|
||||||
|
preLVM = false;
|
||||||
|
allowDiscards = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Mount the unlocked mapper device as btrfs
|
||||||
|
fileSystems.${cfg.mountPoint} = {
|
||||||
|
device = "/dev/mapper/${luksName}";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = cfg.btrfsOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
# btrbk — automated snapshot creation and rotation
|
||||||
|
services.btrbk = mkIf cfg.btrbk.enable {
|
||||||
|
instances.poup16t = {
|
||||||
|
onCalendar = cfg.btrbk.schedule;
|
||||||
|
settings = {
|
||||||
|
snapshot_preserve_min = cfg.btrbk.preserveMin;
|
||||||
|
snapshot_preserve = cfg.btrbk.preserve;
|
||||||
|
|
||||||
|
volume.${cfg.mountPoint} = {
|
||||||
|
snapshot_create = "always";
|
||||||
|
snapshot_dir = cfg.btrbk.snapshotDir;
|
||||||
|
subvolume = ".";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ in {
|
|||||||
reticulumStack = python3.pkgs.buildPythonApplication rec {
|
reticulumStack = python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "reticulum";
|
pname = "reticulum";
|
||||||
version = "1.2.9";
|
version = "1.2.9";
|
||||||
|
format = "setuptools";
|
||||||
src = pyPkgs.fetchPypi {
|
src = pyPkgs.fetchPypi {
|
||||||
pname = "rns";
|
pname = "rns";
|
||||||
inherit version;
|
inherit version;
|
||||||
@@ -24,6 +25,7 @@ in {
|
|||||||
lxmf = python3.pkgs.buildPythonApplication rec {
|
lxmf = python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "lxmf";
|
pname = "lxmf";
|
||||||
version = "0.9.8";
|
version = "0.9.8";
|
||||||
|
format = "setuptools";
|
||||||
src = pyPkgs.fetchPypi {
|
src = pyPkgs.fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "30f39f3a975a049c12ee2cfceb3261d24cb5adec881c6821f7354464b3f3650c";
|
sha256 = "30f39f3a975a049c12ee2cfceb3261d24cb5adec881c6821f7354464b3f3650c";
|
||||||
@@ -42,6 +44,7 @@ in {
|
|||||||
nomadnet = python3.pkgs.buildPythonApplication rec {
|
nomadnet = python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "nomadnet";
|
pname = "nomadnet";
|
||||||
version = "1.1.1";
|
version = "1.1.1";
|
||||||
|
format = "setuptools";
|
||||||
src = pyPkgs.fetchPypi {
|
src = pyPkgs.fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "fa13b64a10e75b705a58024815ab72451700aa726af96d415ba99dec28dfc40a";
|
sha256 = "fa13b64a10e75b705a58024815ab72451700aa726af96d415ba99dec28dfc40a";
|
||||||
@@ -60,6 +63,7 @@ in {
|
|||||||
rnsh = python3.pkgs.buildPythonApplication rec {
|
rnsh = python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "rnsh";
|
pname = "rnsh";
|
||||||
version = "0.1.7";
|
version = "0.1.7";
|
||||||
|
format = "setuptools";
|
||||||
src = pyPkgs.fetchPypi {
|
src = pyPkgs.fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "9cb72f25abb1c6d300f8014b264184ff78f592fe88e36094938012990b797c93";
|
sha256 = "9cb72f25abb1c6d300f8014b264184ff78f592fe88e36094938012990b797c93";
|
||||||
|
|||||||
Reference in New Issue
Block a user