update
This commit is contained in:
parent
1609390356
commit
74442be05e
46
flake.nix
46
flake.nix
|
@ -62,6 +62,11 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hyprpicker = {
|
||||||
|
url = "github:hyprwm/hyprpicker";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
waybar = {
|
waybar = {
|
||||||
url = "github:alexays/waybar";
|
url = "github:alexays/waybar";
|
||||||
flake = false;
|
flake = false;
|
||||||
|
@ -93,6 +98,7 @@
|
||||||
self.overlays.default
|
self.overlays.default
|
||||||
inputs.hyprland-contrib.overlays.default
|
inputs.hyprland-contrib.overlays.default
|
||||||
inputs.hyprpaper.overlays.default
|
inputs.hyprpaper.overlays.default
|
||||||
|
inputs.hyprpicker.overlays.default
|
||||||
inputs.webcord.overlays.default
|
inputs.webcord.overlays.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -127,18 +133,12 @@
|
||||||
|
|
||||||
steam = prev.steam.override {
|
steam = prev.steam.override {
|
||||||
extraPkgs = pkgs: [
|
extraPkgs = pkgs: [
|
||||||
pkgs.gamescope
|
|
||||||
pkgs.gnome.zenity
|
pkgs.gnome.zenity
|
||||||
pkgs.keyutils
|
|
||||||
pkgs.libkrb5
|
|
||||||
pkgs.mangohud
|
|
||||||
pkgs.mpg123
|
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
|
||||||
extraLibraries = pkgs: [
|
ncmpcpp = prev.ncmpcpp.override {
|
||||||
pkgs.mpg123
|
visualizerSupport = true;
|
||||||
pkgs.zlib-ng
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
mesa-git =
|
mesa-git =
|
||||||
|
@ -154,36 +154,18 @@
|
||||||
"-Dandroid-libbacktrace=disabled"
|
"-Dandroid-libbacktrace=disabled"
|
||||||
"-Dlmsensors=disabled"
|
"-Dlmsensors=disabled"
|
||||||
"-Dlibunwind=disabled"
|
"-Dlibunwind=disabled"
|
||||||
|
"-Dgallium-xa=disabled"
|
||||||
];
|
];
|
||||||
})).override
|
})).override
|
||||||
{
|
{
|
||||||
galliumDrivers = [ "radeonsi" "swrast" "svga" ];
|
galliumDrivers = [ "radeonsi" "swrast" ];
|
||||||
vulkanDrivers = [ "amd" ];
|
vulkanDrivers = [ "amd" ];
|
||||||
enableGalliumNine = false; # Replaced by DXVK
|
enableGalliumNine = false; # Replaced by DXVK
|
||||||
};
|
};
|
||||||
|
|
||||||
mygui = prev.mygui.overrideAttrs
|
customedid = pkgs.callPackage ./pkgs/custom-edid { };
|
||||||
(old: {
|
wxedid = pkgs.callPackage ./pkgs/wxedid { };
|
||||||
version = "3.4.1";
|
fastfetch = pkgs.callPackage ./pkgs/fastfetch { };
|
||||||
src = prev.fetchFromGitHub {
|
|
||||||
owner = "MyGUI";
|
|
||||||
repo = "mygui";
|
|
||||||
rev = "MyGUI3.4.1";
|
|
||||||
sha256 = "sha256-5u9whibYKPj8tCuhdLOhL4nDisbFAB0NxxdjU/8izb8=";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
customedid = pkgs.callPackage
|
|
||||||
./pkgs/custom-edid
|
|
||||||
{ };
|
|
||||||
wxedid = pkgs.callPackage
|
|
||||||
./pkgs/wxedid
|
|
||||||
{ };
|
|
||||||
|
|
||||||
fastfetch = pkgs.callPackage
|
|
||||||
./pkgs/fastfetch
|
|
||||||
{ };
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosConfigurations.terra = nixpkgs.lib.nixosSystem
|
nixosConfigurations.terra = nixpkgs.lib.nixosSystem
|
||||||
|
|
|
@ -1,331 +0,0 @@
|
||||||
{ stdenv
|
|
||||||
, lib
|
|
||||||
, fetchurl
|
|
||||||
, meson
|
|
||||||
, pkg-config
|
|
||||||
, ninja
|
|
||||||
, intltool
|
|
||||||
, bison
|
|
||||||
, flex
|
|
||||||
, file
|
|
||||||
, python3Packages
|
|
||||||
, wayland-scanner
|
|
||||||
, expat
|
|
||||||
, libdrm
|
|
||||||
, xorg
|
|
||||||
, wayland
|
|
||||||
, wayland-protocols
|
|
||||||
, openssl
|
|
||||||
, llvmPackages
|
|
||||||
, libffi
|
|
||||||
, libomxil-bellagio
|
|
||||||
, libva-minimal
|
|
||||||
, libelf
|
|
||||||
, libvdpau
|
|
||||||
, libglvnd
|
|
||||||
, libunwind
|
|
||||||
, vulkan-loader
|
|
||||||
, glslang
|
|
||||||
, galliumDrivers ? [ "auto" ]
|
|
||||||
# upstream Mesa defaults to only enabling swrast (aka lavapipe) on aarch64 for some reason, so force building the others
|
|
||||||
, vulkanDrivers ? if (stdenv.isLinux && stdenv.isAarch64) then [ "swrast" "broadcom" "freedreno" "panfrost" ] else [ "auto" ]
|
|
||||||
, eglPlatforms ? [ "x11" ] ++ lib.optionals stdenv.isLinux [ "wayland" ]
|
|
||||||
, vulkanLayers ? lib.optionals (!stdenv.isDarwin) [ "device-select" "overlay" ] # No Vulkan support on Darwin
|
|
||||||
, OpenGL
|
|
||||||
, Xplugin
|
|
||||||
, withValgrind ? lib.meta.availableOn stdenv.hostPlatform valgrind-light && !valgrind-light.meta.broken
|
|
||||||
, valgrind-light
|
|
||||||
, enableGalliumNine ? stdenv.isLinux
|
|
||||||
, enableOSMesa ? stdenv.isLinux
|
|
||||||
, enableOpenCL ? stdenv.isLinux && stdenv.isx86_64
|
|
||||||
, enablePatentEncumberedCodecs ? true
|
|
||||||
, libclc
|
|
||||||
, jdupes
|
|
||||||
, cmake
|
|
||||||
, rustc
|
|
||||||
, rust-bindgen
|
|
||||||
, spirv-llvm-translator_14
|
|
||||||
, inputs
|
|
||||||
}:
|
|
||||||
|
|
||||||
/** Packaging design:
|
|
||||||
- The basic mesa ($out) contains headers and libraries (GLU is in libGLU now).
|
|
||||||
This or the mesa attribute (which also contains GLU) are small (~ 2 MB, mostly headers)
|
|
||||||
and are designed to be the buildInput of other packages.
|
|
||||||
- DRI drivers are compiled into $drivers output, which is much bigger and
|
|
||||||
depends on LLVM. These should be searched at runtime in
|
|
||||||
"/run/opengl-driver{,-32}/lib/*" and so are kind-of impure (given by NixOS).
|
|
||||||
(I suppose on non-NixOS one would create the appropriate symlinks from there.)
|
|
||||||
- libOSMesa is in $osmesa (~4 MB)
|
|
||||||
*/
|
|
||||||
|
|
||||||
let
|
|
||||||
# Release calendar: https://www.mesa3d.org/release-calendar.html
|
|
||||||
# Release frequency: https://www.mesa3d.org/releasing.html#schedule
|
|
||||||
version = "git";
|
|
||||||
branch = lib.versions.major version;
|
|
||||||
|
|
||||||
withLibdrm = lib.meta.availableOn stdenv.hostPlatform libdrm;
|
|
||||||
|
|
||||||
rust-bindgen' = rust-bindgen.override {
|
|
||||||
rust-bindgen-unwrapped = rust-bindgen.unwrapped.override {
|
|
||||||
clang = llvmPackages.clang;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
self = stdenv.mkDerivation {
|
|
||||||
pname = "mesa-git";
|
|
||||||
inherit version;
|
|
||||||
|
|
||||||
src = inputs.mesa-git;
|
|
||||||
|
|
||||||
# TODO:
|
|
||||||
# revive ./dricore-gallium.patch when it gets ported (from Ubuntu), as it saved
|
|
||||||
# ~35 MB in $drivers; watch https://launchpad.net/ubuntu/+source/mesa/+changelog
|
|
||||||
patches = [
|
|
||||||
# fixes pkgsMusl.mesa build
|
|
||||||
./musl.patch
|
|
||||||
|
|
||||||
./opencl.patch
|
|
||||||
./disk_cache-include-dri-driver-path-in-cache-key.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
patchShebangs .
|
|
||||||
|
|
||||||
# The drirc.d directory cannot be installed to $drivers as that would cause a cyclic dependency:
|
|
||||||
substituteInPlace src/util/xmlconfig.c --replace \
|
|
||||||
'DATADIR "/drirc.d"' '"${placeholder "out"}/share/drirc.d"'
|
|
||||||
substituteInPlace src/util/meson.build --replace \
|
|
||||||
"get_option('datadir')" "'${placeholder "out"}/share'"
|
|
||||||
substituteInPlace src/amd/vulkan/meson.build --replace \
|
|
||||||
"get_option('datadir')" "'${placeholder "out"}/share'"
|
|
||||||
'';
|
|
||||||
|
|
||||||
outputs = [ "out" "dev" "drivers" ]
|
|
||||||
++ lib.optional enableOSMesa "osmesa"
|
|
||||||
++ lib.optional stdenv.isLinux "driversdev"
|
|
||||||
++ lib.optional enableOpenCL "opencl";
|
|
||||||
|
|
||||||
# FIXME: this fixes rusticl/iris segfaulting on startup, _somehow_.
|
|
||||||
# Needs more investigating.
|
|
||||||
separateDebugInfo = true;
|
|
||||||
|
|
||||||
preConfigure = ''
|
|
||||||
PATH=${llvmPackages.libllvm.dev}/bin:$PATH
|
|
||||||
'';
|
|
||||||
|
|
||||||
# TODO: Figure out how to enable opencl without having a runtime dependency on clang
|
|
||||||
mesonFlags = [
|
|
||||||
"--sysconfdir=/etc"
|
|
||||||
"--datadir=${placeholder "drivers"}/share" # Vendor files
|
|
||||||
|
|
||||||
# Don't build in debug mode
|
|
||||||
# https://gitlab.freedesktop.org/mesa/mesa/blob/master/docs/meson.html#L327
|
|
||||||
"-Db_ndebug=true"
|
|
||||||
|
|
||||||
"-Ddisk-cache-key=${placeholder "drivers"}"
|
|
||||||
"-Ddri-search-path=${libglvnd.driverLink}/lib/dri"
|
|
||||||
|
|
||||||
"-Dplatforms=${lib.concatStringsSep "," eglPlatforms}"
|
|
||||||
"-Dgallium-drivers=${lib.concatStringsSep "," galliumDrivers}"
|
|
||||||
"-Dvulkan-drivers=${lib.concatStringsSep "," vulkanDrivers}"
|
|
||||||
|
|
||||||
"-Ddri-drivers-path=${placeholder "drivers"}/lib/dri"
|
|
||||||
"-Dvdpau-libs-path=${placeholder "drivers"}/lib/vdpau"
|
|
||||||
"-Domx-libs-path=${placeholder "drivers"}/lib/bellagio"
|
|
||||||
"-Dva-libs-path=${placeholder "drivers"}/lib/dri"
|
|
||||||
"-Dd3d-drivers-path=${placeholder "drivers"}/lib/d3d"
|
|
||||||
"-Dgallium-nine=${lib.boolToString enableGalliumNine}" # Direct3D in Wine
|
|
||||||
"-Dosmesa=${lib.boolToString enableOSMesa}" # used by wine
|
|
||||||
"-Dmicrosoft-clc=disabled" # Only relevant on Windows (OpenCL 1.2 API on top of D3D12)
|
|
||||||
|
|
||||||
# To enable non-mesa gbm backends to be found (e.g. Nvidia)
|
|
||||||
"-Dgbm-backends-path=${libglvnd.driverLink}/lib/gbm:${placeholder "out"}/lib/gbm"
|
|
||||||
] ++ lib.optionals stdenv.isLinux [
|
|
||||||
"-Dglvnd=true"
|
|
||||||
] ++ lib.optionals enableOpenCL [
|
|
||||||
"-Dgallium-opencl=icd" # Enable the gallium OpenCL frontend
|
|
||||||
"-Dgallium-rusticl=true"
|
|
||||||
"-Drust_std=2021"
|
|
||||||
"-Dclang-libdir=${llvmPackages.clang-unwrapped.lib}/lib"
|
|
||||||
] ++ lib.optional enablePatentEncumberedCodecs
|
|
||||||
"-Dvideo-codecs=h264dec,h264enc,h265dec,h265enc,vc1dec"
|
|
||||||
++ lib.optional (vulkanLayers != [ ]) "-D vulkan-layers=${builtins.concatStringsSep "," vulkanLayers}";
|
|
||||||
|
|
||||||
buildInputs = with xorg; [
|
|
||||||
expat
|
|
||||||
llvmPackages.libllvm
|
|
||||||
libglvnd
|
|
||||||
xorgproto
|
|
||||||
libX11
|
|
||||||
libXext
|
|
||||||
libxcb
|
|
||||||
libXt
|
|
||||||
libXfixes
|
|
||||||
libxshmfence
|
|
||||||
libXrandr
|
|
||||||
libffi
|
|
||||||
libvdpau
|
|
||||||
libelf
|
|
||||||
libXvMC
|
|
||||||
libpthreadstubs
|
|
||||||
openssl /*or another sha1 provider*/
|
|
||||||
] ++ lib.optionals (lib.elem "wayland" eglPlatforms) [ wayland wayland-protocols ]
|
|
||||||
++ lib.optionals stdenv.isLinux [ libomxil-bellagio libva-minimal ]
|
|
||||||
++ lib.optionals stdenv.isDarwin [ libunwind ]
|
|
||||||
++ lib.optionals enableOpenCL [ libclc llvmPackages.clang llvmPackages.clang-unwrapped rustc rust-bindgen' spirv-llvm-translator_14 ]
|
|
||||||
++ lib.optional withValgrind valgrind-light
|
|
||||||
# Mesa will not build zink when gallium-drivers=auto
|
|
||||||
++ lib.optional (lib.elem "zink" galliumDrivers) vulkan-loader;
|
|
||||||
|
|
||||||
depsBuildBuild = [ pkg-config ];
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
meson
|
|
||||||
pkg-config
|
|
||||||
ninja
|
|
||||||
intltool
|
|
||||||
bison
|
|
||||||
flex
|
|
||||||
file
|
|
||||||
python3Packages.python
|
|
||||||
python3Packages.Mako
|
|
||||||
jdupes
|
|
||||||
glslang
|
|
||||||
] ++ lib.optionals (lib.elem "wayland" eglPlatforms) [
|
|
||||||
wayland-scanner
|
|
||||||
];
|
|
||||||
|
|
||||||
propagatedBuildInputs = with xorg; [
|
|
||||||
libXdamage
|
|
||||||
libXxf86vm
|
|
||||||
] ++ lib.optional withLibdrm libdrm
|
|
||||||
++ lib.optionals stdenv.isDarwin [ OpenGL Xplugin ];
|
|
||||||
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
# Some installs don't have any drivers so this directory is never created.
|
|
||||||
mkdir -p $drivers $osmesa
|
|
||||||
'' + lib.optionalString stdenv.isLinux ''
|
|
||||||
mkdir -p $drivers/lib
|
|
||||||
|
|
||||||
if [ -n "$(shopt -s nullglob; echo "$out/lib/libxatracker"*)" -o -n "$(shopt -s nullglob; echo "$out/lib/libvulkan_"*)" ]; then
|
|
||||||
# move gallium-related stuff to $drivers, so $out doesn't depend on LLVM
|
|
||||||
mv -t $drivers/lib \
|
|
||||||
$out/lib/libxatracker* \
|
|
||||||
$out/lib/libvulkan_*
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$(shopt -s nullglob; echo "$out"/lib/lib*_mesa*)" ]; then
|
|
||||||
# Move other drivers to a separate output
|
|
||||||
mv -t $drivers/lib $out/lib/lib*_mesa*
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Update search path used by glvnd
|
|
||||||
for js in $drivers/share/glvnd/egl_vendor.d/*.json; do
|
|
||||||
substituteInPlace "$js" --replace '"libEGL_' '"'"$drivers/lib/libEGL_"
|
|
||||||
done
|
|
||||||
|
|
||||||
# Update search path used by Vulkan (it's pointing to $out but
|
|
||||||
# drivers are in $drivers)
|
|
||||||
for js in $drivers/share/vulkan/icd.d/*.json; do
|
|
||||||
substituteInPlace "$js" --replace "$out" "$drivers"
|
|
||||||
done
|
|
||||||
'' + lib.optionalString enableOpenCL ''
|
|
||||||
# Move OpenCL stuff
|
|
||||||
mkdir -p $opencl/lib
|
|
||||||
mv -t "$opencl/lib/" \
|
|
||||||
$out/lib/gallium-pipe \
|
|
||||||
$out/lib/lib*OpenCL*
|
|
||||||
|
|
||||||
# We construct our own .icd files that contain absolute paths.
|
|
||||||
mkdir -p $opencl/etc/OpenCL/vendors/
|
|
||||||
echo $opencl/lib/libMesaOpenCL.so > $opencl/etc/OpenCL/vendors/mesa.icd
|
|
||||||
echo $opencl/lib/libRusticlOpenCL.so > $opencl/etc/OpenCL/vendors/rusticl.icd
|
|
||||||
'' + lib.optionalString enableOSMesa ''
|
|
||||||
# move libOSMesa to $osmesa, as it's relatively big
|
|
||||||
mkdir -p $osmesa/lib
|
|
||||||
mv -t $osmesa/lib/ $out/lib/libOSMesa*
|
|
||||||
'' + lib.optionalString (vulkanLayers != [ ]) ''
|
|
||||||
mv -t $drivers/lib $out/lib/libVkLayer*
|
|
||||||
for js in $drivers/share/vulkan/{im,ex}plicit_layer.d/*.json; do
|
|
||||||
substituteInPlace "$js" --replace '"libVkLayer_' '"'"$drivers/lib/libVkLayer_"
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
|
|
||||||
postFixup = lib.optionalString stdenv.isLinux ''
|
|
||||||
# set the default search path for DRI drivers; used e.g. by X server
|
|
||||||
substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace "$drivers" "${libglvnd.driverLink}"
|
|
||||||
[ -f "$dev/lib/pkgconfig/d3d.pc" ] && substituteInPlace "$dev/lib/pkgconfig/d3d.pc" --replace "$drivers" "${libglvnd.driverLink}"
|
|
||||||
|
|
||||||
# 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
|
|
||||||
done
|
|
||||||
|
|
||||||
# NAR doesn't support hard links, so convert them to symlinks to save space.
|
|
||||||
jdupes --hard-links --link-soft --recurse "$drivers"
|
|
||||||
|
|
||||||
# add RPATH so the drivers can find the moved libgallium and libdricore9
|
|
||||||
# moved here to avoid problems with stripping patchelfed files
|
|
||||||
for lib in $drivers/lib/*.so* $drivers/lib/*/*.so*; do
|
|
||||||
if [[ ! -L "$lib" ]]; then
|
|
||||||
patchelf --set-rpath "$(patchelf --print-rpath $lib):$drivers/lib" "$lib"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ "-fno-common" ] ++ lib.optionals enableOpenCL [
|
|
||||||
"-UPIPE_SEARCH_DIR"
|
|
||||||
"-DPIPE_SEARCH_DIR=\"${placeholder "opencl"}/lib/gallium-pipe\""
|
|
||||||
];
|
|
||||||
|
|
||||||
passthru = {
|
|
||||||
inherit (libglvnd) driverLink;
|
|
||||||
inherit llvmPackages;
|
|
||||||
|
|
||||||
libdrm = if withLibdrm then libdrm else null;
|
|
||||||
|
|
||||||
tests = lib.optionalAttrs stdenv.isLinux {
|
|
||||||
devDoesNotDependOnLLVM = stdenv.mkDerivation {
|
|
||||||
name = "mesa-dev-does-not-depend-on-llvm";
|
|
||||||
buildCommand = ''
|
|
||||||
echo ${self.dev} >>$out
|
|
||||||
'';
|
|
||||||
disallowedRequisites = [ llvmPackages.llvm self.drivers ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "An open source 3D graphics library";
|
|
||||||
longDescription = ''
|
|
||||||
The Mesa project began as an open-source implementation of the OpenGL
|
|
||||||
specification - a system for rendering interactive 3D graphics. Over the
|
|
||||||
years the project has grown to implement more graphics APIs, including
|
|
||||||
OpenGL ES (versions 1, 2, 3), OpenCL, OpenMAX, VDPAU, VA API, XvMC, and
|
|
||||||
Vulkan. A variety of device drivers allows the Mesa libraries to be used
|
|
||||||
in many different environments ranging from software emulation to
|
|
||||||
complete hardware acceleration for modern GPUs.
|
|
||||||
'';
|
|
||||||
homepage = "https://www.mesa3d.org/";
|
|
||||||
changelog = "https://www.mesa3d.org/relnotes/${version}.html";
|
|
||||||
license = licenses.mit; # X11 variant, in most files
|
|
||||||
platforms = platforms.mesaPlatforms;
|
|
||||||
maintainers = with maintainers; [ primeos vcunat ]; # Help is welcome :)
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
self
|
|
||||||
|
|
|
@ -1,75 +0,0 @@
|
||||||
{ stdenv
|
|
||||||
, libglvnd, mesa
|
|
||||||
, OpenGL }:
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
inherit (libglvnd) version;
|
|
||||||
pname = "libGL";
|
|
||||||
outputs = [ "out" "dev" ];
|
|
||||||
|
|
||||||
# On macOS, libglvnd is not supported, so we just use what mesa
|
|
||||||
# build. We need to also include OpenGL.framework, and some
|
|
||||||
# extra tricks to go along with. We add mesa’s libGLX to support
|
|
||||||
# the X extensions to OpenGL.
|
|
||||||
buildCommand = if stdenv.hostPlatform.isDarwin then ''
|
|
||||||
mkdir -p $out/nix-support $dev
|
|
||||||
echo ${OpenGL} >> $out/nix-support/propagated-build-inputs
|
|
||||||
ln -s ${mesa.out}/lib $out/lib
|
|
||||||
|
|
||||||
mkdir -p $dev/lib/pkgconfig $dev/nix-support
|
|
||||||
echo "$out" > $dev/nix-support/propagated-build-inputs
|
|
||||||
ln -s ${mesa.dev}/include $dev/include
|
|
||||||
|
|
||||||
cat <<EOF >$dev/lib/pkgconfig/gl.pc
|
|
||||||
Name: gl
|
|
||||||
Description: gl library
|
|
||||||
Version: ${mesa.version}
|
|
||||||
Libs: -L${mesa.out}/lib -lGL
|
|
||||||
Cflags: -I${mesa.dev}/include
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >$dev/lib/pkgconfig/glesv1_cm.pc
|
|
||||||
Name: glesv1_cm
|
|
||||||
Description: glesv1_cm library
|
|
||||||
Version: ${mesa.version}
|
|
||||||
Libs: -L${mesa.out}/lib -lGLESv1_CM
|
|
||||||
Cflags: -I${mesa.dev}/include
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >$dev/lib/pkgconfig/glesv2.pc
|
|
||||||
Name: glesv2
|
|
||||||
Description: glesv2 library
|
|
||||||
Version: ${mesa.version}
|
|
||||||
Libs: -L${mesa.out}/lib -lGLESv2
|
|
||||||
Cflags: -I${mesa.dev}/include
|
|
||||||
EOF
|
|
||||||
''
|
|
||||||
|
|
||||||
# Otherwise, setup gl stubs to use libglvnd.
|
|
||||||
else ''
|
|
||||||
mkdir -p $out/nix-support
|
|
||||||
ln -s ${libglvnd.out}/lib $out/lib
|
|
||||||
|
|
||||||
mkdir -p $dev/{,lib/pkgconfig,nix-support}
|
|
||||||
echo "$out ${libglvnd} ${libglvnd.dev}" > $dev/nix-support/propagated-build-inputs
|
|
||||||
ln -s ${libglvnd.dev}/include $dev/include
|
|
||||||
|
|
||||||
genPkgConfig() {
|
|
||||||
local name="$1"
|
|
||||||
local lib="$2"
|
|
||||||
|
|
||||||
cat <<EOF >$dev/lib/pkgconfig/$name.pc
|
|
||||||
Name: $name
|
|
||||||
Description: $lib library
|
|
||||||
Version: ${libglvnd.version}
|
|
||||||
Libs: -L${libglvnd.out}/lib -l$lib
|
|
||||||
Cflags: -I${libglvnd.dev}/include
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
genPkgConfig gl GL
|
|
||||||
genPkgConfig egl EGL
|
|
||||||
genPkgConfig glesv1_cm GLESv1_CM
|
|
||||||
genPkgConfig glesv2 GLESv2
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -20,13 +20,6 @@
|
||||||
"drm.edid_firmware=DP-1:edid/edid-EX2780Q.bin"
|
"drm.edid_firmware=DP-1:edid/edid-EX2780Q.bin"
|
||||||
];
|
];
|
||||||
|
|
||||||
extraModprobeConfig = ''
|
|
||||||
options iwlwifi power_save=0
|
|
||||||
options iwlwifi swcrypto=0
|
|
||||||
options iwlwifi uapsd_disable=1
|
|
||||||
options iwlmvm power_scheme=1
|
|
||||||
'';
|
|
||||||
|
|
||||||
loader = {
|
loader = {
|
||||||
efi = {
|
efi = {
|
||||||
canTouchEfiVariables = true;
|
canTouchEfiVariables = true;
|
||||||
|
@ -56,10 +49,11 @@
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "terra"; # Define your hostname.
|
hostName = "terra"; # Define your hostname.
|
||||||
|
enableIPv6 = false;
|
||||||
|
|
||||||
networkmanager = {
|
networkmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wifi = {
|
wifi = {
|
||||||
scanRandMacAddress = false;
|
|
||||||
powersave = false;
|
powersave = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ pkgs, config, lib, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.cava ];
|
||||||
|
|
||||||
|
xdg.configFile."cava/config".text = lib.generators.toINI { } {
|
||||||
|
general = {
|
||||||
|
bar_width = "2";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -69,7 +69,6 @@
|
||||||
};
|
};
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
nf = "${pkgs.pfetch}/bin/pfetch";
|
nf = "${pkgs.pfetch}/bin/pfetch";
|
||||||
r = "${pkgs.nnn}/bin/nnn";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ in
|
||||||
kak-lsp
|
kak-lsp
|
||||||
kakboard
|
kakboard
|
||||||
kakoune-extra-filetypes
|
kakoune-extra-filetypes
|
||||||
#powerline-kak
|
powerline-kak
|
||||||
smarttab
|
smarttab
|
||||||
sort-selections
|
sort-selections
|
||||||
];
|
];
|
||||||
|
@ -53,7 +53,7 @@ in
|
||||||
|
|
||||||
ui = {
|
ui = {
|
||||||
assistant = "none";
|
assistant = "none";
|
||||||
setTitle = true;
|
setTitle = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
@ -69,10 +69,10 @@ in
|
||||||
set-face global StatusLine rgb:ebdbb2,default
|
set-face global StatusLine rgb:ebdbb2,default
|
||||||
set-face global BufferPadding rgb:504945,default
|
set-face global BufferPadding rgb:504945,default
|
||||||
|
|
||||||
# require-module powerline
|
require-module powerline
|
||||||
# powerline-start
|
powerline-start
|
||||||
# powerline-theme gruvbox
|
powerline-theme gruvbox
|
||||||
# powerline-separator global half-step
|
#powerline-separator global half-step
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,6 @@
|
||||||
|
|
||||||
programs.ncmpcpp = {
|
programs.ncmpcpp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.ncmpcpp.override { visualizerSupport = true; };
|
|
||||||
settings = {
|
settings = {
|
||||||
visualizer_data_source = "/tmp/mpd.fifo";
|
visualizer_data_source = "/tmp/mpd.fifo";
|
||||||
visualizer_output_name = "my_fifo";
|
visualizer_output_name = "my_fifo";
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
{ config, pkgs, ... }: {
|
|
||||||
programs.nnn = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.nnn.override {
|
|
||||||
withNerdIcons = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -78,7 +78,7 @@ in
|
||||||
}
|
}
|
||||||
|
|
||||||
general {
|
general {
|
||||||
gaps_in = 10
|
gaps_in = 16
|
||||||
border_size = 4
|
border_size = 4
|
||||||
|
|
||||||
col.active_border = rgba(${colors.base0F}FF)
|
col.active_border = rgba(${colors.base0F}FF)
|
||||||
|
@ -97,6 +97,8 @@ in
|
||||||
misc {
|
misc {
|
||||||
vfr = true
|
vfr = true
|
||||||
vrr = 2
|
vrr = 2
|
||||||
|
enable_swallow = true
|
||||||
|
swallow_regex = ^(foot)$
|
||||||
}
|
}
|
||||||
|
|
||||||
decoration {
|
decoration {
|
||||||
|
@ -113,12 +115,14 @@ in
|
||||||
col.shadow = rgba(${colors.base00}99)
|
col.shadow = rgba(${colors.base00}99)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
blurls = waybar
|
||||||
|
blurls = notifications
|
||||||
|
|
||||||
animations {
|
animations {
|
||||||
enabled = yes
|
enabled = yes
|
||||||
|
|
||||||
animation = windows, 1, 5, default
|
animation = windowsIn, 1, 8, default, slide
|
||||||
animation = windowsOut, 1, 5, default
|
animation = windowsOut, 1, 8, default, slide
|
||||||
animation = border, 1, 8, default
|
animation = border, 1, 8, default
|
||||||
animation = fade, 1, 5, default
|
animation = fade, 1, 5, default
|
||||||
animation = workspaces, 1, 4, default
|
animation = workspaces, 1, 4, default
|
||||||
|
|
|
@ -3,7 +3,7 @@ let
|
||||||
colors = config.colorScheme.colors;
|
colors = config.colorScheme.colors;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.mako = {
|
services.mako = {
|
||||||
enable = true;
|
enable = true;
|
||||||
anchor = "top-right";
|
anchor = "top-right";
|
||||||
defaultTimeout = 5000;
|
defaultTimeout = 5000;
|
||||||
|
@ -11,7 +11,7 @@ in
|
||||||
width = 320;
|
width = 320;
|
||||||
height = 130;
|
height = 130;
|
||||||
|
|
||||||
backgroundColor = "#${colors.base00}";
|
backgroundColor = "#${colors.base00}B3";
|
||||||
borderColor = "#${colors.base01}";
|
borderColor = "#${colors.base01}";
|
||||||
borderRadius = 10;
|
borderRadius = 10;
|
||||||
borderSize = 2;
|
borderSize = 2;
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, lib, nix-colors, ... }:
|
||||||
let
|
let
|
||||||
|
wobsock = "/tmp/wob-vol.fifo";
|
||||||
colors = config.colorScheme.colors;
|
colors = config.colorScheme.colors;
|
||||||
|
|
||||||
|
backgroundColorRGB = nix-colors.lib-core.conversions.hexToRGBString "," colors.base00;
|
||||||
|
backgroundAlpha = "0.7";
|
||||||
|
|
||||||
|
font = "JetBrainsMono Nerd Font";
|
||||||
|
fontSize = "9pt";
|
||||||
|
|
||||||
ds-battery = pkgs.writeShellScriptBin "ds-battery.sh" ''
|
ds-battery = pkgs.writeShellScriptBin "ds-battery.sh" ''
|
||||||
ds_capacity_file="/sys/class/power_supply/ps-controller-battery-4c:b9:9b:74:ae:31/capacity"
|
ds_capacity_file="/sys/class/power_supply/ps-controller-battery-4c:b9:9b:74:ae:31/capacity"
|
||||||
ds_status_file="/sys/class/power_supply/ps-controller-battery-4c:b9:9b:74:ae:31/status"
|
ds_status_file="/sys/class/power_supply/ps-controller-battery-4c:b9:9b:74:ae:31/status"
|
||||||
|
@ -33,7 +40,7 @@ in
|
||||||
modules-center = [ "wlr/workspaces" "custom/blank" ];
|
modules-center = [ "wlr/workspaces" "custom/blank" ];
|
||||||
modules-right = [
|
modules-right = [
|
||||||
"custom/ds-battery"
|
"custom/ds-battery"
|
||||||
"pulseaudio"
|
"wireplumber"
|
||||||
"mpd"
|
"mpd"
|
||||||
"tray"
|
"tray"
|
||||||
"custom/blank"
|
"custom/blank"
|
||||||
|
@ -54,21 +61,11 @@ in
|
||||||
|
|
||||||
format = "{icon}";
|
format = "{icon}";
|
||||||
format-icons = {
|
format-icons = {
|
||||||
#active = "";
|
|
||||||
#default = "";
|
|
||||||
active = "";
|
active = "";
|
||||||
default = "";
|
default = "";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
"custom/workspaceborderleft" = {
|
|
||||||
format = " ";
|
|
||||||
};
|
|
||||||
|
|
||||||
"custom/workspaceborderright" = {
|
|
||||||
format = " ";
|
|
||||||
};
|
|
||||||
|
|
||||||
"hyprland/window" = {
|
"hyprland/window" = {
|
||||||
separate-outputs = true;
|
separate-outputs = true;
|
||||||
};
|
};
|
||||||
|
@ -77,17 +74,20 @@ in
|
||||||
format = "{:%a %d. %B %H:%M}";
|
format = "{:%a %d. %B %H:%M}";
|
||||||
};
|
};
|
||||||
|
|
||||||
"pulseaudio" = {
|
"wireplumber" = {
|
||||||
scroll-step = 5;
|
scroll-step = 5;
|
||||||
format = "{icon} {volume}%";
|
format = "{icon} {volume}%";
|
||||||
format-icons = [ "" "" "墳" "" ];
|
format-icons = [ "" "" "墳" "" ];
|
||||||
ignored-sinks = [ "Easy Effects Sink" ];
|
ignored-sinks = [ "Easy Effects Sink" ];
|
||||||
|
on-scroll-up = "${pkgs.pamixer}/bin/pamixer -i 10 --get-volume > ${wobsock}";
|
||||||
|
on-scroll-down = "${pkgs.pamixer}/bin/pamixer -d 10 --get-volume > ${wobsock}";
|
||||||
};
|
};
|
||||||
|
|
||||||
"tray" = {
|
"tray" = {
|
||||||
icon-size = 16;
|
icon-size = 16;
|
||||||
spacing = 10;
|
spacing = 10;
|
||||||
};
|
};
|
||||||
|
|
||||||
"mpd" = {
|
"mpd" = {
|
||||||
format =
|
format =
|
||||||
"{stateIcon} {artist} - {title} {elapsedTime:%M:%S}/{totalTime:%M:%S}";
|
"{stateIcon} {artist} - {title} {elapsedTime:%M:%S}/{totalTime:%M:%S}";
|
||||||
|
@ -96,6 +96,7 @@ in
|
||||||
playing = "";
|
playing = "";
|
||||||
paused = "";
|
paused = "";
|
||||||
};
|
};
|
||||||
|
on-click = "${pkgs.foot}/bin/foot -e ${pkgs.ncmpcpp}/bin/ncmpcpp";
|
||||||
};
|
};
|
||||||
|
|
||||||
"custom/ds-battery" = {
|
"custom/ds-battery" = {
|
||||||
|
@ -103,23 +104,20 @@ in
|
||||||
exec = "${ds-battery}/bin/ds-battery.sh";
|
exec = "${ds-battery}/bin/ds-battery.sh";
|
||||||
escape = "true";
|
escape = "true";
|
||||||
};
|
};
|
||||||
|
|
||||||
"custom/blank" = { format = " "; };
|
"custom/blank" = { format = " "; };
|
||||||
|
|
||||||
}];
|
}];
|
||||||
|
|
||||||
style = ''
|
style = ''
|
||||||
@define-color foreground #${colors.base06};
|
@define-color foreground #${colors.base06};
|
||||||
@define-color background #${colors.base00};
|
@define-color background rgba(${backgroundColorRGB},${backgroundAlpha});
|
||||||
@define-color box-bg #${colors.base01};
|
@define-color box-bg #${colors.base01};
|
||||||
@define-color workspace-bg #${colors.base00};
|
@define-color workspace-bg #${colors.base00};
|
||||||
|
|
||||||
label:disabled,
|
|
||||||
button:disabled {
|
|
||||||
color: inherit;
|
|
||||||
background-image: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
* {
|
||||||
font-family: JetBrainsMono Nerd Font;
|
font-family: ${font};
|
||||||
font-size: 9pt;
|
font-size: ${fontSize};
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
|
@ -127,15 +125,31 @@ in
|
||||||
color: @foreground;
|
color: @foreground;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pulseaudio, #mpd, #custom-waybar-mpris, #custom-ds-battery, #window, #keyboard-state, #tray, #clock {
|
#wireplumber,
|
||||||
|
#mpd,
|
||||||
|
#custom-waybar-mpris,
|
||||||
|
#custom-ds-battery,
|
||||||
|
#window,
|
||||||
|
#keyboard-state,
|
||||||
|
#tray,
|
||||||
|
#clock {
|
||||||
background: @box-bg;
|
background: @box-bg;
|
||||||
padding: 0 10px 0 10px;
|
padding: 0px 10px 0px 10px;
|
||||||
margin: 5px 10px 5px 0;
|
margin: 5px 10px 5px 0px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#wireplumber {
|
||||||
|
margin: 5px 4px 5px 0px;
|
||||||
|
border-radius: 10px 0px 0px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mpd {
|
||||||
|
border-radius: 0px 10px 10px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
#tray, #clock {
|
#tray, #clock {
|
||||||
margin: 5px 0 5px 0;
|
margin: 5px 0px 5px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar.empty #window {
|
window#waybar.empty #window {
|
||||||
|
@ -143,19 +157,19 @@ in
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces {
|
#workspaces {
|
||||||
margin: 5px 0 5px 0;
|
margin: 5px 0px 5px 0px;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button {
|
#workspaces button {
|
||||||
color: @foreground;
|
color: @foreground;
|
||||||
background: @box-bg;
|
background: @box-bg;
|
||||||
padding: 0 5px;
|
padding: 0px 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button:last-child {
|
#workspaces button:last-child {
|
||||||
background: @box-bg;
|
background: @box-bg;
|
||||||
border-radius: 0px 10px 10px 0;
|
border-radius: 0px 10px 10px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button:first-child {
|
#workspaces button:first-child {
|
||||||
|
@ -177,7 +191,6 @@ in
|
||||||
#workspaces button.unfocused {
|
#workspaces button.unfocused {
|
||||||
color: @foreground;
|
color: @foreground;
|
||||||
background: @box-bg;
|
background: @box-bg;
|
||||||
/* background: @box-bg; */
|
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
colors = config.colorScheme.colors;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
xdg.configFile."wob/wob.ini".text = lib.generators.toINIWithGlobalSection { } {
|
xdg.configFile."wob/wob.ini".text = lib.generators.toINIWithGlobalSection { } {
|
||||||
globalSection = {
|
globalSection = {
|
||||||
height = "40";
|
height = "40";
|
||||||
|
|
||||||
border_size = "2";
|
border_size = "2";
|
||||||
border_color = "D65D0EFF";
|
border_color = "${colors.base0F}FF";
|
||||||
|
|
||||||
background_color = "282828FF";
|
background_color = "${colors.base00}FF";
|
||||||
bar_color = "D65D0EFF";
|
bar_color = "${colors.base0F}FF";
|
||||||
|
|
||||||
};
|
};
|
||||||
sections = { };
|
sections = { };
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
nix-colors.homeManagerModule
|
nix-colors.homeManagerModule
|
||||||
./configs/beets/beets.nix
|
./configs/beets/beets.nix
|
||||||
|
./configs/cava/cava.nix
|
||||||
./configs/kakoune/kakoune.nix
|
./configs/kakoune/kakoune.nix
|
||||||
./configs/wayland/hyprland.nix
|
./configs/wayland/hyprland.nix
|
||||||
#./configs/wayland/sway.nix
|
#./configs/wayland/sway.nix
|
||||||
|
@ -10,7 +11,6 @@
|
||||||
./configs/mpd/mpd.nix
|
./configs/mpd/mpd.nix
|
||||||
./configs/mpv/mpv.nix
|
./configs/mpv/mpv.nix
|
||||||
./configs/firefox/firefox.nix
|
./configs/firefox/firefox.nix
|
||||||
./configs/nnn/nnn.nix
|
|
||||||
./configs/dircolors.nix
|
./configs/dircolors.nix
|
||||||
./configs/xdg-mime.nix
|
./configs/xdg-mime.nix
|
||||||
];
|
];
|
||||||
|
@ -31,6 +31,7 @@
|
||||||
gnome.simple-scan
|
gnome.simple-scan
|
||||||
gnome.gvfs
|
gnome.gvfs
|
||||||
hyprpaper
|
hyprpaper
|
||||||
|
hyprpicker
|
||||||
lutris
|
lutris
|
||||||
mesa-demos
|
mesa-demos
|
||||||
mesa-demos
|
mesa-demos
|
||||||
|
@ -38,7 +39,6 @@
|
||||||
noto-fonts-cjk-sans
|
noto-fonts-cjk-sans
|
||||||
noto-fonts-cjk-serif
|
noto-fonts-cjk-serif
|
||||||
obs-studio
|
obs-studio
|
||||||
pass
|
|
||||||
pavucontrol
|
pavucontrol
|
||||||
protontricks
|
protontricks
|
||||||
sc-im
|
sc-im
|
||||||
|
@ -142,6 +142,8 @@
|
||||||
|
|
||||||
programs.aria2.enable = true;
|
programs.aria2.enable = true;
|
||||||
|
|
||||||
|
programs.password-store.enable = true;
|
||||||
|
|
||||||
xdg.userDirs = {
|
xdg.userDirs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
createDirectories = true;
|
createDirectories = true;
|
||||||
|
|
Reference in New Issue