Squash merge dev into master

This commit is contained in:
alsaiduq-lab 2025-05-21 10:58:37 -06:00
parent 3b40f76557
commit c9341c29c5
12 changed files with 133 additions and 63 deletions

2
.gitignore vendored
View file

@ -3,7 +3,7 @@ backup/
.secrets .secrets
result result
$HOME
.env .env
*.nix.bak *.nix.bak

View file

@ -10,5 +10,7 @@
retroarch retroarch
mednafen mednafen
joycond joycond
waydroid
shadps4
]; ];
} }

View file

@ -14,12 +14,12 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/b7877a82-a67d-4362-ad36-ac513d7c0fc6"; { device = "/dev/disk/by-uuid/dfac5ce5-a84e-4956-8b7d-e7f7f9fd6131";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/5F97-DB57"; { device = "/dev/disk/by-uuid/1C7F-E72A";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = [ "fmask=0077" "dmask=0077" ];
}; };

View file

@ -1,3 +1,4 @@
# TODO: cleanout and repopulate individual packages better
{ {
pkgs, pkgs,
lib, lib,
@ -5,11 +6,6 @@
}: let }: let
customPkgs = import ../pkgs {inherit pkgs lib;}; customPkgs = import ../pkgs {inherit pkgs lib;};
in { in {
imports = [
../modules/python.nix
../modules/npm.nix
];
python.enable = true; python.enable = true;
npm.enable = true; npm.enable = true;
@ -21,7 +17,13 @@ in {
spotify spotify
flameshot flameshot
mpv mpv
linuxHeaders
appimage-run
freetype.dev
zed-editor
pixman
udiskie udiskie
maim
git git
git-lfs git-lfs
gitAndTools.gh gitAndTools.gh
@ -35,6 +37,7 @@ in {
yarn yarn
bun bun
deno deno
obsidian
go go
go-tools go-tools
gopls gopls
@ -46,7 +49,6 @@ in {
cargo-audit cargo-audit
rust-analyzer rust-analyzer
python3Packages.debugpy python3Packages.debugpy
customPkgs.python-ngx-lsp
gcc gcc
stdenv.cc.cc.lib stdenv.cc.cc.lib
gnumake gnumake
@ -62,7 +64,10 @@ in {
elixir elixir
swift swift
zig zig
dbus.dev
pkg-config
ghc ghc
cacert
cabal-install cabal-install
stack stack
haskell-language-server haskell-language-server
@ -124,8 +129,7 @@ in {
slop slop
dunst dunst
pulseaudio pulseaudio
ani-cli yt-dlp # might remove for source built version
yt-dlp
httpie httpie
wrk wrk
cloudflared cloudflared
@ -140,10 +144,14 @@ in {
sqlite sqlite
redis redis
sqls sqls
ollama
tree-sitter tree-sitter
luajitPackages.jsregexp luajitPackages.jsregexp
tailscale tailscale
cachix cachix
portaudio
xorg.libX11
xorg.libXtst
xorg.libXi
xorg.xorgproto
]; ];
} }

View file

@ -1,7 +1,4 @@
{ {pkgs, ...}: {
pkgs,
...
}: {
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = { services.pipewire = {
enable = true; enable = true;
@ -15,5 +12,11 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
cava cava
pulseaudio pulseaudio
alsa-utils
portaudio
alsa-lib
ffmpeg
pavucontrol
clang
]; ];
} }

View file

@ -15,8 +15,10 @@
./timezone.nix ./timezone.nix
./user.nix ./user.nix
./python.nix ./python.nix
./npm.nix
./tailscale.nix ./tailscale.nix
./udiskie.nix ./udiskie.nix
# ./ollama.nix
]; ];
# Enable CUPS to print documents. # Enable CUPS to print documents.

View file

@ -4,12 +4,11 @@
lib, lib,
... ...
}: let }: let
npmGlobalDir = "$HOME/.npm-global"; npmGlobalDir = "~/.npm-global";
npmConf = pkgs.writeText "npmrc" '' npmConf = pkgs.writeText "npmrc" ''
prefix=${npmGlobalDir} prefix=${npmGlobalDir}
cache=$HOME/.npm cache=~/.npm
init-module=$HOME/.npm-init.js init-module=~/.npm-init.js
node-linker=hoisted
''; '';
in { in {
options.npm = { options.npm = {
@ -17,23 +16,31 @@ in {
}; };
config = lib.mkIf config.npm.enable { config = lib.mkIf config.npm.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
nodejs nodejs_22
nodePackages.npm nodePackages.npm
electron
]; ];
environment.variables = { environment.variables = {
NPM_CONFIG_PREFIX = npmGlobalDir; NPM_CONFIG_PREFIX = npmGlobalDir;
PATH = ["${npmGlobalDir}/bin"]; PATH = [
NPM_CONFIG_USERCONFIG = "${npmConf}"; "${pkgs.nodejs_22}/bin"
"${npmGlobalDir}/bin"
];
};
environment.etc."npmrc".source = npmConf;
systemd.user.services.npm-setup = {
description = "Set up NPM user configuration";
wantedBy = ["default.target"];
script = ''
if [ ! -f ~/.npmrc ]; then
cp ${npmConf} ~/.npmrc
chmod u+rw ~/.npmrc
fi
'';
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
};
}; };
system.userActivationScripts.setupNpm = ''
mkdir -p ${npmGlobalDir}/bin
mkdir -p $HOME/.npm
if [ ! -f "$HOME/.npmrc" ]; then
cp ${npmConf} $HOME/.npmrc
fi
if [ -d "${npmGlobalDir}" ]; then
chmod -R +rw ${npmGlobalDir}
fi
'';
}; };
} }

View file

@ -6,16 +6,30 @@
services.xserver.videoDrivers = ["nvidia"]; services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = { hardware.nvidia = {
modesetting.enable = false;
powerManagement.enable = false;
# Set to true for RTX 4000 series and newer GPUs
open = true;
package = config.boot.kernelPackages.nvidiaPackages.stable; package = config.boot.kernelPackages.nvidiaPackages.stable;
open = true;
modesetting.enable = true; # must be true for Wayland
powerManagement.enable = false;
nvidiaSettings = true; nvidiaSettings = true;
}; };
hardware.graphics = {
enable = true;
enable32Bit = true;
};
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
stdenv.cc.cc.lib
cudaPackages.cudatoolkit.lib
cudaPackages.cudnn
cudaPackages.nccl
];
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
cudaPackages.cudatoolkit
glxinfo glxinfo
cudaPackages.cudatoolkit
]; ];
} }

View file

@ -14,14 +14,15 @@
[packages] [packages]
numpy = "<2.0.0" numpy = "<2.0.0"
''; '';
gccLibPath = "${pkgs.gcc-unwrapped.lib}/lib";
nvidiaLibPath = "${pkgs.linuxPackages.nvidia_x11}/lib";
cudaLibPath = "${pkgs.cudatoolkit}/lib";
pythonEnv = pkgs.python311.buildEnv.override { pythonEnv = pkgs.python311.buildEnv.override {
extraLibs = with py; [ extraLibs = with py; [
customPkgs.python-rembg customPkgs.python-rembg
numpy
i3ipc i3ipc
pandas
matplotlib
scipy
requests requests
virtualenv virtualenv
ipython ipython
@ -35,7 +36,13 @@
jedi jedi
libcst libcst
pip pip
wheel
]; ];
extraOutputsToInstall = ["out"];
postBuild = ''
wrapProgram $out/bin/python \
--prefix LD_LIBRARY_PATH : "${gccLibPath}:${nvidiaLibPath}:${cudaLibPath}"
'';
}; };
in { in {
options.python = { options.python = {
@ -46,19 +53,13 @@ in {
pythonEnv pythonEnv
isort isort
uv uv
git
stdenv.cc.cc.lib stdenv.cc.cc.lib
python311 python311
]; ];
environment.variables = { environment.variables = {
PIP_PREFIX = "$HOME/.local";
PIP_CONFIG_FILE = "${pipConf}"; PIP_CONFIG_FILE = "${pipConf}";
PYTHONPATH = "$HOME/.local/lib/python3.11/site-packages"; LD_LIBRARY_PATH = lib.mkForce "${gccLibPath}:${nvidiaLibPath}:${cudaLibPath}";
}; };
system.userActivationScripts.removeNumpy2 = ''
if [ -d "$HOME/.local/lib/python3.11/site-packages/numpy" ]; then
echo "Removing NumPy from user packages to prevent conflicts..."
rm -rf "$HOME/.local/lib/python3.11/site-packages/numpy"*
fi
'';
}; };
} }

View file

@ -1,4 +1,9 @@
{pkgs, ...}: { {
pkgs,
lib,
config,
...
}: {
programs.steam = { programs.steam = {
enable = true; enable = true;
remotePlay.openFirewall = true; remotePlay.openFirewall = true;
@ -26,8 +31,18 @@
vulkan-validation-layers vulkan-validation-layers
libstrangle libstrangle
piper piper
portaudio
alsa-lib
ffmpeg
stdenv.cc.cc.lib
]; ];
environment.variables = { environment.sessionVariables = {
LD_LIBRARY_PATH = "${pkgs.mangohud}/lib"; LD_LIBRARY_PATH = lib.makeLibraryPath [
pkgs.mangohud
pkgs.portaudio
pkgs.alsa-lib
pkgs.ffmpeg
pkgs.stdenv.cc.cc.lib
];
}; };
} }

View file

@ -42,9 +42,10 @@ in {
}; };
}; };
python-ngx-lsp = pkgs.callPackage ./python-nginx-language-server { # removing for now since it seems to work, will leave just in case
inherit lib; # python-ngx-lsp = pkgs.callPackage ./python-nginx-language-server {
fetchFromGitHub = pkgs.fetchFromGitHub; # inherit lib;
python311Packages = customPythonPackages; # fetchFromGitHub = pkgs.fetchFromGitHub;
}; # python311Packages = customPythonPackages;
#};
} }

View file

@ -5,16 +5,21 @@
ncurses, ncurses,
python3Packages, python3Packages,
gettext, gettext,
coreutils,
findutils,
gawk,
groff,
xsel,
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "fish"; pname = "fish";
version = "4.0.1-2025-03-16-rust-${builtins.substring 0 7 "642ec399ca17bbde973dc20461335396fe922e4c"}"; version = "4.0.2-2025-04-20-${builtins.substring 0 7 "489d5d1733de5d10328e948c7683da198c5859c0"}";
src = fetchgit { src = fetchgit {
url = "https://github.com/fish-shell/fish-shell.git"; url = "https://github.com/fish-shell/fish-shell.git";
rev = "642ec399ca17bbde973dc20461335396fe922e4c"; rev = "489d5d1733de5d10328e948c7683da198c5859c0";
fetchSubmodules = true; fetchSubmodules = true;
sha256 = "sha256-N01RmhyTNMtF8lNmnfC/uvR387UZFx6doQBICtTGWSU="; sha256 = "sha256-Q0sGAIjsvQsjvAnZlcyB2VldOpmiBYPliF5uyOndyyA=";
}; };
cargoLock = { cargoLock = {
@ -25,8 +30,20 @@ rustPlatform.buildRustPackage rec {
}; };
}; };
buildInputs = [ncurses gettext]; buildInputs = [
nativeBuildInputs = with python3Packages; [sphinx sphinx_rtd_theme]; ncurses
gettext
coreutils
findutils
gawk
groff
xsel
];
nativeBuildInputs = with python3Packages; [
sphinx
sphinx_rtd_theme
python
];
preBuild = '' preBuild = ''
export FISH_BUILD_VERSION="${version}" export FISH_BUILD_VERSION="${version}"