initial commit

This commit is contained in:
Ranomier 2024-11-11 02:31:05 +01:00
commit b39b82463b
13 changed files with 214 additions and 0 deletions

14
nswitch Executable file
View 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"