81 current 2024-03-01 11:58:09 24.05.20240228.9099616 6.6.18 *
This commit is contained in:
parent
c1942decb5
commit
c179fc9135
1 changed files with 14 additions and 0 deletions
|
|
@ -71,6 +71,20 @@
|
||||||
# (pkgs.writeShellScriptBin "my-hello" ''
|
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||||
# echo "Hello, ${config.home.username}!"
|
# echo "Hello, ${config.home.username}!"
|
||||||
# '')
|
# '')
|
||||||
|
(pkgs.writeShellScriptBin "rebuild" ''
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
pushd ~/nixos/
|
||||||
|
alejandra . &>/dev/null
|
||||||
|
git diff -U0 **/*.nix
|
||||||
|
git add .
|
||||||
|
echo "[REBUILD]: rebuilding nixos"
|
||||||
|
sudo nixos-rebuild switch --flake ~/nixos#earth &>nixos-switch.log || (cat nixos-switch.log | grep --color error && false)
|
||||||
|
gen=$(nixos-rebuild list-generations | grep current)
|
||||||
|
git commit -am "$gen"
|
||||||
|
git push origin main
|
||||||
|
popd
|
||||||
|
'')
|
||||||
];
|
];
|
||||||
|
|
||||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue