mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-29 09:42:33 +01:00
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)
This commit is contained in:
1 parent
4bd428776e
commit
e4c2548a93
18 files changed
+31
-31
No files matched your search
@@ -1,6 +1,7 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
# Set your time zone.
|
||||
time.timeZone = "Asia/Shanghai";
|
||||
# Set your time zone. A default: the computer-use VMs match their proxy region.
|
||||
time.timeZone = lib.mkDefault "Asia/Shanghai";
|
||||
|
||||
# English is the default. Chinese overrides only the categories where the
|
||||
# en_US default is factually wrong for China (metric, A4, CNY); everything
|
||||
|
||||
@@ -33,10 +33,11 @@ in
|
||||
publish-addresses = true;
|
||||
publish-domain = true;
|
||||
};
|
||||
# The nixpkgs sunshine module still sets these legacy options. Force them
|
||||
# to null so settings.publish above is the only source of truth.
|
||||
publish.enable = lib.mkForce null;
|
||||
publish.userServices = lib.mkForce null;
|
||||
# The nixpkgs sunshine module still sets these legacy options (with
|
||||
# mkDefault). Reset them to null so settings.publish above is the only
|
||||
# source of truth.
|
||||
publish.enable = null;
|
||||
publish.userServices = null;
|
||||
};
|
||||
|
||||
# avahi and systemd-resolved both run an mDNS responder, which makes mDNS
|
||||
|
||||
@@ -40,7 +40,7 @@ in
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
# Match the proxy's exit region.
|
||||
time.timeZone = lib.mkForce timeZone;
|
||||
time.timeZone = timeZone;
|
||||
|
||||
# Browsers keep their profile/preferences in dconf.
|
||||
programs.dconf.enable = true;
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
|
||||
config = {
|
||||
# disable backups in the VM
|
||||
modules.btrbk.enable = lib.mkForce false;
|
||||
modules.btrbk.enable = false;
|
||||
|
||||
# VM guest: no physical hardware to inspect.
|
||||
modules.hardwareTools.enable = lib.mkForce false;
|
||||
modules.hardwareTools.enable = false;
|
||||
|
||||
boot.growPartition = true;
|
||||
boot.kernelParams = [ "console=ttyS0" ];
|
||||
@@ -30,7 +30,7 @@
|
||||
services.qemuGuest.enable = true; # qemu-guest-agent
|
||||
services.openssh.enable = true;
|
||||
# we configure the host via nixos itself, so we don't need the cloud-init
|
||||
services.cloud-init.enable = lib.mkForce false;
|
||||
services.cloud-init.enable = false;
|
||||
# Default so the NixOS test framework can override it: test-instrumentation
|
||||
# disables this getty to keep ttyS0 free for its backdoor console.
|
||||
systemd.services."serial-getty@ttyS0".enable = lib.mkDefault true;
|
||||
|
||||
Reference in new issue
Block a user