configuration.nix/justfile
Jalil David Salamé Messina 5358188ad1
All checks were successful
/ check (push) Successful in 9s
/ check-renovaterc (push) Successful in 3s
/ build-packages (push) Successful in 13s
/ build-vm (push) Successful in 2s
/ report-size (push) Successful in 5s
refactor(hm/gui): reorganize modules
This way we are not `import`ing stuff which is slow.

It also makes it easier to turn off the sway module.
2025-04-21 19:04:52 +02:00

36 lines
1.1 KiB
Makefile

default:
echo 'Hello, world!'
# Update a specific flake input
update input:
nix flake lock --update-input "{{input}}" --commit-lock-file
build-vm:
nixos-rebuild build-vm --fallback --flake .#vm --print-build-logs
run-vm: build-vm
QEMU_OPTS="$QEMU_OPTS_WL" result/bin/run-nixos-vm
update-vim-plugins:
#!/bin/sh
plugindir=./modules/nixvim/extraPlugins
# copy nixpkgs from local checkout
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 -
# update vim plugins
nix run nixpkgs#vimPluginsUpdater -- --proc=1 --nixpkgs "$nixpkgs" --no-commit -i "$plugindir/plugins" -o "$plugindir/generated.nix" update
# format the generated output
nix fmt "$plugindir/generated.nix"
# Amend Update flake.lock PR
flake-pr:
git branch -D update_flake_lock_action || echo "no previous update branch"
gix fetch -r origin
git switch update_flake_lock_action
git commit --amend --no-edit
git push origin update_flake_lock_action --force-with-lease