Didn't fail even with incorrect assertion. Multi line string for
assertFileContains didn't properly work. Don't want to manage an entire
zsh config file in assertFileContent so just multi step asserting the
generated file.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Add `mutableUserDebug` and `userDebug` options to generate `debug.json` file.
The options are heavily inspired by `mutableUserTasks` and `userTasks` options implementation.
Closes#8091
When passing `gpg.publicKeys` a `source` including _multiple_ keys,
only the first one in `source` will have `trust` set correctly.
This commit fixes the issue and adds a corresponding test
(failing without the patch, fixed with it).
- added a test to the standalone-basics unit: the option subcommand queries the `home.username` value and ensures that something sane is returned.
details:
- the option subcommand was broken by upstream changes to the `nixos-option` command.
- hm had no tests for the option subcommand, so the problem was discovered by users.
- output from nixos-option probably starts with 'Value:\n "alice"', but we're only looking for 'alice' because the output format is not guaranteed.
- calls nix-instatiate instead of nixos-option (using nix-option's underlying nix script).
- loops over options to display since nixos-option can only process a single option.
- passes through the --recursive flag from nixos-option. and includes --help and man page for the flag.
details:
nixos-option was changed from a C++ command to a shell script that feeds a nix script (with arguments) to nix-instatiate. in the process, the --config_expr and --options_expr we once passed to nixos-option were removed.
without changing the nixos-option shell script, we have no may to override the arguments to the nixos-option nix script.
luckily, we can use our modulesExpr as a direct argument to the new nixos-option nix script.
unluckily, the nix script does not accept multiple options per instantiation. so we are also looping through the given options ourselves and feeding them each to nixos-option's nix script.
the nixos-option shell and nix scripts are in different places in the nix store, so we have to search the store for the nix script given the location of the shell script.
also, the nixos-option nix script wants a 'recursive' flag, so we now honor that flag for the home-manager option subcommand.
Add an option to set rclone's log-level per mount:
programs.rclone.remotes.<name>.mounts.<name>.logLevel = "DEBUG";
If no value is set, it'll use rclone's implicit default ("NOTICE")
Previously, the debug log-level got enforced (via "-vv"),
which caused noisy logs, and there was no easy way to change that.
Note: rclone global-flags can't be configured in the config file,
so this uses the environment variable approach.
references:
- https://rclone.org/docs/#logging
- https://rclone.org/docs/#v-vv-verbose
If no value is given, use the implicit default of rclone instead of redefining it through the options
Ensure NIX_CONFIG is correctly configured for the tests command.
It is possible that someone may enable experimental features on an
ad-hoc basis, e.g. via the `--extra-experimental-features` CLI flag.
In this scenario, the tests script cannot assume they are already
enabled.
In the future, we may also wish to configure other things, like extra
binary substitutors.
Extract the `tests` package from `flake.nix` into its own file
`tests/package.nix`.
This a) de-couples it from the flake (to a degree) and b) allows more
neatly using the callPackage pattern.
This adds a new backupCommand option to allow users to specify a
custom command to run on existing files during activation, as an
alternative to the existing backupFileExtension mechanism.
Adds backupCommand option to NixOS and nix-darwin modules.
Exports HOME_MANAGER_BACKUP_COMMAND environment variable when set.
Updates file activation logic to use the custom backup command if
provided, falling back to the existing backup extension logic.
Updates collision checking and user-facing instructions to
mention the new option.
This enables advanced backup workflows, such as moving files to
trash or archiving with custom tools, before managing them with
Home Manager.