NIXOS-b85/configuration.nix

153 lines
3.7 KiB
Nix

{ config, lib, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
];
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
tdesktop
google-chrome
vscode
bluez
vlc
obs-studio
libreoffice
wget
git
neofetch
tcping-go
btop
busybox
xclip
(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;
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
environment.shellAliases = {
nrs = ''sudo nixos-rebuild switch --option substituter "https://mirrors.ustc.edu.cn/nix-channels/store"'';
conf = "sudo vim /etc/nixos/configuration.nix";
};
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
hardware.opengl.extraPackages = with pkgs; [
rocm-opencl-icd
rocm-opencl-runtime
pkgs.amdvlk
];
networking.hostName = "b85";
networking.networkmanager.enable = true;
networking.proxy.default = "http://127.0.0.1:7890/";
networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
time.timeZone = "Asia/Shanghai";
services.xserver.enable = true;
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
# 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;
extraGroups = [ "wheel" ];
};
boot.supportedFilesystems = [ "ntfs" ];
# programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
# 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;
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
meslo-lgs-nf
wqy_zenhei
hack-font
];
i18n.defaultLocale = "zh_CN.UTF-8";
console = {
font = "hack";
keyMap = "us";
};
i18n.inputMethod.enabled = "ibus";
i18n.inputMethod.ibus.engines = with pkgs.ibus-engines; [
libpinyin
];
# 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: {
# nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
# inherit pkgs;
# };
};
}