Commit Graph

3017 Commits

Author SHA1 Message Date
Austin Horstman
6ed09becc7 programs/bash: refresh session variables in interactive shells
Interactive non-login Bash shells now apply the current session
variables file before bashrcExtra and initExtra. New terminals pick up
values changed by home-manager switch.

Login shells skip the refresh because .profile already applied it.
Non-interactive shells skip it because sshd can read .bashrc for remote
commands, where startup output can corrupt protocols such as scp and
rsync.

Apply programs.bash.sessionVariables after generic values to preserve
its precedence. Expansions run on every interactive non-login shell, so
warn when direct self-references can change repeatedly. Declarative
search paths remain stable across repeated sourcing.

A profileExtra assignment that collides with a Home Manager-managed
variable is now overwritten in non-login shells. Move such overrides to
initExtra, which runs after the refresh.

targets.genericLinux no longer needs its separate initExtra source.
2026-09-30 21:06:23 -05:00
Austin Horstman
1553bea9ff home-environment: refresh session vars in shells
Move the once-per-session guard to the final extra-code section. Plain
and search variables can then refresh without rerunning arbitrary code.
Keep the extra body top-level so shell parse behavior stays unchanged.

Use an exported generation token for Zsh. Changes to generic or
Zsh-specific values reapply both layers, while unchanged nested shells
keep Zsh precedence and do not repeat self-references.

Plain values are re-evaluated each time the file is applied. Command
substitutions run again, and some self-references can change repeatedly.
Removing a variable still requires a new session.

Closes #3999
Closes #4559
2026-09-30 21:06:23 -05:00
Austin Horstman
793d075a50 lib/shell: warn on self-referential session variables
Warn when session-variable definitions may change if applied more than
once. Apply the check to home and Zsh session variables without changing
their generated output.

Detect direct references after caller-specific rendering while excluding
stable whole-value expansions. Attribute each warning to the surviving
per-attribute definitions, including their module priorities and wrappers.

This gives users advance notice before later work allows the session
configuration to be applied in new shells. Recommend search-variable
options for path-like values and complete assignments for other values.

Tests cover detector boundaries, Zsh escaping, source attribution, and
both module call sites.
2026-09-30 21:06:23 -05:00
Austin Horstman
04d39635a6 home-environment: merge search variables idempotently
Switches `home.sessionPath` and `home.sessionSearchVariables` from
concatenation to the merge helper added in the previous commit. The
first merge preserves configured-first search order while removing
duplicate entries. Later merge blocks preserve inherited positions.

Entries that expand to an empty string are ignored. Statically empty
entries also produce an evaluation warning so an accidental
current-directory entry does not disappear silently.

Fish gets a native merge helper because babelfish rejects the POSIX
helper's quoted pattern removal, and Fish stores names ending in PATH as
lists. Candidate assignments and merge calls are translated together so
references to earlier search variables observe the same values as the
POSIX file. The native helper also preserves newline-bearing values
through Fish command substitutions.

A shared behavioral fixture sources both generated files for first and
later merges. It covers expansion and escaping, cross-variable
references, unset and empty values, duplicates, separator-bearing
entries, empty fields, Fish list shape, helper cleanup, and leading,
embedded, and trailing newlines.

Removes `prependToVar`, which has no consumers left and produced the
self-referential form this replaces. It was public through
`lib.hm.shell`, so the release notes include migration guidance.
2026-09-30 21:06:23 -05:00
無名氏
fab715cc65 pi-coding-agent: add appendSystem option
Allow configuring APPEND_SYSTEM.md with inline instructions or a file path, following the context option and respecting configDir.
2026-09-30 13:16:34 -05:00
Zexin Yuan
603fbca129 worktrunk: fix skills path after installAgentSkills migration
nixpkgs#558216 switched the worktrunk package to the installAgentSkills
hook, moving the bundled skills from $out/skills/ to
$out/share/skills/worktrunk/.

Assisted-by: Claude-Code:GLM-5.3
Co-authored-by: Austin Horstman <khaneliman12@gmail.com>
2026-09-30 13:15:22 -05:00
Clément DOUIN
7c0c726efe himalaya: bring v2 support 2026-09-30 13:08:34 -05:00
o-az
b75a0703c9 fnox: add module 2026-09-30 16:47:55 +02:00
Austin Horstman
bf3f7a120d astroid: migrate to native JSON settings
Add programs.astroid.settings for native JSON configuration and
generate the configuration file from it.

The extraConfig and externalEditor options become deprecated aliases
into settings. Home Manager no longer writes its bundled template;
Astroid's built-in defaults match it except editor.markdown_processor.
Astroid accounts still supply account settings, the notmuch path, and
the GPG path as per-key defaults. Empty settings write no file.

externalEditor now merges at ordinary priority instead of replacing
the editor keys, and priorities on extraConfig sections apply to the
section as a unit. The release notes describe both changes.
2026-09-30 08:40:10 -05:00
Austin Horstman
d4941d9c8d notmuch: migrate to native INI settings
Add programs.notmuch.settings for native INI configuration with list
values, and generate the configuration file from it.

The new.ignore, new.tags, maildir.synchronizeFlags, search.excludeTags,
and extraConfig options become deprecated aliases into settings.
Settings carry no static defaults: new.tags, new.ignore, and
maildir.synchronize_flags fall back to notmuch's identical defaults.
State versions before 26.11 keep search.exclude_tags = deleted;spam and
write database.path even without email accounts. Enabled email
accounts supply database.path, and notmuch-enabled accounts the user
identity. Null values and empty sections are omitted so a derived
value can be removed.

extraConfig no longer overwrites modeled values unconditionally: forced
definitions win and ordinary collisions fail. The release notes
describe the migration.

Mbsync, lieer, and mujmap now write settings.new.ignore directly, so
they do not trigger deprecation warnings.
2026-09-30 08:23:14 -05:00
Austin Horstman
7d46509d83 borgmatic: migrate backups to native settings
Add programs.borgmatic.backups.<name>.settings for native borgmatic
YAML and generate each backup file from it.

The location, storage, retention, and consistency options and the
section extraConfig options become deprecated aliases into settings.
Warnings name the affected backup. Legacy configurations without
overlapping keys produce the same YAML, and Home Manager symlink
exclusions still append to exclude_from.

Drop the assertions that rejected backups setting both or neither of
sourceDirectories and patterns, so native source patterns and
database-only backups work.
2026-09-30 07:59:27 -05:00
Austin Horstman
31830be4fc borgmatic: omit unspecified check frequency
Consistency checks without a frequency were written as
`frequency: null`, which borgmatic rejects during configuration
validation. Omit null check fields so borgmatic applies its own
default.
2026-09-30 07:59:27 -05:00
ash
b0d0106ef6 difftastic: fix terminal width detection in jujutsu integration 2026-09-29 19:04:11 -05:00
Austin Horstman
6fa0edfe6a zellij: update the plugins example
zellijPlugins.vim-plugins-navigator does not exist; the plugin is
zellijPlugins.vim-zellij-navigator.
2026-09-25 13:02:11 -05:00
Austin Horstman
749b1f4a29 neovim: update the plugins example
vimPlugins.yankring is an alias; the plugin is vimPlugins.YankRing-vim.
2026-09-25 13:02:11 -05:00
Austin Horstman
afe5a94001 vim: update the plugins example
vimPlugins.YankRing does not exist; the plugin is
vimPlugins.YankRing-vim.
2026-09-25 13:02:11 -05:00
Austin Horstman
7957a803d3 thunderbird: update the package example
thunderbird-91 no longer exists; use thunderbird-esr.
2026-09-25 13:02:11 -05:00
Austin Horstman
a431cbf6bd emacs: update the package example
emacs25-nox no longer exists; use emacs-nox.
2026-09-25 13:02:11 -05:00
Austin Horstman
7f8da23ceb offlineimap: update the package example
python3Packages.requests_oauthlib was removed and python3Packages.gpgme
is an alias; the packages are requests-oauthlib and gpg. The example
also extended old.propagatedBuildInputs, which the package does not
set because it lists its Python dependencies in dependencies, so it
failed to evaluate. Extend old.dependencies instead.
2026-09-25 13:02:11 -05:00
Austin Horstman
563b616d79 gnome-shell: update the theme examples
plata-theme was removed from nixpkgs. Use orchis-theme, which ships
share/themes/Orchis/gnome-shell.
2026-09-25 13:02:11 -05:00
Austin Horstman
c11a84c495 pidgin: update the plugins example
The pidgin plugins moved into pkgs.pidginPackages.
2026-09-25 13:02:11 -05:00
Austin Horstman
77beb2db84 borgmatic: update the encryptionPasscommand example
pkgs.password-store does not exist; the password-store package is
pkgs.pass.
2026-09-25 13:02:11 -05:00
Austin Horstman
8a08680362 firefox: update the okular handler example
pkgs.okular no longer exists at the top level; the package is
pkgs.kdePackages.okular.
2026-09-25 13:02:11 -05:00
Austin Horstman
f9d4ef7e2a helix: update the languages example
The example took typescript-language-server and typescript from
pkgs.nodePackages, which nixpkgs removed, and passed --tsserver-path,
which typescript-language-server 5.3.0 rejects as an unknown option,
so the server exited at startup. Run the top-level
typescript-language-server with --stdio only; the nixpkgs package
already falls back to the tsserver from typescript_5.
2026-09-25 13:02:11 -05:00
Austin Horstman
ecca7fc52e mpv: update the package example
pkgs.mpv-unwrapped.wrapper no longer exists. Show the same build through
pkgs.mpv.override, which evaluates against current nixpkgs.
2026-09-25 13:02:11 -05:00
Austin Horstman
7e613901a7 kakoune: update the plugins example
kakounePlugins.kak-fzf is an alias; the plugin is kakounePlugins.fzf-kak.
2026-09-25 13:02:11 -05:00
Austin Horstman
b5199e1094 jetbrains-remote: update the ides example
jetbrains.pycharm-professional was renamed to jetbrains.pycharm.
2026-09-25 13:02:11 -05:00
Austin Horstman
5a1b841d8d gradle: update the package example
nixpkgs removed gradle_7. The default gradle is already gradle_8, so
show gradle_9 as the example of picking another version.
2026-09-25 13:02:11 -05:00
Austin Horstman
190387403f gpg: update the package example
nixpkgs no longer has gnupg23; use gnupg24 as the example instead.
2026-09-25 13:02:11 -05:00
Austin Horstman
0ddbfb5dc0 rbw: suggest gcr_3 for pinentry-gnome3
The pinentry description told users to add pkgs.gcr to
services.dbus.packages, but nixpkgs removed it. Suggest pkgs.gcr_3,
which NixOS uses for pinentry-gnome3.
2026-09-25 13:02:11 -05:00
Austin Horstman
bb785eec22 github-copilot-cli: warn that MCP server values are world-readable
mcp-config.json is generated in the world-readable Nix store, and the
example put an API key in an HTTP header. Remove the key from the
example and document env.<NAME>.file, which Home Manager reads at server
startup for local servers.
2026-09-25 13:01:17 -05:00
Austin Horstman
6406966663 docker-cli: warn that settings are world-readable
config.json is generated in the world-readable Nix store, but the
description did not warn against registry credentials or proxy
passwords. Point at Docker credential stores instead, note that docker
login still reports an error when it adds a registry to the read-only
file, and mention the helper's own store command. Also close the
unterminated link to the config.json reference.
2026-09-25 13:01:17 -05:00
Austin Horstman
9bb0782f16 claude-code: warn that MCP server values are world-readable
Values in mcpServers are serialized into a generated plugin in the
world-readable Nix store, and the example put database credentials in a
DSN and an environment variable. Remove the credentials from the example
and point local servers at the file-backed programs.mcp.servers
environment values.
2026-09-25 13:01:17 -05:00
Austin Horstman
7ae44c33c0 algia: warn that settings are world-readable
The settings example set a Nostr private key, and the generated
config.json is a world-readable Nix store path. Drop the key from the
example and explain the exposure.
2026-09-25 13:01:17 -05:00
Austin Horstman
289607b8d8 aiac: warn that settings are world-readable
The settings example showed a literal api_key, which ends up in
aiac.toml in the world-readable Nix store. aiac expands environment
variables in api_key, so show an environment variable reference
instead.
2026-09-25 13:01:17 -05:00
Austin Horstman
0467f24e31 aerc: warn that the OAuth2 client secret is world-readable
When the matching imapAuth or smtpAuth is oauthbearer or xoauth2, a
non-null client_secret is URL-encoded into the source or outgoing URL
in accounts.conf, which is a world-readable Nix store file. Say so in
the option description.

The access or refresh token does not need to be in that file. The
module sets source-cred-cmd and outgoing-cred-cmd from passwordCommand,
and aerc uses the command's output as the access token, or as the
refresh token when token_endpoint is set. Say that too.
2026-09-25 13:01:17 -05:00
Austin Horstman
166bb6e8e0 abaddon: warn that settings are world-readable
The settings example set a Discord login token, and the generated
abaddon.ini is a world-readable Nix store path. Drop the token from the
example and say so in the description. Abaddon also rewrites
abaddon.ini when it exits, replacing the file Home Manager links, and a
token set from its Discord menu is saved there, so suggest leaving the
option empty when logging in from Abaddon.
2026-09-25 13:01:17 -05:00
Austin Horstman
e3b0881f91 gpg: fix dead documentation link
The publicKeys trust description linked to a GNU Privacy Handbook page
that returns 404. Link the Trust Values chapter of the GnuPG manual,
which lists the same levels.
2026-09-24 10:54:04 -05:00
Austin Horstman
6fc03f541e wezterm: fix dead documentation links
The wezterm documentation moved from wezfurlong.org/wezterm to
wezterm.org, and the old configuration pages return 404. Update the
settings, extraConfig, and colorSchemes links.
2026-09-24 10:54:04 -05:00
Austin Horstman
0bc4586cba vinegar: link the configuration keys
The settings description linked to vinegarhq.org/Configuration/, which
returns 404. Link the config package in the vinegar repository, which
defines the configuration keys.
2026-09-24 10:54:04 -05:00
Austin Horstman
4404e29fc1 alistral: fix dead documentation link
The settings description linked to the config page of the old
documentation site, which returns 404. The current site documents the
config.json keys on its configuration schema page, so link that.
2026-09-24 10:54:04 -05:00
Austin Horstman
352644a82f rio: fix dead documentation link
The settings description linked to the old raphamorim.io documentation,
which returns 404. Link the configuration page on rioterm.com.
2026-09-24 10:54:04 -05:00
Austin Horstman
fcdbef3dfe numbat: fix dead documentation link
The settings description linked to doc/cli-customization.html, which
returns 404. Link the current CLI customization page.
2026-09-24 10:54:04 -05:00
Austin Horstman
d6ebbfae7e oh-my-posh: fix dead documentation link
The settings description linked to docs/configuration/overview, which
returns 404. Link the configuration introduction page.
2026-09-24 10:54:04 -05:00
Austin Horstman
7678c2f639 rmpc: fix dead documentation link
The config description linked to the old GitHub Pages documentation,
which returns 404. Link the configuration page on rmpc.mierak.dev.
2026-09-24 10:54:04 -05:00
Austin Horstman
f82cb692c2 halloy: fix dead documentation link
The themes description linked to themes/index.html, which returns 404.
Link the themes page at its current URL.
2026-09-24 10:54:04 -05:00
Austin Horstman
c605130dd0 flashspace: fix dead documentation links
The settings and profiles descriptions linked to
wojciech-zurek/FlashSpace, which returns 404. The project lives at
wojciech-kulik/FlashSpace, the nixpkgs homepage, so link that
repository.
2026-09-24 10:54:04 -05:00
Austin Horstman
f7a03cd4b8 fresh-editor: fix dead documentation link
The settings description linked to docs/USER_GUIDE.md in the fresh
repository, which returns 404. Link the configuration page on
getfresh.dev.
2026-09-24 10:54:04 -05:00
Austin Horstman
7ddd11d13d zk: fix dead documentation link
The settings description linked docs/config.md in the zk repository,
which returns 404 because the configuration docs moved into
docs/config/. Link the configuration file page on the zk documentation
site.
2026-09-24 10:54:04 -05:00
Austin Horstman
0e954cb8fc i3status-rust: fix dead documentation link
The blocks description linked to blocks.md in the repository, which
returns 404. Link the blocks reference on the project documentation
site.
2026-09-24 10:54:04 -05:00