diff --git a/profiles/base-user/.config/git/config.nix b/profiles/base-user/.config/git/config.nix index 38c618c3..ffe61794 100644 --- a/profiles/base-user/.config/git/config.nix +++ b/profiles/base-user/.config/git/config.nix @@ -23,6 +23,7 @@ in [commit] gpgsign = true + template = ${xdg.configHome}/git/gitmessage [tag] gpgsign = true [init] diff --git a/profiles/base-user/.config/git/gitmessage.nix b/profiles/base-user/.config/git/gitmessage.nix new file mode 100644 index 00000000..7f4b1c64 --- /dev/null +++ b/profiles/base-user/.config/git/gitmessage.nix @@ -0,0 +1,32 @@ +{ config, pkgs, ... }: +let + user = config.pub-solar.user; + xdg = config.home-manager.users."${user.name}".xdg; +in +'' +# Title: Summary, imperative, start upper case, don't end with a period +# No more than 50 chars. #### 50 chars is here: # +# + + +# ^ Remember ending with an extra blank line +# Body: Explain *what* and *why* (not *how*). Include issue number. +# Wrap at 72 chars. ################################## which is here: # +# + + +# ^ Remember ending with an extra blank line +# At the end: Include Co-authored-by for all contributors. +# +Co-authored-by: ${user.fullName} <${user.email}> + +# Please enter the commit message for your changes. Lines starting +# with '#' will be ignored, and an empty message aborts the commit. +# +# On branch master +# Your branch is up to date with 'origin/main'. +# +# Changes to be committed: +# new file: installation.md +# +'' diff --git a/profiles/base-user/default.nix b/profiles/base-user/default.nix index 44089bec..79fb120a 100644 --- a/profiles/base-user/default.nix +++ b/profiles/base-user/default.nix @@ -19,7 +19,7 @@ in extraGroups = [ "wheel" "docker" "input" "audio" "video" "networkmanager" "lp" "scanner" ]; initialHashedPassword = if psCfg.user.password != null then psCfg.user.password else ""; shell = pkgs.zsh; - openssh.authorizedKeys.keyFiles = if psCfg.user.publicKeys != null then psCfg.user.publicKeys else []; + openssh.authorizedKeys.keyFiles = if psCfg.user.publicKeys != null then psCfg.user.publicKeys else [ ]; }; }; } diff --git a/profiles/base-user/home.nix b/profiles/base-user/home.nix index 87db37dd..c1a999f1 100644 --- a/profiles/base-user/home.nix +++ b/profiles/base-user/home.nix @@ -42,6 +42,7 @@ in xdg.mimeApps = import ./mimeapps.nix; xdg.configFile."git/config".text = import ./.config/git/config.nix { inherit config; inherit pkgs; }; + xdg.configFile."git/gitmessage".text = import ./.config/git/gitmessage.nix { inherit config; inherit pkgs; }; xdg.configFile."git/global_gitignore".text = import ./.config/git/global_gitignore.nix { inherit config; inherit pkgs; }; xdg.configFile."dircolors".source = ./.config/dircolors; xdg.configFile."xmodmap".source = ./.config/xmodmap;