Zander Hawke пре 1 година
родитељ
комит
9393507c81
4 измењених фајлова са 35 додато и 3 уклоњено
  1. 6 3
      flake.nix
  2. 12 0
      users/thomas/cli/gnupg.nix
  3. 10 0
      users/thomas/cli/ssh.nix
  4. 7 0
      users/thomas/modgud/default.nix

+ 6 - 3
flake.nix

@@ -33,7 +33,7 @@
         in {
 
           homeConfigurations = {
-            thomas = home-manager.lib.homeManagerConfiguration {
+            "thomas@meili" = home-manager.lib.homeManagerConfiguration {
               inherit pkgs;
               extraSpecialArgs = { inherit inputs; inherit outputs; };
               modules = [
@@ -43,10 +43,13 @@
               ];
             };
 
-            thomas-slim = home-manager.lib.homeManagerConfiguration {
+            "thomas@modgud" = home-manager.lib.homeManagerConfiguration {
               inherit pkgs;
               extraSpecialArgs = { inherit inputs; inherit outputs; };
-              modules = [ ./users/thomas ];
+              modules = [
+                ./users/thomas
+                ./users/thomas/modgud
+              ];
             };
           };
 

+ 12 - 0
users/thomas/cli/gnupg.nix

@@ -19,4 +19,16 @@ in
       trust = 5;
     }];
   };
+
+  services.gpg-agent = {
+    enable = true;
+    defaultCacheTtl = 600;
+    maxCacheTtl = 7200;
+    enableExtraSocket = true;
+    enableSshSupport = true;
+    extraConfig = ''
+      keep-tty
+      keep-display
+    '';
+  };
 }

+ 10 - 0
users/thomas/cli/ssh.nix

@@ -20,6 +20,16 @@ in
       modgud = {
         hostname = "modgud.t5.st";
         user = "thomas";
+        remoteForwards = [
+          {
+            host.address = "/Users/thomas/.config/gnupg/S.gpg-agent.extra";
+            bind.address = "/run/user/1000/gnupg/d.o6jzqfigwppq1eps4nhng6n5/S.gpg-agent";
+          }
+          {
+            host.address = "/Users/thomas/.config/gnupg/S.gpg-agent.ssh";
+            bind.address = "/run/user/1000/gnupg/d.o6jzqfigwppq1eps4nhng6n5/S.gpg-agent.ssh";
+          }
+        ];
       };
 
       "github.com".user = "git";

+ 7 - 0
users/thomas/modgud/default.nix

@@ -0,0 +1,7 @@
+{
+  home.sessionVariables = {
+    SSH_AUTH_SOCK = "/run/user/1000/gnupg/d.o6jzqfigwppq1eps4nhng6n5/S.gpg-agent.ssh";
+  };
+
+  services.gpg-agent.enable = false;
+}