-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to add nix-darwin support to agenix
Merges work by @montchr, @cmhamill, and @rtimush and rebases on main. - fixes #60 - fixes #120 - closes #107
- Loading branch information
Showing
6 changed files
with
191 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Do not copy this! It is insecure. This is only okay because we are testing. | ||
{ | ||
system.activationScripts.extraUserActivation.text = '' | ||
echo "Installing SSH host key" | ||
sudo cp ${../example_keys/system1.pub} /etc/ssh/ssh_host_ed25519_key.pub | ||
sudo cp ${../example_keys/system1} /etc/ssh/ssh_host_ed25519_key | ||
sudo chmod 644 /etc/ssh/ssh_host_ed25519_key.pub | ||
sudo chmod 600 /etc/ssh/ssh_host_ed25519_key | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
config, | ||
pkgs, | ||
... | ||
}: let | ||
secret = "hello"; | ||
testScript = pkgs.writeShellApplication { | ||
name = "agenix-integration"; | ||
text = '' | ||
grep ${secret} ${config.age.secrets.secret1.path} | ||
''; | ||
}; | ||
in { | ||
imports = [ | ||
./install_ssh_host_keys_darwin.nix | ||
../modules/age.nix | ||
]; | ||
|
||
services.nix-daemon.enable = true; | ||
|
||
age.secrets.secret1.file = ../example/secret1.age; | ||
|
||
environment.systemPackages = [testScript]; | ||
} |