Add nix-ld and uv for Python development

This commit is contained in:
Joshua Yuen 2026-09-13 00:57:16 -04:00
parent 5a08f180b2
commit 1af0956351
Signed by: josh
GPG Key ID: 530DA0331EFE99F5
5 changed files with 53 additions and 0 deletions

View File

@ -4,6 +4,7 @@
{ {
imports = [ imports = [
./boot.nix ./boot.nix
./dev.nix
./fonts.nix ./fonts.nix
./gdm.nix ./gdm.nix
./gnomeBoxes.nix ./gnomeBoxes.nix

39
modules/nixos/dev.nix Normal file
View File

@ -0,0 +1,39 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.dev;
in
{
config = mkIf cfg.enable {
# Runs dynamically linked executables intended for generic Linux (e.g. Python
# binaries downloaded by uv) by providing the standard loaders in /lib/*
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
zlib
zstd
stdenv.cc.cc
curl
openssl
attr
libssh
bzip2
libxml2
acl
libsodium
util-linux
xz
systemd
glib
libelf
];
};
environment.systemPackages = with pkgs; [ uv ];
};
}

View File

@ -5,6 +5,7 @@
imports = [ imports = [
./discord.nix ./discord.nix
./dictation.nix ./dictation.nix
./dev.nix
./display.nix ./display.nix
./gnomeBoxes.nix ./gnomeBoxes.nix
./gpg.nix ./gpg.nix

10
modules/options/dev.nix Normal file
View File

@ -0,0 +1,10 @@
{
lib,
...
}:
with lib;
{
options.modules.dev = {
enable = mkEnableOption "Python development with uv and nix-ld";
};
}

View File

@ -15,6 +15,8 @@
modules.localsend.enable = true; modules.localsend.enable = true;
modules.dev.enable = true;
modules.zsh.enable = true; modules.zsh.enable = true;
modules.shell.defaultShell = "zsh"; modules.shell.defaultShell = "zsh";