34 lines
939 B
Nix
34 lines
939 B
Nix
{ config, lib, pkgs, modulesPath, ... }:
|
|
let
|
|
inherit (pkgs.stdenv) hostPlatform;
|
|
locale-archive-stub =
|
|
pkgs.stdenvNoCC.mkDerivation {
|
|
pname = "locale-archive-stub";
|
|
version = "0";
|
|
|
|
buildCommand = ''
|
|
mkdir -p "$out/lib/locale"
|
|
touch "$out/lib/locale/locale-archive"
|
|
'';
|
|
};
|
|
in {
|
|
disabledModules = [
|
|
(modulesPath + "/config/ldso.nix")
|
|
(modulesPath + "/config/stub-ld.nix")
|
|
(modulesPath + "/programs/nix-ld.nix")
|
|
];
|
|
|
|
config = lib.mkMerge [
|
|
(lib.mkIf hostPlatform.isMusl {
|
|
i18n.glibcLocales = lib.mkDefault locale-archive-stub;
|
|
i18n.supportedLocales = lib.mkDefault [ ];
|
|
|
|
programs.command-not-found.enable = lib.mkDefault false;
|
|
programs.less.lessopen = lib.mkDefault null;
|
|
|
|
security.pam.services.login.updateWtmp = lib.mkForce false;
|
|
services.nscd.enable = lib.mkForce false;
|
|
system.nssModules = lib.mkForce [ ];
|
|
})
|
|
];
|
|
}
|