From 22cb1f219a80f0d1bb07b6e6d7b9301b3aa5d8c2 Mon Sep 17 00:00:00 2001 From: Chris Hodapp Date: Fri, 13 Nov 2026 20:31:57 -0800 Subject: [PATCH] feat(nemacs): publish the profile of a nemacs configuration A tool that lists the generations of a nemacs configuration or rolls it back needs to know where the profile is. nemacsConfigurations.. now carries the profile output beside package and activationPackage, with the path of the profile as text that may name $HOME. Co-Authored-By: Claude Sonnet 5.5 --- README.md | 2 +- lib-overlays/nemacs/default.nix | 7 ++++--- tests/pinned-world/default.nix | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 84201b1..2108019 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ source by. | `treefmt` | `treefmt-nix` | the formatters of a source tree, as treefmt-nix modules; the configuration named `formatter` is published as the `formatter.` that `nix fmt` runs | | `nvf` | `nvf` | a Neovim written as nvf modules, published as `nvfConfigurations..`, in the shape `neovimConfiguration` returns, kept in a separate Nix profile that the NixOS configuration, home-manager configuration or hjem configuration it is declared inside activates | | `nixvim` | `nixvim` | a Neovim written as nixvim modules, published as `nixvimConfigurations..`, kept in a profile as an nvf configuration is | -| `nemacs` | none | an Emacs written as nemacs modules, whose `core` module the flake of nemacs registers; published as `nemacsConfigurations..` with its `package` and its `activationPackage`, kept in a profile as an nvf configuration is | +| `nemacs` | none | an Emacs written as nemacs modules, whose `core` module the flake of nemacs registers; published as `nemacsConfigurations..` with its `package`, its `activationPackage` and its `profile`, kept in a profile as an nvf configuration is | | `topology` | `nix-topology` | the diagram of the NixOS configurations declared inside it, as nix-topology renders it; the configuration named `topology` is published as `topology.` | | `kubenix` | `kubenix` | Kubernetes resources written as kubenix modules, published as `kubenixConfigurations..`, the evaluation result, whose `config.kubernetes.result` is the JSON `kubectl apply -f` reads | | `nixidy` | `nixidy` | an Argo CD environment written as nixidy modules, evaluated with nixidy's `mkEnv` and published as the `nixidyEnvs..` the nixidy CLI reads | diff --git a/lib-overlays/nemacs/default.nix b/lib-overlays/nemacs/default.nix index a771c3d..753b94d 100644 --- a/lib-overlays/nemacs/default.nix +++ b/lib-overlays/nemacs/default.nix @@ -15,8 +15,9 @@ # The output is `package`, the editor, the `config.build.package` of # the evaluation. A configuration is published as # `nemacsConfigurations..`: `package`, `activationPackage`, -# `config` and `options`, where `activationPackage` holds the `activate` -# of the profile described next. +# `profile`, `config` and `options`, where `activationPackage` holds the +# `activate` of the profile described next, and `profile` says where +# that profile is. # # A nemacs configuration is kept in a separate Nix profile, the way a # home-manager configuration keeps its generations @@ -137,7 +138,7 @@ attrset = "nemacsConfigurations"; bySystem = true; value = manifest: { - inherit (manifest.outputs) package activationPackage; + inherit (manifest.outputs) package activationPackage profile; inherit (manifest.value) config options; }; }; diff --git a/tests/pinned-world/default.nix b/tests/pinned-world/default.nix index 4565806..a2eb8ca 100644 --- a/tests/pinned-world/default.nix +++ b/tests/pinned-world/default.nix @@ -5624,6 +5624,7 @@ let && published.config.bundles.hello.enable && published.options ? build && builtins.isString published.activationPackage.drvPath + && published.profile.path == "$HOME/.local/state/caisson/profiles/nemacs/editor" && builtins.attrNames top.nemacsConfigurations.x86_64-linux == [ "editor"