Files
nix-config/hosts/12kingdoms-shoukei/default.nix
T
Ryan Yin e4c2548a93 refactor: replace redundant mkForce with plain values and mkDefault
Each of these overrode a value nothing else set at a higher priority:

- qemu-guest: btrbk, hardwareTools and cloud-init have no competing
  definition on the guests.
- mdns: nixpkgs' sunshine module sets avahi.publish.* with mkDefault.
- computer-use: i18n now sets the time zone with mkDefault.
- darwin terminal: the shared ghostty/kitty font sizes are now mkDefault.
- shoukei: sunshine is mkDefault false in remote-desktop.nix, zram's
  memoryPercent is mkDefault 50; supportedFilesystems now merges instead
  of discarding the fsType entries other modules add.
- youko: nothing enables docker.
- nixpak: pasta.enable and sockets.pipewire are mkDefault in the shared
  modules, sockets.pulse already was.

Every NixOS host's toplevel drvPath is unchanged; on fern and frieren the
terminal font sizes and time zone evaluate to the same values.

Assisted-by: Claude Code (claude-opus-5-5)
2026-11-01 10:14:27 -06:00

74 lines
2.5 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
lib,
myvars,
...
}:
#############################################################
#
# Shoukei - NixOS running on Macbook Pro 2022 M2 16G
#
#############################################################
let
hostName = "shoukei"; # Define your hostname.
in
{
imports = [
./hardware-configuration.nix
./game
# shoukei reuses ai's preservation layout; no host-specific overrides yet
../idols-ai/preservation.nix
];
# 16G on a laptop: heavy derivations go to aquamarine's 96G instead of
# swapping here.
modules.remote-builders.enable = true;
# disable sunshine for security
services.sunshine.enable = false;
# Laptop joins untrusted networks and is never scraped (see youko's
# `offlineHosts`); don't expose :9100, and don't keep the smartctl exporter
# (:9633) running either -- nothing collects it and the laptop isn't a
# long-lived drive to watch.
services.prometheus.exporters.node.enable = lib.mkForce false;
services.prometheus.exporters.smartctl.enable = lib.mkForce false;
# resolvconf restarts nscd on every /etc/resolv.conf rewrite (see
# /etc/resolvconf.conf). Boot network churn exceeds the default start limit
# (5/10s) and latches nscd into `failed`, which also fails nss-lookup.target /
# nss-user-lookup.target; `try-restart` cannot revive it. nscd cannot be
# disabled (NixOS loads NSS modules through it, see nsswitch.nix), so don't
# rate-limit these external restarts and back off on the crash path instead.
systemd.services.nscd = {
startLimitIntervalSec = 0;
serviceConfig = {
RestartSec = "1s";
RestartSteps = 5;
RestartMaxDelaySec = "60s";
};
};
networking = {
inherit hostName;
inherit (myvars.networking) nameservers;
};
modules.networking.mihomo.resolvedIntegration = true;
fileSystems."/btr_pool" = {
device = "/dev/disk/by-uuid/c2e8b249-240e-4eef-bf4e-81e7dbbf4887";
fsType = "btrfs";
options = [ "subvolid=5" ];
};
modules.btrbk.enable = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "25.11"; # Did you read the comment?
}