mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-04 14:00:04 +00:00
Wire users.users.<name>.{autoSubUidGidRange,subUidRanges,subGidRanges}
into userborn, which allocates and writes the subid files.
The userborn-import-legacy service seeds the subid files from
/var/lib/nixos/auto-subuid-map so that existing auto allocations
survive the migration to userborn.
59 lines
1.4 KiB
Nix
59 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
libxcrypt,
|
|
nixosTests,
|
|
nix-update-script,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "userborn";
|
|
version = "1.0.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nikstur";
|
|
repo = "userborn";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-YUJY5Ss29joSkBztf6r7DwSci/hTBYgmN1qkJRfhHAo=";
|
|
};
|
|
|
|
sourceRoot = "${finalAttrs.src.name}/rust/userborn";
|
|
|
|
cargoHash = "sha256-U9RZQ9MabWJEWzMrsmEoIoEUUkFVT7igUBPalXnFeRU=";
|
|
|
|
nativeBuildInputs = [ rustPlatform.bindgenHook ];
|
|
|
|
buildInputs = [ libxcrypt ];
|
|
|
|
stripAllList = [ "bin" ];
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { };
|
|
tests = {
|
|
inherit (nixosTests)
|
|
userborn
|
|
userborn-migration
|
|
userborn-mutable-users
|
|
userborn-mutable-etc
|
|
userborn-immutable-users
|
|
userborn-immutable-etc
|
|
userborn-static
|
|
userborn-subids
|
|
userborn-subids-immutable-etc
|
|
userborn-subids-mutable-etc
|
|
;
|
|
};
|
|
};
|
|
|
|
meta = {
|
|
homepage = "https://github.com/nikstur/userborn";
|
|
description = "Declaratively bear (manage) Linux users and groups";
|
|
changelog = "https://github.com/nikstur/userborn/blob/${finalAttrs.version}/CHANGELOG.md";
|
|
license = lib.licenses.mit;
|
|
platforms = lib.platforms.unix;
|
|
maintainers = with lib.maintainers; [ nikstur ];
|
|
mainProgram = "userborn";
|
|
};
|
|
})
|