-
Notifications
You must be signed in to change notification settings - Fork 1
/
default.nix
42 lines (41 loc) · 1.4 KB
/
default.nix
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
# Shell for bootstrapping flake-enabled nix and other tooling
{ config # flake-parts `perSystem` config
, inputs
, pkgs
, lib
, ...
}: pkgs.mkShellNoCC {
nativeBuildInputs = with pkgs; [
# lix-monitored
(nix-enraged.override { monitored = true; })
(nixd.override { nix = nix-enraged; })
home-manager
git
wireguard-tools
deploy-rs
# inputs.agenix.packages.${pkgs.hostPlatform.system}.agenix
# inputs.ragenix.packages.${pkgs.hostPlatform.system}.ragenix
rage
config.agenix-rekey.package
age-plugin-yubikey
] ++ lib.optionals pkgs.stdenv.hostPlatform.isDarwin [
# "${inputs.nix-darwin.outPath}/pkgs/nix-tools/default.nix" |> import |> (p: pkgs.callPackage p {}) |> builtins.getAttr "darwin-rebuild"
(lib.pipe inputs.nix-darwin.outPath [
(f: "${f}/pkgs/nix-tools/default.nix")
import
(p: pkgs.callPackage p {
nixPackage = nix-enraged;
})
(builtins.getAttr "darwin-rebuild")
])
];
env = {
# NOTE: Always add affected files to git after agenix operations
AGENIX_REKEY_ADD_TO_GIT = "always";
} // lib.optionalAttrs (let platform = pkgs.hostPlatform; in platform.isLinux && platform.isAarch64) {
# TODO: refer through `inputs`
# TODO: move to `cheetah` config
AGENIX_REKEY_PRIMARY_IDENTITY = "age1m23jgdtkfh6gqnxge88q03yy9exckajmlmx8sw2z9t3t5gpr0c4qxgdtwr";
AGENIX_REKEY_PRIMARY_IDENTITY_ONLY = true;
};
}