{ config, pkgs, lib, ... }: let home-manager-src = builtins.fetchTarball { url = "https://github.com/nix-community/home-manager/archive/release-25.11.tar.gz"; }; in { imports = [ ./hardware-configuration.nix (import "${home-manager-src}/nixos") ]; boot.initrd.luks.devices."luks-aaa4ee90-4242-428b-b086-9c33c03473fe".device = "/dev/disk/by-uuid/aaa4ee90-4242-428b-b086-9c33c03473fe"; services.getty.autologinUser = "gregory"; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; nix.settings.experimental-features = [ "nix-command"]; boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; home-manager.users.gregory = import ./home.nix { inherit pkgs; }; environment.systemPackages = with pkgs; [ #pkgs.python312.withPackages (ps: [ ps.pillow ps.pyftpdlib ps.numpy ]) python3 python3Packages.numpy python3Packages.pillow python3Packages.pyyaml python3Packages.pyftpdlib (haskellPackages.ghcWithPackages (hpkgs: with hpkgs; [ random ])) haskell-language-server cowsay tagainijisho djview djvulibre convmv dnsmasq # linuxKernel.packages.linux_6_12.v4l2loopback config.boot.kernelPackages.v4l2loopback cheese perf pymol bedtools krita v4l-utils wf-recorder wl-screenrec libime pencil2d helix graphviz gzdoom bc optipng i3status waybar qrencode zbar 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 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 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 ]; services.logind.settings.Login = { HandleLidSwitch="ignore"; HandleLidSwitchExternalPower="ignore"; HandleLidSwitchDocked="ignore"; }; networking.firewall = { enable = true; allowedTCPPorts = [ 5559 5560 5561 ]; }; services.flatpak.enable=true; environment.etc."profile.local".text = '' export EDITOR=vim ''; services.dbus.enable = true; xdg.portal = { enable = true; # Ensure portals are enabled extraPortals = with pkgs; [ xdg-desktop-portal-gtk # For 'gtk' backend xdg-desktop-portal-wlr # For 'wlr' backend ]; config.common = { default = "gtk"; # Default to gtk for all interfaces "org.freedesktop.impl.portal.Screencast" = "wlr"; "org.freedesktop.impl.portal.Screenshot" = "wlr"; }; }; i18n.inputMethod = { enable = true; type = "fcitx5"; fcitx5.waylandFrontend = true; fcitx5.addons = with pkgs; [ #qt6Packages.fcitx5-chinese-addons fcitx5-mozc #fcitx5-mozc-ut fcitx5-gtk qt6Packages.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 font-awesome ]; environment.variables = { WLR_NO_HARDWARE_CURSORS = "1"; }; networking.hostName = "siliconCan"; 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.xserver.displayManager.startx.enable = true; 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; }; # todo: use services.logind.settings.Login instead #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; }; }; 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" "intel" ]; #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"; }