3.1 KiB
3.1 KiB
modules/nixos/common/
Baseline settings every Linux host receives. default.nix imports each file/subfolder and
sets a few always-on defaults (EDITOR=vi, NIXPKGS_ALLOW_UNFREE, local bin in PATH).
Most leaf modules expose a skyg.nixos.common.* enable flag and stay inert until switched on.
Files
common/
├── default.nix # Imports everything below + always-on env defaults
├── 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, …); 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
├── binary-cache.nix # skyg.nixos.common.cachePush — push finished builds to the bigbox2 cache
├── containers/ # Docker vs Podman runtime selection
├── hardware/ # GPU, fan control, audio, laptop power, Coral TPU udev
└── pritunl/ # Pritunl VPN client service
Notable details
core.nixsetstime.timeZone = "America/Toronto",i18ntoen_CA.UTF-8, enablesprograms.nhwith auto-clean, and adds a dailynix-collect-garbage --delete-older-than 7dcron job for both root and the user.networking.nixdefinesskyg.core.hostName, enables NetworkManager + the NFS server, and disables the flakyNetworkManager-wait-onlineunit.user.nixcreates the actual system user (inwheel+networkmanager) with zsh as the login shell; gated byskyg.user.createSystemUser(defaulttrue).ssh-server.nixships the master public key and a hardened sshd config (key-only auth, long keepalives). Disabled by default.
Option Namespace
skyg.core.hostName → networking.nix
skyg.user.createSystemUser → user.nix
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.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/
Conventions
- This tree is for behaviour that is reasonable on any Linux host. Anything role-specific
belongs in
server/ordesktop/. - Hostname-independent defaults can be set directly; anything optional gets an
enablegate.