Describe the bug
I'm working on a home-manager module, where I now want to rename
programs.firefox.profiles.<name>.privacy.enableSettings
to
programs.firefox.profiles.<name>.privacy.settings.enable
The problem is, that list of submodules.
I tried to add
imports = [
(mkRenamedOptionModule
[ "privacy" "enableSettings" ]
[ "privacy" "settings" "enable" ])
];
to the programs.firefox.profiles.<name>
module, but that causes the error
warning: Git tree '/home/user/dotfiles' is dirty
warning: Git tree '/home/user/dotfiles' is dirty
error: --- ThrownError ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ nix-build
The option `programs.firefox.profiles.main.warnings' defined in `/home/user/dotfiles/nur-packages/hm-modules/programs/firefox-privacy.nix' does not exist.
(use '--show-trace' to show detailed location information)
There are 135 unread and relevant news items.
Read them by running the command 'home-manager news'.
because each submodule doesn't have a separate warning system.
Obviously doing
imports = [
(mkRenamedOptionModule
[ "programs" "firefox" "profiles" "privacy" "enableSettings" ]
[ "programs" "firefox" "profiles" "privacy" "settings" "enable" ])
];
doesn't work either, because it's missing the profile name.
To Reproduce
Try to rename a suboption in an option of type types.attrsOf (types.submodule ({ config, ... }: {
.
The error I got can be seen on my nur-packages' GitLab (on tag nixpkgs-issue-96006
which I created for this occasion).
Expected behavior
Unclear. I guess warnings
would be propagated upwards, somehow, using magic?
Metadata
Please run nix-shell -p nix-info --run "nix-info -m"
and paste the result.
"x86_64-linux"
Linux 5.7.16, NixOS, 20.09.20200821.4a87da1 (Nightingale)
yes
yes
nix-env (Nix) 2.4pre20200721_ff314f1
""
"nixos-20.09pre237781.32b46dd897a"
/nix/var/nix/profiles/per-user/root/channels/nixos
cc @Infinisil
I've got a plan for fixing this! Will work on this soon probably :)
See PR above ^ :)
Most helpful comment
I've got a plan for fixing this! Will work on this soon probably :)