~misterio/nix-config

790760d347146a6eb091e3715736de9d3eb22cfa — Gabriel Fontes 2 months ago dc18bca
home/gpg: change socket location
2 files changed, 5 insertions(+), 5 deletions(-)

M home/misterio/cli/gpg.nix
M home/misterio/cli/ssh.nix
M home/misterio/cli/gpg.nix => home/misterio/cli/gpg.nix +3 -3
@@ 63,7 63,7 @@ in
    "/persist/home/misterio".directories = [ ".gnupg" ];
  };

  # Link /run/user/$UID/gnupg to ~/.gnupg/sockets
  # Link /run/user/$UID/gnupg to ~/.gnupg-sockets
  # So that SSH config does not have to know the UID
  systemd.user.services.link-gnupg-sockets = {
    Unit = {


@@ 71,8 71,8 @@ in
    };
    Service = {
      Type = "oneshot";
      ExecStart = "${pkgs.coreutils}/bin/ln -Tfs /run/user/%U/gnupg %h/.gnupg/sockets";
      ExecStop = "${pkgs.coreutils}/bin/rm $HOME/.gnupg/sockets";
      ExecStart = "${pkgs.coreutils}/bin/ln -Tfs /run/user/%U/gnupg %h/.gnupg-sockets";
      ExecStop = "${pkgs.coreutils}/bin/rm $HOME/.gnupg-sockets";
      RemainAfterExit = true;
    };
    Install.WantedBy = [ "default.target" ];

M home/misterio/cli/ssh.nix => home/misterio/cli/ssh.nix +2 -2
@@ 11,8 11,8 @@ in
        host = builtins.concatStringsSep " " hostnames;
        forwardAgent = true;
        remoteForwards = [{
          bind.address = ''/%d/.gnupg/sockets/S.gpg-agent'';
          host.address = ''/%d/.gnupg/sockets/S.gpg-agent.extra'';
          bind.address = ''/%d/.gnupg-sockets/S.gpg-agent'';
          host.address = ''/%d/.gnupg-sockets/S.gpg-agent.extra'';
        }];
      };
      trusted = lib.hm.dag.entryBefore [ "net" ] {