Files
m3ta-chiron db0bfbc707 feat(colmena): set up Colmena as deploy tool for all NixOS hosts
- Add colmena flake input (nix-community >= 0.5.0) and CLI to devShell
- Extract shared nixosHosts module map consumed by BOTH
  nixosConfigurations (nixos-rebuild/nh) and the Colmena hive,
  so local rebuilds and remote deploys cannot drift apart
- Add colmenaHive output via colmena.lib.makeHive (direct flake
  evaluation, required on Nix >= 2.21) plus legacy colmena output
- Tags: m3-atlas/m3-helios/m3-hermes = server, m3-ares/m3-kratos =
  desktop with allowLocalDeployment; targetUser m3tam3re
- meta.allowApplyAll = false guards bare 'colmena apply'; use
  'colmena apply --on @server' or 'apply-local' instead
- Document deploy commands in AGENTS.md

Note: colmena builds render system.nixos.version as 26.11pre-git
(colmena's evaluator has no flake sourceInfo) - cosmetic only,
package closures are identical to nixos-rebuild.

Includes pending working-tree changes: hermes-agent bump v2026.9.24,
agent-lib input removal, m3ta-home switched to local path checkout,
m3-kratos monitor setup update, alejandra reformat of rofi-pass.nix.
2026-10-04 13:07:14 +02:00

114 lines
2.5 KiB
Nix

# Resurrected from nixpkgs after upstream removal on 2026-09-04
# ("rofi-pass has been removed as it is unmaintained upstream").
# m3ta-home's rofi module (programs.rofi.pass.package) and the Hyprland
# mod+P keybind still rely on it. Pinned resurrection — no updateScript.
{
lib,
stdenv,
fetchFromGitHub,
makeBinaryWrapper,
coreutils,
util-linuxMinimal,
gnugrep,
libnotify,
pwgen,
findutils,
gawk,
gnused,
rofi,
# wayland-only deps
pass-wayland,
wl-clipboard,
wtype,
# x11-only deps
pass,
xclip,
xdotool,
# backend selector
backend ? "x11",
}:
assert lib.assertOneOf "backend" backend [
"x11"
"wayland"
];
stdenv.mkDerivation {
pname = "rofi-pass";
version = "2.0.2-unstable-2024-06-16";
src = fetchFromGitHub {
owner = "carnager";
repo = "rofi-pass";
rev = "37c4c862deb133a85b7d72989acfdbd2ef16b8ad";
hash = "sha256-1lPNj47vTPLBK7mVm+PngV8C/ZsjJ2EN4ffXGU2TlQo=";
};
nativeBuildInputs = [makeBinaryWrapper];
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -a rofi-pass $out/bin/rofi-pass
mkdir -p $out/share/doc/rofi-pass/
cp -a config.example $out/share/doc/rofi-pass/config.example
runHook postInstall
'';
wrapperPath = lib.makeBinPath (
[
coreutils
findutils
gawk
gnugrep
gnused
libnotify
pwgen
rofi
util-linuxMinimal
]
++ lib.optionals (backend == "x11") [
(pass.withExtensions (ext: [ext.pass-otp]))
xclip
xdotool
]
++ lib.optionals (backend == "wayland") [
(pass-wayland.withExtensions (ext: [ext.pass-otp]))
wl-clipboard
wtype
]
);
fixupPhase = ''
runHook preFixup
patchShebangs $out/bin
wrapProgram $out/bin/rofi-pass \
--prefix PATH : "$wrapperPath" \
--set-default ROFI_PASS_BACKEND ${
if backend == "wayland"
then "wtype"
else "xdotool"
} \
--set-default ROFI_PASS_CLIPBOARD_BACKEND ${
if backend == "wayland"
then "wl-clipboard"
else "xclip"
}
runHook postFixup
'';
meta = {
description = "Script to make rofi work with password-store";
mainProgram = "rofi-pass";
homepage = "https://github.com/carnager/rofi-pass";
license = lib.licenses.gpl3;
platforms = with lib.platforms; linux;
};
}