2024-05-15 07:23:11 +08:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
2024-05-27 20:42:53 +08:00
|
|
|
let
|
|
|
|
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
|
|
|
|
in
|
2024-05-15 07:23:11 +08:00
|
|
|
{
|
|
|
|
imports =
|
2024-05-15 13:08:39 +08:00
|
|
|
[
|
2024-05-15 07:23:11 +08:00
|
|
|
./hardware-configuration.nix
|
2024-05-27 20:42:53 +08:00
|
|
|
(import "${home-manager}/nixos")
|
2024-05-15 07:23:11 +08:00
|
|
|
];
|
|
|
|
|
2024-05-15 13:08:39 +08:00
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
tdesktop
|
|
|
|
google-chrome
|
|
|
|
vscode
|
|
|
|
bluez
|
|
|
|
vlc
|
2024-05-15 13:11:17 +08:00
|
|
|
obs-studio
|
2024-05-15 13:29:01 +08:00
|
|
|
libreoffice
|
2024-05-27 20:42:53 +08:00
|
|
|
sunshine
|
|
|
|
bitwig-studio
|
|
|
|
kleopatra
|
|
|
|
|
|
|
|
wine64
|
|
|
|
wineWow64Packages.stagingFull
|
|
|
|
winetricks
|
|
|
|
yabridge
|
|
|
|
yabridgectl
|
|
|
|
|
2024-05-15 13:08:39 +08:00
|
|
|
|
|
|
|
|
|
|
|
wget
|
|
|
|
git
|
|
|
|
neofetch
|
|
|
|
tcping-go
|
|
|
|
btop
|
|
|
|
busybox
|
|
|
|
xclip
|
2024-05-27 20:42:53 +08:00
|
|
|
yubico-pam
|
|
|
|
yubikey-agent
|
|
|
|
yubikey-manager
|
|
|
|
yubioath-flutter
|
2024-05-15 13:08:39 +08:00
|
|
|
(neovim.override {
|
|
|
|
vimAlias = true;
|
|
|
|
configure = {
|
|
|
|
customRC=''
|
|
|
|
set mouse=a
|
|
|
|
set tabstop=4
|
|
|
|
set nu
|
|
|
|
set autoindent
|
|
|
|
|
|
|
|
'';
|
|
|
|
packages.myPlugins = with pkgs.vimPlugins; {
|
|
|
|
start = [ vim-lastplace vim-nix ];
|
|
|
|
opt = [];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
})
|
|
|
|
|
|
|
|
];
|
|
|
|
programs.clash-verge.enable=true;
|
|
|
|
programs.clash-verge.tunMode=true;
|
|
|
|
programs.clash-verge.autoStart=true;
|
2024-05-15 13:11:17 +08:00
|
|
|
programs.steam = {
|
|
|
|
enable = true;
|
|
|
|
remotePlay.openFirewall = true;
|
|
|
|
dedicatedServer.openFirewall = true;
|
|
|
|
};
|
2024-05-15 13:08:39 +08:00
|
|
|
environment.shellAliases = {
|
|
|
|
nrs = ''sudo nixos-rebuild switch --option substituter "https://mirrors.ustc.edu.cn/nix-channels/store"'';
|
|
|
|
conf = "sudo vim /etc/nixos/configuration.nix";
|
|
|
|
};
|
2024-05-15 07:23:11 +08:00
|
|
|
|
|
|
|
boot.loader.grub.enable = true;
|
|
|
|
boot.loader.grub.efiSupport = true;
|
|
|
|
boot.loader.grub.efiInstallAsRemovable = true;
|
|
|
|
boot.loader.efi.efiSysMountPoint = "/boot";
|
|
|
|
# Define on which hard drive you want to install Grub.
|
|
|
|
boot.loader.grub.device = "nodev"; # or "nodev" for efi only
|
|
|
|
|
2024-05-15 07:28:50 +08:00
|
|
|
hardware.opengl.extraPackages = with pkgs; [
|
|
|
|
rocm-opencl-icd
|
|
|
|
rocm-opencl-runtime
|
|
|
|
pkgs.amdvlk
|
|
|
|
];
|
|
|
|
|
2024-05-15 13:08:39 +08:00
|
|
|
networking.hostName = "b85";
|
|
|
|
networking.networkmanager.enable = true;
|
2024-05-15 07:28:50 +08:00
|
|
|
|
2024-05-15 13:08:39 +08:00
|
|
|
networking.proxy.default = "http://127.0.0.1:7890/";
|
|
|
|
networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
|
|
|
2024-05-15 07:23:11 +08:00
|
|
|
time.timeZone = "Asia/Shanghai";
|
|
|
|
|
2024-05-27 20:42:53 +08:00
|
|
|
services.xserver = {
|
|
|
|
enable = true;
|
|
|
|
displayManager.sddm.enable = true;
|
|
|
|
desktopManager.plasma5.enable = true;
|
|
|
|
displayManager.defaultSession = "plasma";
|
|
|
|
};
|
|
|
|
programs.dconf.enable = true;
|
|
|
|
#home-manager.users.lzc256 = {
|
|
|
|
# home.stateVersion = "23.11";
|
|
|
|
#};
|
|
|
|
|
|
|
|
# services.displayManager.sddm.enable = true;
|
|
|
|
# services.xserver.desktopManager.plasma5.enable = true;
|
|
|
|
# services.desktopManager.plasma6.enable = true;
|
2024-05-15 07:23:11 +08:00
|
|
|
|
|
|
|
# Configure keymap in X11
|
|
|
|
# services.xserver.xkb.layout = "us";
|
|
|
|
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
|
|
|
|
|
|
|
services.printing.enable = true;
|
|
|
|
sound.enable = true;
|
|
|
|
hardware.pulseaudio.enable = true;
|
|
|
|
hardware.bluetooth.enable = true;
|
|
|
|
hardware.bluetooth.powerOnBoot = true;
|
|
|
|
|
|
|
|
# Enable touchpad support (enabled default in most desktopManager).
|
|
|
|
# services.xserver.libinput.enable = true;
|
|
|
|
|
|
|
|
security.sudo.wheelNeedsPassword = false;
|
|
|
|
users.users.lzc256 = {
|
|
|
|
isNormalUser = true;
|
2024-05-15 13:08:39 +08:00
|
|
|
extraGroups = [ "wheel" ];
|
2024-05-15 07:23:11 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
boot.supportedFilesystems = [ "ntfs" ];
|
|
|
|
|
|
|
|
|
|
|
|
# programs.mtr.enable = true;
|
2024-05-15 13:08:39 +08:00
|
|
|
programs.gnupg.agent = {
|
|
|
|
enable = true;
|
|
|
|
enableSSHSupport = true;
|
|
|
|
};
|
2024-05-15 07:23:11 +08:00
|
|
|
|
|
|
|
# services.openssh.enable = true;
|
|
|
|
|
|
|
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
|
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
|
|
|
|
|
|
# Copy the NixOS configuration file and link it from the resulting system
|
|
|
|
# (/run/current-system/configuration.nix). This is useful in case you
|
|
|
|
# accidentally delete configuration.nix.
|
|
|
|
# system.copySystemConfiguration = true;
|
|
|
|
|
2024-05-15 13:08:39 +08:00
|
|
|
fonts.packages = with pkgs; [
|
2024-05-15 07:23:11 +08:00
|
|
|
noto-fonts-cjk
|
2024-05-27 20:42:53 +08:00
|
|
|
noto-fonts
|
2024-05-15 07:23:11 +08:00
|
|
|
noto-fonts-emoji
|
2024-05-27 20:42:53 +08:00
|
|
|
noto-fonts-cjk-serif
|
2024-05-15 07:23:11 +08:00
|
|
|
meslo-lgs-nf
|
|
|
|
wqy_zenhei
|
|
|
|
hack-font
|
|
|
|
];
|
2024-05-27 20:42:53 +08:00
|
|
|
fonts.fontconfig = {
|
|
|
|
antialias = true;
|
|
|
|
hinting.enable = true;
|
|
|
|
defaultFonts = {
|
|
|
|
emoji = [ "Noto Color Emoji" ];
|
|
|
|
monospace = [ "FiraCode Nerd Font" ];
|
|
|
|
sansSerif = [ "Noto Sans CJK SC" ];
|
|
|
|
serif = [ "Noto Serif CJK SC" ];
|
|
|
|
};
|
|
|
|
};
|
2024-05-15 07:23:11 +08:00
|
|
|
i18n.defaultLocale = "zh_CN.UTF-8";
|
|
|
|
console = {
|
|
|
|
font = "hack";
|
|
|
|
keyMap = "us";
|
2024-05-15 13:08:39 +08:00
|
|
|
};
|
|
|
|
i18n.inputMethod.enabled = "ibus";
|
|
|
|
i18n.inputMethod.ibus.engines = with pkgs.ibus-engines; [
|
|
|
|
libpinyin
|
2024-05-27 20:42:53 +08:00
|
|
|
|
2024-05-15 13:08:39 +08:00
|
|
|
];
|
|
|
|
|
2024-05-15 07:23:11 +08:00
|
|
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
|
|
|
system.stateVersion = "23.11"; # Did you read the comment?
|
|
|
|
nix.settings.substituters = [ "https://mirrors.ustc.edu.cn/nix-channels/store" ];
|
|
|
|
nixpkgs.config.packageOverrides = pkgs: {
|
2024-05-15 13:08:39 +08:00
|
|
|
# nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
|
|
|
|
# inherit pkgs;
|
|
|
|
# };
|
2024-05-15 07:23:11 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|