- flake.nix with nixpkgs, home-manager, nix-colors, m3ta-nixpkgs, agenix, NUR inputs - lib/mkHome.nix: compose HM config from user + identity + context + sets - profiles/base: shell, cli-tools, secrets (always loaded) - profiles/contexts/desktop: WM, apps, theme, ghostty - profiles/contexts/server: minimal headless - profiles/sets/coding: core (git, direnv, jq, rg), editor, lsp, languages, agents - profiles/sets/gaming: steam, gamescope, gpu - profiles/sets/media: obs, ffmpeg, kdenlive, handbrake, yt-dlp - users/m3tam3re/identities: private.nix, work.nix (git, jj, ssh per identity) - users/m3tam3re/preferences: cliphist, difftastic, base packages
36 lines
794 B
Nix
36 lines
794 B
Nix
# Python runtime with pip and uv.
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
with lib; let
|
|
cfg = config.coding.languages.python;
|
|
in {
|
|
options.coding.languages.python = {
|
|
enable = mkEnableOption "Python runtime with pip and uv";
|
|
extraPackages = mkOption {
|
|
type = types.listOf types.package;
|
|
default = [];
|
|
example = literalExpression "[ pkgs.python3Packages.numpy ]";
|
|
description = "Additional Python packages to include";
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
home.packages = with pkgs; [
|
|
(pkgs.python3.withPackages (ps:
|
|
with ps;
|
|
[
|
|
uv
|
|
]
|
|
++ cfg.extraPackages))
|
|
(writeShellScriptBin "pip" "exec uv pip $@")
|
|
(writeShellScriptBin "pip3" "exec uv pip $@")
|
|
pyrefly
|
|
ruff
|
|
];
|
|
};
|
|
}
|