nixos/mix.sh

40 lines
1.0 KiB
Bash
Raw Permalink Normal View History

2024-06-14 19:25:45 -08:00
#!/bin/sh
fetch_dl_driver () {
# this must be run before first bootstrap on new machine. IM SORRY
file /nix/store/bsv1gnjqqivcbhgbs3cgd6d0i1yz66pj-displaylink-580.zip >&/dev/null ||
nix-prefetch-url https://marq42.xyz/displaylink-580.zip
}
hostname=$(cat /etc/hostname)
rebuild () {
nixos-rebuild $1 --flake ./#$2
}
case $1 in
2024-11-29 13:11:00 -09:00
home)
# nix --extra-experimental-features nix-command\ flakes \
# run "github:NixOS/nix/2.18.4" -- \
# --extra-experimental-features nix-command\ flakes \
# build ./\#homeManagerConfigurations.soundblaster.activationPackage &&
# ./result/activate
nix --extra-experimental-features nix-command\ flakes \
run "github:NixOS/nix/2.18.4" -- \
--extra-experimental-features nix-command\ flakes \
run "github:nix-community/home-manager/release-24.11" -- \
--extra-experimental-features nix-command\ flakes\
switch --flake ./\#soundblaster
;;
2024-06-14 19:25:45 -08:00
fetch)
fetch_dl_driver
;;
switch)
rebuild switch $hostname
;;
boot)
rebuild boot $hostname
;;
esac