245 lines
6.4 KiB
Nix
245 lines
6.4 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
|
|
glslang-submodule = with pkgs; stdenv.mkDerivation {
|
|
name = "glslang";
|
|
installPhase = ''
|
|
mkdir -p $out
|
|
'';
|
|
src = fetchFromGitHub {
|
|
owner = "KhronosGroup";
|
|
repo = "glslang";
|
|
rev = "c34bb3b6c55f6ab084124ad964be95a699700d34";
|
|
sha256 = "IMROcny+b5CpmzEfvKBYDB0QYYvqC5bq3n1S4EQ6sXc=";
|
|
};
|
|
};
|
|
wallpaper-engine-kde-plugin = with pkgs; stdenv.mkDerivation rec {
|
|
pname = "wallpaperEngineKde";
|
|
version = "91d8e25c0c94b4919f3d110c1f22727932240b3c";
|
|
src = fetchFromGitHub {
|
|
owner = "Jelgnum";
|
|
repo = "wallpaper-engine-kde-plugin";
|
|
rev = version;
|
|
hash = "sha256-ff3U/TXr9umQeVHiqfEy38Wau5rJuMeJ3G/CZ9VE++g=";
|
|
fetchSubmodules = true;
|
|
};
|
|
nativeBuildInputs = [
|
|
cmake extra-cmake-modules glslang-submodule pkg-config gst_all_1.gst-libav shaderc
|
|
];
|
|
buildInputs = [
|
|
mpv lz4 vulkan-headers vulkan-tools vulkan-loader
|
|
]
|
|
++ (with libsForQt5; with qt5; [plasma-framework qtwebsockets qtwebchannel qtx11extras qtdeclarative])
|
|
++ [(python3.withPackages (python-pkgs: [ python-pkgs.websockets ]))];
|
|
cmakeFlags = [ "-DUSE_PLASMAPKG=ON" ];
|
|
dontWrapQtApps = true;
|
|
postPatch = ''
|
|
rm -rf src/backend_scene/third_party/glslang
|
|
ln -s ${glslang-submodule.src} src/backend_scene/third_party/glslang
|
|
'';
|
|
#Optional informations
|
|
meta = with lib; {
|
|
description = "Wallpaper Engine KDE plasma plugin";
|
|
homepage = "https://github.com/Jelgnum/wallpaper-engine-kde-plugin";
|
|
license = licenses.gpl2Plus;
|
|
platforms = platforms.linux;
|
|
};
|
|
};
|
|
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
|
|
|
|
waypaper
|
|
wallutils
|
|
wine64
|
|
wineWow64Packages.stagingFull
|
|
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.vmware.host.enable = true;
|
|
programs.steam = {
|
|
enable = true;
|
|
remotePlay.openFirewall = true;
|
|
dedicatedServer.openFirewall = true;
|
|
};
|
|
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;
|
|
# };
|
|
};
|
|
|
|
|
|
}
|