From 3a20fe9a09f78601d57c1b26a53124684d8fdac9 Mon Sep 17 00:00:00 2001 From: moons Date: Sun, 6 Sep 2026 20:31:48 +0900 Subject: [PATCH] darktable --- AGENTS.md | 5 +++++ hosts/default.nix | 1 + modules/applications/darktable/home/nixos.nix | 22 +++++++++++++++++++ modules/profiles/README.md | 7 ++++++ .../profiles/workload/photography/meta.nix | 5 +++++ modules/systems/nix/common.nix | 2 ++ 6 files changed, 42 insertions(+) create mode 100644 modules/applications/darktable/home/nixos.nix create mode 100644 modules/profiles/workload/photography/meta.nix diff --git a/AGENTS.md b/AGENTS.md index bc92c67..867f6fb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -374,6 +374,7 @@ modules/profiles/ │ ├── game/ │ ├── machine-learning/ │ ├── personal/ +│ ├── photography/ │ ├── server/ │ └── remote-access/ └── security/ @@ -652,6 +653,7 @@ A host registry may use a specification like this: "workload.game" "workload.machine-learning" "workload.personal" + "workload.photography" ]; }; @@ -685,6 +687,9 @@ x1g13 is the secure NixOS development and personal ThinkPad, with the same desktop sessions plus Tailscale client, SOPS, Secure Boot, and TPM-backed disk unlock. galleria is the Intel/NVIDIA physical desktop shared with Windows; it uses dedicated NixOS partitions, LUKS, Secure Boot, and TPM-backed disk unlock. +It selects `workload.photography` for AI-enabled darktable. The application +chooses CUDA support from the NVIDIA hardware unit's enable state and keeps +the default CUDA targets, including RTX 3060 Ti support, to reuse binary caches. m2 is the daily-use macOS development and personal machine with the macOS interface defaults. Keep the desktop sessions independently selectable, and keep the development and personal profiles usable across NixOS and Darwin. diff --git a/hosts/default.nix b/hosts/default.nix index 7754192..dbebd81 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -117,6 +117,7 @@ "workload.game" "workload.machine-learning" "workload.personal" + "workload.photography" "workload.camera" ]; }; diff --git a/modules/applications/darktable/home/nixos.nix b/modules/applications/darktable/home/nixos.nix new file mode 100644 index 0000000..3952b1f --- /dev/null +++ b/modules/applications/darktable/home/nixos.nix @@ -0,0 +1,22 @@ +{ + inputs, + osConfig, + pkgs, + ... +}: +let + unstable = import inputs.nixpkgs-unstable { + inherit (pkgs.stdenv.hostPlatform) system; + # Keep default CUDA targets so dependencies match the CUDA binary cache. + config = pkgs.config // { + cudaSupport = osConfig.my.hardwares.nvidia.enable; + }; + }; +in +{ + home.packages = [ + (unstable.darktable.override { + withAi = true; + }) + ]; +} diff --git a/modules/profiles/README.md b/modules/profiles/README.md index 5e148bb..1d46fb2 100644 --- a/modules/profiles/README.md +++ b/modules/profiles/README.md @@ -42,6 +42,7 @@ required on every supported host. | `workload.game` | NixOS, macOS | | `workload.machine-learning` | NixOS with Home Manager | | `workload.personal` | NixOS, macOS with Home Manager | +| `workload.photography` | NixOS with Home Manager | | `workload.remote-access` | NixOS, macOS | | `workload.camera` | NixOS | | `workload.server` | NixOS, macOS with Home Manager | @@ -70,6 +71,12 @@ Neovim, Yazi, and the remaining interactive command-line tools. `workload.machine-learning` provides the Hugging Face Hub CLI for hosts used to download and publish machine learning models and datasets. +`workload.photography` provides darktable with AI support from the locked +unstable package set. Its ONNX Runtime uses CUDA when the NVIDIA hardware unit +is enabled, and CPU inference otherwise. Keep the default CUDA capabilities +and forward compatibility to reuse the CUDA binary cache; these targets include +galleria's RTX 3060 Ti. OpenCL drivers remain owned by hardware units. + `workload.deploy-rs-target` enables OpenSSH and provisions the `nixdeploy` service account with the narrowly scoped passwordless commands required for deploy-rs activation and rollback confirmation. diff --git a/modules/profiles/workload/photography/meta.nix b/modules/profiles/workload/photography/meta.nix new file mode 100644 index 0000000..2c79ece --- /dev/null +++ b/modules/profiles/workload/photography/meta.nix @@ -0,0 +1,5 @@ +{ + description = "RAW photo development and editing"; + + includes = [ "applications.darktable" ]; +} diff --git a/modules/systems/nix/common.nix b/modules/systems/nix/common.nix index 9ae9919..10e1b27 100644 --- a/modules/systems/nix/common.nix +++ b/modules/systems/nix/common.nix @@ -23,6 +23,7 @@ "https://cache.numtide.com" "https://codex-desktop-linux.cachix.org" "https://cuda-maintainers.cachix.org" + "https://cache.nixos-cuda.org" ]; extra-trusted-public-keys = [ @@ -35,6 +36,7 @@ "niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g=" "codex-desktop-linux.cachix.org-1:nX/xy6AdK9hQE24A8ALGjkCKj2ObFmcnemiL5Cid4nk=" "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=" + "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" "nix-builder-1:aG/Y2Lac517isxGO+ZYdVgglj/SI54PkkWoZTQI9aOI=" ]; };