diff options
-rw-r--r-- | flake.nix | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/flake.nix b/flake.nix index a712b3e..7067523 100644 --- a/flake.nix +++ b/flake.nix @@ -1,17 +1,16 @@ { description = "Custom locale"; outputs = { self, ... }: { - overlays.default = final: prev: { - glibcLocales = prev.glibcLocales.overrideAttrs (base: { + nixosModules.default = { config, lib, pkgs, ... }: { + i18n.glibcLocales = (pkgs.glibcLocales.overrideAttrs (base: { postPatch = base.postPatch + '' - cp ${prev.lib.escapeShellArg ./en_EU} localedata/locales/en_EU + cp ${./en_EU} localedata/locales/en_EU echo 'en_EU.UTF-8/UTF-8 \' >>localedata/SUPPORTED ''; - }); - }; - - nixosModules.default = { lib, ... }: { - nixpkgs.overlays = [ self.overlays.default ]; + })).override { + allLocales = builtins.any (x: x == "all") config.i18n.supportedLocales; + locales = config.i18n.supportedLocales; + }; i18n.defaultLocale = lib.mkDefault "en_EU.UTF-8"; }; }; |