initial commit
This commit is contained in:
commit
b39b82463b
13 changed files with 214 additions and 0 deletions
14
nswitch
Executable file
14
nswitch
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
# from https://github.com/0atman/noboilerplate/blob/main/scripts/38-nixos.md#dont-use-nix-env
|
||||
# docstring=quick edit (or ling xD) for nixos config
|
||||
set -E -o pipefail
|
||||
|
||||
cd ~/Projects/NixOS/
|
||||
nvim
|
||||
nix fmt . &>/dev/null
|
||||
git diff -U0 *.nix
|
||||
echo "NixOS Rebuilding..."
|
||||
sudo nixos-rebuild switch &>nixos-switch.log || (
|
||||
cat nixos-switch.log | grep --color error && false)
|
||||
gen=$(nixos-rebuild list-generations | grep current)
|
||||
git commit -am "$gen"
|
Loading…
Add table
Add a link
Reference in a new issue