119 current 2024-12-31 04:42:05 25.05.20241217.d3c42f1 6.6.66 *
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [zsh-powerlevel10k meslo-lgs-nf];
|
||||
|
||||
@@ -223,8 +223,9 @@ export LESS_TERMCAP_us=$'\e[1;4;31m'
|
||||
|
||||
# ------ NNN (not no not november)
|
||||
export PATH=/home/synchronous/.scripts/nnn:$PATH
|
||||
export VISUAL=wrapper.sh
|
||||
export EDITOR="$VISUAL"
|
||||
# export VISUAL=wrapper.sh
|
||||
# export EDITOR="$VISUAL"
|
||||
export EDITOR="nvim"
|
||||
export NNN_PLUG='m:preview-tui;'
|
||||
export NNN_FIFO=/tmp/nnn.fifo
|
||||
export NNN_TERMINAL=alacritty
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
set -e
|
||||
|
||||
# Edit your config
|
||||
$EDITOR configuration.nix
|
||||
# $EDITOR configuration.nix
|
||||
|
||||
# cd to your config dir
|
||||
pushd ~/dotfiles/nixos/
|
||||
pushd /home/synchronous/nix-cfg
|
||||
|
||||
# Early return if no changes were detected (thanks @singiamtel!)
|
||||
if git diff --quiet '*.nix'; then
|
||||
if git --git-dir /home/synchronous/nix-cfg/.git diff --quiet '*.nix'; then
|
||||
echo "No changes detected, exiting."
|
||||
popd
|
||||
exit 0
|
||||
@@ -21,18 +21,19 @@ alejandra . &>/dev/null \
|
||||
|| ( alejandra . ; echo "formatting failed!" && exit 1)
|
||||
|
||||
# Shows your changes
|
||||
git diff -U0 '*.nix'
|
||||
git --git-dir /home/synchronous/nix-cfg/.git diff
|
||||
# -U0 '*.nix'
|
||||
|
||||
echo "NixOS Rebuilding..."
|
||||
|
||||
# Rebuild, output simplified errors, log trackebacks
|
||||
sudo nixos-rebuild switch &>nixos-switch.log || (cat nixos-switch.log | grep --color error && exit 1)
|
||||
sudo nixos-rebuild switch --flake /home/synchronous/nix-cfg/flake.nix &>nixos-switch.log || (cat nixos-switch.log | grep --color error && exit 1)
|
||||
|
||||
# Get current generation metadata
|
||||
current=$(nixos-rebuild list-generations | grep current)
|
||||
|
||||
# Commit all changes witih the generation metadata
|
||||
git commit -am "$current"
|
||||
git --git-dir /home/synchronous/nix-cfg/.git commit -am "$current"
|
||||
|
||||
# Back to where you were
|
||||
popd
|
||||
|
||||
Reference in New Issue
Block a user