2023-07-20 10:31:07 +00:00
|
|
|
{ pkgs, lib, ... }:
|
|
|
|
let
|
|
|
|
intel-driver = (
|
|
|
|
if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then
|
|
|
|
pkgs.vaapiIntel
|
|
|
|
else
|
|
|
|
pkgs.intel-vaapi-driver
|
|
|
|
);
|
2023-07-20 10:52:10 +00:00
|
|
|
intel-driver32 = (
|
|
|
|
if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then
|
|
|
|
pkgs.driversi686Linux.vaapiIntel
|
|
|
|
else
|
|
|
|
pkgs.driversi686Linux.intel-vaapi-driver
|
|
|
|
);
|
2023-07-20 10:31:07 +00:00
|
|
|
in
|
|
|
|
{
|
2023-07-04 08:53:01 +00:00
|
|
|
sound.enable = true;
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
time.timeZone = "Asia/Shanghai";
|
|
|
|
security.sudo.wheelNeedsPassword = false;
|
2023-06-21 05:29:28 +00:00
|
|
|
|
2023-07-20 10:08:01 +00:00
|
|
|
environment.variables.VDPAU_DRIVER = "va_gl";
|
2023-07-04 08:53:01 +00:00
|
|
|
hardware = {
|
2023-07-20 10:08:01 +00:00
|
|
|
opengl = {
|
|
|
|
enable = true;
|
2023-07-20 10:39:54 +00:00
|
|
|
extraPackages = with pkgs; [
|
2023-07-20 10:33:41 +00:00
|
|
|
mesa.drivers
|
|
|
|
libvdpau-va-gl
|
|
|
|
vaapiVdpau
|
2023-07-20 10:42:28 +00:00
|
|
|
intel-driver
|
|
|
|
];
|
2023-07-20 10:52:10 +00:00
|
|
|
|
|
|
|
driSupport32Bit = true;
|
|
|
|
extraPackages32 = with pkgs.driversi686Linux; [
|
|
|
|
intel-driver32
|
|
|
|
mesa.drivers
|
|
|
|
libvdpau-va-gl
|
|
|
|
vaapiVdpau
|
|
|
|
];
|
2023-07-20 10:08:01 +00:00
|
|
|
};
|
2023-07-04 08:53:01 +00:00
|
|
|
};
|
2023-06-21 05:29:28 +00:00
|
|
|
|
2023-07-04 08:53:01 +00:00
|
|
|
# Select internationalisation properties.
|
|
|
|
i18n = {
|
|
|
|
defaultLocale = "zh_CN.UTF-8";
|
|
|
|
extraLocaleSettings = {
|
|
|
|
LC_ADDRESS = "zh_CN.UTF-8";
|
|
|
|
LC_IDENTIFICATION = "zh_CN.UTF-8";
|
|
|
|
LC_MEASUREMENT = "zh_CN.UTF-8";
|
|
|
|
LC_MONETARY = "zh_CN.UTF-8";
|
|
|
|
LC_NAME = "zh_CN.UTF-8";
|
|
|
|
LC_NUMERIC = "zh_CN.UTF-8";
|
|
|
|
LC_PAPER = "zh_CN.UTF-8";
|
|
|
|
LC_TELEPHONE = "zh_CN.UTF-8";
|
|
|
|
LC_TIME = "zh_CN.UTF-8";
|
2023-06-21 05:29:28 +00:00
|
|
|
};
|
2023-07-04 08:53:01 +00:00
|
|
|
};
|
2023-06-28 23:21:20 +00:00
|
|
|
|
2023-07-22 04:38:53 +00:00
|
|
|
nix = {
|
|
|
|
settings = {
|
|
|
|
auto-optimise-store = true;
|
|
|
|
experimental-features = [
|
|
|
|
"nix-command"
|
|
|
|
"flakes"
|
|
|
|
];
|
2023-07-04 01:23:03 +00:00
|
|
|
|
2023-07-22 04:38:53 +00:00
|
|
|
substituters = [
|
|
|
|
"https://mirrors.ustc.edu.cn/nix-channels/store" # 中科大
|
|
|
|
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" # 清华
|
|
|
|
"https://mirrors.bfsu.edu.cn/nix-channels/store" # 北外
|
|
|
|
"https://mirror.sjtu.edu.cn/nix-channels/store" # 交大
|
|
|
|
"https://nixos-cn.cachix.org"
|
|
|
|
"https://cache.nixos.org/"
|
|
|
|
];
|
2023-07-04 01:23:03 +00:00
|
|
|
|
2023-07-22 04:38:53 +00:00
|
|
|
trusted-users = [
|
|
|
|
"root"
|
|
|
|
"@wheel"
|
|
|
|
];
|
|
|
|
};
|
2023-06-28 23:21:20 +00:00
|
|
|
|
2023-07-22 04:38:53 +00:00
|
|
|
gc = {
|
|
|
|
automatic = true;
|
|
|
|
dates = "weekly";
|
|
|
|
options = "--delete-older-than 1w";
|
|
|
|
};
|
2023-07-04 08:53:01 +00:00
|
|
|
};
|
|
|
|
}
|