Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/.direnv
/.direnv*
/.envrc.local
result*
/.run/
Expand Down
130 changes: 102 additions & 28 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,12 @@
capkgs.url = "github:input-output-hk/capkgs";
iohk-nix.url = "github:input-output-hk/iohk-nix";
# iohk-nix.url = "path:/home/jlotoski/work/iohk/iohk-nix-wt/iohk-nix";
iohk-nix-ng.url = "github:input-output-hk/iohk-nix";
iohk-nix-ng.url = "github:input-output-hk/iohk-nix/jl/10.6.0-pre-updates";
# iohk-nix-ng.url = "path:/home/jlotoski/work/iohk/iohk-nix-wt/iohk-nix";

# Until blockperf detail fix is merged to master upstream
blockperf.url = "github:johnalotoski/blockperf/jl/fix-detail";

# For tmp local testing pins
# cardano-faucet.url = "github:input-output-hk/cardano-faucet/jl/node-9.2";
# cardano-faucet.url = "path:/home/jlotoski/work/iohk/cardano-faucet-wt/jl/node-9.2";
Expand Down Expand Up @@ -103,7 +106,8 @@

cardano-node-service-ng = {
# Until 10.6.0 tag is available
url = "github:IntersectMBO/cardano-node/f11e0f303ddf3e5b8975daf72ceaa522ddb98426";
url = "github:IntersectMBO/cardano-node/jl/10.6.0-pre-nix-cfg-updates";
# url = "path:/home/jlotoski/work/iohk/cardano-node-wt/jl/10.6.0-pre-nix-cfg-updates";
flake = false;
};

Expand Down Expand Up @@ -142,7 +146,8 @@

cardano-tracer-service-ng = {
# Until 10.6.0 tag is available
url = "github:IntersectMBO/cardano-node/f11e0f303ddf3e5b8975daf72ceaa522ddb98426";
url = "github:IntersectMBO/cardano-node/jl/10.6.0-pre-nix-cfg-updates";
# url = "path:/home/jlotoski/work/iohk/cardano-node-wt/jl/10.6.0-pre-nix-cfg-updates";
flake = false;
};

Expand Down
30 changes: 28 additions & 2 deletions flake/nixosModules/profile-basic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,37 @@
};

environment = {
shellAliases = {
# Remote to remote rsync over ssm is likely to be bandwidth limited
# due to proxying. Consider using wush instead. An alias is used in
# preference over bash function for better discoverability.
#
# Example usage, where the hostname in the rsync args is the EC2 ID:
# rsync-ssm "$REGION" "$RSYNC_ARGS[@]"
rsync-ssm = ''
rsyncSsm(){
if [ -z "$AWS_ACCESS_KEY_ID" ] || [ -z "$AWS_SECRET_ACCESS_KEY" ] || [ -z "$AWS_SESSION_TOKEN" ]; then
echo "If needed, short term credentials from the deployer can be generated with \"just aws-sso-export\" and sourced on this machine."
fi
REGION="$1"
ARGS="''${@:2}"
rsync -e "ssh -o $(ssm-proxy-rsync $REGION)" ''${ARGS[@]};
}
rsyncSsm "$@" \
'';
};

# These can be discovered with `declare -F` for bash function name only and `declare -f` for code
shellInit = ''
# This can be used to simplify ssh sessions, rsync, ex:
# ssh -o "$(ssm-proxy-cmd "$REGION")" "$INSTANCE_ID"
# This can be used to simplify ssh sessions, ex: `ssh -o "$(ssm-proxy-cmd "$REGION")" "$INSTANCE_ID"`
ssm-proxy-cmd() {
echo "ProxyCommand=sh -c 'aws --region $1 ssm start-session --target %h --document-name AWS-StartSSHSession --parameters portNumber=%p'"
}

# This is used to simplify rsync sessions with the rsync-ssm alias: `rsync-ssm "$REGION" "$RSYNC_ARGS[@]"`
ssm-proxy-rsync () {
echo "ProxyCommand='sh -c \"aws --region $1 ssm start-session --target %h --document-name AWS-StartSSHSession --parameters portNumber=%p\"'"
}
'';

systemPackages = with pkgs; [
Expand Down Expand Up @@ -100,6 +125,7 @@
tcpdump
tree
wget
wush
];
};

Expand Down
10 changes: 5 additions & 5 deletions flake/nixosModules/profile-blockperf.nix
Original file line number Diff line number Diff line change
Expand Up @@ -275,27 +275,27 @@ flake: {
else {
TraceOptions = {
"BlockFetch.Client.CompletedBlockFetch" = {
details = "DNormal";
detail = "DNormal";
maxFrequency = 0.0;
severity = "Info";
};
"BlockFetch.Client.SendFetchRequest" = {
details = "DNormal";
detail = "DNormal";
maxFrequency = 0.0;
severity = "Info";
};
"ChainDB.AddBlockEvent.AddedToCurrentChain" = {
details = "DNormal";
detail = "DNormal";
maxFrequency = 0.0;
severity = "Info";
};
"ChainDB.AddBlockEvent.SwitchedToAFork" = {
details = "DNormal";
detail = "DNormal";
maxFrequency = 0.0;
severity = "Info";
};
"ChainSync.Client.DownloadedHeader" = {
details = "DNormal";
detail = "DNormal";
maxFrequency = 0.0;
severity = "Info";
};
Expand Down
Loading