commit 4fff769be97071057847a47b4f1c3c1cdd855816 Author: Andreev Gregory Date: Sat Aug 23 15:20:35 2025 +0300 my nix config diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..577b0a0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +hardware-configuration.nix diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..da4624b --- /dev/null +++ b/configuration.nix @@ -0,0 +1,488 @@ +# nixos-help + +{ config, pkgs, lib, ... }: + +{ + imports = [ + ./hardware-configuration.nix +# + + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + nix.settings.experimental-features = [ "nix-command"]; + + environment.systemPackages = with pkgs; [ + signal-desktop + upower + wl-kbptr + gcolor3 + wlr-randr + cdrkit + cdrtools + samba + # Idk what is unar, so I stick with this + unrar-wrapper + usbutils + blender + nushell + keynav + mozc + dex + lshw + pax-utils + patchelf + wev + keyd + pciutils + xsel + copyq + xdotool + xorg.xwininfo + xorg.xdpyinfo + tg + gmic + gimpPlugins.gmic + geogebra6 + netpbm + brscan5 + brscan4 + sane-backends + sane-frontends + sane-airscan + xsane + uftpd + wireshark + inetutils + playerctl + #libguestfs-with-appliance + #guestfs-tools + ungoogled-chromium + iw + hmcl + prismlauncher + kvmtool + qemu + valgrind + gnum4 + zlib + libmd + foliate + pychess + powerstat + shaderc + sqlite + ghostscript + img2pdf + imagemagick + cups + weasis + deluge + id3v2 + #virtualbox + vulkan-tools + llama-cpp + + xorg.xev + xorg.xset + xorg.xmodmap + xorg.xinit + wget + git + firefox + xterm + openbox + zsh + tmux + telegram-desktop + zsh-completions + neofetch + ly + alsa-utils + bluez + tree + cloc + bluez-alsa + cmus + htop + jetbrains.pycharm-community-bin + picom + linuxKernel.packages.linux_5_4.wireguard + wireguard-tools + pulsemixer + nix-prefetch-git + xclip + p7zip + tor-browser + xcompmgr + nix-search-cli + ffmpeg_6-full + qbittorrent + openssh + rsync + ntfs3g + calc + flameshot + gimp + cups + yt-dlp + mpv + xwallpaper + vscodium # for tinymist + rtorrent + transmission_4 + typst + zathura + man-pages + man-pages-posix + mdbook + libreoffice + + nix-ld + gcc + xorg.libX11 + xorg.libXinerama + xorg.libXft + xorg.libXrandr + xorg.xorgproto + fontconfig + gnumake + pkg-config + freetype + xorg.libXrender + python311 + + vim + + gcr + emacs + + steam-tui + steamcmd + ratpoison + + waybar # status bar + wl-clipboard + grim + slurp # clipboard + screenshot tools + foot + ]; + + + i18n.inputMethod = { + enable = true; + type = "fcitx5"; + fcitx5.addons = with pkgs; [ + fcitx5-mozc + #fcitx5-mozc-ut + fcitx5-gtk + fcitx5-configtool + ]; + }; + + programs.sway = { + enable = true; + wrapperFeatures.gtk = true; # makes GTK apps get Wayland variables + }; + + fonts.packages = with pkgs; [ + noto-fonts + noto-fonts-cjk-sans + noto-fonts-color-emoji + comic-mono + ]; + + environment.variables = { + WLR_NO_HARDWARE_CURSORS = "1"; + }; + + networking.hostName = "gaminglaptopg"; + + networking.networkmanager.enable = true; + + time.timeZone = "Europe/Moscow"; + + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "ru_RU.UTF-8"; + LC_IDENTIFICATION = "ru_RU.UTF-8"; + LC_MEASUREMENT = "ru_RU.UTF-8"; + LC_MONETARY = "ru_RU.UTF-8"; + LC_NAME = "ru_RU.UTF-8"; + LC_NUMERIC = "ru_RU.UTF-8"; + LC_PAPER = "ru_RU.UTF-8"; + LC_TELEPHONE = "ru_RU.UTF-8"; + LC_TIME = "ru_RU.UTF-8"; + }; + + + services.xserver = { + enable=true; + exportConfiguration = true; + }; + + services.displayManager.ly.enable = true; + # deng I hate stupid NIXOS + #services.displayManager.ly.settings = { + # hide_borders = false; + # animation = "colormix"; + #}; + + users.extraGroups.vboxusers.members = [ "gregory" ]; + + security.sudo = { + wheelNeedsPassword = false; + }; + + users.groups.gregory = {}; + + users.users.gregory = { + isNormalUser = true; + description = "gregory"; + extraGroups = [ "networkmanager" "wheel" "gregory" "docker" "kvm" "scanner" "lp" ]; + packages = with pkgs; []; + }; + + virtualisation.docker.enable = true; + virtualisation.libvirtd.enable = true; + #virtualisation.virtualbox.host.enable = true; + + #environment.etc."xdg/picom.conf".source = ./picom.conf; + + services.printing.enable = true; + + hardware.sane = { + enable = true; + brscan4.enable = true; + }; + + services.avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + }; + + services.logind.extraConfig = '' + LidSwitchIgnoreInhibited=no + HandleLidSwitch=ignore + ''; + + programs.zsh.enable = true; + + services.pulseaudio.enable = lib.mkForce false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + #jack.enable = true; + wireplumber = { + enable = true; + configPackages = [ + (pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/51-disable-bt-suspend.conf" '' + monitor.bluez.rules = [ + { + matches = [ + { + node.name = "~bluez_input.*" + }, + { + node.name = "~bluez_output.*" + } + ] + actions = { + update-props = { + session.suspend-timeout-seconds = 0 + } + } + } + ] + '') + ]; + }; + }; + hardware.bluetooth.enable = true; + hardware.bluetooth.powerOnBoot = true; + + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + }; + + nixpkgs.config.allowUnfree = true; + #nixpkgs.config.allowBroken = true; + + programs.slock.enable = true; + + programs.nix-ld.enable = true; + programs.nix-ld.libraries = with pkgs; [ + libidn2 + libmd + SDL + SDL2 + SDL2_image + SDL2_mixer + SDL2_ttf + SDL_image + SDL_mixer + SDL_ttf + alsa-lib + at-spi2-atk + at-spi2-core + atk + bzip2 + cairo + cups + curlWithGnuTls + dbus + dbus-glib + desktop-file-utils + e2fsprogs + expat + flac + fontconfig + freeglut + freetype + fribidi + fuse + fuse3 + gdk-pixbuf + glew110 + glib + gmp + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-ugly + gst_all_1.gstreamer + gtk2 + harfbuzz + icu + keyutils.lib + libGL + libGLU + libappindicator-gtk2 + libcaca + libcanberra + libcap + libclang.lib + libdbusmenu + libdrm + libgcrypt + libgpg-error + libidn + libjack2 + libjpeg + libmikmod + libogg + libpng12 + libpulseaudio + librsvg + libsamplerate + libthai + libtheora + libtiff + libudev0-shim + libusb1 + libuuid + libvdpau + libvorbis + libvpx + libxcrypt-legacy + libxkbcommon + libxml2 + mesa + nspr + nss + openssl + p11-kit + pango + pixman + python3 + speex + stdenv.cc.cc + tbb + udev + vulkan-loader + wayland + xorg.libICE + xorg.libSM + xorg.libX11 + xorg.libXScrnSaver + xorg.libXcomposite + xorg.libXcursor + xorg.libXdamage + xorg.libXext + xorg.libXfixes + xorg.libXft + xorg.libXi + xorg.libXinerama + xorg.libXmu + xorg.libXrandr + xorg.libXrender + xorg.libXt + xorg.libXtst + xorg.libXxf86vm + xorg.libpciaccess + xorg.libxcb + xorg.xcbutil + xorg.xcbutilimage + xorg.xcbutilkeysyms + xorg.xcbutilrenderutil + xorg.xcbutilwm + xorg.xkeyboardconfig + xz + zlib + ]; + + # Enable OpenGL + hardware.graphics = { + enable = true; + }; + + + services.xserver.videoDrivers = [ "amdgpu" "nouveau" ]; + #services.xserver.videoDrivers = ["nvidia" "amdgpu" ]; + + #boot.blacklistedKernelModules = [ + # "nvidia" "nvidia_drm" "nvidia_uvm" "nvidia_modeset" + #]; + + #hardware.nvidia = { + # modesetting.enable = true; + # powerManagement.enable = false; + # powerManagement.finegrained = false; + # open = false; + # nvidiaSettings = true; + # package = config.boot.kernelPackages.nvidiaPackages.stable; + #}; + + fileSystems."/mnt/ksblue64" = { + device = "/dev/disk/by-label/KSBLUE64"; + fsType = "vfat"; + options = [ "nofail" ]; + }; + + fileSystems."/mnt/transcend" = { + device = "/dev/disk/by-label/TRANSCEND_FILMS"; + fsType = "ext4"; + options = [ "nofail" ]; + }; + + fileSystems."/mnt/ksyellow128" = { + device = "/dev/disk/by-label/KSYELLOW128"; + fsType = "ext4"; + options = ["nofail"]; + }; + + fileSystems."/mnt/ksyellow128_2" = { + device = "/dev/disk/by-label/KSYELLOW128_2"; + fsType = "ext4"; + options = ["nofail"]; + }; + + system.stateVersion = "24.11"; +}