Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LOCALE_ARCHIVE is unconfigurable and unconditional #2333

Closed
1 task done
arcnmx opened this issue Sep 18, 2021 · 6 comments · Fixed by #4177
Closed
1 task done

LOCALE_ARCHIVE is unconfigurable and unconditional #2333

arcnmx opened this issue Sep 18, 2021 · 6 comments · Fixed by #4177
Assignees
Labels
bug pinned Prevent marking as stale

Comments

@arcnmx
Copy link
Contributor

arcnmx commented Sep 18, 2021

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

home-manager unconditionally inserts pkgs.glibcLocales into the closure without any mechanism for disabling, configuring, or trimming it down in the way that nixos does (see i18n.supportedLocales and related options). This adds something like 200MB to the closure size with no way to turn it off.

(to be fair there are workarounds like using package overlays or setting disabledModules but still, this should be an option!)

Maintainer CC

No response

System information

host os: `Linux 5.14.2, NixOS, 21.11 (Porcupine)`
@arcnmx arcnmx added bug triage Issues or feature request that have not been triaged yet labels Sep 18, 2021
arcnmx added a commit to arcnmx/home that referenced this issue Sep 19, 2021
arcnmx added a commit to arcnmx/home that referenced this issue Sep 20, 2021
@berbiche berbiche removed the triage Issues or feature request that have not been triaged yet label Sep 20, 2021
@berbiche
Copy link
Member

Thanks for the report.

If you would like to submit a PR then you are welcome too!

@stale
Copy link

stale bot commented Dec 19, 2021

Thank you for your contribution! I marked this issue as stale due to inactivity. If this remains inactive for another 7 days, I will close this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

  • If this is resolved, please consider closing it so that the maintainers know not to focus on this.
  • If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

  • If you are also experiencing this issue, please add details of your situation to help with the debugging process.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

If you have nothing of substance to add, please refrain from commenting and allow the bot close the issue. Also, don't be afraid to manually close an issue, even if it holds valuable information.

Closed issues stay in the system for people to search, read, cross-reference, or even reopen--nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

@stale stale bot added the status: stale label Dec 19, 2021
@arcnmx
Copy link
Contributor Author

arcnmx commented Dec 19, 2021

I haven't had a chance to come up with a PR yet but it's still relevant you mean bot :<

@stale stale bot removed the status: stale label Dec 19, 2021
@stale
Copy link

stale bot commented Mar 19, 2022

Thank you for your contribution! I marked this issue as stale due to inactivity. If this remains inactive for another 7 days, I will close this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

  • If this is resolved, please consider closing it so that the maintainers know not to focus on this.
  • If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

  • If you are also experiencing this issue, please add details of your situation to help with the debugging process.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

If you have nothing of substance to add, please refrain from commenting and allow the bot to close the issue. Also, don't be afraid to manually close an issue, even if it holds valuable information.

Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

@stale stale bot added the status: stale label Mar 19, 2022
@elohmeier
Copy link

This is my current workaround reg. this issue:

{ nixosConfig, ... }:
{
  # workaround https://github.com/nix-community/home-manager/issues/2333
  disabledModules = [ "config/i18n.nix" ];

  home.sessionVariables.LOCALE_ARCHIVE_2_27 = "${nixosConfig.i18n.glibcLocales}/lib/locale/locale-archive";
  systemd.user.sessionVariables.LOCALE_ARCHIVE_2_27 = "${nixosConfig.i18n.glibcLocales}/lib/locale/locale-archive";
};

This can be used when home-manager is used as a NixOS module and will use the trimmed down version from NixOS, effectively reducing the closure size for home-manager.

@stale stale bot removed the status: stale label Mar 19, 2022
@berbiche berbiche added the pinned Prevent marking as stale label Mar 19, 2022
@AndrewKvalheim
Copy link

I use the NixOS option i18n.glibcLocales to configure my locale. LOCALE_ARCHIVE successfully reflects my configurtion, but Home Manager overshadows it with the higher priority LOCALE_ARCHIVE_2_27 carrying an incorrect value.

Since this was added just to support non-NixOS, can we disable it in NixOS?

rvl added a commit to rvl/home-manager that referenced this issue Jun 28, 2023
This will reduce the system closure size by about 200MB under NixOS by
sharing the glibcLocales package.

When home-manager is installed on Linux without the NixOS module, all
glibc locales are installed, as before.

Resolves nix-community#2333
rvl added a commit to rvl/home-manager that referenced this issue Jun 28, 2023
This will reduce the system closure size by about 200MB under NixOS by
sharing the glibcLocales package.

When home-manager is installed on Linux without the NixOS module, all
glibc locales are installed, as before.

Resolves nix-community#2333
rvl added a commit to rvl/home-manager that referenced this issue Jun 28, 2023
This will reduce the system closure size by about 200MB under NixOS by
sharing the glibcLocales package.

When home-manager is installed on Linux without the NixOS module, all
glibc locales are installed, as before.

Resolves nix-community#2333
rvl added a commit to rvl/home-manager that referenced this issue Jun 28, 2023
This will reduce the system closure size by about 200MB under NixOS by
sharing the glibcLocales package.

When home-manager is installed on Linux without the NixOS module, all
glibc locales are installed, as before.

Resolves: nix-community#2333
rvl added a commit to rvl/home-manager that referenced this issue Jul 4, 2023
This will reduce the system closure size by about 200MB under NixOS by
sharing the glibcLocales package.

When home-manager is installed on Linux without the NixOS module, all
glibc locales are installed, as before.

Resolves: nix-community#2333
rvl added a commit to rvl/home-manager that referenced this issue Jul 4, 2023
This will reduce the system closure size by about 200MB under NixOS by
sharing the glibcLocales package.

When home-manager is installed on Linux without the NixOS module, all
glibc locales are installed, as before.

Resolves: nix-community#2333
ncfavier pushed a commit that referenced this issue Jul 4, 2023
This will reduce the system closure size by about 200MB under NixOS by
sharing the glibcLocales package.

When home-manager is installed on Linux without the NixOS module, all
glibc locales are installed, as before.

Resolves: #2333
antholeole pushed a commit to antholeole/home-manager that referenced this issue Jul 24, 2023
…ix-community#4177)

This will reduce the system closure size by about 200MB under NixOS by
sharing the glibcLocales package.

When home-manager is installed on Linux without the NixOS module, all
glibc locales are installed, as before.

Resolves: nix-community#2333
SimSaladin added a commit to SimSaladin/home-manager that referenced this issue Aug 26, 2023
* upstream/master: (352 commits)
  flake.lock: Update
  qcal: add module
  bat: generate cache file in XDG cache home
  nixos: only refer to `users.users` if needed
  home-cursor: remove IFD when linking icon directories
  flake.lock: Update
  home-cursor: improve icon compatibility
  fix(qt): allow theming for apps started by systemd (nix-community#4349)
  flake.lock: Update
  fcitx5: add `fcitx5-config-qt` to test stub
  pqiv: only run tests on Linux platforms
  pqiv: add module
  Translate using Weblate (German)
  xplr: add module
  browserpass: support librewolf
  Translate using Weblate (Romanian)
  Translate using Weblate (Portuguese (Brazil))
  hyprland: remove xwayland.hidpi (nix-community#4302)
  home-manager: handle profile list in Nix >2.17
  lf: simplify option validation (nix-community#4334)
  programs.khal: uncomment locale config (nix-community#4319)
  kanshi: support adaptive sync (nix-community#4328)
  mu: add package option (nix-community#4325)
  modules: types.string throws error now (nix-community#4324)
  taffybar: Avoid restarting too quickly (nix-community#4316)
  aerc: do not use smtp-starttls (nix-community#4272)
  zsh: Add `zsh.history.ignoreAllDups` config option (nix-community#4248)
  jujutsu: fix zsh completion (nix-community#4305)
  Translate using Weblate (Korean)
  Translate using Weblate (Romanian)
  Translate using Weblate (German)
  flake.lock: Update
  network-manager-applet: remove `--sm-disable` flag
  himalaya: update a link to ticket
  nushell: deprecation of let-env (nix-community#4292)
  man: fix caches generation in cross-compiled system (nix-community#4294)
  fish: fix session vars build in cross-compiled system (nix-community#4293)
  Update translation files
  Translate using Weblate (Chinese (Simplified))
  gh: option to enable helper for additional hosts (nix-community#4288)
  home-manager: rework news command
  home-manager: skip manual in uninstall configuration
  gnome-terminal: add assertion on profile names
  hyprland: use `toKeyValue`'s `indent` argument (nix-community#4274)
  gpg: fix typo (nix-community#4277)
  firefox: make package nullable (nix-community#4113)
  git-sync: add news entry for darwin
  tmate: don't generate empty config file (nix-community#4271)
  gh-dash: add module
  git-sync: add darwin support
  flake.lock: Update
  hyprland: prioritize variables and beziers (nix-community#4263)
  hyprland: add module
  script-directory: fix documentation link (nix-community#4258)
  Translate using Weblate (Indonesian)
  Translate using Weblate (Ukrainian)
  Translate using Weblate (Spanish)
  Translate using Weblate (Swedish)
  docs: hide `_module.*` from NixOS/nix-darwin docs
  jujutsu: update for Jujutsu 0.8.0 (nix-community#4250)
  ripgrep: don't set env. variable if no config (nix-community#4254)
  docs: update for Markdown migration
  treewide: remove now-redundant `lib.mdDoc` calls
  docs: clean up after Markdown migration
  flake: remove temporary nixpkgs pin
  treewide: convert all option docs to Markdown
  treewide: adjust some DocBook for conversion
  treewide: `mkAliasOption` -> `mkAliasOptionMD`
  treewide: `mkPackageOption` -> `mkPackageOptionMD`
  treewide: convert options with tables to Markdown
  treewide: convert options with lists to Markdown
  treewide: convert custom `enable` docs to Markdown
  treewide: convert parameterized docs to Markdown
  treewide: manually convert some docs to Markdown
  treewide: fix `mkEnableOption` arguments
  treewide: add missing option descriptions
  docs: use `nixosOptionsDoc`
  flake: temporarily pin nixpkgs version
  version: add `isReleaseBranch`
  manual: add test
  Update translation files
  flake.lock: Update
  home-manager: remove Home Manager default paths
  imapnotify: Use JSON type for extraConfig (nix-community#4238)
  Translate using Weblate (French)
  zsh: fix custom syntax highlighting styles (nix-community#4236)
  i3-sway: allow arbitrary floating modifier (nix-community#4229)
  i3-sway: multiple outputs (nix-community#4223)
  home-cursor.nix: enable gtk module when enabling gtk config generation (nix-community#4144)
  aerc: add assertion to limit per-account extraConfig to UI config (nix-community#4196)
  flake.lock: Update
  ssh-agent: add assertion and fix news entry (nix-community#4210)
  imapnotify: move test
  imapnotify: use direct nix store path for config
  flake.lock: Update
  nushell: add login.nu configuration option
  himalaya: fix notmuch backend
  swayosd: add module
  pyenv: add module
  darcs: add module
  tests: some minor cleanups
  goimapnotify: remove test dependency on notmuch
  unison: Allow using same option multiple times (nix-community#4208)
  imapnotify: Add launchd agent (nix-community#3291)
  i3: remove deprecated example in i3.config.startup (nix-community#4201)
  antidote: static file move to /tmp
  Translate using Weblate (Indonesian)
  PULL_REQUEST_TEMPLATE.md: add maintainer cc section (nix-community#4193)
  programs.khal
  vdirsyncer: synchronize metadata as well (nix-community#4167)
  i18n: Use glibcLocales from NixOS if possible (nix-community#2333) (nix-community#4177)
  xfconf: remove properties with null values (nix-community#4192)
  home-manager: Use `path:` URI type for flake default (nix-community#3646)
  ci: autolabel calendars PRs (nix-community#4165)
  flake.lock: Update (nix-community#4161)
  news: fix typo in programs.zsh.antidote entry
  ssh-agent: init module (nix-community#4178)
  chromium: fix `commandLineArgs` to use the user specified package (nix-community#4175)
  sxhkd: allow usage of derivations as keybind commands (nix-community#4169)
  README: Remove the pills (nix-community#4181)
  lsd: use -A instead of -a in aliases (nix-community#4173)
  kakoune: add defaultEditor option
  docs: update link to allowed users setting (nix-community#4176)
  zsh: allow setting custom syntax highlighting styles (nix-community#4122)
  flake: add formatter (nix-community#3620)
  broot: fix test (nix-community#4170)
  antidote: fix .dot path
  ci: build manual and push to home-manager.dev
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug pinned Prevent marking as stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants