Tier A removals — small, half-wired modules nobody had asked for: - makima (Copilot-key remapper): drop core/system/makima.nix, the features/apps/makima/ keyboard.toml, the nomarchy-restart-makima script, the `nomarchy.system.features.makima` option, the state-file binding, the import in core/system/default.nix, and the "Key Remapping" entry in nomarchy-menu. ~50 LoC + a service nobody asked for. - Typora theme dir (core/home/config/Typora/) — Typora is a paid tool Nomarchy doesn't even ship; the SUPER+SHIFT+W keybinding pointed at a binary that wasn't on PATH. - xournalpp settings (core/home/config/xournalpp/) — referenced /usr/share paths that don't exist on NixOS. - core/home/config/environment.d/fcitx.conf — manual env vars are redundant once fcitx5 routes through NixOS's i18n.inputMethod. Optionalization — three half-wired features now sit behind explicit toggles, all default off (except keyring which keeps its existing default-on): - nomarchy.system.inputMethod.enable: new core/system/input-method.nix uses NixOS's i18n.inputMethod with fcitx5 + mozc/chinese/table addons. Drops the Hyprland exec-once line — i18n.inputMethod handles autostart. - nomarchy.system.voxtype.enable: marker option for users who install voxtype out-of-band (it's not in nixpkgs). Today it just documents intent; the existing keybinding + waybar widget no-op gracefully. - nomarchy.apps.opencode.enable: gates the existing features/apps/opencode/default.nix xdg.configFile so the opencode config only deploys when the user opts in. Installer: - system.nix and home.nix templates now surface the new toggles in their "Optional Nomarchy modules" comment blocks. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
119 lines
3.4 KiB
Nix
119 lines
3.4 KiB
Nix
{ lib, ... }:
|
|
|
|
{
|
|
options.nomarchy.system = {
|
|
dns = lib.mkOption {
|
|
type = lib.types.enum [ "Cloudflare" "Google" "DHCP" "Custom" ];
|
|
default = "DHCP";
|
|
description = "Selected DNS provider.";
|
|
};
|
|
customDns = lib.mkOption {
|
|
type = lib.types.listOf lib.types.str;
|
|
default = [];
|
|
description = "List of custom DNS servers.";
|
|
};
|
|
wifi = {
|
|
powersave = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = true;
|
|
description = "Whether to enable wifi power saving.";
|
|
};
|
|
};
|
|
timezone = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "UTC";
|
|
description = "System timezone.";
|
|
};
|
|
features = {
|
|
fingerprint = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
description = "Whether to enable fingerprint support.";
|
|
};
|
|
fido2 = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
description = "Whether to enable FIDO2 support.";
|
|
};
|
|
hybridGPU = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
description = "Whether to enable hybrid GPU support (supergfxd).";
|
|
};
|
|
};
|
|
theme = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "summer-night";
|
|
description = "Selected system theme.";
|
|
};
|
|
|
|
# ----- Tier 1 system features (all opt-in, no behavioural change off) ---
|
|
|
|
snapper = {
|
|
enable = lib.mkEnableOption ''
|
|
Snapper-driven BTRFS timeline snapshots of `/`. Auto-disables when
|
|
`/` isn't BTRFS. Includes a `nixos-rebuild-snap` wrapper that takes
|
|
a "Pre-rebuild" snapshot before each switch.
|
|
'';
|
|
};
|
|
|
|
hibernation = {
|
|
enable = lib.mkEnableOption ''
|
|
suspend-then-hibernate (lid close, idle, power button). NOTE: this
|
|
requires a disk swap device or swapfile sized to at least RAM —
|
|
zRAM alone is not enough.
|
|
'';
|
|
idleMinutes = lib.mkOption {
|
|
type = lib.types.int;
|
|
default = 30;
|
|
description = "Idle minutes before suspend-then-hibernate fires.";
|
|
};
|
|
};
|
|
|
|
containers = {
|
|
enable = lib.mkEnableOption ''
|
|
Rootless Podman with Docker compatibility (`docker` → `podman`),
|
|
plus podman-compose, podman-tui and dive.
|
|
'';
|
|
};
|
|
|
|
virtualization = {
|
|
libvirt = {
|
|
enable = lib.mkEnableOption ''
|
|
libvirt daemon + virt-manager + OVMF. The user must be in the
|
|
`libvirtd` group.
|
|
'';
|
|
};
|
|
};
|
|
|
|
keyring = {
|
|
enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = true;
|
|
description = ''
|
|
Auto-unlock GNOME Keyring at SDDM/Hyprland login and route SSH
|
|
keys through `gcr-ssh-agent`. Default on — near-universal QoL
|
|
improvement.
|
|
'';
|
|
};
|
|
};
|
|
|
|
inputMethod = {
|
|
enable = lib.mkEnableOption ''
|
|
fcitx5 input method (CJK / IME). Wires NixOS's i18n.inputMethod and
|
|
autostarts fcitx5-daemon. Adds a small footprint when enabled, so
|
|
most users want this off.
|
|
'';
|
|
};
|
|
|
|
voxtype = {
|
|
enable = lib.mkEnableOption ''
|
|
voxtype voice-typing integration. NOTE: voxtype is not packaged in
|
|
nixpkgs — when enabled, install voxtype yourself (e.g. via
|
|
`home.packages = [ (pkgs.callPackage … {}) ]`). With this off the
|
|
SUPER+CTRL+X keybinding and waybar widget are no-ops.
|
|
'';
|
|
};
|
|
};
|
|
}
|