about summary refs log tree commit diff
path: root/modules/common/git.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-02-20 02:05:59 +0300
committerAzat Bahawi <azat@bahawi.net>2023-02-20 02:05:59 +0300
commite40f7d991353ad70984afdf67b25c049190c56bd (patch)
tree295a80114cca78952ed6ed562198d997b496faba /modules/common/git.nix
parent2023-02-19 (diff)
2023-02-20
Diffstat (limited to 'modules/common/git.nix')
-rw-r--r--modules/common/git.nix23
1 files changed, 23 insertions, 0 deletions
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];
 

Consider giving Nix/NixOS a try! <3