2024-03-01 08:24:07 +01:00
|
|
|
default:
|
|
|
|
echo 'Hello, world!'
|
|
|
|
|
|
|
|
# Update a specific flake input
|
|
|
|
update input:
|
|
|
|
nix flake lock --update-input {{input}} --commit-lock-file
|
|
|
|
|
2024-05-04 23:20:30 +02:00
|
|
|
build-vm:
|
|
|
|
nixos-rebuild build-vm --flake .#vm --print-build-logs
|
|
|
|
|
|
|
|
run-vm: build-vm
|
|
|
|
QEMU_OPTS="$QEMU_OPTS_WL" result/bin/run-nixos-vm
|
|
|
|
|
2024-08-10 14:38:01 +02:00
|
|
|
update-vim-plugins:
|
|
|
|
#!/bin/sh
|
|
|
|
# Use local nixpkgs if available
|
|
|
|
nixpkgs="$HOME/Dev/nixpkgs"
|
|
|
|
# copy nixpkgs from local checkout
|
|
|
|
if [ ! -d "$nixpkgs" ]; then
|
|
|
|
nixpkgs="$(mktemp -d)"
|
|
|
|
cp -r /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/. "$nixpkgs"
|
|
|
|
cd "$nixpkgs"
|
|
|
|
git init .
|
|
|
|
git add .
|
|
|
|
git commit -m 'dummy commit'
|
|
|
|
cd -
|
|
|
|
fi
|
|
|
|
# update vim plugins
|
|
|
|
nix run nixpkgs#vimPluginsUpdater -- --nixpkgs "$nixpkgs" --no-commit -i ./nvim/extraPlugins/plugins -o ./nvim/extraPlugins/generated.nix update
|
|
|
|
# format the generated output
|
|
|
|
nix fmt ./nvim/extraPlugins/generated.nix
|
|
|
|
|
2024-03-01 08:24:07 +01:00
|
|
|
# Amend Update flake.lock PR
|
|
|
|
flake-pr:
|
2024-03-29 13:13:16 +01:00
|
|
|
git branch -D update_flake_lock_action || echo "no previous update branch"
|
|
|
|
gix fetch -r origin
|
2024-03-01 08:24:07 +01:00
|
|
|
git switch update_flake_lock_action
|
|
|
|
git commit --amend --no-edit
|
|
|
|
git push origin update_flake_lock_action --force-with-lease
|