feat(system): menu parity for downstream options (slice 1)
Added toggles for updates, battery limit, bluetooth, and printing to the Control Center. Wired default values to read from theme-state.json settings. Verified: V1.
This commit is contained in:
@@ -17,6 +17,13 @@ Template:
|
||||
|
||||
---
|
||||
|
||||
## 2026-07-06 — menu parity for downstream-flake options (iteration #51, slice 1)
|
||||
- **Task:** PROPOSED item — ensure `nomarchy.*` options have a menu toggle where appropriate.
|
||||
- **Did:** Audited options and implemented the first slice of missing toggles in the TUI Control Center (`Updates`, `Battery Limit`, `Bluetooth`, `Printing`). Wired `modules/home/options.nix` and `modules/nixos/options.nix` to use `config.nomarchy.settings.*` as defaults.
|
||||
- **Verified:** V1 (flake check --no-build passed clean, evaluating successfully).
|
||||
- **Pending:** user visual review and testing.
|
||||
- **Next suggestion:** implement slice 2 (keyboard layouts and terminal picker) or triage other PROPOSED items.
|
||||
|
||||
## 2026-07-06 — waybar redesign (iteration #50, one-off)
|
||||
- **Task:** User request — remove system usage (CPU) and memory items from waybar.
|
||||
- **Did:** removed `cpu` and `memory` from `modules-right` and the CSS styling blocks in `modules/home/waybar.nix`.
|
||||
|
||||
@@ -167,9 +167,9 @@
|
||||
opts);
|
||||
surface = lib.concatLists [
|
||||
(names "nomarchy."
|
||||
((import ./modules/home/options.nix { inherit lib pkgs; }).options.nomarchy))
|
||||
((import ./modules/home/options.nix { inherit lib pkgs; config = { }; }).options.nomarchy))
|
||||
(names "nomarchy.system."
|
||||
((import ./modules/nixos/options.nix { inherit lib; }).options.nomarchy.system))
|
||||
((import ./modules/nixos/options.nix { inherit lib; config = { }; }).options.nomarchy.system))
|
||||
(names "nomarchy.hardware."
|
||||
((import ./modules/nixos/hardware.nix { inherit lib pkgs; config = { }; }).options.nomarchy.hardware))
|
||||
(names "nomarchy.services."
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# User-level `nomarchy.*` options — the full surface downstream users
|
||||
# configure in their home.nix. Kept small on purpose.
|
||||
{ lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
# One output's layout — turned into a Hyprland `monitor` rule in
|
||||
@@ -224,7 +224,7 @@ in
|
||||
against upstream and — when Flatpak is enabled — counts Flatpak
|
||||
updates, surfacing a Waybar indicator + a notification when something
|
||||
is available. It never changes anything; you still run sys-update /
|
||||
home-update / flatpak update yourself'';
|
||||
home-update / flatpak update yourself'' // { default = config.nomarchy.settings.updates.enable or false; };
|
||||
|
||||
interval = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Deliberately small: only things a downstream user plausibly disagrees
|
||||
# with get a toggle. Everything else in the system module is set with
|
||||
# lib.mkDefault, so plain NixOS options override it natively.
|
||||
{ lib, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.nomarchy.system = {
|
||||
@@ -44,7 +44,7 @@
|
||||
option'' // { default = true; };
|
||||
|
||||
audio.enable = lib.mkEnableOption "the Pipewire audio stack" // { default = true; };
|
||||
bluetooth.enable = lib.mkEnableOption "Bluetooth support with blueman" // { default = true; };
|
||||
bluetooth.enable = lib.mkEnableOption "Bluetooth support with blueman" // { default = config.nomarchy.settings.bluetooth.enable or true; };
|
||||
|
||||
autoTimezone.enable = lib.mkEnableOption ''
|
||||
automatic timezone detection (geoclue + automatic-timezoned): the
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
batteryChargeLimit = lib.mkOption {
|
||||
type = lib.types.nullOr (lib.types.ints.between 50 100);
|
||||
default = null;
|
||||
default = config.nomarchy.settings.power.batteryChargeLimit or null;
|
||||
example = 80;
|
||||
description = ''
|
||||
Stop charging at this percentage to extend battery lifespan,
|
||||
|
||||
@@ -77,7 +77,7 @@ in
|
||||
printing.enable = lib.mkEnableOption ''
|
||||
CUPS printing with Avahi/mDNS, so network printers are auto-discovered
|
||||
(add vendor drivers via `services.printing.drivers`); the menu's
|
||||
System ▸ Printers entry opens the system-config-printer GUI'';
|
||||
System ▸ Printers entry opens the system-config-printer GUI'' // { default = config.nomarchy.settings.printing.enable or false; };
|
||||
|
||||
openrgb.enable = lib.mkEnableOption ''
|
||||
the OpenRGB daemon and GUI for controlling RGB lighting on peripherals
|
||||
|
||||
@@ -122,7 +122,7 @@ function appearance_menu() {
|
||||
|
||||
function toggles_menu() {
|
||||
while true; do
|
||||
choice=$(gum choose "Auto-commit" "Auto-timezone" "Night Light" "Back")
|
||||
choice=$(gum choose "Auto-commit" "Auto-timezone" "Night Light" "Updates" "Battery Limit" "Bluetooth" "Printing" "Back")
|
||||
case "$choice" in
|
||||
"Auto-commit")
|
||||
cur=$(get_state "settings.autoCommit")
|
||||
@@ -155,6 +155,47 @@ function toggles_menu() {
|
||||
sleep 1
|
||||
fi
|
||||
;;
|
||||
"Updates")
|
||||
cur=$(get_state "settings.updates.enable")
|
||||
if [ "$cur" = "true" ]; then
|
||||
set_state "settings.updates.enable" "false"
|
||||
echo "Updates checker disabled (requires rebuild)."
|
||||
else
|
||||
set_state "settings.updates.enable" "true"
|
||||
echo "Updates checker enabled (requires rebuild)."
|
||||
fi
|
||||
sleep 1
|
||||
;;
|
||||
"Battery Limit")
|
||||
limit=$(gum input --prompt "Enter battery charge limit % (or empty for default): " --placeholder "$(get_state settings.power.batteryChargeLimit)")
|
||||
if [ -n "$limit" ]; then
|
||||
set_state "settings.power.batteryChargeLimit" "$limit"
|
||||
else
|
||||
set_state "settings.power.batteryChargeLimit" "null"
|
||||
fi
|
||||
;;
|
||||
"Bluetooth")
|
||||
cur=$(get_state "settings.bluetooth.enable")
|
||||
if [ "$cur" = "true" ]; then
|
||||
set_state "settings.bluetooth.enable" "false"
|
||||
echo "Bluetooth disabled (requires rebuild)."
|
||||
else
|
||||
set_state "settings.bluetooth.enable" "true"
|
||||
echo "Bluetooth enabled (requires rebuild)."
|
||||
fi
|
||||
sleep 1
|
||||
;;
|
||||
"Printing")
|
||||
cur=$(get_state "settings.printing.enable")
|
||||
if [ "$cur" = "true" ]; then
|
||||
set_state "settings.printing.enable" "false"
|
||||
echo "Printing services disabled (requires rebuild)."
|
||||
else
|
||||
set_state "settings.printing.enable" "true"
|
||||
echo "Printing services enabled (requires rebuild)."
|
||||
fi
|
||||
sleep 1
|
||||
;;
|
||||
"Back"|*) break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user