Skip to content

Commit

Permalink
[scripts] ,hm: add option to pass in extra args
Browse files Browse the repository at this point in the history
  • Loading branch information
meain committed Jan 2, 2024
1 parent b16a85d commit cf5b6a9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/.local/bin/random/,hm
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,18 @@ elif [ "$1" = update-all ]; then
grep -v '^pinned-' | # don't show pinned versions
xargs -n1 nix flake lock --update-input
elif [ "$1" = lock ]; then
shift
cd "$HOME/.dotfiles/home-manager/.config/home-manager"
nix flake lock
nix flake lock "$@"
elif [ "$1" = build ]; then
shift
cd "$HOME/.config/home-manager/"
nix build --show-trace -L .#homeConfigurations.meain.activationPackage
nix build --show-trace -L .#homeConfigurations.meain.activationPackage "$@"
elif [ "$1" = switch ]; then
shift
cd "$HOME/.config/home-manager/"
nix build -L .#homeConfigurations.meain.activationPackage
home-manager switch
home-manager switch "$@"
else
cd "$HOME/.config/home-manager/"
home-manager "${1:-build}"
Expand Down

0 comments on commit cf5b6a9

Please sign in to comment.