Files
whc-nixos/modules/common.nix
T
WHC cac29b4c79 Add Gowin FPGA toolchain for desktop development.
Vendor Gowin EDU IDE, add openFPGALoader/Yosys/nextpnr/Apicula, and USB udev rules for Tang boards.
2026-09-19 18:34:38 +08:00

84 lines
1.8 KiB
Nix

{ config, pkgs, ... }:
{
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 10;
boot.loader.efi.canTouchEfiVariables = true;
networking.networkmanager.enable = true;
time.timeZone = "Asia/Shanghai";
i18n.defaultLocale = "zh_CN.UTF-8";
i18n.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";
};
# 蓝牙
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
services.blueman.enable = true;
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
users.users.whc = {
isNormalUser = true;
description = "whc";
extraGroups = [
"networkmanager"
"wheel"
"video"
"audio"
];
};
nixpkgs.config.allowUnfree = true;
nix.settings = {
experimental-features = [
"nix-command"
"flakes"
];
auto-optimise-store = true;
substituters = [
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"
"https://mirrors.ustc.edu.cn/nix-channels/store"
"https://cache.nixos.org"
];
};
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
programs.nix-ld.enable = true;
programs.git.enable = true;
# Clash Verge Rev
programs.clash-verge = {
enable = true;
package = pkgs.clash-verge-rev;
autoStart = true;
serviceMode = true;
tunMode = true;
group = "wheel";
};
}