Skip to content

Commit

Permalink
fix setlocale error when using home-manager on arch
Browse files Browse the repository at this point in the history
* fixes error:
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
* reference: NixOS/nixpkgs#38991
  • Loading branch information
akshaykarle committed Dec 30, 2022
1 parent c09fbc1 commit e2127a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dotfiles/config.fish.symlink
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Set lang
set -xU LANG en_US.UTF-8
set -xU LC_ALL en_US.UTF-8
# need to set LOCALE_ARCHIVE for nix to fix error:
# bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
# reference- https://github.com/NixOS/nixpkgs/issues/38991
set -xU LOCALE_ARCHIVE_2_11 "$(nix-build --no-out-link "<nixpkgs>" -A glibcLocales)/lib/locale/locale-archive"
set -xU LOCALE_ARCHIVE_2_27 "$(nix-build --no-out-link "<nixpkgs>" -A glibcLocales)/lib/locale/locale-archive"
set -xU LOCALE_ARCHIVE "/usr/bin/locale"

# Remove greeting
set fish_greeting
Expand Down
1 change: 1 addition & 0 deletions modules/home-manager/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ in {

packages = with pkgs; [
# standard toolset
glibcLocales
coreutils-full
curl
gawk
Expand Down

0 comments on commit e2127a8

Please sign in to comment.