mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 10:30:44 +02:00
added some git configuration and a notification if git isnt setup
This commit is contained in:
@@ -52,7 +52,7 @@ imports = [
|
|||||||
# environment.
|
# environment.
|
||||||
home.packages = [
|
home.packages = [
|
||||||
#scritps
|
#scritps
|
||||||
(pkgs.callPackage ../../modules/scripts/dontkillsteam.nix {})
|
(pkgs.callPackage ../../modules/scripts/dontkillsteam.nix {}) # kill app (if it is steam put it in some background
|
||||||
(pkgs.callPackage ../../modules/scripts/batterynotify.nix {})
|
(pkgs.callPackage ../../modules/scripts/batterynotify.nix {})
|
||||||
(pkgs.callPackage ../../modules/scripts/weather.nix {})
|
(pkgs.callPackage ../../modules/scripts/weather.nix {})
|
||||||
(pkgs.callPackage ../../modules/scripts/cowsay.nix {})
|
(pkgs.callPackage ../../modules/scripts/cowsay.nix {})
|
||||||
@@ -60,8 +60,9 @@ home.packages = [
|
|||||||
(pkgs.callPackage ../../modules/scripts/mountkdrive.nix {})
|
(pkgs.callPackage ../../modules/scripts/mountkdrive.nix {})
|
||||||
(pkgs.callPackage ../../modules/scripts/weatherwaybar.nix {})
|
(pkgs.callPackage ../../modules/scripts/weatherwaybar.nix {})
|
||||||
(pkgs.callPackage ../../modules/scripts/colorpicker.nix {})
|
(pkgs.callPackage ../../modules/scripts/colorpicker.nix {})
|
||||||
(pkgs.callPackage ../../modules/scripts/killall.nix {})
|
(pkgs.callPackage ../../modules/scripts/killall.nix {}) # kill all windows except focused window
|
||||||
(pkgs.callPackage ../../modules/scripts/launch.nix {}) # necessary for the apps i launch with hyprland at every start
|
(pkgs.callPackage ../../modules/scripts/launch.nix {}) # necessary for the apps i launch with hyprland at every start
|
||||||
|
(pkgs.callPackage ../../modules/scripts/gitnotify.nix {})
|
||||||
#pkgs
|
#pkgs
|
||||||
pkgs.gruvbox-gtk-theme
|
pkgs.gruvbox-gtk-theme
|
||||||
# # Adds the 'hello' command to your environment. It prints a friendly
|
# # Adds the 'hello' command to your environment. It prints a friendly
|
||||||
|
|||||||
@@ -3,17 +3,8 @@
|
|||||||
{
|
{
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# user.email dont work #user.email = "137088692+Totorile1@users.noreply.github.com";
|
settings = {
|
||||||
#user.name = "Totorile1";
|
init.defaultBranch = "main";
|
||||||
# no declarative parameters for git as it would show in a public git repo more info than I would like. Just use the following commands
|
};
|
||||||
# git config --global user.name "YourName"
|
};
|
||||||
# git config --global user.email "YourEmail"
|
|
||||||
# git config --global init.defaultBranch main
|
|
||||||
# git config --global user.email "137088692+Totorile1@users.noreply.github.com"
|
|
||||||
#cd ~/nixos\
|
|
||||||
#git add .
|
|
||||||
#git commit -m "Update NixOS configuration"
|
|
||||||
#git push origin master
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ in
|
|||||||
"sleep 1 && custom-wallpaper"
|
"sleep 1 && custom-wallpaper"
|
||||||
"custom-mountkdrive"
|
"custom-mountkdrive"
|
||||||
"waybar"
|
"waybar"
|
||||||
|
"custom-gitnotify"
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
# login autostart
|
# login autostart
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
{ writeShellApplication, git, libnotify, ... }:
|
||||||
|
|
||||||
|
writeShellApplication {
|
||||||
|
name = "custom-gitnotify";
|
||||||
|
runtimeInputs = [
|
||||||
|
git
|
||||||
|
libnotify
|
||||||
|
];
|
||||||
|
text = ''
|
||||||
|
# Check if git is installed
|
||||||
|
if ! command -v git >/dev/null 2>&1; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
NAME=$(git config --global user.name)
|
||||||
|
EMAIL=$(git config --global user.email)
|
||||||
|
|
||||||
|
if [[ -z "$NAME" || -z "$EMAIL" ]]; then
|
||||||
|
notify-send \
|
||||||
|
"Git not configured" \
|
||||||
|
"Set your identity\n or remove this warning by removing the custom-gitnotify line in\n ~/nixos/modules/home-manager/hyprland.nix"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user