mirror of
https://github.com/sadan4/dotfiles.git
synced 2024-11-16 23:04:39 -05:00
143 current 2024-05-25 22:07:21 24.05.20240419.5c24cf2 6.8.6-zen1 *
This commit is contained in:
parent
0f4c83e3c3
commit
741cef70aa
2 changed files with 12 additions and 5 deletions
15
build
15
build
|
@ -3,10 +3,17 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
#Change to change box setup
|
#Change to change box setup
|
||||||
BOX="default"
|
BOX="desktop"
|
||||||
|
|
||||||
pushd ~/nixos/
|
pushd ~/nixos/
|
||||||
|
notify(){
|
||||||
|
command -v notify-send > /dev/null
|
||||||
|
if [[ $? -ne 0 ]]; then
|
||||||
|
return
|
||||||
|
else
|
||||||
|
notify-send "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
# if git diff --quiet '*.nix' && [[ !( $1 =~ "*force*") ]] then
|
# if git diff --quiet '*.nix' && [[ !( $1 =~ "*force*") ]] then
|
||||||
# echo "No changes. Exiting"
|
# echo "No changes. Exiting"
|
||||||
# # notify-send "No changes. Exiting"
|
# # notify-send "No changes. Exiting"
|
||||||
|
@ -22,11 +29,11 @@ git diff -U0 '*.nix'
|
||||||
|
|
||||||
echo "Starting build"
|
echo "Starting build"
|
||||||
|
|
||||||
sudo nixos-rebuild switch --flake .#${BOX} &> build.log || (cat build.log | grep --color error && notify-send "ERROR BUILDING NIX" && exit 1)
|
sudo nixos-rebuild switch --flake .#${BOX} &> build.log || (cat build.log | grep --color error && notify "ERROR BUILDING NIX" && exit 1)
|
||||||
|
|
||||||
current=$(nixos-rebuild list-generations | grep current)
|
current=$(nixos-rebuild list-generations | grep current)
|
||||||
|
|
||||||
git commit -am "${current}"
|
git commit -am "${current}"
|
||||||
|
|
||||||
popd
|
popd
|
||||||
notify-send -e "good build" --icon=software-update-okay
|
notify -e "good build" --icon=software-update-okay
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# in
|
# in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
default = nixpkgs.lib.nixosSystem {
|
desktop = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
./boxes/desktop/configuration.nix
|
./boxes/desktop/configuration.nix
|
||||||
|
|
Loading…
Reference in a new issue