312 current 1970-01-01 01:00:00 23.11.20240514.9ddcaff 6.1.90 *
This commit is contained in:
parent
bcc917a2da
commit
f3d2da344f
@ -11,6 +11,7 @@
|
||||
sway.laptop = true;
|
||||
|
||||
shell.enable = true;
|
||||
git.enable = true;
|
||||
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
|
@ -1,6 +1,19 @@
|
||||
{...}: {
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.git;
|
||||
in {
|
||||
imports = [./lazygit.nix];
|
||||
|
||||
options = {
|
||||
git.enable = lib.mkEnableOption "git";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
git.lazygit.enable = lib.mkDefault true;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
@ -23,4 +36,5 @@
|
||||
userEmail = "max.kaenner@gmail.com";
|
||||
userName = "Max Känner";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,15 @@
|
||||
{...}: {
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.git.lazygit;
|
||||
in {
|
||||
options = {
|
||||
git.lazygit.enable = lib.mkEnableOption "lazygit, a git tui";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.lazygit = {
|
||||
enable = true;
|
||||
settings = {
|
||||
@ -9,4 +20,5 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
33
rebuild.sh
33
rebuild.sh
@ -1,33 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# A rebuild script that commits on a successful build
|
||||
set -e
|
||||
|
||||
# cd to your config dir
|
||||
pushd ~/dotfiles/nixos/
|
||||
|
||||
# Edit your config
|
||||
$EDITOR
|
||||
|
||||
# Autoformat your nix files
|
||||
alejandra . #&>/dev/null
|
||||
|
||||
# Shows your changes
|
||||
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 && false)
|
||||
|
||||
# Get current generation metadata
|
||||
current=$(nixos-rebuild list-generations | grep current)
|
||||
|
||||
# Commit all changes with the gereation metadata
|
||||
git commit -am "$current"
|
||||
|
||||
# Back to where you were
|
||||
popd
|
||||
|
||||
# Notify all OK!
|
||||
notify-send -e "NixOS Rebuilt OK!" --icon=software-update-available
|
Loading…
Reference in New Issue
Block a user