From e88a2b66dce2ce0babccd19033c8b9357f04fbc3 Mon Sep 17 00:00:00 2001 From: jeirmeister Date: Wed, 30 Oct 2024 03:40:36 -0700 Subject: [PATCH] Still fixing the git... --- users/jeirmeister/programs/git.nix | 22 +++++++------- users/jeirmeister/programs/vscode.nix | 41 ++++++++++++++++++++------- users/jeirmeister/programs/zsh.nix | 9 ++---- 3 files changed, 43 insertions(+), 29 deletions(-) diff --git a/users/jeirmeister/programs/git.nix b/users/jeirmeister/programs/git.nix index f09cf93..ff88375 100644 --- a/users/jeirmeister/programs/git.nix +++ b/users/jeirmeister/programs/git.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: { programs.git = { @@ -6,18 +6,20 @@ lfs.enable = true; userName = "jeirmeister"; userEmail = "jeir@jeirslab.xyz"; - + extraConfig = { init.defaultBranch = "main"; pull.rebase = false; - + # Configure credential helper credential = { helper = "${pkgs.git-credential-manager}/bin/git-credential-manager"; - useHttpPath = true; }; + + # Add additional required configurations + safe.directory = "*"; }; - + ignores = [ ".DS_Store" "*.swp" @@ -26,15 +28,11 @@ ]; }; - # Ensure required KDE packages are installed + # Ensure required packages are installed home.packages = with pkgs; [ git-credential-manager - ksshaskpass ]; - # Set environment variables for KDE integration - home.sessionVariables = { - GIT_ASKPASS = "${pkgs.ksshaskpass}/bin/ksshaskpass"; - SSH_ASKPASS = "${pkgs.ksshaskpass}/bin/ksshaskpass"; - }; + # Enable XDG directories + xdg.enable = true; } \ No newline at end of file diff --git a/users/jeirmeister/programs/vscode.nix b/users/jeirmeister/programs/vscode.nix index 2dd6955..1be8a8c 100644 --- a/users/jeirmeister/programs/vscode.nix +++ b/users/jeirmeister/programs/vscode.nix @@ -1,27 +1,30 @@ { config, pkgs, ... }: { programs.vscode = { + enable = true; # Make sure this is enabled + extensions = with pkgs.vscode-extensions; [ - # Essential - vscodevim.vim + # Essentia + ms-vsliveshare.vsliveshare - github.copilot - + + # Languages - bbenoist.nix +# bbenoist.nix ms-python.python rust-lang.rust-analyzer - + # Tools - eamodio.gitlens + # eamodio.gitlens ms-azuretools.vscode-docker - + # Theme & UI pkief.material-icon-theme dracula-theme.theme-dracula ]; - + userSettings = { + # Existing settings "editor.fontSize" = 14; "editor.fontFamily" = "FiraCode Nerd Font"; "editor.formatOnSave" = true; @@ -31,6 +34,24 @@ "editor.rulers" = [ 80 120 ]; "files.trimTrailingWhitespace" = true; "editor.bracketPairColorization.enabled" = true; + + # Git settings + "git.enabled" = true; + "git.autofetch" = true; + "git.confirmSync" = false; + "git.enableSmartCommit" = true; + "git.path" = "${pkgs.git}/bin/git"; + "git.openRepositoryInParentFolders" = "never"; + + # GitLens settings (since you have it installed) + "gitlens.hovers.currentLine.over" = "line"; + "gitlens.currentLine.enabled" = true; + "gitlens.hovers.enabled" = true; + "gitlens.mode.active" = "zen"; + + # Credential manager integration + "git.terminalAuthentication" = true; + "git.credential.helper" = "${pkgs.git-credential-manager}/bin/git-credential-manager"; }; }; -} \ No newline at end of file +} diff --git a/users/jeirmeister/programs/zsh.nix b/users/jeirmeister/programs/zsh.nix index 9f46205..7805174 100644 --- a/users/jeirmeister/programs/zsh.nix +++ b/users/jeirmeister/programs/zsh.nix @@ -7,22 +7,17 @@ autosuggestion.enable = true; enableCompletion = true; syntaxHighlighting.enable = true; - + oh-my-zsh = { enable = true; theme = "robbyrussell"; plugins = [ "git" "docker" "kubectl" ]; }; - + # Add this section to ensure home-manager paths are properly sourced initExtra = '' # Add home-manager applications to PATH export PATH=$HOME/.nix-profile/bin:$PATH - - # Ensure XDG directories are set - export XDG_DATA_HOME=$HOME/.local/share - export XDG_CONFIG_HOME=$HOME/.config - export XDG_CACHE_HOME=$HOME/.cache ''; };