From e40f7d991353ad70984afdf67b25c049190c56bd Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Mon, 20 Feb 2023 02:05:59 +0300 Subject: 2023-02-20 --- modules/common/git.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'modules/common/git.nix') diff --git a/modules/common/git.nix b/modules/common/git.nix index 2a0554f..c3ebafc 100644 --- a/modules/common/git.nix +++ b/modules/common/git.nix @@ -1,6 +1,8 @@ { config, + inputs, lib, + localUsername ? lib.my.username, pkgs, ... }: @@ -11,6 +13,27 @@ in { mkEnableOption "Git client"; config = mkIf cfg.client.enable { + secrets = let + # HACK Darwin doesn't support XDG specifications. + configHome = "${config.my.home}/.config"; + in { + glab-cli-config = { + file = "${inputs.self}/secrets/glab-cli-config"; + path = "${configHome}/glab-cli/config.yml"; + owner = localUsername; + }; + gh-hosts = { + file = "${inputs.self}/secrets/gh-hosts"; + path = "${configHome}/gh/hosts.yml"; + owner = localUsername; + }; + hut = { + file = "${inputs.self}/secrets/hut"; + path = "${configHome}/hut/config"; + owner = localUsername; + }; + }; + hm = { home.packages = with pkgs; [glab hut]; -- cgit 1.4.1