NIXOS-b85/configuration.nix

153 lines
3.7 KiB
Nix
Raw Normal View History

2024-05-15 07:23:11 +08:00
{ config, lib, pkgs, ... }:
{
imports =
2024-05-15 13:08:39 +08:00
[
2024-05-15 07:23:11 +08:00
./hardware-configuration.nix
];
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-15 13:08:39 +08:00
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;
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";
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;
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
noto-fonts-cjk
noto-fonts-emoji
meslo-lgs-nf
wqy_zenhei
hack-font
];
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-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
};
}
2024-05-15 13:08:39 +08:00