Misc no-hit rules that we already are in compliance with. Ignoring
`faster_` rules because those prefer builtin > lib and we have lib
compat behavior to prefer.
Enable statix's collapsible_let_in rule and apply its auto-fixes in the podman linux modules.
This keeps the ratchet focused on one auto-fixable warning at a time.
This change converts redundant attribute assignments of the form `a =
a;` or `a = someSet.a;` into cleaner `inherit` statements. This reduces
verbosity and follows common Nix style for bringing attributes into
scope.
Statix Codes: W03 (manual_inherit), W04 (manual_inherit_from)
Also include statix and the rule in our configuration.
The current behavior of `home.file` is inconsistent when handling
recursive file with another, overlapping, non-recursive file.
Specifically, consider a configuration
```nix
home.file = {
"foo" = { source = ./foo; recursive = true; };
"foo/bar".text = "some other file";
};
```
where `./foo` is a directory containing a file `bar`. Switching to
this configuration will result in the `./foo` directory being
recursively symlinked while the "foo/bar" entry is ignored. Note,
building the home files derivation does log
> File conflict for file 'foo/bar'
On the other hand, the supposedly equivalent configuration
```nix
home.file = {
"foo" = { source = ./foo; recursive = true; };
abc = { target = "foo/bar"; text = "some other file"; };
};
```
results in the `./foo` directory not being recursively symlinked,
i.e., only the file `foo/bar` shows up in the built configuration.
This time the home files build log contains
> File conflict for file 'foo'
This commit makes the behavior more consistent in that we always
handle the file in a unified manner. The conflict resolution is
offered in three flavors, "ignore", "error", and "override" indicating
whether the recursively symlinked file wins, the entire build errors
out, and the regularly symlinked file wins.
The current default is "ignore" since it is the resolution that most
closely matches the current behavior, at least when the file attribute
name is used as the target path.
The other two resolutions can be chosen by setting the
`home.fileOverlapResolution` option, which is set as invisible due to
its experimental nature.
When both system-level (e.g., NixOS programs.tmux) and home-manager
tmux configs set newSession = true, tmux would create two sessions
on startup since both /etc/tmux.conf and ~/.config/tmux/tmux.conf
contain the new-session command.
Change new-session to new-session -A -s 0, which attaches to session
"0" if it exists, otherwise creates it. This makes the command
idempotent so multiple configs can safely enable newSession.
Add a `settings` option that allows WezTerm to be configured
declaratively using a Nix attribute set. Settings are serialized to
Lua using `lib.generators.toLua`. Raw Lua expressions such as
`wezterm.font` and `wezterm.action.*` can be embedded using
`lib.generators.mkLuaInline`.
When `settings` is set, `extraConfig` is still supported. It is
wrapped in an immediately invoked function expression so that any
`return` statement (including the common `return {}` and
`return config` patterns) is captured and merged on top of the
generated settings, preserving full backward compatibility.
The merge between `settings` and `extraConfig` is shallow: a key
returned from `extraConfig` replaces the entire corresponding value
from `settings`, including nested tables and arrays.
Closes#6047
Add StartLimitIntervalSec and StartLimitBurst configuration to the
Syncthing systemd unit. This prevents Syncthing restarting indefinitely
if it hits a bug such as NixOS/nixpkgs#502836.
The values here are taken from the values provided in the upstream
Syncthing example systemd unit[0].
[0]: 1a3cbca017/etc/linux-systemd/user/syncthing.service
Passing a large number of packages (e.g. all of home.packages) to
defaultApplicationPackages causes slow builds because every .desktop
file in every listed package is scanned at build time. Add a note
warning users to list only the specific packages they need.
OpenCode v1.2.15 introduced a separate tui.json file for TUI-specific
settings, deprecating theme/keybinds in config.json.
Changes:
- Add programs.opencode.tui option for TUI settings
- Generate separate ~/.config/opencode/tui.json with proper schema
- Add deprecation warnings for theme/keybinds in settings
- Add tests for new functionality
- Fix existing tests that used deprecated theme in settings
See: https://opencode.ai/docs/config#tui
Release: https://github.com/anomalyco/opencode/releases/tag/v1.2.15
Co-authored-by: Thierry Delafontaine <delafthi@pm.me>
`$SSH_AUTH_SOCK` must not be set unconditionally through
'home.sessionVariables' since its value needs to be preserved if it
stems from a forwarded SSH agent. Hence, this commit establishes a
centralized, internal 'ssh_auth_sock.initialization' option for setting
`$SSH_AUTH_SOCK`. It checks whether its value has to be preserved and
injects the initialization code into the proper
'programs.(bash|fish|nushell|zsh).*' options.
This commit introduces a new option for the Opencode web service to
allow configuring an environment file so that we can safely specify an
`OPENCODE_SERVER_PASSWORD` environment variable to secure access to the
service without exposing the secret to the Nix store.