diff --git a/users/transcaffeine/default.nix b/users/transcaffeine/default.nix index 61c5080..4af72da 100644 --- a/users/transcaffeine/default.nix +++ b/users/transcaffeine/default.nix @@ -22,5 +22,5 @@ nix-diff ]; }; - home-manager.users.transcaffeine = import ./home-manager.nix; + home-manager.users.transcaffeine = import ./home-manager/default.nix; } diff --git a/users/transcaffeine/home-manager.nix b/users/transcaffeine/home-manager/default.nix similarity index 75% rename from users/transcaffeine/home-manager.nix rename to users/transcaffeine/home-manager/default.nix index d3047d2..bb4f6e5 100644 --- a/users/transcaffeine/home-manager.nix +++ b/users/transcaffeine/home-manager/default.nix @@ -1,4 +1,7 @@ { lib, pkgs, ... }: { + imports = [ + ./git.nix + ]; home.stateVersion = "24.11"; services.darkman = { enable = true; @@ -9,4 +12,6 @@ dbusserver = true; }; }; + + home.preferXdgDirectories = true; } diff --git a/users/transcaffeine/home-manager/git.nix b/users/transcaffeine/home-manager/git.nix new file mode 100644 index 0000000..7494b43 --- /dev/null +++ b/users/transcaffeine/home-manager/git.nix @@ -0,0 +1,31 @@ +{ lib, ... }: { + programs.git = let + gitconfig = builtins.fromTOML ( + lib.readFile + ((builtins.fetchGit { + url = "https://git.finally.coffee/transcaffeine/dotfiles.git"; + ref = "main"; + rev = "3811febee134e62d3539c472005f04710d913611"; + shallow = false; + }).outPath + "/config/git/gitconfig") + ); + key = gitconfig.user.signingKey; + aliases = gitconfig.alias; + in { + enable = true; + userName = gitconfig.user.name; + userEmail = gitconfig.user.email; + signing = { + signByDefault = true; + inherit key; + }; + inherit aliases; + extraConfig = { + format = gitconfig.format; + commit = gitconfig.commit; + tag = gitconfig.tag; + pull = gitconfig.pull; + rebase = gitconfig.rebase; + }; + }; +}