-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathflake.nix
More file actions
44 lines (40 loc) · 1.11 KB
/
Copy pathflake.nix
File metadata and controls
44 lines (40 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
description = "Convert SSH Ed25519 keys to age keys";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs }:
let
inherit (nixpkgs) lib;
systems = [
"aarch64-linux"
"x86_64-linux"
"riscv64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
eachSystem = f: lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
in
{
packages = eachSystem (pkgs: rec {
ssh-to-age = pkgs.callPackage ./default.nix { };
default = ssh-to-age;
});
checks = eachSystem (
pkgs:
let
system = pkgs.stdenv.hostPlatform.system;
packages = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") self.packages.${system};
devShells = lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") (self.devShells.${system} or { });
in
{
cross-build = pkgs.callPackage ./cross-build.nix {
inherit (self.packages.${system}) ssh-to-age;
};
}
// packages
// devShells
);
};
}