diff options
| author | 2025-03-31 13:18:59 -0400 | |
|---|---|---|
| committer | 2025-03-31 13:18:59 -0400 | |
| commit | 56d74ee6b8ba7ac9572814f556891e86525f7663 (patch) | |
| tree | 3253e4e9b581e1c33b52e54ed09d7c761797bd88 | |
| parent | d907076ef8d0fcfcb8f99581aa3cc8052634a654 (diff) | |
| download | dotfiles-56d74ee6b8ba7ac9572814f556891e86525f7663.tar.gz dotfiles-56d74ee6b8ba7ac9572814f556891e86525f7663.tar.bz2 dotfiles-56d74ee6b8ba7ac9572814f556891e86525f7663.zip | |
Experiment with "as needed" packages and cleanup
31 files changed, 442 insertions, 1337 deletions
diff --git a/files/nixpkgs-patches/274ea258ee704724977160757ac4228ecb6eb31f.diff b/files/nixpkgs-patches/274ea258ee704724977160757ac4228ecb6eb31f.diff deleted file mode 100644 index 780acd3..0000000 --- a/files/nixpkgs-patches/274ea258ee704724977160757ac4228ecb6eb31f.diff +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/pkgs/by-name/or/orca-slicer/package.nix b/pkgs/by-name/or/orca-slicer/package.nix -index faa025a797f0b..96b996e4f38c6 100644 ---- a/pkgs/by-name/or/orca-slicer/package.nix -+++ b/pkgs/by-name/or/orca-slicer/package.nix -@@ -3,6 +3,7 @@ - lib, - binutils, - fetchFromGitHub, -+ fetchpatch, - cmake, - pkg-config, - wrapGAppsHook3, -@@ -126,7 +127,15 @@ stdenv.mkDerivation rec { - patches = [ - # Fix for webkitgtk linking - ./patches/0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch -+ # Link opencv_core and opencv_imgproc instead of opencv_world - ./patches/dont-link-opencv-world-orca.patch -+ # The changeset from https://github.com/SoftFever/OrcaSlicer/pull/7650, can be removed when that PR gets merged -+ # Allows disabling the update nag screen -+ (fetchpatch { -+ name = "pr-7650-configurable-update-check.patch"; -+ url = "https://github.com/SoftFever/OrcaSlicer/commit/d10a06ae11089cd1f63705e87f558e9392f7a167.patch"; -+ hash = "sha256-t4own5AwPsLYBsGA15id5IH1ngM0NSuWdFsrxMRXmTk="; -+ }) - ]; - - doCheck = true; -@@ -186,6 +195,7 @@ stdenv.mkDerivation rec { - "-DCMAKE_CXX_FLAGS=-DGL_SILENCE_DEPRECATION" - "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-as-needed" - "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,${mesa.drivers}/lib -Wl,-rpath,${mesa.osmesa}/lib" -+ "-DORCA_VERSION_CHECK_DEFAULT=OFF" - ]; - - preFixup = '' diff --git a/files/nixpkgs-patches/383432.diff b/files/nixpkgs-patches/383432.diff deleted file mode 100644 index 4f21af4..0000000 --- a/files/nixpkgs-patches/383432.diff +++ /dev/null @@ -1,825 +0,0 @@ -diff --git a/pkgs/applications/emulators/wine/base.nix b/pkgs/applications/emulators/wine/base.nix -index c47a04e9e42c6..aaa53bb38c575 100644 ---- a/pkgs/applications/emulators/wine/base.nix -+++ b/pkgs/applications/emulators/wine/base.nix -@@ -98,7 +98,7 @@ lib.optionalAttrs (buildScript != null) { builder = buildScript; } - ++ lib.optionals gtkSupport [ pkgs.gtk3 pkgs.glib ] - ++ lib.optionals openclSupport [ pkgs.opencl-headers pkgs.ocl-icd ] - ++ lib.optionals tlsSupport [ pkgs.openssl pkgs.gnutls ] -- ++ lib.optionals (openglSupport && !stdenv.hostPlatform.isDarwin) [ pkgs.libGLU pkgs.libGL pkgs.mesa.osmesa pkgs.libdrm ] -+ ++ lib.optionals (openglSupport && !stdenv.hostPlatform.isDarwin) [ pkgs.libGLU pkgs.libGL pkgs.libdrm ] - ++ lib.optionals stdenv.hostPlatform.isDarwin darwinFrameworks - ++ lib.optionals (x11Support) (with pkgs.xorg; [ - libX11 libXcomposite libXcursor libXext libXfixes libXi libXrandr libXrender libXxf86vm -diff --git a/pkgs/applications/video/kodi/unwrapped.nix b/pkgs/applications/video/kodi/unwrapped.nix -index 9cfcfc6072f4f..3974536067c13 100644 ---- a/pkgs/applications/video/kodi/unwrapped.nix -+++ b/pkgs/applications/video/kodi/unwrapped.nix -@@ -18,7 +18,7 @@ - , libcrossguid, libmicrohttpd - , bluez, doxygen, giflib, glib, harfbuzz, lcms2, libidn2, libpthreadstubs, libtasn1 - , libplist, p11-kit, zlib, flatbuffers, fstrcmp, rapidjson --, lirc, mesa -+, lirc, mesa-gl-headers - , x11Support ? true, libX11, xorgproto, libXt, libXmu, libXext, libXinerama, libXrandr, libXtst, libXfixes, xdpyinfo, libXdmcp - , dbusSupport ? true, dbus - , joystickSupport ? true, cwiid -@@ -122,7 +122,7 @@ in stdenv.mkDerivation (finalAttrs: { - bluez giflib glib harfbuzz lcms2 libpthreadstubs - ffmpeg flatbuffers fstrcmp rapidjson - lirc -- mesa # uses eglext_angle.h, which is not provided by glvnd -+ mesa-gl-headers - ] - ++ lib.optionals x11Support [ - libX11 xorgproto libXt libXmu libXext.dev libXdmcp -diff --git a/pkgs/by-name/he/hey-mail/package.nix b/pkgs/by-name/he/hey-mail/package.nix -index 52b0add9188ea..b4e3f10b2995b 100644 ---- a/pkgs/by-name/he/hey-mail/package.nix -+++ b/pkgs/by-name/he/hey-mail/package.nix -@@ -21,7 +21,7 @@ - wrapGAppsHook3, - writeScript, - atk, -- mesa, -+ libgbm, - cups, - systemd, - alsa-lib, -@@ -53,7 +53,7 @@ let - libxkbcommon - libGL - atk -- mesa -+ libgbm - cups - systemd - alsa-lib -diff --git a/pkgs/by-name/ma/magpie/package.nix b/pkgs/by-name/ma/magpie/package.nix -index 65ff728acba0c..35036b14319ca 100644 ---- a/pkgs/by-name/ma/magpie/package.nix -+++ b/pkgs/by-name/ma/magpie/package.nix -@@ -25,6 +25,7 @@ - libXtst, - libinput, - libdrm, -+ libgbm, - gsettings-desktop-schemas, - glib, - gtk3, -@@ -32,7 +33,7 @@ - pipewire, - libgudev, - libwacom, -- mesa, -+ mesa-gl-headers, - meson, - nix-update-script, - validatePkgConfig, -@@ -86,7 +87,7 @@ stdenv.mkDerivation (finalAttrs: { - libXtst - libcap_ng - graphene -- mesa # actually uses eglmesaext -+ mesa-gl-headers - ]; - - nativeBuildInputs = [ -@@ -114,6 +115,7 @@ stdenv.mkDerivation (finalAttrs: { - gtk3 - libcanberra - libdrm -+ libgbm - libgudev - libinput - libstartup_notification -diff --git a/pkgs/by-name/mu/muffin/package.nix b/pkgs/by-name/mu/muffin/package.nix -index ad233c8a85aa1..e781647b9ad7e 100644 ---- a/pkgs/by-name/mu/muffin/package.nix -+++ b/pkgs/by-name/mu/muffin/package.nix -@@ -15,6 +15,7 @@ - json-glib, - libcanberra, - libdrm, -+ libgbm, - libgnomekbd, - libgudev, - libinput, -@@ -24,7 +25,7 @@ - libXdamage, - libxkbcommon, - libXtst, -- mesa, -+ mesa-gl-headers, - meson, - ninja, - pipewire, -@@ -84,6 +85,7 @@ stdenv.mkDerivation rec { - gtk3 - libcanberra - libdrm -+ libgbm - libgnomekbd - libgudev - libinput -@@ -104,7 +106,7 @@ stdenv.mkDerivation rec { - json-glib - libXtst - graphene -- mesa # actually uses eglmesaext -+ mesa-gl-headers - ]; - - mesonFlags = [ -diff --git a/pkgs/by-name/mu/mutter/package.nix b/pkgs/by-name/mu/mutter/package.nix -index 8480c9095b947..4e08097370b5e 100644 ---- a/pkgs/by-name/mu/mutter/package.nix -+++ b/pkgs/by-name/mu/mutter/package.nix -@@ -36,6 +36,7 @@ - libXau, - libinput, - libdrm, -+ libgbm, - libei, - libdisplay-info, - gsettings-desktop-schemas, -@@ -50,7 +51,7 @@ - libwacom, - libSM, - xwayland, -- mesa, -+ mesa-gl-headers, - meson, - gnome-settings-daemon, - xorgserver, -@@ -101,7 +102,7 @@ stdenv.mkDerivation (finalAttrs: { - propagatedBuildInputs = [ - # required for pkg-config to detect mutter-mtk - graphene -- mesa # actually uses eglmesaext -+ mesa-gl-headers - ]; - - nativeBuildInputs = [ -@@ -133,6 +134,7 @@ stdenv.mkDerivation (finalAttrs: { - harfbuzz - libcanberra - libdrm -+ libgbm - libei - libdisplay-info - libGL -diff --git a/pkgs/by-name/mu/mutter46/package.nix b/pkgs/by-name/mu/mutter46/package.nix -index 67079c173ab8d..b594ee5c8cf22 100644 ---- a/pkgs/by-name/mu/mutter46/package.nix -+++ b/pkgs/by-name/mu/mutter46/package.nix -@@ -34,6 +34,7 @@ - libXau, - libinput, - libdrm, -+ libgbm, - libei, - libdisplay-info, - gsettings-desktop-schemas, -@@ -48,7 +49,7 @@ - libwacom, - libSM, - xwayland, -- mesa, -+ mesa-gl-headers, - meson, - gnome-settings-daemon, - xorgserver, -@@ -97,7 +98,7 @@ stdenv.mkDerivation (finalAttrs: { - propagatedBuildInputs = [ - # required for pkg-config to detect mutter-mtk - graphene -- mesa # actually uses eglmesaext -+ mesa-gl-headers - ]; - - nativeBuildInputs = [ -@@ -128,6 +129,7 @@ stdenv.mkDerivation (finalAttrs: { - harfbuzz - libcanberra - libdrm -+ libgbm - libei - libdisplay-info - libgudev -diff --git a/pkgs/by-name/or/orca-slicer/package.nix b/pkgs/by-name/or/orca-slicer/package.nix -index 96b996e4f38c6..89e03d1d69977 100644 ---- a/pkgs/by-name/or/orca-slicer/package.nix -+++ b/pkgs/by-name/or/orca-slicer/package.nix -@@ -27,7 +27,6 @@ - hicolor-icon-theme, - ilmbase, - libpng, -- mesa, - mpfr, - nlopt, - opencascade-occt_7_6, -@@ -107,9 +106,6 @@ stdenv.mkDerivation rec { - hicolor-icon-theme - ilmbase - libpng -- mesa -- mesa.osmesa -- mesa.drivers - mpfr - nlopt - opencascade-occt_7_6 -@@ -129,6 +125,8 @@ stdenv.mkDerivation rec { - ./patches/0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch - # Link opencv_core and opencv_imgproc instead of opencv_world - ./patches/dont-link-opencv-world-orca.patch -+ # Don't link osmesa -+ ./patches/no-osmesa.patch - # The changeset from https://github.com/SoftFever/OrcaSlicer/pull/7650, can be removed when that PR gets merged - # Allows disabling the update nag screen - (fetchpatch { -@@ -169,8 +167,6 @@ stdenv.mkDerivation rec { - - NIX_LDFLAGS = toString [ - (lib.optionalString withSystemd "-ludev") -- "-L${mesa.osmesa}/lib" -- "-L${mesa.drivers}/lib" - "-L${boost186}/lib" - "-lboost_log" - "-lboost_log_setup" -@@ -194,7 +190,6 @@ stdenv.mkDerivation rec { - "-DBOOST_LOG_NO_LIB=OFF" - "-DCMAKE_CXX_FLAGS=-DGL_SILENCE_DEPRECATION" - "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-as-needed" -- "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,${mesa.drivers}/lib -Wl,-rpath,${mesa.osmesa}/lib" - "-DORCA_VERSION_CHECK_DEFAULT=OFF" - ]; - -@@ -202,12 +197,9 @@ stdenv.mkDerivation rec { - gappsWrapperArgs+=( - --prefix LD_LIBRARY_PATH : "$out/lib:${ - lib.makeLibraryPath [ -- mesa.drivers -- mesa.osmesa - glew - ] - }" -- --prefix LIBGL_DRIVERS_PATH : "${mesa.drivers}/lib/dri" - --set WEBKIT_DISABLE_COMPOSITING_MODE 1 - ) - ''; -diff --git a/pkgs/by-name/or/orca-slicer/patches/no-osmesa.patch b/pkgs/by-name/or/orca-slicer/patches/no-osmesa.patch -new file mode 100644 -index 0000000000000..09298b3e55b6d ---- /dev/null -+++ b/pkgs/by-name/or/orca-slicer/patches/no-osmesa.patch -@@ -0,0 +1,13 @@ -+diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt -+index e695acd48..174e233e6 100644 -+--- a/src/slic3r/CMakeLists.txt -++++ b/src/slic3r/CMakeLists.txt -+@@ -587,7 +587,7 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") -+ FIND_LIBRARY(WAYLAND_EGL_LIBRARIES NAMES wayland-egl) -+ FIND_LIBRARY(WAYLAND_CLIENT_LIBRARIES NAMES wayland-client) -+ find_package(CURL REQUIRED) -+- target_link_libraries(libslic3r_gui ${DBUS_LIBRARIES} OSMesa) -++ target_link_libraries(libslic3r_gui ${DBUS_LIBRARIES}) -+ target_link_libraries(libslic3r_gui -+ OpenGL::EGL -+ ${WAYLAND_SERVER_LIBRARIES} -diff --git a/pkgs/by-name/qq/qqmusic/package.nix b/pkgs/by-name/qq/qqmusic/package.nix -index 4faa34fd83a42..4e35c80b4a9ac 100644 ---- a/pkgs/by-name/qq/qqmusic/package.nix -+++ b/pkgs/by-name/qq/qqmusic/package.nix -@@ -21,7 +21,6 @@ - libdbusmenu, - libglvnd, - libpulseaudio, -- mesa, - nspr, - nss, - pango, -@@ -62,7 +61,6 @@ stdenv.mkDerivation (finalAttrs: { - libdbusmenu - libglvnd - libpulseaudio -- mesa - nspr - nss - pango -diff --git a/pkgs/desktops/enlightenment/efl/default.nix b/pkgs/desktops/enlightenment/efl/default.nix -index 6e7b77e2089d4..fc5853479f467 100644 ---- a/pkgs/desktops/enlightenment/efl/default.nix -+++ b/pkgs/desktops/enlightenment/efl/default.nix -@@ -27,6 +27,7 @@ - jbig2dec, - libGL, - libdrm, -+ libgbm, - libinput, - libjpeg, - libpng, -@@ -40,7 +41,7 @@ - libxkbcommon, - lua, - lz4, -- mesa, -+ mesa-gl-headers, - mint-x-icons, - openjpeg, - openssl, -@@ -91,7 +92,7 @@ stdenv.mkDerivation rec { - libsndfile - libtiff - lz4 -- mesa # actually uses eglmesaext -+ mesa-gl-headers - openssl - systemd - udev -@@ -118,6 +119,7 @@ stdenv.mkDerivation rec { - hicolor-icon-theme # for the icon theme - jbig2dec - libdrm -+ libgbm - libinput - libjpeg - libraw -diff --git a/pkgs/development/libraries/arrayfire/default.nix b/pkgs/development/libraries/arrayfire/default.nix -index c33e6f4cbfe25..d0259c6016b29 100644 ---- a/pkgs/development/libraries/arrayfire/default.nix -+++ b/pkgs/development/libraries/arrayfire/default.nix -@@ -245,5 +245,6 @@ stdenv.mkDerivation rec { - chessai - twesterhout - ]; -+ broken = true; - }; - } -diff --git a/pkgs/development/libraries/cogl/default.nix b/pkgs/development/libraries/cogl/default.nix -index 469a33c8d713e..58164f4454a54 100644 ---- a/pkgs/development/libraries/cogl/default.nix -+++ b/pkgs/development/libraries/cogl/default.nix -@@ -14,7 +14,8 @@ - gobject-introspection, - wayland, - gnome, -- mesa, -+ libgbm, -+ mesa-gl-headers, - automake, - autoconf, - gstreamerSupport ? false, -@@ -86,7 +87,8 @@ stdenv.mkDerivation rec { - ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ - wayland -- mesa # actually uses eglmesaext -+ libgbm -+ mesa-gl-headers - libGL - xorg.libXrandr - xorg.libXfixes -diff --git a/pkgs/development/libraries/mesa/common.nix b/pkgs/development/libraries/mesa/common.nix -index 8439861cf36c8..23e5104ffcf6f 100644 ---- a/pkgs/development/libraries/mesa/common.nix -+++ b/pkgs/development/libraries/mesa/common.nix -@@ -5,14 +5,14 @@ - # nix build .#legacyPackages.x86_64-darwin.mesa .#legacyPackages.aarch64-darwin.mesa - rec { - pname = "mesa"; -- version = "24.3.4"; -+ version = "25.0.1"; - - src = fetchFromGitLab { - domain = "gitlab.freedesktop.org"; - owner = "mesa"; - repo = "mesa"; - rev = "mesa-${version}"; -- hash = "sha256-1RUHbTgcCxdDrWjqB0EG4Ny/nwdjQHHpyPauiW/yogU="; -+ hash = "sha256-9D4d7EEdZysvXDRcmpbyt85Lo64sldNRomp6/HUVORo="; - }; - - meta = { -diff --git a/pkgs/development/libraries/mesa/cross_clc.patch b/pkgs/development/libraries/mesa/cross_clc.patch -deleted file mode 100644 -index cb29e57ec3493..0000000000000 ---- a/pkgs/development/libraries/mesa/cross_clc.patch -+++ /dev/null -@@ -1,90 +0,0 @@ --commit f063e9f74b45f34e4ac570a90901253bf8e64efd --Author: Mary Guillemard <mary.guillemard@collabora.com> --Date: 2024-12-02 09:11:35 +0100 -- -- meson: Add mesa-clc and install-mesa-clc options -- -- Due to the cross build issues in current meson, we adds new options to -- allow mesa_clc and vtn_bindgen to be installed or searched on the -- system. -- -- Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> -- Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> -- Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> -- Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32719> -- --diff --git a/meson.build b/meson.build --index de9c9af53a1..e37325ec176 100644 ----- a/meson.build --+++ b/meson.build --@@ -808,7 +808,7 @@ if with_gallium_rusticl or with_nouveau_vk or with_tools.contains('etnaviv') -- endif -- -- with_clover_spirv = with_gallium_clover and get_option('opencl-spirv') ---with_clc = with_microsoft_clc or with_intel_clc or with_gallium_asahi or with_asahi_vk or with_gallium_rusticl or with_clover_spirv --+with_clc = get_option('mesa-clc') != 'auto' or with_microsoft_clc or with_intel_clc or with_gallium_asahi or with_asahi_vk or with_gallium_rusticl -- -- dep_clc = null_dep -- if with_gallium_clover or with_clc --diff --git a/meson_options.txt b/meson_options.txt --index 79ee65e6094..8f22b36e5fb 100644 ----- a/meson_options.txt --+++ b/meson_options.txt --@@ -744,3 +744,20 @@ option( -- 'none', 'dri2' -- ], -- ) --+ --+option( --+ 'mesa-clc', --+ type : 'combo', --+ value : 'auto', --+ choices : [ --+ 'enabled', 'system', 'auto' --+ ], --+ description : 'Build the mesa-clc compiler or use a system version.' --+) --+ --+option( --+ 'install-mesa-clc', --+ type : 'boolean', --+ value : false, --+ description : 'Install the mesa-clc compiler (if needed for cross builds).' --+) --diff --git a/src/compiler/clc/meson.build b/src/compiler/clc/meson.build --index 74767d08de2..4875d71ca21 100644 ----- a/src/compiler/clc/meson.build --+++ b/src/compiler/clc/meson.build --@@ -117,15 +117,20 @@ idep_mesaclc = declare_dependency( -- link_args : _idep_mesaclc_link_args, -- ) -- ---prog_mesa_clc = executable( --- 'mesa_clc', --- ['mesa_clc.c'], --- include_directories : [inc_include, inc_src], --- c_args : [pre_args, no_override_init_args], --- link_args : [ld_args_build_id], --- dependencies : [idep_mesaclc, dep_llvm, dep_spirv_tools, idep_getopt], --- # If we can run host binaries directly, just build mesa_clc for the host. --- # Most commonly this happens when doing a cross compile from an x86_64 build --- # machine to an x86 host --- native : not meson.can_run_host_binaries(), ---) --+if get_option('mesa-clc') == 'system' --+ prog_mesa_clc = find_program('mesa_clc', native : true) --+else --+ prog_mesa_clc = executable( --+ 'mesa_clc', --+ ['mesa_clc.c'], --+ include_directories : [inc_include, inc_src], --+ c_args : [pre_args, no_override_init_args], --+ link_args : [ld_args_build_id], --+ dependencies : [idep_mesaclc, dep_llvm, dep_spirv_tools, idep_getopt], --+ # If we can run host binaries directly, just build mesa_clc for the host. --+ # Most commonly this happens when doing a cross compile from an x86_64 build --+ # machine to an x86 host --+ native : not meson.can_run_host_binaries(), --+ install : get_option('install-mesa-clc'), --+ ) --+endif -diff --git a/pkgs/development/libraries/mesa/darwin.nix b/pkgs/development/libraries/mesa/darwin.nix -index 55392071010a9..1a458523632ec 100644 ---- a/pkgs/development/libraries/mesa/darwin.nix -+++ b/pkgs/development/libraries/mesa/darwin.nix -@@ -27,18 +27,6 @@ stdenv.mkDerivation { - meta - ; - -- # Darwin build fixes. FIXME: remove in 25.1. -- patches = [ -- (fetchpatch { -- url = "https://gitlab.freedesktop.org/mesa/mesa/-/commit/e89eba0796b3469f1d2cdbb600309f6231a8169d.patch"; -- hash = "sha256-0EP0JsYy+UTQ+eGd3sMfoLf1R+2e8n1flmQAHq3rCR4="; -- }) -- (fetchpatch { -- url = "https://gitlab.freedesktop.org/mesa/mesa/-/commit/568a4ca899762fe96fc9b34d2288d07e6656af87.patch"; -- hash = "sha256-uLxa5vA3/cYAIJT9h7eBQ1EBu4MnMg9R5uGAHzTb5Fc="; -- }) -- ]; -- - outputs = [ - "out" - "dev" -diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix -index 633770b6862c8..3fe641b4476c0 100644 ---- a/pkgs/development/libraries/mesa/default.nix -+++ b/pkgs/development/libraries/mesa/default.nix -@@ -91,6 +91,7 @@ - "intel-nullhw" - ] - , mesa -+, mesa-gl-headers - , makeSetupHook - }: - -@@ -138,9 +139,6 @@ in stdenv.mkDerivation { - - patches = [ - ./opencl.patch -- # cherry-picked from https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32719 -- # safe to remove for versions > 24.3.2 -- ./cross_clc.patch - ]; - - postPatch = '' -@@ -154,15 +152,28 @@ in stdenv.mkDerivation { - substituteInPlace src/amd/vulkan/meson.build --replace \ - "get_option('datadir')" "'${placeholder "out"}/share'" - -+ for header in ${toString mesa-gl-headers.headers}; do -+ if ! diff -q $header ${mesa-gl-headers}/$header; then -+ echo "File $header does not match between mesa and mesa-gl-headers, please update mesa-gl-headers first!" -+ exit 42 -+ fi -+ done -+ - ${copyRustDeps} - ''; - - outputs = [ -- "out" "dev" "drivers" "driversdev" "opencl" "teflon" "osmesa" -+ "out" "dev" -+ "drivers" -+ # OpenCL drivers pull in ~1G of extra LLVM stuff, so don't install them -+ # if the user didn't explicitly ask for it -+ "opencl" - # the Dozen drivers depend on libspirv2dxil, but link it statically, and - # libspirv2dxil itself is pretty chonky, so relocate it to its own output in - # case anything wants to use it at some point - "spirv2dxil" -+ # tools for the host platform to be used when cross-compiling -+ "cross_tools" - ]; - - # Keep build-ids so drivers can use them for caching, etc. -@@ -196,8 +207,10 @@ in stdenv.mkDerivation { - # Enable glvnd for dynamic libGL dispatch - (lib.mesonEnable "glvnd" true) - -- (lib.mesonBool "gallium-nine" true) # Direct3D in Wine -- (lib.mesonBool "osmesa" true) # used by wine -+ (lib.mesonBool "gallium-nine" false) # Direct3D9 in Wine, largely supplanted by DXVK -+ (lib.mesonBool "osmesa" false) # deprecated upstream -+ (lib.mesonEnable "gallium-xa" false) # old and mostly dead -+ - (lib.mesonBool "teflon" true) # TensorFlow frontend - - # Enable all freedreno kernel mode drivers. (For example, virtio can be -@@ -206,14 +219,13 @@ in stdenv.mkDerivation { - (lib.mesonOption "freedreno-kmds" "msm,kgsl,virtio,wsl") - - # Enable Intel RT stuff when available -- (lib.mesonBool "install-intel-clc" true) -- (lib.mesonBool "install-mesa-clc" true) - (lib.mesonEnable "intel-rt" stdenv.hostPlatform.isx86_64) -+ -+ # Required for OpenCL - (lib.mesonOption "clang-libdir" "${lib.getLib llvmPackages.clang-unwrapped}/lib") - - # Clover, old OpenCL frontend - (lib.mesonOption "gallium-opencl" "icd") -- (lib.mesonBool "opencl-spirv" true) - - # Rusticl, new OpenCL frontend - (lib.mesonBool "gallium-rusticl" true) -@@ -221,12 +233,18 @@ in stdenv.mkDerivation { - # meson auto_features enables this, but we do not want it - (lib.mesonEnable "android-libbacktrace" false) - (lib.mesonEnable "microsoft-clc" false) # Only relevant on Windows (OpenCL 1.2 API on top of D3D12) -+ -+ # Build and install extra tools for cross -+ (lib.mesonBool "install-mesa-clc" true) -+ (lib.mesonBool "install-precomp-compiler" true) -+ -+ # Disable valgrind on targets where it's not available - (lib.mesonEnable "valgrind" withValgrind) - ] ++ lib.optionals enablePatentEncumberedCodecs [ - (lib.mesonOption "video-codecs" "all") - ] ++ lib.optionals needNativeCLC [ -- (lib.mesonOption "intel-clc" "system") - (lib.mesonOption "mesa-clc" "system") -+ (lib.mesonOption "precomp-compiler" "system") - ]; - - strictDeps = true; -@@ -295,11 +313,11 @@ in stdenv.mkDerivation { - wayland-scanner - ] ++ lib.optionals needNativeCLC [ - # `or null` to not break eval with `attribute missing` on darwin to linux cross -- (buildPackages.mesa.driversdev or null) -+ (buildPackages.mesa.cross_tools or null) - ]; - - disallowedRequisites = lib.optionals needNativeCLC [ -- (buildPackages.mesa.driversdev or null) -+ (buildPackages.mesa.cross_tools or null) - ]; - - propagatedBuildInputs = [ libdrm ]; -@@ -308,13 +326,14 @@ in stdenv.mkDerivation { - - postInstall = '' - # Move driver-related bits to $drivers -+ moveToOutput "lib/gallium-pipe" $drivers - moveToOutput "lib/gbm" $drivers - moveToOutput "lib/lib*_mesa*" $drivers - moveToOutput "lib/libgallium*" $drivers - moveToOutput "lib/libglapi*" $drivers - moveToOutput "lib/libpowervr_rogue*" $drivers - moveToOutput "lib/libvulkan_*" $drivers -- moveToOutput "lib/libxatracker*" $drivers -+ moveToOutput "lib/libteflon.so" $drivers - - # Update search path used by glvnd (it's pointing to $out but drivers are in $drivers) - for js in $drivers/share/glvnd/egl_vendor.d/*.json; do -@@ -337,14 +356,14 @@ in stdenv.mkDerivation { - echo $opencl/lib/libMesaOpenCL.so > $opencl/etc/OpenCL/vendors/mesa.icd - echo $opencl/lib/libRusticlOpenCL.so > $opencl/etc/OpenCL/vendors/rusticl.icd - -- moveToOutput bin/intel_clc $driversdev -- moveToOutput bin/mesa_clc $driversdev -- moveToOutput lib/gallium-pipe $opencl -+ moveToOutput bin/intel_clc $cross_tools -+ moveToOutput bin/mesa_clc $cross_tools -+ moveToOutput bin/vtn_bindgen $cross_tools -+ - moveToOutput "lib/lib*OpenCL*" $opencl -- moveToOutput "lib/libOSMesa*" $osmesa -+ - moveToOutput bin/spirv2dxil $spirv2dxil - moveToOutput "lib/libspirv_to_dxil*" $spirv2dxil -- moveToOutput lib/libteflon.so $teflon - ''; - - postFixup = '' -@@ -356,15 +375,9 @@ in stdenv.mkDerivation { - # remove pkgconfig files for GL/EGL; they are provided by libGL. - rm -f $dev/lib/pkgconfig/{gl,egl}.pc - -- # Move development files for libraries in $drivers to $driversdev -- mkdir -p $driversdev/include -- mv $dev/include/xa_* $dev/include/d3d* -t $driversdev/include || true -- mkdir -p $driversdev/lib/pkgconfig -- for pc in lib/pkgconfig/{xatracker,d3d}.pc; do -- if [ -f "$dev/$pc" ]; then -- substituteInPlace "$dev/$pc" --replace $out $drivers -- mv $dev/$pc $driversdev/$pc -- fi -+ # remove headers moved to mesa-gl-headers -+ for header in ${toString mesa-gl-headers.headers}; do -+ rm -f $dev/$header - done - - # update symlinks pointing to libgallium in $out -@@ -392,7 +405,7 @@ in stdenv.mkDerivation { - - env.NIX_CFLAGS_COMPILE = toString ([ - "-UPIPE_SEARCH_DIR" -- "-DPIPE_SEARCH_DIR=\"${placeholder "opencl"}/lib/gallium-pipe\"" -+ "-DPIPE_SEARCH_DIR=\"${placeholder "drivers"}/lib/gallium-pipe\"" - ]); - - passthru = { -diff --git a/pkgs/development/libraries/mesa/headers.nix b/pkgs/development/libraries/mesa/headers.nix -new file mode 100644 -index 0000000000000..314e1ac5efadd ---- /dev/null -+++ b/pkgs/development/libraries/mesa/headers.nix -@@ -0,0 +1,39 @@ -+{ -+ lib, -+ stdenv, -+ fetchFromGitLab, -+}: -+ -+let -+ common = import ./common.nix { inherit lib fetchFromGitLab; }; -+ headers = [ -+ "include/EGL/eglext_angle.h" -+ "include/EGL/eglmesaext.h" -+ ]; -+in -+stdenv.mkDerivation rec { -+ pname = "mesa-gl-headers"; -+ -+ # These are a bigger rebuild and don't change often, so keep them separate. -+ version = "25.0.1"; -+ -+ src = fetchFromGitLab { -+ domain = "gitlab.freedesktop.org"; -+ owner = "mesa"; -+ repo = "mesa"; -+ rev = "mesa-${version}"; -+ hash = "sha256-9D4d7EEdZysvXDRcmpbyt85Lo64sldNRomp6/HUVORo="; -+ }; -+ -+ dontBuild = true; -+ -+ installPhase = '' -+ for header in ${toString headers}; do -+ install -Dm444 $header $out/$header -+ done -+ ''; -+ -+ passthru = { inherit headers; }; -+ -+ inherit (common) meta; -+} -diff --git a/pkgs/development/python-modules/horizon-eda/default.nix b/pkgs/development/python-modules/horizon-eda/default.nix -index f1b64a71ae32b..e444dc2705ca2 100644 ---- a/pkgs/development/python-modules/horizon-eda/default.nix -+++ b/pkgs/development/python-modules/horizon-eda/default.nix -@@ -1,7 +1,6 @@ - { - buildPythonPackage, - horizon-eda, -- mesa, - pycairo, - python, - pythonOlder, -@@ -24,8 +23,6 @@ buildPythonPackage { - disabled = pythonOlder "3.9"; - - buildInputs = base.buildInputs ++ [ -- mesa -- mesa.osmesa - python - ]; - -diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix -index 2dc81662f4257..754055f229ba5 100644 ---- a/pkgs/servers/x11/xorg/overrides.nix -+++ b/pkgs/servers/x11/xorg/overrides.nix -@@ -604,7 +604,6 @@ self: super: - }); - - xf86videovmware = super.xf86videovmware.overrideAttrs (attrs: { -- buildInputs = attrs.buildInputs ++ [ mesa mesa.driversdev llvm ]; # for libxatracker - env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=address" ]; # gcc12 - meta = attrs.meta // { - platforms = ["i686-linux" "x86_64-linux"]; -diff --git a/pkgs/tools/X11/primus/lib.nix b/pkgs/tools/X11/primus/lib.nix -index 7e6572f66a9a5..1beecf73015ec 100644 ---- a/pkgs/tools/X11/primus/lib.nix -+++ b/pkgs/tools/X11/primus/lib.nix -@@ -5,7 +5,6 @@ - fetchpatch, - libX11, - libGL, -- mesa, - nvidia_x11 ? null, - libglvnd, - }: -@@ -48,7 +47,6 @@ stdenv.mkDerivation { - "LIBDIR=$(out)/lib" - "PRIMUS_libGLa=${aPackage}/lib/libGL.so" - "PRIMUS_libGLd=${libGL}/lib/libGL.so" -- "PRIMUS_LOAD_GLOBAL=${mesa}/lib/libglapi.so" - ]; - - installPhase = '' -diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix -index 3feea755f81b5..ae79b42a313c5 100644 ---- a/pkgs/top-level/all-packages.nix -+++ b/pkgs/top-level/all-packages.nix -@@ -9905,6 +9905,7 @@ with pkgs; - mesa_i686 = pkgsi686Linux.mesa; # make it build on Hydra - - libgbm = callPackage ../development/libraries/mesa/gbm.nix {}; -+ mesa-gl-headers = callPackage ../development/libraries/mesa/headers.nix {}; - - ## End libGL/libGLU/Mesa stuff - -diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix -index d781f386f10ba..6a9fc437c31b6 100644 ---- a/pkgs/top-level/python-packages.nix -+++ b/pkgs/top-level/python-packages.nix -@@ -6099,7 +6099,7 @@ self: super: with self; { - hopcroftkarp = callPackage ../development/python-modules/hopcroftkarp { }; - - horizon-eda = callPackage ../development/python-modules/horizon-eda { -- inherit (pkgs) horizon-eda mesa; -+ inherit (pkgs) horizon-eda; - }; - - howdoi = callPackage ../development/python-modules/howdoi { }; diff --git a/files/nixpkgs-patches/d3631853bd708955edfe71dca94171efb5749711.diff b/files/nixpkgs-patches/d3631853bd708955edfe71dca94171efb5749711.diff deleted file mode 100644 index 550506d..0000000 --- a/files/nixpkgs-patches/d3631853bd708955edfe71dca94171efb5749711.diff +++ /dev/null @@ -1,80 +0,0 @@ -diff --git a/pkgs/by-name/or/orca-slicer/package.nix b/pkgs/by-name/or/orca-slicer/package.nix -index 96b996e4f38c6..89e03d1d69977 100644 ---- a/pkgs/by-name/or/orca-slicer/package.nix -+++ b/pkgs/by-name/or/orca-slicer/package.nix -@@ -27,7 +27,6 @@ - hicolor-icon-theme, - ilmbase, - libpng, -- mesa, - mpfr, - nlopt, - opencascade-occt_7_6, -@@ -107,9 +106,6 @@ stdenv.mkDerivation rec { - hicolor-icon-theme - ilmbase - libpng -- mesa -- mesa.osmesa -- mesa.drivers - mpfr - nlopt - opencascade-occt_7_6 -@@ -129,6 +125,8 @@ stdenv.mkDerivation rec { - ./patches/0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch - # Link opencv_core and opencv_imgproc instead of opencv_world - ./patches/dont-link-opencv-world-orca.patch -+ # Don't link osmesa -+ ./patches/no-osmesa.patch - # The changeset from https://github.com/SoftFever/OrcaSlicer/pull/7650, can be removed when that PR gets merged - # Allows disabling the update nag screen - (fetchpatch { -@@ -169,8 +167,6 @@ stdenv.mkDerivation rec { - - NIX_LDFLAGS = toString [ - (lib.optionalString withSystemd "-ludev") -- "-L${mesa.osmesa}/lib" -- "-L${mesa.drivers}/lib" - "-L${boost186}/lib" - "-lboost_log" - "-lboost_log_setup" -@@ -194,7 +190,6 @@ stdenv.mkDerivation rec { - "-DBOOST_LOG_NO_LIB=OFF" - "-DCMAKE_CXX_FLAGS=-DGL_SILENCE_DEPRECATION" - "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-as-needed" -- "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,${mesa.drivers}/lib -Wl,-rpath,${mesa.osmesa}/lib" - "-DORCA_VERSION_CHECK_DEFAULT=OFF" - ]; - -@@ -202,12 +197,9 @@ stdenv.mkDerivation rec { - gappsWrapperArgs+=( - --prefix LD_LIBRARY_PATH : "$out/lib:${ - lib.makeLibraryPath [ -- mesa.drivers -- mesa.osmesa - glew - ] - }" -- --prefix LIBGL_DRIVERS_PATH : "${mesa.drivers}/lib/dri" - --set WEBKIT_DISABLE_COMPOSITING_MODE 1 - ) - ''; -diff --git a/pkgs/by-name/or/orca-slicer/patches/no-osmesa.patch b/pkgs/by-name/or/orca-slicer/patches/no-osmesa.patch -new file mode 100644 -index 0000000000000..09298b3e55b6d ---- /dev/null -+++ b/pkgs/by-name/or/orca-slicer/patches/no-osmesa.patch -@@ -0,0 +1,13 @@ -+diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt -+index e695acd48..174e233e6 100644 -+--- a/src/slic3r/CMakeLists.txt -++++ b/src/slic3r/CMakeLists.txt -+@@ -587,7 +587,7 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") -+ FIND_LIBRARY(WAYLAND_EGL_LIBRARIES NAMES wayland-egl) -+ FIND_LIBRARY(WAYLAND_CLIENT_LIBRARIES NAMES wayland-client) -+ find_package(CURL REQUIRED) -+- target_link_libraries(libslic3r_gui ${DBUS_LIBRARIES} OSMesa) -++ target_link_libraries(libslic3r_gui ${DBUS_LIBRARIES}) -+ target_link_libraries(libslic3r_gui -+ OpenGL::EGL -+ ${WAYLAND_SERVER_LIBRARIES} diff --git a/files/nixpkgs-patches/f57f3d99091a105cbd9484c33264558785efc4be.diff b/files/nixpkgs-patches/f57f3d99091a105cbd9484c33264558785efc4be.diff new file mode 100644 index 0000000..86100d5 --- /dev/null +++ b/files/nixpkgs-patches/f57f3d99091a105cbd9484c33264558785efc4be.diff @@ -0,0 +1,64 @@ +diff --git a/docs/changelog.rst b/docs/changelog.rst +index 502ee01193..b20c1a39f0 100644 +--- a/docs/changelog.rst ++++ b/docs/changelog.rst +@@ -110,6 +110,9 @@ Detailed list of changes + - Fix a regression in version 0.40.0 causing a crash when the underline + thickness of the font is zero (:iss:`8443`) + ++- Fix a regression in version 0.40.0 causing a hang on resizing with a wide ++ character at the right edge of a line that needs to be moved onto the next ++ line (:iss:`8464`) + + 0.40.1 [2025-03-18] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +diff --git a/kitty/resize.c b/kitty/resize.c +index 78980b7886..280495fab3 100644 +--- a/kitty/resize.c ++++ b/kitty/resize.c +@@ -228,7 +228,7 @@ multiline_copy_src_to_dest(Rewrap *r) { + + static void + fast_copy_src_to_dest(Rewrap *r) { +- CPUCell *c; index_type mc_width; ++ CPUCell *c; + while (r->src.x < r->src_x_limit) { + if (r->dest.x >= dest_xnum) { + next_dest_line(r, true); +@@ -238,17 +238,10 @@ fast_copy_src_to_dest(Rewrap *r) { + } + } + index_type num = MIN(r->src_x_limit - r->src.x, dest_xnum - r->dest.x); +- if (num && (c = &r->src.line.cpu_cells[r->src.x + num - 1])->is_multicell && c->x != (mc_width = mcd_x_limit(c)) - 1) { ++ if (num && (c = &r->src.line.cpu_cells[r->src.x + num - 1])->is_multicell && c->x != mcd_x_limit(c) - 1) { + // we have a split multicell at the right edge of the copy region +- if (num > mc_width) num = MIN(r->src_x_limit - r->src.x - mc_width, num); +- else { +- if (mc_width > dest_xnum) { +- multiline_copy_src_to_dest(r); +- return; +- } +- r->dest.x = dest_xnum; +- continue; +- } ++ multiline_copy_src_to_dest(r); ++ return; + } + copy_range(&r->src.line, r->src.x, &r->dest.line, r->dest.x, num); + update_tracked_cursors(r, num, r->src.y, r->dest.y, r->src_x_limit); +diff --git a/kitty_tests/multicell.py b/kitty_tests/multicell.py +index 63e9892b81..94c2010c9f 100644 +--- a/kitty_tests/multicell.py ++++ b/kitty_tests/multicell.py +@@ -98,6 +98,11 @@ def assert_line(text, y=None): + def assert_cursor_at(x, y): + self.ae((s.cursor.x, s.cursor.y), (x, y)) + ++ s = self.create_screen(cols=8, lines=4) ++ s.draw('飛青進服三上') ++ s.resize(s.lines, 5) ++ self.ae('飛青', str(s.line(0))) ++ + s = self.create_screen(cols=6, lines=6) + + # Test basic multicell drawing diff --git a/files/nvim/init.vim b/files/nvim/init.vim index d52edcc..b05acbd 100644 --- a/files/nvim/init.vim +++ b/files/nvim/init.vim @@ -5,8 +5,6 @@ set signcolumn=yes set updatetime=250 set scrolloff=5 -" https://github.com/SmiteshP/nvim-navic - " Change directory based on current file. if !empty($NIX_SHELL) " Attempt to conflict less with plugins. @@ -205,6 +203,13 @@ function! SyntaxGroup() echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name') endfun +" https://vi.stackexchange.com/a/456 +function! TrimWhitespace() + let l:save = winsaveview() + keeppatterns %s/\s\+$//e + call winrestview(l:save) +endfun + " https://github.com/junegunn/fzf.vim?tab=readme-ov-file#example-git-grep-wrapper command! -bang -nargs=* GGrep \ call fzf#vim#grep( @@ -236,7 +241,7 @@ function get_lsp_name() end buf_is_big = function(bufnr) - local max_filesize = 100 * 1024 -- 100 KB + local max_filesize = 100 * 1024 -- 100KB local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(bufnr)) if ok and stats and stats.size > max_filesize then return true @@ -247,6 +252,7 @@ end -- LSP configs. if os.getenv('NIX_SHELL') ~= nil then + vim.diagnostic.config({ virtual_text = true }) local lsp = require('lspconfig') lsp.clangd.setup({ cmd = { @@ -259,15 +265,21 @@ if os.getenv('NIX_SHELL') ~= nil then '--completion-style=bundled', '--pch-storage=memory', '--header-insertion=never', - '--header-insertion-decorators=0' + '--header-insertion-decorators=0', + '--query-driver=gcc' }, capabilities = { textDocument = { semanticHighlightingCapabilities = { semanticHighlighting = true + }, + completion = { + completionItem = { + snippetSupport = false + } } } - } + }, }) lsp.ruff.setup({}) -- https://github.com/neovim/nvim-lspconfig/issues/2626#issuecomment-2117022664 @@ -275,10 +287,10 @@ if os.getenv('NIX_SHELL') ~= nil then vim.api.nvim_create_autocmd('BufReadPre', { callback = function(t) if buf_is_big(t.buf) then - vim.o.eventignore = "FileType" + vim.o.eventignore = 'FileType' vim.schedule(function() - vim.o.eventignore = "" - print("Dropped FileType events because the buffer is too big") + vim.o.eventignore = '' + print('Dropped FileType events because the buffer is too big') end) end end @@ -297,7 +309,12 @@ require('mini.sessions').setup({ }) -- Completion. -require('mini.completion').setup({}) +require('mini.completion').setup({ + window = { + info = { border = 'none' }, + signature = { border = 'none' } + } +}) -- Don't use tabs in Neogit. require('neogit').setup({ diff --git a/files/nvim/mini_completion_no_title.diff b/files/nvim/mini_completion_no_title.diff new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/files/nvim/mini_completion_no_title.diff diff --git a/files/nvim/mini_sessions_view.diff b/files/nvim/mini_sessions_view.diff deleted file mode 100644 index 7fa8500..0000000 --- a/files/nvim/mini_sessions_view.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/lua/mini/sessions.lua b/lua/mini/sessions.lua -index 67d0239..bb20292 100644 ---- a/lua/mini/sessions.lua -+++ b/lua/mini/sessions.lua -@@ -248,7 +248,7 @@ MiniSessions.write = function(session_name, opts) - H.possibly_execute(opts.hooks.pre, data) - - -- Make session file -- local command = string.format('mksession%s %s', opts.force and '!' or '', vim.fn.fnameescape(session_path)) -+ local command = string.format('mkview%s %s', opts.force and '!' or '', vim.fn.fnameescape(session_path)) - vim.cmd(command) - data.modify_time = vim.fn.getftime(session_path) - diff --git a/files/nvim/mini_starter_picture.diff b/files/nvim/mini_starter_picture.diff index 7831ca1..1066573 100644 --- a/files/nvim/mini_starter_picture.diff +++ b/files/nvim/mini_starter_picture.diff @@ -1,5 +1,5 @@ diff --git a/lua/mini/starter.lua b/lua/mini/starter.lua -index 8520569e..939e16de 100644 +index 3e0570f3..3f003ba8 100644 --- a/lua/mini/starter.lua +++ b/lua/mini/starter.lua @@ -138,7 +138,7 @@ @@ -34,7 +34,7 @@ index 8520569e..939e16de 100644 -- Array of functions to be applied consecutively to initial content. -- Each function should take and return content for Starter buffer (see -- |mini.starter| and |MiniStarter.get_content()| for more details). -@@ -372,7 +381,7 @@ MiniStarter.refresh = function(buf_id) +@@ -373,7 +382,7 @@ MiniStarter.refresh = function(buf_id) data.footer = H.normalize_header_footer(config.footer or H.default_footer) -- Evaluate content @@ -43,7 +43,7 @@ index 8520569e..939e16de 100644 local hooks = config.content_hooks or H.default_content_hooks for _, f in ipairs(hooks) do content = f(content, buf_id) -@@ -399,6 +408,12 @@ MiniStarter.refresh = function(buf_id) +@@ -400,6 +409,12 @@ MiniStarter.refresh = function(buf_id) -- Apply current query (clear command line afterwards) H.make_query(buf_id) @@ -56,7 +56,7 @@ index 8520569e..939e16de 100644 end --- Close Starter buffer -@@ -730,18 +745,45 @@ MiniStarter.gen_hook.aligning = function(horizontal, vertical) +@@ -731,18 +746,45 @@ MiniStarter.gen_hook.aligning = function(horizontal, vertical) local win_id = vim.fn.bufwinid(buf_id) if win_id < 0 then return end @@ -104,7 +104,7 @@ index 8520569e..939e16de 100644 return MiniStarter.gen_hook.padding(left_pad, top_pad)(content) end end -@@ -1004,7 +1046,7 @@ H.default_footer = [[ +@@ -1005,7 +1047,7 @@ H.default_footer = [[ Type query to filter items <BS> deletes latest character from query <Esc> resets current query @@ -113,7 +113,7 @@ index 8520569e..939e16de 100644 <CR> executes action of current item <C-c> closes this buffer]] -@@ -1048,8 +1090,54 @@ end +@@ -1046,8 +1088,54 @@ end H.apply_config = function(config) MiniStarter.config = config end @@ -169,7 +169,7 @@ index 8520569e..939e16de 100644 if config.autoopen then local on_vimenter = function() -@@ -1061,7 +1149,7 @@ H.create_autocommands = function(config) +@@ -1059,7 +1147,7 @@ H.create_autocommands = function(config) vim.cmd('noautocmd lua MiniStarter.open()') end @@ -178,7 +178,7 @@ index 8520569e..939e16de 100644 vim.api.nvim_create_autocmd('VimEnter', au_opts) end -@@ -1107,9 +1195,11 @@ H.normalize_header_footer = function(x) +@@ -1105,9 +1193,11 @@ H.normalize_header_footer = function(x) end -- Work with buffer content --------------------------------------------------- @@ -191,7 +191,7 @@ index 8520569e..939e16de 100644 -- Add header lines for _, l in ipairs(header) do H.content_add_line(content, { H.content_unit(l, 'header', 'MiniStarterHeader') }) -@@ -1120,7 +1210,7 @@ H.make_initial_content = function(header, items, footer) +@@ -1118,7 +1208,7 @@ H.make_initial_content = function(header, items, footer) H.content_add_items(content, items) -- Add footer lines @@ -200,7 +200,7 @@ index 8520569e..939e16de 100644 for _, l in ipairs(footer) do H.content_add_line(content, { H.content_unit(l, 'footer', 'MiniStarterFooter') }) end -@@ -1323,11 +1413,22 @@ H.make_buffer_autocmd = function(buf_id) +@@ -1321,11 +1411,22 @@ H.make_buffer_autocmd = function(buf_id) au('VimResized', function() MiniStarter.refresh(buf_id) end, 'Refresh') au('CursorMoved', function() H.position_cursor_on_current_item(buf_id) end, 'Position cursor') @@ -223,19 +223,8 @@ index 8520569e..939e16de 100644 end H.apply_buffer_options = function(buf_id) -@@ -1341,17 +1442,11 @@ H.apply_buffer_options = function(buf_id) - - -- Set unique buffer name. Prefer "Starter" prefix as more user friendly. - H.buffer_number = H.buffer_number + 1 -- local name = H.buffer_number <= 1 and 'Starter' or ('Starter_' .. H.buffer_number) -- for _, buf in ipairs(vim.api.nvim_list_bufs()) do -- if vim.fn.fnamemodify(vim.api.nvim_buf_get_name(buf), ':t') == name then -- name = 'ministarter://' .. H.buffer_number -- break -- end -- end -+ local name = H.buffer_number <= 1 and '*dashboard*' or ('dashboard://' .. H.buffer_number) - vim.api.nvim_buf_set_name(buf_id, name) +@@ -1338,7 +1439,7 @@ H.apply_buffer_options = function(buf_id) + vim.api.nvim_feedkeys('\28\14', 'nx', false) -- Having `noautocmd` is crucial for performance: ~9ms without it, ~1.6ms with it - vim.cmd('noautocmd silent! set filetype=ministarter') @@ -243,7 +232,7 @@ index 8520569e..939e16de 100644 local options = { -- Taken from 'vim-startify' -@@ -1398,12 +1493,8 @@ H.apply_buffer_mappings = function(buf_id) +@@ -1385,12 +1486,8 @@ H.apply_buffer_mappings = function(buf_id) buf_keymap('<CR>', 'MiniStarter.eval_current_item()') @@ -258,7 +247,7 @@ index 8520569e..939e16de 100644 -- Make all special symbols to update query for _, key in ipairs(vim.split(H.get_config().query_updaters, '')) do -@@ -1491,7 +1582,7 @@ H.echo = function(msg, is_important) +@@ -1480,7 +1577,7 @@ H.echo = function(msg, is_important) -- Construct message chunks msg = type(msg) == 'string' and { { msg } } or msg @@ -267,7 +256,7 @@ index 8520569e..939e16de 100644 -- Avoid hit-enter-prompt local max_width = vim.o.columns * math.max(vim.o.cmdheight - 1, 0) + vim.v.echospace -@@ -1540,7 +1631,7 @@ H.eval_fun_or_string = function(x, string_as_cmd) +@@ -1529,7 +1626,7 @@ H.eval_fun_or_string = function(x, string_as_cmd) if type(x) == 'function' then return x() end if type(x) == 'string' then if string_as_cmd then @@ -14,11 +14,11 @@ ] }, "locked": { - "lastModified": 1741024836, - "narHash": "sha256-9BRe7EimHaX7EZO0YaRY/OGEYhmzUkeSto8Ldy+uplg=", + "lastModified": 1742086029, + "narHash": "sha256-Q9eJIDnzzPlacnQZ7He8uRQbtwTvU+e9U4qQLZkf4ec=", "ref": "refs/heads/master", - "rev": "2f7e7ed84b6dafa0a81dde686b4a8e7cbecfcd94", - "revCount": 101, + "rev": "f0accac221a53633380f15b4953ca4f4fdfbeca7", + "revCount": 104, "type": "git", "url": "https://git.akon.city/camu" }, @@ -88,11 +88,11 @@ ] }, "locked": { - "lastModified": 1741217763, - "narHash": "sha256-g/TrltIjFHIjtzKY5CJpoPANfHQWDD43G5U1a/v5oVg=", + "lastModified": 1743438213, + "narHash": "sha256-ZZDN+0v1r4I1xkQWlt8euOJv5S4EvElUCZMrDjTCEsY=", "owner": "nix-community", "repo": "home-manager", - "rev": "486b066025dccd8af7fbe5dd2cc79e46b88c80da", + "rev": "ccd7df836e1f42ea84806760f25b77b586370259", "type": "github" }, "original": { @@ -124,11 +124,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1740646007, - "narHash": "sha256-dMReDQobS3kqoiUCQIYI9c0imPXRZnBubX20yX/G5LE=", + "lastModified": 1743420942, + "narHash": "sha256-b/exDDQSLmENZZgbAEI3qi9yHkuXAXCPbormD8CSJXo=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "009b764ac98a3602d41fc68072eeec5d24fc0e49", + "rev": "de6fc5551121c59c01e2a3d45b277a6d05077bc4", "type": "github" }, "original": { @@ -144,11 +144,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1740567864, - "narHash": "sha256-eTS2wrC1jKR6PKXC9jZqQy5PwqbIOBLSLF3dwLiFJ8M=", + "lastModified": 1741870048, + "narHash": "sha256-odXRdNZGdXg1LmwlAeWL85kgy/FVHsgKlDwrvbR2BsU=", "owner": "nix-community", "repo": "NixOS-WSL", - "rev": "1f40b43d01626ce994eb47150afa0d7215f396ca", + "rev": "5d76001e33ee19644a598ad80e7318ab0957b122", "type": "github" }, "original": { @@ -160,11 +160,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1740463929, - "narHash": "sha256-4Xhu/3aUdCKeLfdteEHMegx5ooKQvwPHNkOgNCXQrvc=", + "lastModified": 1740865531, + "narHash": "sha256-h00vGIh/jxcGl8aWdfnVRD74KuLpyY3mZgMFMy7iKIc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5d7db4668d7a0c6cc5fc8cf6ef33b008b2b1ed8b", + "rev": "5ef6c425980847c78a80d759abc476e941a9bf42", "type": "github" }, "original": { @@ -176,11 +176,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1741173522, - "narHash": "sha256-k7VSqvv0r1r53nUI/IfPHCppkUAddeXn843YlAC5DR0=", + "lastModified": 1743315132, + "narHash": "sha256-6hl6L/tRnwubHcA4pfUUtk542wn2Om+D4UnDhlDW9BE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d69ab0d71b22fa1ce3dbeff666e6deb4917db049", + "rev": "52faf482a3889b7619003c0daec593a1912fddc1", "type": "github" }, "original": { @@ -199,11 +199,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1741270744, - "narHash": "sha256-Uvr849iyRHbD/Rp5VFCd0gzel1T2f2uHE7EMbyjQdL0=", + "lastModified": 1743432156, + "narHash": "sha256-2/E1HKZPCa6yFzAqG9Hva6nn7y0fHs41cI39p31l80g=", "owner": "nix-community", "repo": "NUR", - "rev": "56e505e3832ef0eddb87fd22d344e514cb07f104", + "rev": "eab90f0687a564764388d6a993ea719800fe385c", "type": "github" }, "original": { @@ -41,10 +41,9 @@ }) ); in { - settingsModule = { config, lib, pkgs, ... }: + settingsModule = { lib, ... }: with lib; let - cfg = config.local; fontSettings = types.submodule { options = { name = mkOption { type = types.str; }; @@ -127,8 +126,6 @@ name = "nixpkgs-patched"; src = nixpkgs; patches = [ - ./files/nixpkgs-patches/274ea258ee704724977160757ac4228ecb6eb31f.diff - ./files/nixpkgs-patches/383432.diff ]; }; nixosSystem = import (nixpkgs-patched + "/nixos/lib/eval-config.nix"); @@ -139,31 +136,23 @@ ({ ... }: { nixpkgs.overlays = [ nur.overlays.default (self: super: { local-fonts = super.stdenv.mkDerivation local-fonts; }) - (self: super: { camu = camu.packages.${system}.default; }) - (self: super: { mauri = mauri.packages.${system}.default; }) - (self: super: { - mpv-unwrapped = super.mpv-unwrapped.override { cddaSupport = true; }; - }) - (self: super: { - kitty = (optimizeWithFlags super.kitty "-O3 -march=znver2 -mtune=znver2 -fno-semantic-interposition"); - }) (self: super: { - neovim-unwrapped = (optimizeWithFlags super.neovim-unwrapped "-O3 -march=znver2 -mtune=znver2 -fno-semantic-interposition -flto"); + camu = camu.packages.${system}.default; + camu-devshell = camu.packages.${system}.shellWrapper; }) + (self: super: { mauri = mauri.packages.${system}.default; }) (self: super: { - gtkmm4 = super.gtkmm4.overrideAttrs (old: { - doCheck = false; - }); + mpv-unwrapped = super.mpv-unwrapped.override { cddaSupport = true; }; }) (self: super: { - notmuch = super.notmuch.overrideAttrs (old: { - doCheck = false; + kitty = (optimizeWithFlags super.kitty "-O3 -march=znver2 -mtune=znver2 -fno-semantic-interposition").overrideAttrs (old: { + patches = old.patches ++ [ + ./files/nixpkgs-patches/f57f3d99091a105cbd9484c33264558785efc4be.diff + ]; }); }) (self: super: { - ryujinx = super.ryujinx.overrideAttrs (old: { - doCheck = false; - }); + neovim-unwrapped = (optimizeWithFlags super.neovim-unwrapped "-O3 -march=znver2 -mtune=znver2 -fno-semantic-interposition -flto"); }) (self: super: { sway-unwrapped = super.sway-unwrapped.overrideAttrs (old: { @@ -190,6 +179,7 @@ mini-nvim = prev.mini-nvim.overrideAttrs (old: { patches = [ ./files/nvim/mini_starter_picture.diff + ./files/nvim/mini_completion_no_title.diff ]; }); fzf-vim = prev.fzf-vim.overrideAttrs (old: { @@ -200,9 +190,8 @@ }); }) #(self: super: { - # hollywood = super.hollywood.overrideAttrs (old: { - # patches = [ - # ./files/hollywood_uptodate.diff + # mesa = super.mesa.overrideAttrs (old: { + # patches = old.patches ++ [ # ]; # }); #}) @@ -212,9 +201,7 @@ gobject-introspection python3.pkgs.wrapPython ] ++ old.nativeBuildInputs; - pythonPath = with super.python3.pkgs; [ - pygobject3 - ]; + pythonPath = with super.python3.pkgs; [ pygobject3 ]; # https://github.com/NixOS/nixpkgs/pull/273060/files#diff-b78e5b1234a71c390023923ab5e62fc67b8e7d4371bc6687b7c7de4f392d1facR56 postFixup = '' buildPythonPath "$pythonPath" diff --git a/hosts/sofue/configuration.nix b/hosts/sofue/configuration.nix index 02c0ce7..929f6a2 100644 --- a/hosts/sofue/configuration.nix +++ b/hosts/sofue/configuration.nix @@ -1,6 +1,7 @@ { config, lib, pkgs, modulesPath, ... }: let - s = config.local; + loc = config.local; + colo = loc.scheme; inherit (import ../../nix/settings.nix) disks; in rec { imports = [ @@ -8,7 +9,6 @@ in rec { ../../nix/system.nix ../../nix/x86.nix ../../nix/user.nix - ../../nix/audio.nix ../../nix/bluetooth.nix ../../nix/email.nix ../../nix/amdgpu.nix @@ -133,12 +133,14 @@ in rec { (pkgs.writeShellScriptBin "run-sway" '' export TTY=/dev/tty3 export XDG_VTNR=3 - export WLR_RENDERER=vulkan + export WLR_RENDERER=gles2 export PULSE_SERVER=unix:/home/andrew/.pulsewire-native-socket export PIPEWIRE_REMOTE=/tmp/pipewire-0-manager cd $HOME exec ${pkgs.kbd}/bin/openvt --switch --login --console 3 -f -- ${pkgs.sway}/bin/sway '') + pipewire # Using server from host. + pavucontrol ]; systemd.services.copy-udev = { @@ -157,17 +159,21 @@ in rec { in { programs.kitty = { extraConfig = '' - repaint_delay 5 - input_delay 2 + repaint_delay 4 + input_delay 1 ''; }; - wayland.windowManager.sway = { + wayland.windowManager.sway = let + monitor1 = loc.monitors.monitor1; + monitor2 = loc.monitors.monitor2; + monitor3 = loc.monitors.monitor3; + in { checkConfig = false; config = { output = { - "${s.monitors.monitor1}" = { + "${monitor1}" = { mode = "2560x1440@144.000Hz"; -# position = "3000 200"; + #position = "3000 200"; position = "1080 200"; allow_tearing = "yes"; max_render_time = "off"; @@ -175,33 +181,34 @@ in rec { render_bit_depth = "10"; bg = "${../../themes/spring_2025/wallpaper1.png} fit"; }; - "${s.monitors.monitor2}" = { + "${monitor2}" = { mode = "1920x1080@60.000Hz"; transform = "270"; -# position = "1920 0"; + #position = "1920 0"; position = "0 0"; - max_render_time = "6"; + allow_tearing = "yes"; + max_render_time = "off"; render_bit_depth = "10"; - bg = "#${s.scheme.background-alt} solid_color"; + bg = "#${colo.background-alt} solid_color"; }; -# "${s.monitors.monitor3}" = { -# mode = "1920x1080@60.000Hz"; -# position = "0 1000"; -# max_render_time = "6"; -# render_bit_depth = "10"; -# bg = "#${s.scheme.background-alt} solid_color"; -# }; + #"${monitor3}" = { + # mode = "1920x1080@60.000Hz"; + # position = "0 1000"; + # max_render_time = "6"; + # render_bit_depth = "10"; + # bg = "#${colo.background-alt} solid_color"; + #}; }; workspaceOutputAssign = [ - { workspace = "1"; output = "${s.monitors.monitor1}"; } - { workspace = "2"; output = "${s.monitors.monitor1}"; } - { workspace = "3"; output = "${s.monitors.monitor1}"; } - { workspace = "4"; output = "${s.monitors.monitor1}"; } - { workspace = "5"; output = "${s.monitors.monitor2}"; } - { workspace = "6"; output = "${s.monitors.monitor2}"; } - { workspace = "7"; output = "${s.monitors.monitor2}"; } - { workspace = "8"; output = "${s.monitors.monitor2}"; } - { workspace = "9"; output = "${s.monitors.monitor3}"; } + { workspace = "1"; output = "${monitor1}"; } + { workspace = "2"; output = "${monitor1}"; } + { workspace = "3"; output = "${monitor1}"; } + { workspace = "4"; output = "${monitor1}"; } + { workspace = "5"; output = "${monitor2}"; } + { workspace = "6"; output = "${monitor2}"; } + { workspace = "7"; output = "${monitor2}"; } + { workspace = "8"; output = "${monitor2}"; } + { workspace = "9"; output = "${monitor3}"; } ]; keybindings = let mod1 = "Mod1"; @@ -226,12 +233,12 @@ in rec { "${mod4}+Shift+3" = "move container to workspace 7"; "${mod4}+Shift+4" = "move container to workspace 8"; "${mod4}+Shift+5" = "move container to workspace 9"; - "${mod4}+r" = "exec swaymsg -- output ${s.monitors.monitor1} transform 90"; - "${mod4}+Shift+r" = "exec swaymsg -- output ${s.monitors.monitor1} transform 0"; - "${mod4}+F1" = "exec swaymsg -- output ${s.monitors.monitor1} bg \\#${s.scheme.background-alt} solid_color"; - "${mod4}+F2" = "exec swaymsg -- output ${s.monitors.monitor1} bg ${../../themes/spring_2025/wallpaper1.png} fit"; - #"${mod4}+F1" = "exec printf '||' > $HOME/.config/taro/${s.monitors.monitor1}/selection"; - #"${mod4}+F2" = "exec printf '||' > $HOME/.config/taro/${s.monitors.monitor1}/selection"; + "${mod4}+r" = "exec swaymsg -- output ${monitor1} transform 90"; + "${mod4}+Shift+r" = "exec swaymsg -- output ${monitor1} transform 0"; + "${mod4}+F1" = "exec swaymsg -- output ${monitor1} bg \\#${colo.background-alt} solid_color"; + "${mod4}+F2" = "exec swaymsg -- output ${monitor1} bg ${../../themes/spring_2025/wallpaper1.png} fit"; + #"${mod4}+F1" = "exec printf '||' > $HOME/.config/taro/${monitor1}/selection"; + #"${mod4}+F2" = "exec printf '||' > $HOME/.config/taro/${monitor1}/selection"; "Pause" = "exec $HOME/c/camu/scripts/cmv_add.sh PAUSE"; }; startup = [ diff --git a/hosts/sofue/programs.nix b/hosts/sofue/programs.nix index 72bb4e8..c47f9c1 100644 --- a/hosts/sofue/programs.nix +++ b/hosts/sofue/programs.nix @@ -1,27 +1,29 @@ -{ pkgs, ... }: { - environment.systemPackages = with pkgs; [ - #gftp +{ lib, pkgs, ... }: let + inherit (import ../../nix/utils.nix) asNeeded; +in { + environment.systemPackages = with pkgs; lib.lists.flatten [ #dia - cdrtools - #ardour - #audacity - krita - #olive-editor + (asNeeded lib pkgs "gftp" ["gftp"]) + (asNeeded lib pkgs "cdrtools" ["btcflash" "cdda2mp3" "cdda2ogg" "cdda2wav" "cdrecord" "devdump" "isodebug" "isodump" "isoinfo" "isovfy" "mkhybrid" "mkisofs" "readcd" "rscsi" "scgcheck" "scgskeleton"]) + (asNeeded lib pkgs "audacity" ["audacity"]) + (asNeeded lib pkgs "krita" ["krita"]) + (asNeeded lib pkgs "olive-editor" ["olive-editor"]) yt-dlp - #chatterino2 - streamlink - megatools - #wineWowPackages.staging - #winetricks - #cabextract - #looking-glass-client - #qbittorrent - #ungoogled-chromium + (asNeeded lib pkgs "[chatterino2 streamlink]" ["chatterino2"]) + (asNeeded lib pkgs "megatools" ["megacopy" "megadf" "megadl" "megaexport" "megaget" "megals" "megamkdir" "megaput" "megareg" "megarm" "megatest" "megatools"]) + (asNeeded lib pkgs "gdown" ["gdown"]) + wineWowPackages.staging + winetricks + cabextract + (asNeeded lib pkgs "looking-glass-client" ["looking-glass-client"]) + (asNeeded lib pkgs "qbittorrent" ["qbittorrent"]) + (asNeeded lib pkgs "ungoogled-chromium" ["chromium"]) (pkgs.discord.override { withOpenASAR = true; }) - #imv - #mpv - #vlc + (asNeeded lib pkgs "imv" ["imv"]) + (asNeeded lib pkgs "mpv" ["mpv"]) + (asNeeded lib pkgs "vlc" ["vlc"]) camu + camu-devshell mauri ]; local.scripts.imports = [ diff --git a/hosts/yashinoki/configuration.nix b/hosts/yashinoki/configuration.nix index 2917994..88a3674 100644 --- a/hosts/yashinoki/configuration.nix +++ b/hosts/yashinoki/configuration.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - s = config.local; + loc = config.local; inherit (import ../../nix/settings.nix) disks; in { imports = [ @@ -42,6 +42,7 @@ in { }; scheme = import ../../themes/year_of_snake/snake.nix; starter = { + top_padding = 0; picture = ../../themes/year_of_snake/splash.png; width = 64; padding = { top = -2; left = -6; text = 0; }; @@ -161,11 +162,13 @@ in { input_delay 3 ''; }; - wayland.windowManager.sway = { + wayland.windowManager.sway = let + monitor1 = loc.monitors.monitor1; + in { checkConfig = false; config = { output = { - "${s.monitors.monitor1}" = { + "${monitor1}" = { mode = "3000x2000@59.999Hz"; render_bit_depth = "10"; max_render_time = "off"; @@ -175,11 +178,11 @@ in { }; }; workspaceOutputAssign = [ - { workspace = "1"; output = "${s.monitors.monitor1}"; } - { workspace = "2"; output = "${s.monitors.monitor1}"; } - { workspace = "3"; output = "${s.monitors.monitor1}"; } - { workspace = "4"; output = "${s.monitors.monitor1}"; } - { workspace = "5"; output = "${s.monitors.monitor1}"; } + { workspace = "1"; output = "${monitor1}"; } + { workspace = "2"; output = "${monitor1}"; } + { workspace = "3"; output = "${monitor1}"; } + { workspace = "4"; output = "${monitor1}"; } + { workspace = "5"; output = "${monitor1}"; } ]; keybindings = let mod1 = "Mod1"; @@ -195,10 +198,10 @@ in { "${mod1}+Shift+3" = "move container to workspace 3"; "${mod1}+Shift+4" = "move container to workspace 4"; "${mod1}+Shift+5" = "move container to workspace 5"; - "${mod4}+r" = "exec swaymsg -- output ${s.monitors.monitor1} transform 270"; - "${mod4}+Shift+r" = "exec swaymsg -- output ${s.monitors.monitor1} transform 0"; - "${mod4}+F1" = "exec swaymsg -- output ${s.monitors.monitor1} bg \\#${s.scheme.background-alt} solid_color"; - "${mod4}+F2" = "exec swaymsg -- output ${s.monitors.monitor1} bg ${../../themes/year_of_snake/wallpaper.png} fill"; + "${mod4}+r" = "exec swaymsg -- output ${monitor1} transform 270"; + "${mod4}+Shift+r" = "exec swaymsg -- output ${monitor1} transform 0"; + "${mod4}+F1" = "exec swaymsg -- output ${monitor1} bg \\#${colo.background-alt} solid_color"; + "${mod4}+F2" = "exec swaymsg -- output ${monitor1} bg ${../../themes/year_of_snake/wallpaper.png} fill"; }; }; }; diff --git a/hosts/yashinoki/programs.nix b/hosts/yashinoki/programs.nix index 19742cd..915bb21 100644 --- a/hosts/yashinoki/programs.nix +++ b/hosts/yashinoki/programs.nix @@ -1,12 +1,13 @@ -{ pkgs, ... }: { +{ pkgs, ... }: let + inherit (import ../../nix/utils.nix) asNeeded; +in { environment.systemPackages = with pkgs; [ - krita + (asNeeded lib pkgs "krita" ["krita"]) yt-dlp - wineWowPackages.staging - winetricks - cabextract + (asNeeded lib pkgs "[wineWowPackages.staging winetricks cabextract]" ["function_grep.pl" "msidb" "msiexec" "notepad" "regedit" "regsvr32" "widl" "wine" "wine-preloader" "wine64" "wine64-preloader" "wineboot" "winebuild" "winecfg" "wineconsole" "winecpp" "winedbg" "winedump" "winefile" "wineg++" "winegcc" "winemaker" "winemine" "winepath" "wineserver" "wmc" "wrc"]) (pkgs.discord.override { withOpenASAR = true; }) - mpv + (asNeeded lib pkgs "imv" ["imv"]) + (asNeeded lib pkgs "mpv" ["mpv"]) camu ]; local.scripts.imports = [ diff --git a/nix/amdgpu.nix b/nix/amdgpu.nix index 32b317b..3b6a1c6 100644 --- a/nix/amdgpu.nix +++ b/nix/amdgpu.nix @@ -4,8 +4,8 @@ VDPAU_DRIVER = "radeonsi"; LIBVA_DRIVER_NAME = "radeonsi"; AMD_VULKAN_ICD = "RADV"; - VK_ICD_FILENAMES="${pkgs.pkgsi686Linux.mesa.drivers}/share/vulkan/icd.d/radeon_icd.i686.json:${pkgs.mesa.drivers}/share/vulkan/icd.d/radeon_icd.x86_64.json"; - __EGL_VENDOR_LIBRARY_FILENAMES="${pkgs.pkgsi686Linux.mesa.drivers}/share/glvnd/egl_vendor.d/50_mesa.json:${pkgs.mesa.drivers}/share/glvnd/egl_vendor.d/50_mesa.json"; + VK_ICD_FILENAMES="${pkgs.pkgsi686Linux.mesa}/share/vulkan/icd.d/radeon_icd.i686.json:${pkgs.mesa}/share/vulkan/icd.d/radeon_icd.x86_64.json"; + __EGL_VENDOR_LIBRARY_FILENAMES="${pkgs.pkgsi686Linux.mesa}/share/glvnd/egl_vendor.d/50_mesa.json:${pkgs.mesa}/share/glvnd/egl_vendor.d/50_mesa.json"; }; environment.systemPackages = with pkgs; [ radeontop diff --git a/nix/audio.nix b/nix/audio.nix index e8a57ff..da59310 100644 --- a/nix/audio.nix +++ b/nix/audio.nix @@ -5,9 +5,9 @@ # }; # nixpkgs.config.pulseaudio = true; services.pipewire = { - enable = false; - pulse.enable = false; - alsa.enable = false; + enable = true; + pulse.enable = true; + alsa.enable = true; alsa.support32Bit = true; extraConfig = { # cat /proc/asound/card1/stream0 @@ -24,7 +24,6 @@ "default.video.height" = 480; "default.video.rate.num" = 25; "default.video.rate.denom" = 1; - "vm.overrides" = { }; }; "context.modules" = [{ "name" = "libpipewire-module-filter-chain"; @@ -78,7 +77,6 @@ "pulse.properties" = { "pulse.default.format" = "S32"; "pulse.default.position" = [ "FL" "FR" ]; - "vm.overrides" = { }; }; "stream.properties" = { "resample.quality" = 8; @@ -105,7 +103,7 @@ }; environment.systemPackages = with pkgs; [ pipewire - (pavucontrol.override { withLibcanberra = false; }) + pavucontrol ]; environment.etc = { "convolver/Focal_Elegia_minimum_phase_44100Hz.wav".source = ../files/convolver/Focal_Elegia_minimum_phase_44100Hz.wav; diff --git a/nix/gaming.nix b/nix/gaming.nix index d1e90bf..a2d866f 100644 --- a/nix/gaming.nix +++ b/nix/gaming.nix @@ -1,28 +1,25 @@ -{ config, pkgs, ... }: -let - s = config.local; +{ config, lib, pkgs, ... }: let + loc = config.local; + colo = loc.scheme; + inherit (import ./utils.nix) asNeeded; in { users.users.andrew = { extraGroups = [ "gamemode" ]; }; - environment.systemPackages = with pkgs; [ + environment.systemPackages = with pkgs; lib.lists.flatten [ mangohud - umu-launcher - protontricks - lutris - #legendary-gl - prismlauncher - jdk21 - #retroarch - #dolphin-emu - #pcsx2 - #(ppsspp.override { enableQt = true; }) - #cemu - rpcs3 - #ryujinx - osu-lazer-bin - parsec-bin - #r2modman + (asNeeded lib pkgs "protontricks" ["protontricks" "protontricks-launch"]) + (asNeeded lib pkgs "[lutris umu-launcher]" ["lutris"]) + (asNeeded lib pkgs "prismlauncher" ["prismlauncher"]) + (asNeeded lib pkgs "retroarch" ["retroarch"]) + (asNeeded lib pkgs "dolphin-emu" ["dolphin-emu"]) + (asNeeded lib pkgs "pcsx2" ["pcsx2-qt"]) + (asNeeded lib pkgs "(ppsspp.override { enableQt = true; })" ["ppsspp"]) + (asNeeded lib pkgs "cemu" ["cemu"]) + (asNeeded lib pkgs "rpcs3" ["rpcs3"]) + (asNeeded lib pkgs "ryujinx" ["ryujinx"]) + (asNeeded lib pkgs "osu-lazer-bin" ["osu!"]) + (asNeeded lib pkgs "parsec-bin" ["parsecd"]) (pkgs.writeShellScriptBin "run-steam-gamescope" '' export TTY=/dev/tty4 export XDG_VTNR=4 @@ -38,7 +35,7 @@ in { export VKD3D_DEBUG=none export VKD3D_SHADER_DEBUG=none export mesa_glthread=true - xrandr --output ${s.monitors.monitor1} --primary + xrandr --output ${loc.monitors.monitor1} --primary exec env --unset=SDL_VIDEODRIVER --unset=SDL_VIDEO_DRIVER MANGOHUD=1 gamemoderun "$@" '') ]; @@ -65,20 +62,6 @@ in { }; programs.steam = { enable = true; - package = pkgs.steam.override { - extraPkgs = pkgs: with pkgs; [ - xorg.libXcursor - xorg.libXi - xorg.libXinerama - xorg.libXScrnSaver - libpng - libpulseaudio - libvorbis - stdenv.cc.cc.lib - libkrb5 - keyutils - ]; - }; gamescopeSession = let width = "2560"; height = "1440"; @@ -88,14 +71,14 @@ in { "-W ${width}" "-H ${height}" "-w ${width}" "-h ${height}" "-r 144" - "-O ${s.monitors.monitor1}" + "-O ${loc.monitors.monitor1}" "--rt" "-f" "-e" # "-o 10" "--adaptive-sync" # "--force-grab-cursor" -# "--mangoapp" + "--mangoapp" ]; }; }; @@ -137,8 +120,11 @@ in { cpu_mhz = true; vulkan_driver = true; gpu_name = true; + gpu_power = true; + gpu_temp = true; gpu_junction_temp = true; gpu_core_clock = true; + gpu_voltage = true; vram = true; gpu_mem_temp = true; gpu_mem_clock = true; diff --git a/nix/intel.nix b/nix/intel.nix index 8601f6b..0ebfb8f 100644 --- a/nix/intel.nix +++ b/nix/intel.nix @@ -3,8 +3,8 @@ VDPAU_DRIVER = "va_gl"; LIBVA_DRIVER_NAME = "iHD"; AMD_VULKAN_ICD = "ANV"; - VK_ICD_FILENAMES="${pkgs.pkgsi686Linux.mesa.drivers}/share/vulkan/icd.d/intel_icd.i686.json:${pkgs.mesa.drivers}/share/vulkan/icd.d/intel_icd.x86_64.json"; - __EGL_VENDOR_LIBRARY_FILENAMES="${pkgs.pkgsi686Linux.mesa.drivers}/share/glvnd/egl_vendor.d/50_mesa.json:${pkgs.mesa.drivers}/share/glvnd/egl_vendor.d/50_mesa.json"; + VK_ICD_FILENAMES="${pkgs.pkgsi686Linux.mesa}/share/vulkan/icd.d/intel_icd.i686.json:${pkgs.mesa}/share/vulkan/icd.d/intel_icd.x86_64.json"; + __EGL_VENDOR_LIBRARY_FILENAMES="${pkgs.pkgsi686Linux.mesa}/share/glvnd/egl_vendor.d/50_mesa.json:${pkgs.mesa}/share/glvnd/egl_vendor.d/50_mesa.json"; }; hardware.graphics = { extraPackages = with pkgs; [ diff --git a/nix/programs/firefox.nix b/nix/programs/firefox.nix index 404c3a6..da5aa09 100644 --- a/nix/programs/firefox.nix +++ b/nix/programs/firefox.nix @@ -19,8 +19,8 @@ in { source = (pkgs.fetchFromGitHub { owner = "rafaelmardojai"; repo = "firefox-gnome-theme"; - rev = "d8a440226dc9030cb793db4562132d8166fcc904"; - hash = "sha256-knaPVGni+v431hidyJ/HOKITFzQs0PaxuainC603jjo="; + rev = "a1795946debb5f21dfa5d328a6f1b68984f810fc"; + hash = "sha256-CoGE9+8oVnnOOTStPQ9C87gp0C6vgf0tN3ls7MuKZiE="; }); }; home.file."customChrome.css" = { diff --git a/nix/programs/foot.nix b/nix/programs/foot.nix index 9cc9fa9..5c85ce7 100644 --- a/nix/programs/foot.nix +++ b/nix/programs/foot.nix @@ -1,6 +1,7 @@ { config, pkgs, ... }: let - s = config.local; + loc = config.local; + colo = loc.scheme; in { environment.sessionVariables = { TERMINAL = "${pkgs.foot}/bin/footclient"; @@ -14,24 +15,24 @@ in { font = "${s.font.name}:size=${toString s.font.size}"; }; colors = { - foreground = "${s.scheme.foreground}"; - background = "${s.scheme.background}"; - regular0 = "${s.scheme.color0}"; - regular1 = "${s.scheme.color1}"; - regular2 = "${s.scheme.color2}"; - regular3 = "${s.scheme.color3}"; - regular4 = "${s.scheme.color4}"; - regular5 = "${s.scheme.color5}"; - regular6 = "${s.scheme.color6}"; - regular7 = "${s.scheme.color7}"; - bright0 = "${s.scheme.color8}"; - bright1 = "${s.scheme.color9}"; - bright2 = "${s.scheme.color10}"; - bright3 = "${s.scheme.color11}"; - bright4 = "${s.scheme.color12}"; - bright5 = "${s.scheme.color13}"; - bright6 = "${s.scheme.color14}"; - bright7 = "${s.scheme.color15}"; + foreground = "${colo.foreground}"; + background = "${colo.background}"; + regular0 = "${colo.color0}"; + regular1 = "${colo.color1}"; + regular2 = "${colo.color2}"; + regular3 = "${colo.color3}"; + regular4 = "${colo.color4}"; + regular5 = "${colo.color5}"; + regular6 = "${colo.color6}"; + regular7 = "${colo.color7}"; + bright0 = "${colo.color8}"; + bright1 = "${colo.color9}"; + bright2 = "${colo.color10}"; + bright3 = "${colo.color11}"; + bright4 = "${colo.color12}"; + bright5 = "${colo.color13}"; + bright6 = "${colo.color14}"; + bright7 = "${colo.color15}"; alpha = "1.0"; }; }; diff --git a/nix/programs/kitty.nix b/nix/programs/kitty.nix index e3238eb..5f0c91b 100644 --- a/nix/programs/kitty.nix +++ b/nix/programs/kitty.nix @@ -1,6 +1,7 @@ { config, lib, pkgs, ... }: let - s = config.local; + loc = config.local; + colo = loc.scheme; in { environment.sessionVariables = { TERMINAL = "${pkgs.kitty}/bin/kitty -1"; @@ -9,8 +10,8 @@ in { programs.kitty = { enable = true; font = { - name = s.font.name; - size = s.font.size; + name = loc.font.name; + size = loc.font.size; }; shellIntegration = { mode = "enabled"; @@ -20,7 +21,7 @@ in { shell ${pkgs.bashInteractive}/bin/bash --login update_check_interval 0 confirm_os_window_close 0 - sync_to_monitor yes + sync_to_monitor no allow_remote_control yes linux_display_server wayland remember_window_size no @@ -29,41 +30,41 @@ in { scrollback_lines 3000 paste_actions confirm,confirm-if-large disable_ligatures always - modify_font baseline ${toString s.font.baseline} - cursor #${s.scheme.foreground} + modify_font baseline ${toString loc.font.baseline} + cursor #${colo.foreground} cursor_shape block #cursor_blink_interval -1 linear ease-out #cursor_stop_blinking_after 20.0 cursor_trail 35 cursor_trail_decay 0.1 0.5 cursor_trail_start_threshold 2 - foreground #${s.scheme.foreground} - background #${s.scheme.background} - color0 #${s.scheme.color0} - color1 #${s.scheme.color1} - color2 #${s.scheme.color2} - color3 #${s.scheme.color3} - color4 #${s.scheme.color4} - color5 #${s.scheme.color5} - color6 #${s.scheme.color6} - color7 #${s.scheme.color7} - color8 #${s.scheme.color8} - color9 #${s.scheme.color9} - color10 #${s.scheme.color10} - color11 #${s.scheme.color11} - color12 #${s.scheme.color12} - color13 #${s.scheme.color13} - color14 #${s.scheme.color14} - color15 #${s.scheme.color15} - selection_foreground #${s.scheme.background} - selection_background #${s.scheme.color6} - mark1_foreground #${s.scheme.background} - mark1_background #${s.scheme.color5} - mark2_foreground #${s.scheme.background} - mark2_background #${s.scheme.color6} - mark3_foreground #${s.scheme.background} - mark3_background #${s.scheme.color4} - background_opacity ${toString s.scheme.alpha} + foreground #${colo.foreground} + background #${colo.background} + color0 #${colo.color0} + color1 #${colo.color1} + color2 #${colo.color2} + color3 #${colo.color3} + color4 #${colo.color4} + color5 #${colo.color5} + color6 #${colo.color6} + color7 #${colo.color7} + color8 #${colo.color8} + color9 #${colo.color9} + color10 #${colo.color10} + color11 #${colo.color11} + color12 #${colo.color12} + color13 #${colo.color13} + color14 #${colo.color14} + color15 #${colo.color15} + selection_foreground #${colo.background} + selection_background #${colo.color6} + mark1_foreground #${colo.background} + mark1_background #${colo.color5} + mark2_foreground #${colo.background} + mark2_background #${colo.color6} + mark3_foreground #${colo.background} + mark3_background #${colo.color4} + background_opacity ${toString colo.alpha} ''; }; wayland.windowManager.sway = { diff --git a/nix/programs/nvim.nix b/nix/programs/nvim.nix index fb779e4..5ff902f 100644 --- a/nix/programs/nvim.nix +++ b/nix/programs/nvim.nix @@ -61,7 +61,7 @@ let hi ModeMsg guifg=#${colo.color4} hi MoreMsg guifg=#${colo.color2} hi NonText guifg=#${colo.color6} - hi NormalFloat guibg=#${colo.background} + hi NormalFloat guibg=#${colo.color4} hi Pmenu guibg=#${colo.color4} hi PmenuThumb guibg=#${colo.color5} hi PmenuSel guibg=#${colo.color3} diff --git a/nix/programs/sway.nix b/nix/programs/sway.nix index 863a8ef..49efdf6 100644 --- a/nix/programs/sway.nix +++ b/nix/programs/sway.nix @@ -1,6 +1,7 @@ { config, lib, pkgs, ... }: let - s = config.local; + loc = config.local; + colo = loc.scheme; in { services.xserver.videoDrivers = [ "modesetting" ]; programs.sway = { @@ -54,82 +55,82 @@ in { home.sessionVariables = { XDG_CURRENT_DESKTOP = "sway"; MOZ_ENABLE_WAYLAND = "1"; - #SDL_VIDEODRIVER = "wayland"; + SDL_VIDEODRIVER = "wayland"; GDK_BACKEND = "wayland,x11"; QT_QPA_PLATFORM = "wayland;xcb"; QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; _JAVA_AWT_WM_NONREPARENTING = "1"; }; xresources.properties = { - "*background" = "#${s.scheme.background}"; - "*foreground" = "#${s.scheme.foreground}"; - "*color0" = "#${s.scheme.color0}"; - "*color1" = "#${s.scheme.color1}"; - "*color2" = "#${s.scheme.color2}"; - "*color3" = "#${s.scheme.color3}"; - "*color4" = "#${s.scheme.color4}"; - "*color5" = "#${s.scheme.color5}"; - "*color6" = "#${s.scheme.color6}"; - "*color7" = "#${s.scheme.color7}"; - "*color8" = "#${s.scheme.color8}"; - "*color9" = "#${s.scheme.color9}"; - "*color10" = "#${s.scheme.color10}"; - "*color11" = "#${s.scheme.color11}"; - "*color12" = "#${s.scheme.color12}"; - "*color13" = "#${s.scheme.color13}"; - "*color14" = "#${s.scheme.color14}"; - "*color15" = "#${s.scheme.color15}"; + "*background" = "#${colo.background}"; + "*foreground" = "#${colo.foreground}"; + "*color0" = "#${colo.color0}"; + "*color1" = "#${colo.color1}"; + "*color2" = "#${colo.color2}"; + "*color3" = "#${colo.color3}"; + "*color4" = "#${colo.color4}"; + "*color5" = "#${colo.color5}"; + "*color6" = "#${colo.color6}"; + "*color7" = "#${colo.color7}"; + "*color8" = "#${colo.color8}"; + "*color9" = "#${colo.color9}"; + "*color10" = "#${colo.color10}"; + "*color11" = "#${colo.color11}"; + "*color12" = "#${colo.color12}"; + "*color13" = "#${colo.color13}"; + "*color14" = "#${colo.color14}"; + "*color15" = "#${colo.color15}"; }; gtk = let # *_shade_color is adjusted from black by default. extraCss3 = '' - @define-color window_bg_color #${s.scheme.background}; - @define-color window_fg_color #${s.scheme.foreground}; - @define-color view_bg_color #${s.scheme.background}; - @define-color view_fg_color #${s.scheme.foreground}; - @define-color accent_bg_color #${s.scheme.color4}; - @define-color accent_fg_color #${s.scheme.background}; - @define-color accent_color #${s.scheme.color4}; - @define-color headerbar_bg_color #${s.scheme.background}; - @define-color headerbar_fg_color #${s.scheme.foreground}; - @define-color headerbar_backdrop_color #${s.scheme.background}; - @define-color headerbar_border_color #${s.scheme.color6}; - @define-color secondary_headerbar_bg_color #${s.scheme.background}; - @define-color secondary_headerbar_fg_color #${s.scheme.foreground}; - @define-color secondary_headerbar_backdrop_color #${s.scheme.background}; - @define-color secondary_headerbar_border_color #${s.scheme.color5}; - @define-color thumbnail_bg_color #${s.scheme.background}; - @define-color thumbnail_fg_color #${s.scheme.foreground}; - @define-color card_bg_color #${s.scheme.background}; - @define-color card_fg_color #${s.scheme.foreground}; - @define-color popover_bg_color #${s.scheme.background}; - @define-color popover_fg_color #${s.scheme.foreground}; - @define-color dialog_bg_color #${s.scheme.background}; - @define-color dialog_fg_color #${s.scheme.foreground}; - @define-color panel_bg_color #${s.scheme.background}; - @define-color panel_fg_color #${s.scheme.foreground}; - @define-color sidebar_bg_color #${s.scheme.background}; - @define-color sidebar_fg_color #${s.scheme.foreground}; - @define-color sidebar_backdrop_color #${s.scheme.background}; - @define-color warning_bg_color #${s.scheme.color4}; - @define-color warning_fg_color #${s.scheme.foreground}; - @define-color warning_color #${s.scheme.color4}; - @define-color error_bg_color #${s.scheme.color3}; - @define-color error_fg_color #${s.scheme.foreground}; - @define-color error_color #${s.scheme.color3}; - @define-color success_bg_color #${s.scheme.color2}; - @define-color success_fg_color #${s.scheme.background}; - @define-color success_color #${s.scheme.color2}; - @define-color destructive_bg_color #${s.scheme.color5}; - @define-color destructive_fg_color #${s.scheme.background}; - @define-color destructive_color #${s.scheme.color5}; + @define-color window_bg_color #${colo.background}; + @define-color window_fg_color #${colo.foreground}; + @define-color view_bg_color #${colo.background}; + @define-color view_fg_color #${colo.foreground}; + @define-color accent_bg_color #${colo.color4}; + @define-color accent_fg_color #${colo.background}; + @define-color accent_color #${colo.color4}; + @define-color headerbar_bg_color #${colo.background}; + @define-color headerbar_fg_color #${colo.foreground}; + @define-color headerbar_backdrop_color #${colo.background}; + @define-color headerbar_border_color #${colo.color6}; + @define-color secondary_headerbar_bg_color #${colo.background}; + @define-color secondary_headerbar_fg_color #${colo.foreground}; + @define-color secondary_headerbar_backdrop_color #${colo.background}; + @define-color secondary_headerbar_border_color #${colo.color5}; + @define-color thumbnail_bg_color #${colo.background}; + @define-color thumbnail_fg_color #${colo.foreground}; + @define-color card_bg_color #${colo.background}; + @define-color card_fg_color #${colo.foreground}; + @define-color popover_bg_color #${colo.background}; + @define-color popover_fg_color #${colo.foreground}; + @define-color dialog_bg_color #${colo.background}; + @define-color dialog_fg_color #${colo.foreground}; + @define-color panel_bg_color #${colo.background}; + @define-color panel_fg_color #${colo.foreground}; + @define-color sidebar_bg_color #${colo.background}; + @define-color sidebar_fg_color #${colo.foreground}; + @define-color sidebar_backdrop_color #${colo.background}; + @define-color warning_bg_color #${colo.color4}; + @define-color warning_fg_color #${colo.foreground}; + @define-color warning_color #${colo.color4}; + @define-color error_bg_color #${colo.color3}; + @define-color error_fg_color #${colo.foreground}; + @define-color error_color #${colo.color3}; + @define-color success_bg_color #${colo.color2}; + @define-color success_fg_color #${colo.background}; + @define-color success_color #${colo.color2}; + @define-color destructive_bg_color #${colo.color5}; + @define-color destructive_fg_color #${colo.background}; + @define-color destructive_color #${colo.color5}; ''; extraCss4 = '' ''; in { enable = true; theme = { - name = "adw-gtk3" + (if s.scheme.lightness == "light" then "" else "-dark"); + name = "adw-gtk3" + (if colo.lightness == "light" then "" else "-dark"); package = pkgs.adw-gtk3; }; cursorTheme = { @@ -156,12 +157,12 @@ in { settings = { "<config>" = { edge = "top"; - font = "${s.ui-font.name} ${toString s.ui-font.size}"; - background = "${s.scheme.background}"; - border = "${s.scheme.background}"; - text = "${s.scheme.foreground}"; - button-text = "${s.scheme.foreground}"; - button-background = "${s.scheme.color6}"; + font = "${loc.ui-font.name} ${toString loc.ui-font.size}"; + background = "${colo.background}"; + border = "${colo.background}"; + text = "${colo.foreground}"; + button-text = "${colo.foreground}"; + button-background = "${colo.color6}"; message-padding = 5; border-bottom-size = 1; details-border-size = 1; @@ -211,7 +212,7 @@ in { scroll_button = "276"; }; "1386:890:Wacom_One_by_Wacom_S_Pen" = { - map_to_output = s.monitors.monitor1; + map_to_output = loc.monitors.monitor1; left_handed = "enabled"; }; }; @@ -259,9 +260,9 @@ in { }; }; fonts = { - names = [ s.ui-font.name ]; + names = [ loc.ui-font.name ]; style = "Regular"; - size = s.ui-font.size + 0.0; + size = loc.ui-font.size + 0.0; }; bars = [ ]; window = { @@ -269,7 +270,8 @@ in { titlebar = false; commands = [ { command = "move to scratchpad"; criteria.app_id = "kitty-server"; } - { command = "max_render_time 1"; criteria.app_id = "kitty"; } + #{ command = "max_render_time 1"; criteria.app_id = "kitty"; } + { command = "allow_tearing yes"; criteria.app_id = "kitty"; } { command = "inhibit_idle fullscreen; floating enable; max_render_time 1; allow_tearing yes"; criteria.app_id = "cmv"; } { command = "floating enable"; criteria.class = "cmv.exe"; } { command = "floating enable"; criteria.app_id = "mauri"; } @@ -281,7 +283,6 @@ in { { command = "inhibit_idle fullscreen; allow_tearing yes"; criteria.class = "cs2"; } { command = "inhibit_idle fullscreen; allow_tearing yes"; criteria.class = "Minecraft*"; } { command = "inhibit_idle fullscreen; allow_tearing yes"; criteria.title = "Overwatch"; } - { command = "allow_tearing yes"; criteria.title = "vkcube"; } { command = "inhibit_idle fullscreen"; criteria.class = "Ryujinx"; } { command = "inhibit_idle fullscreen"; criteria.app_id = "org.yuzu_emu.yuzu"; } { command = "inhibit_idle fullscreen"; criteria.class = "dolphin-emu"; } @@ -290,10 +291,10 @@ in { ]; }; colors = let - bg = "#${s.scheme.background}"; - fg = "#${s.scheme.foreground}"; - ch = "#${s.scheme.color4}"; - urgent = "#${s.scheme.color1}"; + bg = "#${colo.background}"; + fg = "#${colo.foreground}"; + ch = "#${colo.color4}"; + urgent = "#${colo.color1}"; in { background = bg; focused = { background = bg; border = ch; childBorder = ch; indicator = ch; text = fg; }; @@ -305,7 +306,7 @@ in { startup = let gnome-schema = "org.gnome.desktop.interface"; in [ - { command = "dconf write /org/gnome/desktop/interface/color-scheme \"'prefer-${s.scheme.lightness}'\""; always = true; } + { command = "dconf write /org/gnome/desktop/interface/color-scheme \"'prefer-${colo.lightness}'\""; always = true; } { command = "dbus-sway-environment"; } { command = "swaymsg 'seat * hide_cursor 4000'"; always = true; } { command = "kitty -1 --class=\"kitty-server\""; } @@ -326,10 +327,10 @@ in { services.mako = { enable = true; defaultTimeout = 14000; - font = "${s.font.name} ${toString s.ui-font.size}"; - backgroundColor = "#${s.scheme.background}"; - textColor = "#${s.scheme.foreground}"; - borderColor = "#${s.scheme.color6}"; + font = "${loc.font.name} ${toString loc.ui-font.size}"; + backgroundColor = "#${colo.background}"; + textColor = "#${colo.foreground}"; + borderColor = "#${colo.color6}"; }; }; } diff --git a/nix/scripts.nix b/nix/scripts.nix index 97d3ee6..a36d17a 100644 --- a/nix/scripts.nix +++ b/nix/scripts.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let - s = config.local; - inherit (import ./settings.nix) scripts; + loc = config.local; + colo = loc.scheme; in { environment.etc = { "emoji.json".source = builtins.fetchurl { @@ -12,14 +12,14 @@ in { environment.systemPackages = [ (pkgs.writeShellScriptBin "bemenu-colored" '' bemenu -C --single-instance -B 0 -M 0 --hp 6 \ - --fn "${s.font.name} ${toString (s.font.size - 1)}" -H ${toString ((s.font.size - 1) * 2)} \ - --cf "#${s.scheme.foreground}" --cb "#${s.scheme.background}" \ - --hf "#${s.scheme.background}" --hb "#${s.scheme.color4}" \ - --nf "#${s.scheme.foreground}" --nb "#${s.scheme.background}" \ - --ff "#${s.scheme.foreground}" --fb "#${s.scheme.background}" \ - --af "#${s.scheme.foreground}" --ab "#${s.scheme.background}" -p "" + --fn "${loc.font.name} ${toString (loc.font.size - 1)}" -H ${toString ((loc.font.size - 1) * 2)} \ + --cf "#${colo.foreground}" --cb "#${colo.background}" \ + --hf "#${colo.background}" --hb "#${colo.color4}" \ + --nf "#${colo.foreground}" --nb "#${colo.background}" \ + --ff "#${colo.foreground}" --fb "#${colo.background}" \ + --af "#${colo.foreground}" --ab "#${colo.background}" -p "" '') - ] ++ (lib.lists.forEach s.scripts.imports (x: pkgs.writeTextFile { + ] ++ (lib.lists.forEach loc.scripts.imports (x: pkgs.writeTextFile { name = x; text = (builtins.readFile ../scripts/${x}); executable = true; diff --git a/nix/system.nix b/nix/system.nix index 92535f5..5f1943e 100644 --- a/nix/system.nix +++ b/nix/system.nix @@ -10,6 +10,9 @@ optimise.automatic = true; }; + nixpkgs.config.allowUnfree = true; + hardware.enableRedistributableFirmware = true; + security.pam.loginLimits = [ { domain = "*"; @@ -71,9 +74,6 @@ }; }; - nixpkgs.config.allowUnfree = true; - hardware.enableRedistributableFirmware = true; - hardware.graphics = { enable = true; extraPackages = with pkgs; [ diff --git a/nix/user.nix b/nix/user.nix index fbfd354..057f95f 100644 --- a/nix/user.nix +++ b/nix/user.nix @@ -1,6 +1,7 @@ -{ config, pkgs, ... }: let - s = config.local; - colo = s.scheme; +{ config, lib, pkgs, ... }: let + loc = config.local; + colo = loc.scheme; + inherit (import ./utils.nix) asNeeded; in { users.users.andrew = { isNormalUser = true; @@ -42,15 +43,15 @@ in { lcdfilter = "default"; }; defaultFonts = { - serif = [ s.ui-font.name ]; - sansSerif = [ s.ui-font.name ]; - monospace = [ s.font.name ]; - emoji = [ s.emoji-font.name ]; + serif = [ loc.ui-font.name ]; + sansSerif = [ loc.ui-font.name ]; + monospace = [ loc.font.name ]; + emoji = [ loc.emoji-font.name ]; }; }; }; - environment.systemPackages = with pkgs; [ + environment.systemPackages = with pkgs; lib.lists.flatten [ man-pages man-pages-posix home-manager @@ -61,22 +62,18 @@ in { sloccount (aspellWithDicts (dicts: with dicts; [ en en-computers en-science ])) rsync - (python3.withPackages (python-pkgs: [ - python-pkgs.requests - python-pkgs.beautifulsoup4 - ])) + (python3.withPackages (python-pkgs: [ python-pkgs.requests python-pkgs.beautifulsoup4 ])) htop neofetch - cmatrix - #hollywood + (asNeeded lib pkgs "cmatrix" ["cmatrix"]) hdparm usbutils cryptsetup - nix-index + (asNeeded lib pkgs "nix-index" ["nix-channel-index" "nix-index" "nix-locate"]) imagemagick - optipng - dmtx-utils - zbar + (asNeeded lib pkgs "optipng" ["optipng"]) + (asNeeded lib pkgs "dmtx-utils" ["dmtxquery" "dmtxread" "dmtxwrite"]) + (asNeeded lib pkgs "zbar" ["zbarcam" "zbarcam-gtk" "zbarcam-qt" "zbarimg"]) perlPackages.ArchiveZip b3sum libfaketime @@ -84,9 +81,7 @@ in { dos2unix socat curl - httrack - gdown - megatools + (asNeeded lib pkgs "httrack" ["htsserver" "httrack" "proxytrack" "webhttrack"]) libuchardet (unzip.override { enableNLS = true; }) rar @@ -103,10 +98,10 @@ in { gcr pass zenity - zathura ]; local.scripts.imports = [ + "install-as-needed" "cpu-vulns" "spell" "ts-date" diff --git a/nix/utils.nix b/nix/utils.nix new file mode 100644 index 0000000..9219048 --- /dev/null +++ b/nix/utils.nix @@ -0,0 +1,7 @@ +{ + asNeeded = (lib: pkgs: pkg: commands: + (lib.lists.forEach commands (command: pkgs.writeShellScriptBin "${command}" '' + install-as-needed "${pkg}" ${command} ''$@ + '')) + ); +} diff --git a/nix/virtualisation.nix b/nix/virtualisation.nix index f8be5b6..a73054d 100644 --- a/nix/virtualisation.nix +++ b/nix/virtualisation.nix @@ -1,7 +1,4 @@ -{ pkgs, ... }: -let - inherit (import ./settings.nix) scripts; -in { +{ pkgs, ... }: { users.users.andrew.extraGroups = [ "libvirtd" "kvm" ]; virtualisation.libvirtd.enable = true; programs.virt-manager.enable = true; diff --git a/scripts/install-as-needed b/scripts/install-as-needed new file mode 100755 index 0000000..ab48655 --- /dev/null +++ b/scripts/install-as-needed @@ -0,0 +1,3 @@ +#! /usr/bin/env sh +export NIXPKGS_ALLOW_UNFREE=1 +nix shell --impure --expr "with (import (builtins.getFlake ''nixpkgs'') {});$1" --command ${@:2} diff --git a/themes/spring_2025/spring_2025.nix b/themes/spring_2025/spring_2025.nix index 764906d..16f12aa 100644 --- a/themes/spring_2025/spring_2025.nix +++ b/themes/spring_2025/spring_2025.nix @@ -19,5 +19,5 @@ rec { color13 = "${color5}"; color14 = "${color6}"; color15 = "${color7}"; - alpha = 0.965; + alpha = 0.985; } diff --git a/themes/year_of_snake/snake.nix b/themes/year_of_snake/snake.nix index af85640..c2a9d01 100644 --- a/themes/year_of_snake/snake.nix +++ b/themes/year_of_snake/snake.nix @@ -5,11 +5,11 @@ rec { foreground = "ffffff"; #ffffff color0 = "${background}"; color1 = "7b3837"; #7b3837 - color2 = "e5d6cf"; #e5d6cf - color3 = "f5c4a4"; #f5c4a4 - color4 = "f3eff0"; #f3eff0 - color5 = "9e4746"; #9e4746 - color6 = "f2d7b9"; #f2d7b9 + color2 = "f3eff0"; #f3eff0 + color3 = "9e4746"; #9e4746 + color4 = "e5d6cf"; #e5d6cf + color5 = "f2d7b9"; #f2d7b9 + color6 = "f5c4a4"; #f5c4a4 color7 = "${foreground}"; color8 = "${color6}"; color9 = "${color1}"; |