Skip to content

Instantly share code, notes, and snippets.

View lucperkins's full-sized avatar
🎯
Focusing

Luc Perkins lucperkins

🎯
Focusing
View GitHub Profile
nix copy \
--from ssh-ng://"${CI_MACHINE_IP}" \
".#packages.x86_64-linux.service-pkg"
# On the beefy CI machine
nix copy \
--to ssh-ng://"${CLOUD_VM_IP}" \
".#packages.x86_64-linux.service-pkg"
nix copy \
--to ssh-ng://my-remote-host \
"nixpkgs#apachakafka_3_3"
pub fn get_or_none<T>(items: Vec<T>) -> Option<Vec<T>> {
if items.is_empty() {
None
} else {
Some(items)
}
}
@lucperkins
lucperkins / input.md
Last active December 26, 2022 19:16
Rust TOC example

Here's a level 2 header

Some text.

Here's a level 3 header

Some more text.

Back to level 2

git checkout https://github.com/DeterminateSystems/nix-github-action
cd nix-github-action
# Run the CI suite locally
nix develop --command ci-local
- name: Prettify JS and TS files
run: nix develop --command ci-prettify
{
prettify = pkgs.writeScriptBin "ci-prettify" ''
prettier --write **/*.{js,ts}
'';
}
- name: Prettify JS and TS files
run: nix develop --command prettier --write **/*.{js,ts}
steps:
- uses: actions/checkout@v3
- name: Install Nix
uses: cachix/install-nix-action@v17
with:
# Mostly to avoid GitHub rate limiting
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
# Note: this would only work if Cargo is included in the Nix shell
- name: Build release