clean up & consoldiation of custom pkgs from flakes & herdr

This commit is contained in:
ari committed 2026-09-09 11:46:46 -04:00
1 parent 6229440107
commit bdfcb9e814
22 files changed
+207 -446

No files matched your search

+7 -4
View File
@@ -9,10 +9,10 @@ Most leaf modules expose a `skyg.nixos.common.*` enable flag and stay inert unti
```
common/
├── default.nix # Imports everything below + always-on env defaults
├── core.nix # System packages, nh, nix-ld, timezone (Toronto), locale, GC cron
├── networking.nix # skyg.core.hostName, NetworkManager, NFS server
├── core.nix # System packages, nh, nix-ld, timezone (Toronto), locale, GC cron; skyg.nixos.common.minimal
├── networking.nix # skyg.core.hostName, NetworkManager, NFS server (skyg.nixos.common.networking.nfsServer)
├── user.nix # skyg.user.createSystemUser — creates the system user/groups + zsh shell
├── fonts.nix # System font packages + fontconfig defaults (Fira Code, Noto, …)
├── fonts.nix # System font packages + fontconfig defaults (Fira Code, Noto, …); skyg.nixos.common.fonts.minimal
├── ssh-server.nix # skyg.nixos.common.ssh-server — hardened sshd + master pubkey
├── ssh-notify.nix # skyg.nixos.common.ssh-notify — forward notify-send from SSH sessions to a desktop client
├── qemu.nix # skyg.core.qemu — QEMU/quickemu + SPICE guest tooling
@@ -43,7 +43,10 @@ skyg.core.qemu.* → qemu.nix
skyg.nixos.common.ssh-server.* → ssh-server.nix
skyg.nixos.common.ssh-notify.* → ssh-notify.nix
skyg.nixos.common.cachePush.* → binary-cache.nix
skyg.nixos.common.containers.* → containers/
skyg.nixos.common.minimal → core.nix (skip heavy always-on system packages)
skyg.nixos.common.fonts.minimal → fonts.nix (install only a minimal font set)
skyg.nixos.common.networking.nfsServer → networking.nix (enable/disable the NFS server)
skyg.nixos.common.containers.* → containers/
skyg.nixos.common.hardware.* → hardware/
skyg.nixos.common.pritunl.* → pritunl/
```
@@ -37,6 +37,7 @@ consistently (compose tooling, user group membership, OCI backend, metrics).
### Option namespace
```
skyg.nixos.common.containers.enable → false to disable the container runtime entirely
skyg.nixos.common.containers.runtime → "docker" | "podman"
skyg.nixos.common.containers.enableOnBoot
skyg.nixos.common.containers.localDockerRegistries
@@ -8,6 +8,11 @@
];
options = {
skyg.nixos.common.containers = {
enable = lib.mkOption {
description = "Whether to enable the container runtime (docker/podman).";
type = lib.types.bool;
default = true;
};
runtime = lib.mkOption {
description = "Docker vs podman";
type = lib.types.str;
+1 -1
View File
@@ -4,7 +4,7 @@ let
cfg = config.skyg.nixos.common.containers;
in
{
config = lib.mkIf (cfg.runtime == "docker") {
config = lib.mkIf (cfg.enable && cfg.runtime == "docker") {
virtualisation.docker = {
enable = true;
autoPrune.enable = true;
+1 -1
View File
@@ -3,7 +3,7 @@ let
cfg = config.skyg.nixos.common.containers;
in
{
config = lib.mkIf (cfg.runtime == "podman") {
config = lib.mkIf (cfg.enable && cfg.runtime == "podman") {
virtualisation.oci-containers.backend = "podman";
virtualisation = {
podman = {
+34 -25
View File
@@ -13,6 +13,11 @@
default = 7;
};
};
nixos.common.minimal = lib.mkOption {
type = lib.types.bool;
description = "Minimal common system: skip heavy always-on packages for lean hosts.";
default = false;
};
};
config = let skyg = config.skyg; in {
@@ -29,35 +34,39 @@
enable = true;
clean.enable = true;
};
environment.systemPackages = with pkgs; [
# shell tools
git
usbutils
environment.systemPackages =
(with pkgs; [
# shell tools
git
usbutils
# system utils
nfs-utils
lm_sensors
hwinfo
dig
iperf
# shell tools
wget
])
# On lean hosts, skip the heavy server/nix-dev extra tools.
++ (lib.optionals (!config.skyg.nixos.common.minimal) (with pkgs; [
# system utils
nfs-utils
lm_sensors
hwinfo
dig
iperf
# misc
glib-networking
glib
glibc
# misc
glib-networking
glib
glibc
# printer
system-config-printer
# printer
system-config-printer
# nix utils
nix-index
nil
cachix
nixpkgs-fmt
nvd
# shell tools
wget
];
# nix utils
nix-index
nil
cachix
nixpkgs-fmt
nvd
]));
services.xserver.excludePackages = with pkgs; [
xterm
];
+32 -14
View File
@@ -1,6 +1,6 @@
{ pkgs, ... }:
{ config, pkgs, lib, ... }:
let
fontPackages = with pkgs; [
fullFontPackages = with pkgs; [
nerd-fonts.fira-code
nerd-fonts.droid-sans-mono
nerd-fonts.fira-mono
@@ -14,20 +14,38 @@ let
noto-fonts-cjk-sans
noto-fonts-color-emoji
];
minimalFontPackages = with pkgs; [
fira-code
noto-fonts
noto-fonts-color-emoji
];
in
{
environment.systemPackages = fontPackages;
fonts = {
packages = fontPackages;
enableDefaultPackages = true;
fontDir.enable = true;
fontconfig = {
enable = true;
defaultFonts = {
serif = [ "Fira Code" "DroidSansMono" ];
sansSerif = [ "Fira Code" "DroidSansMono" ];
monospace = [ "Fira Code" ];
};
options.skyg.nixos.common.fonts = {
minimal = lib.mkOption {
type = lib.types.bool;
description = "Install only a minimal font set (for lean hosts).";
default = false;
};
};
config =
let
fontPackages = if config.skyg.nixos.common.fonts.minimal then minimalFontPackages else fullFontPackages;
in
{
environment.systemPackages = fontPackages;
fonts = {
packages = fontPackages;
enableDefaultPackages = true;
fontDir.enable = true;
fontconfig = {
enable = true;
defaultFonts = {
serif = [ "Fira Code" "DroidSansMono" ];
sansSerif = [ "Fira Code" "DroidSansMono" ];
monospace = [ "Fira Code" ];
};
};
};
};
}
+8 -1
View File
@@ -10,6 +10,13 @@ in
type = lib.types.str;
};
};
skyg.nixos.common.networking = {
nfsServer.enable = lib.mkOption {
description = "Enable the NFS server (services.nfs.server).";
type = lib.types.bool;
default = true;
};
};
};
config = {
# Define hostname.
@@ -19,7 +26,7 @@ in
networking.networkmanager.enable = true;
# NFS Support
services.nfs.server.enable = true;
services.nfs.server.enable = config.skyg.nixos.common.networking.nfsServer.enable;
# Disable the flaky nm service
systemd.services.NetworkManager-wait-online.enable = false;
+1
View File
@@ -11,6 +11,7 @@ in
};
config = lib.mkIf (cfg.name != "" && cfg.createSystemUser) {
programs.zsh.enable = true;
users.users.root = {
shell = pkgs.zsh;
};
+2 -2
View File
@@ -10,7 +10,7 @@ independent `skyg.nixos.server.services.<name>.enable` flag. Most run as OCI con
```
services/
├── default.nix # imports the services below
├── ai-services.nix # skyg.nixos.server.services.ai — ollama + Wyoming (whisper/piper/wake)
├── ai-services.nix # skyg.nixos.server.services.ai — Wyoming (whisper/piper/wake)
├── audiobookshelf.nix # skyg.nixos.server.services.audiobookshelf — audiobook/podcast server
├── ds4.nix # skyg.nixos.server.services.ds4 — ds4-server HTTP API (DwarfStar local inference)
├── jellyfin.nix # skyg.nixos.server.services.jellyfin — media server (uid/gid 7777)
@@ -21,7 +21,7 @@ services/
## Notable details
- **`ai-services.nix`** runs ollama (GPU-passthrough) and openwakeword as containers and
- **`ai-services.nix`** openwakeword as containers and
enables NixOS-native Wyoming faster-whisper + piper. Opens 11434/10200/10300/10400.
- **`ds4.nix`** runs `ds4-server` (the OpenAI/Anthropic-compatible HTTP API for DwarfStar
DeepSeek V4 inference) as a native systemd service. `package` selects the backend
@@ -24,13 +24,6 @@ in
networking.firewall.allowedTCPPorts = openPorts;
virtualisation.oci-containers = {
containers = {
# ollama = {
# autoStart = true;
# image = "ollama/ollama";
# extraOptions = [ "--device=nvidia.com/gpu=all" ];
# ports = [ "11434:11434" ];
# volumes = [ "ollama:/root/.ollama" ];
# };
openwakeword = {
autoStart = true;
image = "rhasspy/wyoming-openwakeword";