Before this change, a warning would be printed to the console if you
tried to manage a file in a path containing a space. For example,
`vscodium`'s `userSettings` file on Darwin is at
`~/Library/Application Support/VSCodium/User/settings.json`.
Rationale:
As of release 1.1.2[1], the configuration ini file supports
declaration of the `[main]` header as an alternative to global
properties by enumerating all sections and mapping each to the
respective parsing function. Global properties will still be parsed
correctly by fnott however generation adds unnecessary complexity to
the module. This commit removes the need for global properties
generation.
Changes:
- Fixed the FIXME at L118.
- Cleaned up unneeded let bindings.
- Changed the generation method to use the `pkgs.formats.ini` from
pkgs-lib instead of the raw `generators` library. This was done for
consistency and clarity as the `pkgs.formats.ini` is still required
for type declaration and uses `generators` internally.
- Removed `global-properties` testcase.
- Updated `example-settings` testcase.
[1] - https://codeberg.org/dnkl/fnott/releases/tag/1.1.2
As discussed in this issue:
https://github.com/NixOS/nixpkgs/issues/140879
`types.anything` was never meant to be used for arbitrary modules.
Co-authored-by: Silvan Mosberger <github@infinisil.com>
This commit introduces the `nixpkgs-disabled` module, that is
basically a mock of `nixpkgs` module where any value different from
`null` will cause an assertion error.
This is to help debugging cases where `home-manager.useGlobalPkgs` is
set to `true` and `nixpkgs.*` options are being used.
Nowadays this returns the following error:
```
error: The option `home-manager.users.<user>.nixpkgs` does not exist.
```
This will change too:
```
error: `nixpkgs` options are disabled when `home-manager.useGlobalPkgs` is enabled.
```
That will direct the user to the correct solution (either removing
`nixpkgs` or disable `home-manager.useGlobalPkgs`).
Having either argument defined based on the OS is a problem when
trying to write generic Nix code.
The current workaround is to use accept both and specify a default
value for each argument:
```
{ config, lib, nixosConfig ? {}, darwinConfig ? {}, ... }:
let
osConfig = nixosConfig // darwinConfig;
in
{
# Do something with `osConfig`
}
```
With this commit, it becomes possible to do the following:
```
{ config, lib, osConfig, ... }:
{
# Do something with `osConfig`
}
```
- Add NIXPKGS_REV, so we can pass arbitrary revisions for testing (for
example, `release-21.05` so we can test backports).
- Add format target, that calls the format script.
nnn is a terminal file manager.
It is configured mostly using environment variables, so the way I
found it to avoid needing to write either shell specific code or
using `home.sessionVariables` (that would need to make the user
relogin at every configuration change) is to wrap the program using
`wrapProgram`.
This is to better integrate with more advanced shell history managers
like McFly and Atuin. By initializing fzf first, we allow the history
managers to steal the C-r key binding from fzf.
This commit adds a module for configuring atuin, a replacement shell
history program.
The module adds options for generating atuin's `config.toml` from Nix,
and options to enable atuin's integration for bash and zsh
(which will rebind history keys to open the atuin history).