blob: abf6eac8c4e4546c6067f80c227d75ba4b55bf97 (
plain) (
blame)
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
|
{
pkgs,
system,
inputs,
}:
[
(pkgs.writeScriptBin "nbuild" ''
set -e
echo "> Running darwin-rebuild build..."
${inputs.darwin.packages.${system}.darwin-rebuild}/bin/darwin-rebuild build --flake .
echo "> darwin-rebuild build was successful ✅"
'')
(pkgs.writeScriptBin "nswitch" ''
set -e
echo "> Running darwin-rebuild switch..."
${inputs.darwin.packages.${system}.darwin-rebuild}/bin/darwin-rebuild switch --flake .
echo "> macOS config was successfully applied 🚀"
'')
(pkgs.writeScriptBin "sync-agenix-key" ''
set -e
echo "> Copying agenix SSH key from 1password ..."
mkdir -p ~/.ssh
${pkgs._1password-cli}/bin/op --account my.1password.com read "op://Private/agenix/private key?ssh-format=openssh" > ~/.ssh/agenix
${pkgs._1password-cli}/bin/op --account my.1password.com read "op://Private/agenix/public key" > ~/.ssh/agenix.pub
echo "> agenix SSH key copied successfully 🔐"
'')
]
|