-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
66 additions
and
98 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
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,9 @@ | ||
{ self, writeShellScriptBin, writeText, lib, ... }: | ||
let | ||
services = self.legacyPackages.aarch64-darwin.services; | ||
images = with builtins; lib.strings.concatMapStrings (svc: "${svc.image.out}\n") (attrValues services); | ||
in | ||
writeShellScriptBin "printAllImages" '' | ||
set -e | ||
cat ${writeText "images" images} | ||
'' |
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 @@ | ||
{ self, scripts, writeShellScriptBin, ...}let in: (scripts.buildYaegiScript "buildAllImages" ./script.go) |
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,5 @@ | ||
package main | ||
|
||
func main() { | ||
print("hello world from yaegi!") | ||
} |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ self, callPackage, nomad, jq, nix, bws, writeShellScriptBin, writeScriptBin, yaegi, ...}: rec { | ||
|
||
# buildAllImages = callPackage (import ./buildAllImages) {}; | ||
|
||
buildYaegiScript = name: filePath: writeScriptBin name '' | ||
#! ${yaegi}/bin/yaegi | ||
${builtins.readFile filePath} | ||
''; | ||
|
||
buildAllImages = callPackage (import ./buildAllImages) {}; | ||
|
||
# templates a nomad nix file into JSON and calls nomad run on it | ||
# usage: nixmad path/to/job.nix | ||
nixmad = writeShellScriptBin "nixmad" '' | ||
set -e | ||
${nix}/bin/nix eval -f $1 --json --show-trace | ${nomad}/bin/nomad run -json - | ||
''; | ||
|
||
# fetches a secret from bitwarden-secret by ID | ||
# usage: bws-get <ID> | ||
bws-get = writeShellScriptBin "bws-get" '' | ||
set -e | ||
${bws}/bin/bws secret get $1 | ${jq}/bin/jq -r '.value' | ||
''; | ||
|
||
# returns a secret from the MacOS keychain fromatted as JSON for use in TF | ||
# usage: keychain-get <SERVICE> | ||
# returns {"value": "<SECRET>"} | ||
keychain-get = writeShellScriptBin "keychain-get" '' | ||
set -e | ||
SECRET=$(/usr/bin/security find-generic-password -gw -l "$1") | ||
${jq}/bin/jq -n --arg value "$SECRET" '{ "value": $value }' | ||
''; | ||
|
||
allImages = callPackage (import ./allImages) { inherit self; }; | ||
} |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
{ callPackage, ... }: { | ||
name = "services"; | ||
|
||
{ callPackage, writeText, ... }: { | ||
portfolioStats = callPackage (import ./portfolioStats) { }; | ||
} |