From 714d4e676875511315e84276e35ec9c86192b855 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 12 Jul 2026 22:39:06 +0000 Subject: [PATCH] Format Nix files to treefmt style; exclude generated hardware config - alejandra-style brackets/attrset explosion across modules, host and home configs; deadnix-clean argument patterns (drop unused config, unused input destructurings in flake.nix) - exclude hosts/*/hardware-configuration.nix from treefmt so the nixos-generate-config output stays byte-identical Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01E4e3bQXGCUHnhaXoMJk6yE --- flake.nix | 2 -- home/mollyw.nix | 60 ++++++++++++++++++++++++++----------- hosts/chi/configuration.nix | 15 +++++++--- modules/common.nix | 12 ++++---- treefmt.nix | 4 ++- 5 files changed, 62 insertions(+), 31 deletions(-) diff --git a/flake.nix b/flake.nix index 7ab252d..b173205 100644 --- a/flake.nix +++ b/flake.nix @@ -36,9 +36,7 @@ self, nixpkgs, home-manager, - agenic-journal, agenix, - firefox-addons, plasma-manager, treefmt-nix, ... diff --git a/home/mollyw.nix b/home/mollyw.nix index 457963b..e684e0a 100644 --- a/home/mollyw.nix +++ b/home/mollyw.nix @@ -1,11 +1,10 @@ { inputs, lib, - config, pkgs, ... }: { - imports = [ ]; + imports = []; home = { username = "mollyw"; @@ -115,18 +114,28 @@ enable = true; autosuggestion.enable = true; syntaxHighlighting.enable = true; - history = { size = 50000; ignoreDups = true; share = true; }; + history = { + size = 50000; + ignoreDups = true; + share = true; + }; }; starship.enable = true; # Part J: direnv + nix-direnv - direnv = { enable = true; nix-direnv.enable = true; }; + direnv = { + enable = true; + nix-direnv.enable = true; + }; # Part J: Shell QoL fzf.enable = true; zoxide.enable = true; bat.enable = true; - eza = { enable = true; icons = "auto"; }; + eza = { + enable = true; + icons = "auto"; + }; # Part J: btop btop = { @@ -151,11 +160,26 @@ programs.plasma = { enable = true; fonts = { - general = { family = "ComicShannsMono Nerd Font"; pointSize = 10; }; - fixedWidth = { family = "ComicShannsMono Nerd Font Mono"; pointSize = 10; }; - toolbar = { family = "ComicShannsMono Nerd Font"; pointSize = 10; }; - menu = { family = "ComicShannsMono Nerd Font"; pointSize = 10; }; - windowTitle = { family = "ComicShannsMono Nerd Font"; pointSize = 10; }; + general = { + family = "ComicShannsMono Nerd Font"; + pointSize = 10; + }; + fixedWidth = { + family = "ComicShannsMono Nerd Font Mono"; + pointSize = 10; + }; + toolbar = { + family = "ComicShannsMono Nerd Font"; + pointSize = 10; + }; + menu = { + family = "ComicShannsMono Nerd Font"; + pointSize = 10; + }; + windowTitle = { + family = "ComicShannsMono Nerd Font"; + pointSize = 10; + }; }; workspace.wallpaper = "${../wallpapers/catppuccin-mocha.png}"; configFile.kdeglobals.General.TerminalApplication = "ghostty"; @@ -168,7 +192,7 @@ # opencode configuration with Kimi OAuth plugin xdg.configFile."opencode/opencode.json".text = builtins.toJSON { "$schema" = "https://opencode.ai/config.json"; - plugin = [ "opencode-kimi-full" ]; + plugin = ["opencode-kimi-full"]; provider = { "kimi-for-coding-oauth" = { name = "Kimi For Coding (OAuth)"; @@ -182,16 +206,16 @@ attachment = true; reasoning = true; modalities = { - input = [ "text" "image" ]; - output = [ "text" ]; + input = ["text" "image"]; + output = ["text"]; }; options = {}; variants = { - off = { reasoning_effort = "off"; }; - auto = { reasoning_effort = "auto"; }; - low = { reasoning_effort = "low"; }; - medium = { reasoning_effort = "medium"; }; - high = { reasoning_effort = "high"; }; + off = {reasoning_effort = "off";}; + auto = {reasoning_effort = "auto";}; + low = {reasoning_effort = "low";}; + medium = {reasoning_effort = "medium";}; + high = {reasoning_effort = "high";}; }; }; }; diff --git a/hosts/chi/configuration.nix b/hosts/chi/configuration.nix index afe1479..e62df78 100644 --- a/hosts/chi/configuration.nix +++ b/hosts/chi/configuration.nix @@ -1,5 +1,9 @@ -{ config, pkgs, inputs, ... }: { - imports = [ ./hardware-configuration.nix ]; +{ + pkgs, + inputs, + ... +}: { + imports = [./hardware-configuration.nix]; # Bootloader boot.loader.systemd-boot.enable = true; @@ -15,7 +19,10 @@ services.xserver.enable = true; services.displayManager.sddm.enable = true; services.desktopManager.plasma6.enable = true; - services.xserver.xkb = { layout = "us"; variant = ""; }; + services.xserver.xkb = { + layout = "us"; + variant = ""; + }; # Printing services.printing.enable = true; @@ -35,7 +42,7 @@ isNormalUser = true; description = "Molly Wunderlich"; shell = pkgs.zsh; - extraGroups = [ "networkmanager" "wheel" ]; + extraGroups = ["networkmanager" "wheel"]; packages = with pkgs; [ # Add user-specific packages here ]; diff --git a/modules/common.nix b/modules/common.nix index 3a359f7..7c491c1 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -1,6 +1,6 @@ -{ config, pkgs, ... }: { +{pkgs, ...}: { # Nix settings - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = ["nix-command" "flakes"]; nix.settings.auto-optimise-store = true; # Locale @@ -30,9 +30,9 @@ noto-fonts-emoji ]; fonts.fontconfig.defaultFonts = { - serif = [ "ComicShannsMono Nerd Font" ]; - sansSerif = [ "ComicShannsMono Nerd Font" ]; - monospace = [ "ComicShannsMono Nerd Font Mono" ]; - emoji = [ "Noto Color Emoji" ]; + serif = ["ComicShannsMono Nerd Font"]; + sansSerif = ["ComicShannsMono Nerd Font"]; + monospace = ["ComicShannsMono Nerd Font Mono"]; + emoji = ["Noto Color Emoji"]; }; } diff --git a/treefmt.nix b/treefmt.nix index c840226..4acba65 100644 --- a/treefmt.nix +++ b/treefmt.nix @@ -1,6 +1,8 @@ -{ ... }: { +_: { projectRootFile = "flake.nix"; programs.alejandra.enable = true; programs.statix.enable = true; programs.deadnix.enable = true; + # generated by nixos-generate-config; keep byte-identical + settings.global.excludes = ["hosts/*/hardware-configuration.nix"]; } -- 2.51.2