NIXOS-b85/configuration.nix

219 lines
5.5 KiB
Nix

{ config, lib, pkgs, ... }:
let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
mypkgs = import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/c407032be28ca2236f45c49cfb2b8b3885294f7f.tar.gz";
}) {};
wine64-8-20-staging = mypkgs.wine64Packages.staging;
in
{
imports =
[
./hardware-configuration.nix
(import "${home-manager}/nixos")
];
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
tdesktop
google-chrome
vscode
bluez
vlc
obs-studio
libreoffice
kate
sunshine
bitwig-studio
kleopatra
wine64-8-20-staging
bottles
winetricks
yabridge
yabridgectl
wget
git
neofetch
tcping-go
btop
busybox
xclip
yubico-pam
yubikey-agent
yubikey-manager
yubioath-flutter
(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;
# virtualisation.virtualbox.host.enable = true;
# virtualisation.virtualbox.host.enableExtensionPack = true;
# users.extraGroups.vboxusers.members = [ "lzc256" ];
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
services.jack = {
jackd.enable = true;
alsa.enable = false;
loopback = {
enable = true;
# buffering parameters for dmix device to work with ALSA only semi-professional sound programs
#dmixConfig = ''
# period_size 2048
#'';
};
};
users.extraUsers.lzc256.extraGroups = [ "jackaudio" ];
environment.shellAliases = {
nrs = ''sudo /etc/nixos/push.sh; 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;
displayManager.sddm.enable = true;
desktopManager.plasma6.enable = true;
displayManager.defaultSession = "plasmax11";
};
services.xrdp.enable = true;
services.xrdp.defaultWindowManager = "startplasma-x11";
services.xrdp.openFirewall = true;
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;
# 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-cjk
noto-fonts
noto-fonts-emoji
noto-fonts-cjk-serif
meslo-lgs-nf
wqy_zenhei
hack-font
];
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" ];
};
};
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;
# };
};
}