programs/editors: fix user EDITOR value being overriden by the default NixOS one

This commit is contained in:
Anthony Rodriguez 2025-02-02 13:42:16 +01:00
parent b73a64cb52
commit c7fbdb2a3f
Signed by: nezia
SSH key fingerprint: SHA256:Ihfpl0rUpqDevYqnzSR34OYfVLbDNkBiUjs3CpX4ykA

View file

@ -12,6 +12,13 @@ in {
];
config = mkIf config.local.profiles.desktop.enable {
/*
we don't want the default NixOS EDITOR value, which is nano and will override the `environment.d` setting.
we have to unset it like this so that our systemd user variable will take precedence:
*/
environment.extraInit = ''
unset -v EDITOR
'';
hjem.users.${username} = {
files = {
".config/environment.d/${userEnvFile}.conf".text = ''