version bump to 25.05

This commit is contained in:
alsaiduq-lab 2025-05-24 18:05:54 -06:00
parent b22792614e
commit f749641e68
22 changed files with 254 additions and 576 deletions

286
flake.lock generated
View file

@ -1,114 +1,15 @@
{ {
"nodes": { "nodes": {
"determinate": {
"inputs": {
"determinate-nixd-aarch64-darwin": "determinate-nixd-aarch64-darwin",
"determinate-nixd-aarch64-linux": "determinate-nixd-aarch64-linux",
"determinate-nixd-x86_64-darwin": [
"determinate",
"determinate-nixd-aarch64-darwin"
],
"determinate-nixd-x86_64-linux": "determinate-nixd-x86_64-linux",
"nix": "nix",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1743626375,
"narHash": "sha256-4wo3tMgnqvWDSjM1+p0rowOtxXfSYmcyv/VVA2ezpOE=",
"rev": "8d0d8b5624db222f5eac8c81ca250ecf51b154e9",
"revCount": 217,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/3.2.1/0195f83d-5008-71dc-b7a1-ea791584fd3f/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/DeterminateSystems/determinate/%2A"
}
},
"determinate-nixd-aarch64-darwin": {
"flake": false,
"locked": {
"narHash": "sha256-qJbDwSo+bOguk/Lb+ZQs4sWpdvQrnoRmilsLOrLkymQ=",
"type": "file",
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.2.1/macOS"
},
"original": {
"type": "file",
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.2.1/macOS"
}
},
"determinate-nixd-aarch64-linux": {
"flake": false,
"locked": {
"narHash": "sha256-1EAbjeqiX7RJDfrxesLLqwJbR2AsmDqRrDSygVFh+u8=",
"type": "file",
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.2.1/aarch64-linux"
},
"original": {
"type": "file",
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.2.1/aarch64-linux"
}
},
"determinate-nixd-x86_64-linux": {
"flake": false,
"locked": {
"narHash": "sha256-yi1T7JFH+eoeLDImaRVJuLXxtXqNOmGcjGPUyDbntK0=",
"type": "file",
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.2.1/x86_64-linux"
},
"original": {
"type": "file",
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.2.1/x86_64-linux"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": {
"nixpkgs-lib": [
"determinate",
"nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1741352980, "lastModified": 1743550720,
"narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=", "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9", "rev": "c621e8422220273271f52058f618c94e405bb0f5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -117,41 +18,6 @@
"type": "github" "type": "github"
} }
}, },
"git-hooks-nix": {
"inputs": {
"flake-compat": [
"determinate",
"nix"
],
"gitignore": [
"determinate",
"nix"
],
"nixpkgs": [
"determinate",
"nix",
"nixpkgs"
],
"nixpkgs-stable": [
"determinate",
"nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1734279981,
"narHash": "sha256-NdaCraHPp8iYMWzdXAt5Nv6sA3MUzlCiGiR586TCwo0=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "aa9f40c906904ebd83da78e7f328cd8aeaeae785",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -159,52 +25,33 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1743717835, "lastModified": 1747556831,
"narHash": "sha256-LJm6FoIcUoBw3w25ty12/sBfut4zZuNGdN0phYj/ekU=", "narHash": "sha256-Qb84nbYFFk0DzFeqVoHltS2RodAYY5/HZQKE8WnBDsc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "66a6ec65f84255b3defb67ff45af86c844dd451b", "rev": "d0bbd221482c2713cccb80220f3c9d16a6e20a33",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-25.05",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
}, },
"nix": {
"inputs": {
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"git-hooks-nix": "git-hooks-nix",
"nixpkgs": "nixpkgs",
"nixpkgs-23-11": "nixpkgs-23-11",
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1743623616,
"narHash": "sha256-e6rgsNCMzWYpRxSC+tcsrdlVfxITy666PKs2TdOpVUI=",
"rev": "63d41e72f4895fb9f19aa9029bf08e2361959a07",
"revCount": 19952,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.2.1/0195f838-0040-7334-ad8e-0a1fa2e9bbf7/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/DeterminateSystems/nix-src/%2A"
}
},
"nix-gaming": { "nix-gaming": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_3" "nixpkgs": [
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1743644846, "lastModified": 1747965612,
"narHash": "sha256-I217zRnDlSdWzoZi4sHaRKdY+x60tLOo8TyRshkyUBM=", "narHash": "sha256-koAXv7H+cZBMOZkOekO7AIan0e75/ptPqkiOkO3x9lM=",
"owner": "fufexan", "owner": "fufexan",
"repo": "nix-gaming", "repo": "nix-gaming",
"rev": "a6fac721ece856f5dd4690b41b92e7ba3a71d033", "rev": "10e16d55b14d6d2f86d636d546be5130c0827933",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -215,43 +62,27 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1734359947, "lastModified": 1747953325,
"narHash": "sha256-1Noao/H+N8nFB4Beoy8fgwrcOQLVm9o4zKW1ODaqK9E=", "narHash": "sha256-y2ZtlIlNTuVJUZCqzZAhIw5rrKP4DOSklev6c8PyCkQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "48d12d5e70ee91fe8481378e540433a7303dbf6a", "rev": "55d1f923c480dadce40f5231feb472e81b0bab48",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "release-24.11", "ref": "nixos-25.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-23-11": {
"locked": {
"lastModified": 1717159533,
"narHash": "sha256-oamiKNfr2MS6yH64rUn99mIZjc45nGJlj9eGth/3Xuw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446",
"type": "github"
}
},
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1740877520, "lastModified": 1743296961,
"narHash": "sha256-oiwv/ZK/2FhGxrCkQkB83i7GnWXPPLzoqFHpDD3uYpk=", "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "147dee35aab2193b174e4c0868bd80ead5ce755c", "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -260,85 +91,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-regression": {
"locked": {
"lastModified": 1643052045,
"narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1742206328,
"narHash": "sha256-q+AQ///oMnyyFzzF4H9ShSRENt3Zsx37jTiRkLkXXE0=",
"rev": "096478927c360bc18ea80c8274f013709cf7bdcd",
"revCount": 769586,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.769586%2Brev-096478927c360bc18ea80c8274f013709cf7bdcd/0195a7c1-66e1-7e6a-9a81-ea18d238a253/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/DeterminateSystems/nixpkgs-weekly/0.1.tar.gz"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1743076231,
"narHash": "sha256-yQugdVfi316qUfqzN8JMaA2vixl+45GxNm4oUfXlbgw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6c5963357f3c1c840201eda129a99d455074db04",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1743576891,
"narHash": "sha256-vXiKURtntURybE6FMNFAVpRPr8+e8KoLPrYs9TGuAKc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "44a69ed688786e98a101f02b712c313f1ade37ab",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"determinate": "determinate",
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-gaming": "nix-gaming", "nix-gaming": "nix-gaming",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs",
"rpcs3-latest": "rpcs3-latest" "rpcs3_latest": "rpcs3_latest"
} }
}, },
"rpcs3-latest": { "rpcs3_latest": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1743659989, "lastModified": 1748103898,
"narHash": "sha256-qrzu2BGzaaCnUMjpqe4O/amr3fPzASUiyc8wYU5pnQQ=", "narHash": "sha256-HlLFleqkEVs2StNBw1WG9lVuH5kNaZyYFpgMVOvQCMc=",
"owner": "RPCS3", "owner": "RPCS3",
"repo": "rpcs3", "repo": "rpcs3",
"rev": "37dbd77628f44cdef3228bdfc03127365ec7383b", "rev": "3e674a896f9e70ee7112c89c0a2a07f0df4d2326",
"type": "github" "type": "github"
}, },
"original": { "original": {

209
flake.nix
View file

@ -1,204 +1,69 @@
# TODO: remodulate the rpcs3 stuff somewhere else, clunky here
{ {
description = "NixOS configuration for Cobray"; description = "NixOS configuration for Cobray";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nix-gaming = { nix-gaming = {
url = "github:fufexan/nix-gaming"; url = "github:fufexan/nix-gaming";
inputs.nixpkgs.follows = "nixpkgs";
}; };
rpcs3-latest = { rpcs3_latest = {
url = "github:RPCS3/rpcs3"; url = "github:RPCS3/rpcs3";
flake = false; flake = false;
}; };
determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/*";
}; };
outputs = { outputs = {
self, self,
nixpkgs, nixpkgs,
home-manager, home-manager,
nix-gaming, nix-gaming,
rpcs3-latest, rpcs3_latest,
determinate,
... ...
} @ inputs: let } @ inputs: let
system = "x86_64-linux"; system = "x86_64-linux";
customPkgsOverlay = final: prev: let customPkgs = import "${self}/pkgs" {
customPkgs = import ./pkgs { pkgs = nixpkgs.legacyPackages.${system};
pkgs = prev;
lib = prev.lib;
};
in
customPkgs
// {
pugixml = prev.pugixml.overrideAttrs (oldAttrs: rec {
version = "1.15";
src = prev.fetchurl {
url = "https://github.com/zeux/pugixml/releases/download/v${version}/pugixml-${version}.tar.gz";
sha256 = "sha256-ZVreV/pwP7QhwuuaARO1BkvdsUXUFd0fiMeTU9kNURo=";
};
});
SDL3 = prev.stdenv.mkDerivation rec {
pname = "SDL3";
version = "3.1.3";
src = prev.fetchFromGitHub {
owner = "libsdl-org";
repo = "SDL";
rev = "preview-${version}";
sha256 = "sha256-S7yRcLHMPgq6+gec8l+ESxp2dJ+6Po/UNsBUXptQzMQ=";
};
nativeBuildInputs = [prev.cmake];
buildInputs = [
prev.libGL
prev.xorg.libX11
prev.xorg.libXext
prev.alsa-lib
];
cmakeFlags = [
"-DSDL_STATIC=OFF"
"-DSDL_SHARED=ON"
"-DSDL_CMAKE_DEBUG_POSTFIX="
"-DSDL_INSTALL_CMAKEDIR=${placeholder "out"}/lib/cmake/SDL3"
];
postInstall = ''
echo "SDL3 contents:" >&2
ls -lR $out >&2
if [ -f "$out/lib/cmake/SDL3/SDL3Config.cmake" ]; then
echo "SDL3Config.cmake:" >&2
cat $out/lib/cmake/SDL3/SDL3Config.cmake >&2
else
echo "ERROR: SDL3Config.cmake not found" >&2
exit 1
fi
'';
};
rpcs3 = prev.rpcs3.overrideAttrs (oldAttrs: {
nativeBuildInputs =
(oldAttrs.nativeBuildInputs or [])
++ [
prev.llvmPackages_18.llvm.dev
prev.llvmPackages_18.clang
prev.pkg-config
prev.qt6.qmake
prev.qt6.full
prev.xxd
prev.wayland-scanner
];
buildInputs =
(oldAttrs.buildInputs or [])
++ [
prev.llvmPackages_18.llvm
prev.llvmPackages_18.libclang
final.SDL3
prev.qt6.full
prev.vulkan-loader
prev.vulkan-tools
prev.wayland
prev.wayland-protocols
prev.libxkbcommon
prev.libpulseaudio
prev.libevdev
prev.udev
prev.glew
prev.libpng
prev.zstd
];
cmakeFlags =
(oldAttrs.cmakeFlags or [])
++ [
"-DCMAKE_PREFIX_PATH=${final.SDL3};${prev.qt6.full};${prev.wayland}"
"-DSDL3_DIR=${final.SDL3}/lib/cmake/SDL3"
"-DSDL3_INCLUDE_DIR=${final.SDL3}/include/SDL3"
"-DSDL3_LIBRARY=${final.SDL3}/lib/libSDL3.so"
"-DQt6_DIR=${prev.qt6.full}/lib/cmake/Qt6"
"-DWAYLAND_SCANNER=${prev.wayland-scanner}/bin/wayland-scanner"
"-DUSE_SYSTEM_FFMPEG=ON"
"-DUSE_SYSTEM_CURL=ON"
"-DUSE_SYSTEM_WOLFSSL=ON"
"-DUSE_QT=ON"
"-DUSE_VULKAN=ON"
"-DUSE_WAYLAND=ON"
"-DUSE_PULSEAUDIO=ON"
"-DUSE_LIBEVDEV=ON"
"-DUSE_SYSTEM_ZSTD=ON"
"-DUSE_DISCORD_RPC=ON"
"-DCMAKE_VERBOSE_MAKEFILE=ON"
"-DCMAKE_MESSAGE_LOG_LEVEL=TRACE"
];
preConfigure = ''
echo "Verifying submodule directories:" >&2
ls -l 3rdparty/hidapi/hidapi 3rdparty/glslang/glslang 3rdparty/yaml-cpp/yaml-cpp 3rdparty/zstd/zstd 3rdparty/discord-rpc >&2
if [ ! -f 3rdparty/hidapi/hidapi/CMakeLists.txt ] || [ ! -f 3rdparty/discord-rpc/CMakeLists.txt ]; then
echo "ERROR: Submodules (hidapi or discord-rpc) not fetched correctly" >&2
exit 1
fi
echo "Original 3rdparty/CMakeLists.txt:" >&2
cat 3rdparty/CMakeLists.txt >&2
sed -i '/find_package(SDL3/ {
s/find_package(SDL3.*)/set(SDL3_FOUND TRUE)/
a set(SDL3_INCLUDE_DIRS "${final.SDL3}/include/SDL3")
a set(SDL3_LIBRARIES "${final.SDL3}/lib/libSDL3.so")
}' 3rdparty/CMakeLists.txt
sed -i 's/message(FATAL_ERROR "SDL3 is not available on this system")/# Patched: SDL3 assumed available/' 3rdparty/CMakeLists.txt
echo "Patched 3rdparty/CMakeLists.txt:" >&2
cat 3rdparty/CMakeLists.txt >&2
echo "Checking submodules:" >&2
ls -lR 3rdparty/hidapi 3rdparty/glslang 3rdparty/yaml-cpp 3rdparty/cubeb 3rdparty/zstd 3rdparty/discord-rpc >&2
'';
});
};
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [customPkgsOverlay];
};
lib = nixpkgs.lib; lib = nixpkgs.lib;
inherit rpcs3_latest;
rpcs3_latest = pkgs.rpcs3.overrideAttrs (oldAttrs: {
src = pkgs.fetchgit {
url = "https://github.com/RPCS3/rpcs3.git";
rev = inputs.rpcs3-latest.rev;
sha256 = "Yx0Qsc0r+5C0BqqsbJCv47QPeaNbaIut8s6Hcysy2mo=";
fetchSubmodules = true;
}; };
nativeBuildInputs = oldAttrs.nativeBuildInputs;
buildInputs = oldAttrs.buildInputs;
cmakeFlags =
oldAttrs.cmakeFlags
++ [
"-DUSE_DISCORD_RPC=ON"
];
preUnpack = ''
echo "Source rev: ${inputs.rpcs3-latest.rev}" >&2
echo "Expected rev: 37dbd77628f44cdef3228bdfc03127365ec7383b" >&2
'';
});
in { in {
packages.${system} = { nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
rpcs3_latest = rpcs3_latest;
};
nixosConfigurations = {
nixos = lib.nixosSystem {
inherit system; inherit system;
specialArgs = {inherit inputs rpcs3_latest;}; specialArgs = {
inherit inputs customPkgs;
lib = nixpkgs.lib;
};
modules = [ modules = [
{nixpkgs.overlays = [customPkgsOverlay];} {
./hosts/configuration.nix nixpkgs.config.allowUnfree = true;
determinate.nixosModules.default nixpkgs.overlays = [
(final: prev: {
inherit
(customPkgs)
fish-rust
pugixml
SDL3
rpcs3_latest
;
})
]; ];
}
./hosts/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs customPkgs;
}; };
users.cobray = import ./home-manager/cobray.nix;
}; };
homeConfigurations = { }
"cobray" = home-manager.lib.homeManagerConfiguration { ];
inherit pkgs;
extraSpecialArgs = {inherit inputs rpcs3_latest;};
modules = [./home-manager/cobray.nix];
};
}; };
}; };
} }

View file

@ -1,6 +1,6 @@
{ {
pkgs, pkgs,
rpcs3_latest, inputs,
... ...
}: { }: {
imports = [ imports = [
@ -23,6 +23,7 @@
home.stateVersion = "24.11"; home.stateVersion = "24.11";
programs.home-manager.enable = true; programs.home-manager.enable = true;
home.enableNixpkgsReleaseCheck = false; home.enableNixpkgsReleaseCheck = false;
xdg.mime.enable = false;
home.packages = with pkgs; [ home.packages = with pkgs; [
coreutils coreutils
@ -34,6 +35,5 @@
btop btop
nvtopPackages.full nvtopPackages.full
arandr arandr
rpcs3_latest
]; ];
} }

View file

@ -1,4 +1,7 @@
{pkgs, ...}: { {
pkgs,
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
mgba mgba
desmume desmume
@ -12,5 +15,6 @@
joycond joycond
waydroid waydroid
shadps4 shadps4
rpcs3_latest
]; ];
} }

View file

@ -1,8 +1,5 @@
{pkgs, ...}: { {pkgs, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
(ffmpeg.override { ffmpeg_7-full
withXcb = true;
withXlib = true;
})
]; ];
} }

View file

@ -14,6 +14,11 @@
dates = "weekly"; dates = "weekly";
options = "--delete-older-than 30d"; options = "--delete-older-than 30d";
}; };
nix.settings = {
warn-dirty = false;
};
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave # on your system were taken. It's perfectly fine and recommended to leave

View file

@ -1,11 +1,5 @@
# TODO: cleanout and repopulate individual packages better # TODO: cleanout and repopulate individual packages better
{ {pkgs, ...}: {
pkgs,
lib,
...
}: let
customPkgs = import ../pkgs {inherit pkgs lib;};
in {
python.enable = true; python.enable = true;
npm.enable = true; npm.enable = true;
@ -111,7 +105,6 @@ in {
tree tree
mesa mesa
libglvnd libglvnd
mesa.drivers
socat socat
gnused gnused
gawk gawk
@ -127,7 +120,6 @@ in {
fzf fzf
jq jq
bash bash
customPkgs.fish-rust
xorg.xdpyinfo xorg.xdpyinfo
slop slop
dunst dunst
@ -156,5 +148,9 @@ in {
xorg.libXtst xorg.libXtst
xorg.libXi xorg.libXi
xorg.xorgproto xorg.xorgproto
texlive.combined.scheme-full
imagemagick
poppler_utils
ghostscript
]; ];
} }

View file

@ -10,3 +10,6 @@ sudo nix-collect-garbage -d
# As a separation of concerns - you will need to run this command to clean out boot # As a separation of concerns - you will need to run this command to clean out boot
sudo /run/current-system/bin/switch-to-configuration boot sudo /run/current-system/bin/switch-to-configuration boot
# bonus: in case you're stuck in some limbo state
sudo /run/current-system/sw/bin/nixos-rebuild switch --flake .

View file

@ -15,7 +15,6 @@
alsa-utils alsa-utils
portaudio portaudio
alsa-lib alsa-lib
ffmpeg
pavucontrol pavucontrol
clang clang
]; ];

View file

@ -6,7 +6,6 @@
./docker.nix ./docker.nix
./env.nix ./env.nix
./fonts.nix ./fonts.nix
./home-manager.nix
./i3-xfce.nix ./i3-xfce.nix
./net.nix ./net.nix
./nixos.nix ./nixos.nix
@ -18,7 +17,6 @@
./npm.nix ./npm.nix
./tailscale.nix ./tailscale.nix
./udiskie.nix ./udiskie.nix
./ffmpeg.nix
# ./ollama.nix # ./ollama.nix
]; ];
@ -32,8 +30,4 @@
enable = true; enable = true;
enableSSHSupport = true; enableSSHSupport = true;
}; };
environment.systemPackages = with pkgs; [
home-manager
];
} }

View file

@ -20,7 +20,7 @@
LUA_PATH = "${pkgs.luajit}/share/lua/5.1/?.lua;${pkgs.luajit}/share/lua/5.1/?/init.lua;;"; LUA_PATH = "${pkgs.luajit}/share/lua/5.1/?.lua;${pkgs.luajit}/share/lua/5.1/?/init.lua;;";
LUA_CPATH = "${pkgs.luajit}/lib/lua/5.1/?.so;;"; LUA_CPATH = "${pkgs.luajit}/lib/lua/5.1/?.so;;";
PKG_CONFIG_PATH = lib.makeSearchPath "lib/pkgconfig" [ PKG_CONFIG_PATH = lib.makeSearchPath "lib/pkgconfig" [
pkgs.mesa.drivers pkgs.mesa
pkgs.openssl.dev pkgs.openssl.dev
pkgs.libxml2.dev pkgs.libxml2.dev
pkgs.zlib.dev pkgs.zlib.dev

View file

@ -1,5 +0,0 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
ffmpeg_7-full
];
}

View file

@ -18,7 +18,12 @@ in {
noto-fonts-cjk-sans noto-fonts-cjk-sans
noto-fonts-cjk-serif noto-fonts-cjk-serif
noto-fonts-emoji noto-fonts-emoji
(nerdfonts.override {fonts = ["0xProto" "FiraCode" "JetBrainsMono" "Hack" "Noto" "NerdFontsSymbolsOnly"];}) nerd-fonts._0xproto
nerd-fonts.fira-code
nerd-fonts.jetbrains-mono
nerd-fonts.hack
nerd-fonts.noto
nerd-fonts.symbols-only
ipafont ipafont
kochi-substitute kochi-substitute
clear-sans clear-sans

View file

@ -1,17 +1,12 @@
{ { inputs, pkgs, lib, rpcs3_latest, ... }: {
inputs,
rpcs3_latest,
...
}: {
imports = [ imports = [
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
]; ];
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = { users.cobray = import ../home-manager/cobray.nix {
inherit inputs rpcs3_latest; inherit pkgs lib rpcs3_latest;
}; };
users.cobray = import ../home-manager/cobray.nix;
}; };
} }

View file

@ -162,7 +162,7 @@ in {
xsettingsd xsettingsd
hicolor-icon-theme hicolor-icon-theme
adwaita-icon-theme adwaita-icon-theme
breeze-icons kdePackages.breeze-icons
gnome-themes-extra gnome-themes-extra
]; ];

View file

@ -4,26 +4,15 @@
lib, lib,
... ...
}: let }: let
customPkgs = pkgs.callPackage ../pkgs {inherit pkgs lib;};
py = pkgs.python311Packages; py = pkgs.python311Packages;
pipConf = pkgs.writeText "pip.conf" ''
[global]
no-cache-dir = false
[install]
ignore-installed = false
[packages]
numpy = "<2.0.0"
'';
gccLibPath = "${pkgs.gcc-unwrapped.lib}/lib"; gccLibPath = "${pkgs.gcc-unwrapped.lib}/lib";
nvidiaLibPath = "${pkgs.linuxPackages.nvidia_x11}/lib"; nvidiaLibPath = "${pkgs.linuxPackages.nvidia_x11}/lib";
cudaLibPath = "${pkgs.cudatoolkit}/lib"; cudaLibPath = "${pkgs.cudatoolkit}/lib";
glvndLibPath = "${pkgs.libglvnd}/lib"; glvndLibPath = "${pkgs.libglvnd}/lib";
ldLibraryPath = "${gccLibPath}:${nvidiaLibPath}:${cudaLibPath}:${glvndLibPath}"; ldLibraryPath = "${gccLibPath}:${nvidiaLibPath}:${cudaLibPath}:${glvndLibPath}";
pythonEnv = pkgs.python311.buildEnv.override { pythonEnv = pkgs.python311.buildEnv.override {
extraLibs = with py; [ extraLibs = with py; [
customPkgs.python-rembg numpy
i3ipc i3ipc
requests requests
ipython ipython
@ -45,7 +34,6 @@
--prefix LD_LIBRARY_PATH : "${ldLibraryPath}" --prefix LD_LIBRARY_PATH : "${ldLibraryPath}"
''; '';
}; };
custom-UV = pkgs.symlinkJoin { custom-UV = pkgs.symlinkJoin {
name = "uv"; name = "uv";
paths = [pkgs.uv]; paths = [pkgs.uv];
@ -69,8 +57,5 @@ in {
stdenv.cc.cc.lib stdenv.cc.cc.lib
python311 python311
]; ];
environment.variables = {
PIP_CONFIG_FILE = "${pipConf}";
};
}; };
} }

View file

@ -28,7 +28,6 @@
piper piper
portaudio portaudio
alsa-lib alsa-lib
ffmpeg
stdenv.cc.cc.lib stdenv.cc.cc.lib
libglvnd libglvnd
]; ];

View file

@ -1,51 +1,12 @@
{ {
pkgs ? import <nixpkgs> {}, pkgs,
lib ? pkgs.lib, lib,
rpcs3_latest,
}: let }: let
numpy-1 = pkgs.python311Packages.numpy.overridePythonAttrs (oldAttrs: rec { rpcs3Pkgs = pkgs.callPackage ./rpcs3 {
version = "1.26.4"; inherit lib rpcs3_latest;
src = pkgs.fetchPypi {
pname = "numpy";
inherit version;
sha256 = "0410j6jfz1yzm5s0v0yrc1j0q6ih4322357and7arr0jxnlsn0ia";
}; };
});
customPython = pkgs.python311.override {
packageOverrides = self: super: {
numpy = numpy-1;
};
};
customPythonPackages = customPython.pkgs;
in { in {
inherit numpy-1 customPythonPackages; inherit (rpcs3Pkgs) pugixml SDL3 rpcs3 rpcs3_latest;
fish-rust = pkgs.callPackage ./fish-rust {}; fish-rust = pkgs.callPackage ./fish-rust {};
python-rembg = pkgs.callPackage ./python-rembg {
inherit lib;
fetchPypi = pkgs.fetchPypi;
python311Packages = customPythonPackages;
python-pymatting = pkgs.callPackage ./python-pymatting {
inherit lib;
fetchPypi = pkgs.fetchPypi;
python311Packages = customPythonPackages;
};
python-opencv-headless = pkgs.callPackage ./python-opencv-headless {
inherit lib;
fetchPypi = pkgs.fetchPypi;
cmake = pkgs.cmake;
pkg-config = pkgs.pkg-config;
stdenv = pkgs.stdenv;
makeWrapper = pkgs.makeWrapper;
python311Packages = customPythonPackages;
};
};
# removing for now since it seems to work, will leave just in case
# python-ngx-lsp = pkgs.callPackage ./python-nginx-language-server {
# inherit lib;
# fetchFromGitHub = pkgs.fetchFromGitHub;
# python311Packages = customPythonPackages;
#};
} }

View file

@ -6,50 +6,70 @@
makeWrapper, makeWrapper,
cmake, cmake,
pkg-config, pkg-config,
cudaPackages,
enableCuda ? false,
}: }:
python311Packages.buildPythonPackage rec { python311Packages.buildPythonPackage rec {
pname = "opencv-python-headless"; pname = "opencv-python-headless";
version = "4.11.0.86"; version = "4.11.0.86";
format = "setuptools"; format = "other";
src = fetchPypi { src = fetchPypi {
pname = "opencv-python-headless"; pname = "opencv-python-headless";
inherit version; inherit version;
format = "setuptools";
sha256 = "mW6ygspLQ+xqOXJBTeDiMx9dnNorQQkaSXOcGfuEN5g="; sha256 = "mW6ygspLQ+xqOXJBTeDiMx9dnNorQQkaSXOcGfuEN5g=";
}; };
nativeBuildInputs = with python311Packages;
nativeBuildInputs = with python311Packages; [ [
cmake cmake
pkg-config pkg-config
makeWrapper makeWrapper
scikit-build scikit-build
]; ]
++ lib.optionals enableCuda (with cudaPackages; [
buildInputs = with python311Packages; [ cudatoolkit
]);
buildInputs = with python311Packages;
[
scikit-build scikit-build
]; ]
++ lib.optionals enableCuda (with cudaPackages; [
cudatoolkit
cudnn
]);
propagatedBuildInputs = with python311Packages; [ propagatedBuildInputs = with python311Packages; [
setuptools setuptools
numpy numpy
]; ];
dontUseCmakeConfigure = true; dontUseCmakeConfigure = true;
SKBUILD_CMAKE_ARGS =
doCheck = false; [
"-DCMAKE_BUILD_TYPE=Release"
pythonImportsCheck = ["cv2"]; "-DBUILD_opencv_apps=OFF"
"-DBUILD_EXAMPLES=OFF"
postFixup = '' "-DBUILD_TESTS=OFF"
wrapPythonProgramsIn "$out/lib/python3.11/site-packages" "${stdenv.cc.cc.lib}" "-DBUILD_PERF_TESTS=OFF"
"-DBUILD_DOCS=OFF"
"-DOPENCV_GENERATE_PKGCONFIG=ON"
"-DCMAKE_BUILD_PARALLEL_LEVEL=$(nproc)"
]
++ lib.optionals enableCuda [
"-DWITH_CUDA=ON"
"-DCUDA_TOOLKIT_ROOT_DIR=${cudaPackages.cudatoolkit}"
"-DWITH_CUDNN=ON"
];
postPatch = lib.optionalString enableCuda ''
export LD_LIBRARY_PATH=${cudaPackages.cudatoolkit.lib}/lib:$LD_LIBRARY_PATH
'';
doCheck = false;
pythonImportsCheck = ["cv2"];
postFixup = ''
wrapPythonProgramsIn "$out/lib/python3.11/site-packages" "${stdenv.cc.cc.lib}${lib.optionalString enableCuda ":${cudaPackages.cudatoolkit.lib}/lib"}"
''; '';
meta = with lib; { meta = with lib; {
description = "Wrapper package for OpenCV python bindings (headless)"; description = "Wrapper package for OpenCV python bindings (headless)${lib.optionalString enableCuda " with CUDA support"}";
homepage = "https://github.com/opencv/opencv-python"; homepage = "https://github.com/opencv/opencv-python";
license = licenses.mit; license = licenses.mit;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; ["Cobray"]; maintainers = ["Cobray"];
}; };
} }

View file

@ -7,33 +7,28 @@ python311Packages.buildPythonPackage rec {
pname = "pymatting"; pname = "pymatting";
version = "1.1.13"; version = "1.1.13";
format = "pyproject"; format = "pyproject";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
hash = "sha256-LNt8S++s3e9Netwt6ONKJy3mOdYIrlwKCGE9+kJTgQE="; hash = "sha256-LNt8S++s3e9Netwt6ONKJy3mOdYIrlwKCGE9+kJTgQE=";
}; };
nativeBuildInputs = with python311Packages; [ nativeBuildInputs = with python311Packages; [
setuptools setuptools
poetry-core poetry-core
]; ];
propagatedBuildInputs = with python311Packages; [ propagatedBuildInputs = with python311Packages; [
numpy
scipy scipy
pillow pillow
numba numba
]; ];
buildInputs = [ buildInputs = [
]; ];
doCheck = false; doCheck = false;
meta = with lib; { meta = with lib; {
description = "A library for alpha matting"; description = "A library for alpha matting";
homepage = "https://github.com/pymatting/pymatting"; homepage = "https://github.com/pymatting/pymatting";
license = licenses.mit; license = licenses.mit;
platforms = platforms.all; platforms = platforms.all;
maintainers = with maintainers; ["Cobray"]; maintainers = ["Cobray"];
}; };
} }

View file

@ -3,15 +3,15 @@
python311Packages, python311Packages,
fetchPypi, fetchPypi,
python-pymatting, python-pymatting,
python-opencv-headless, enableCuda ? false,
}: }:
python311Packages.buildPythonPackage rec { python311Packages.buildPythonPackage rec {
pname = "rembg"; pname = "rembg";
version = "2.0.50"; version = "2.0.66";
format = "pyproject"; format = "pyproject";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "bMt/GbplRawFZUqoXq37zAq1dribnu/ZlIYTuUIS+DU="; sha256 = "sha256-hRBoq0zMY6artJs69z/cZntx41tmWGM9E/0HSFWPvZk=";
}; };
nativeBuildInputs = with python311Packages; [ nativeBuildInputs = with python311Packages; [
poetry-core poetry-core
@ -27,20 +27,22 @@ python311Packages.buildPythonPackage rec {
tqdm tqdm
aiohttp aiohttp
pytorch-bin pytorch-bin
(opencv4.override {enableCuda = enableCuda;})
] ]
++ [ ++ [
python-opencv-headless
python-pymatting python-pymatting
]; ];
pythonRemoveDeps = ["opencv-python-headless"]; pythonRemoveDeps = ["opencv-python-headless"];
dontPrecompilePages = true; dontPrecompilePages = true;
doInstallCheck = false; doInstallCheck = false;
doCheck = false; doCheck = false;
dontCheck = true;
checkPhase = "echo 'Skipping tests'";
meta = with lib; { meta = with lib; {
description = "Tool to remove image backgrounds"; description = "Tool to remove image backgrounds${lib.optionalString enableCuda " with CUDA support"}";
homepage = "https://github.com/danielgatis/rembg"; homepage = "https://github.com/danielgatis/rembg";
license = licenses.mit; license = licenses.mit;
platforms = platforms.all; platforms = platforms.all;
maintainers = with maintainers; ["Cobray"]; maintainers = ["Cobray"];
}; };
} }

90
pkgs/rpcs3/default.nix Normal file
View file

@ -0,0 +1,90 @@
{
pkgs,
rpcs3_latest,
...
}: {
pugixml = pkgs.pugixml.overrideAttrs (oldAttrs: rec {
version = "1.15";
src = pkgs.fetchurl {
url = "https://github.com/zeux/pugixml/releases/download/v${version}/pugixml-${version}.tar.gz";
sha256 = "sha256-ZVreV/pwP7QhwuuaARO1BkvdsUXUFd0fiMeTU9kNURo=";
};
});
SDL3 = pkgs.stdenv.mkDerivation rec {
pname = "SDL3";
version = "3.1.3";
src = pkgs.fetchFromGitHub {
owner = "libsdl-org";
repo = "SDL";
rev = "preview-${version}";
sha256 = "sha256-S7yRcLHMPgq6+gec8l+ESxp2dJ+6Po/UNsBUXptQzMQ=";
};
nativeBuildInputs = [pkgs.cmake];
buildInputs = [pkgs.libGL pkgs.xorg.libX11 pkgs.xorg.libXext pkgs.alsa-lib];
cmakeFlags = [
"-DSDL_STATIC=OFF"
"-DSDL_SHARED=ON"
"-DSDL_INSTALL_CMAKEDIR=${placeholder "out"}/lib/cmake/SDL3"
];
};
rpcs3_latest = pkgs.rpcs3.overrideAttrs (oldAttrs: {
meta = {
maintainers = ["Cobray"];
description = "Latest build of PS3 emulator";
homepage = "https://rpcs3.net/";
license = pkgs.lib.licenses.gpl2;
};
src = pkgs.fetchgit {
url = "https://github.com/RPCS3/rpcs3.git";
rev = rpcs3_latest.rev;
sha256 = "sha256-0TDxSNMk9L4+ouxYzWFNi3XxPAyD43Xl32hz1T4lFIc=";
fetchSubmodules = true;
};
patches = [];
nativeBuildInputs =
(oldAttrs.nativeBuildInputs or [])
++ [
pkgs.llvmPackages_19.llvm.dev
pkgs.llvmPackages_19.clang
pkgs.pkg-config
pkgs.qt6.qmake
pkgs.qt6.full
pkgs.xxd
pkgs.wayland-scanner
];
buildInputs =
(oldAttrs.buildInputs or [])
++ [
pkgs.llvmPackages_19.llvm
pkgs.llvmPackages_19.libclang
pkgs.qt6.full
pkgs.vulkan-loader
pkgs.vulkan-tools
pkgs.wayland
pkgs.wayland-protocols
pkgs.libxkbcommon
pkgs.libpulseaudio
pkgs.libevdev
pkgs.udev
pkgs.glew
pkgs.libpng
pkgs.zstd
];
cmakeFlags =
(oldAttrs.cmakeFlags or [])
++ [
"-DCMAKE_PREFIX_PATH=${pkgs.qt6.full}:${pkgs.wayland}"
"-DUSE_SYSTEM_FFMPEG=ON"
"-DUSE_SYSTEM_CURL=ON"
"-DUSE_SYSTEM_WOLFSSL=ON"
"-DUSE_QT=ON"
"-DUSE_VULKAN=ON"
"-DUSE_WAYLAND=ON"
"-DUSE_PULSEAUDIO=ON"
"-DUSE_LIBEVDEV=ON"
"-DUSE_SYSTEM_ZSTD=ON"
"-DUSE_DISCORD_RPC=ON"
"-DUSE_SDL=OFF"
];
});
}