diff --git a/modules/workstation/home-manager/default.nix b/modules/workstation/home-manager/default.nix index c92b3b3..007178d 100644 --- a/modules/workstation/home-manager/default.nix +++ b/modules/workstation/home-manager/default.nix @@ -24,7 +24,7 @@ in ./desktop ./development ./fish.nix - ./gpg.nix + ./ssh.nix ./communication.nix ./mail.nix ./helix.nix diff --git a/modules/workstation/home-manager/development/default.nix b/modules/workstation/home-manager/development/default.nix index 48b0473..d5f60d7 100644 --- a/modules/workstation/home-manager/development/default.nix +++ b/modules/workstation/home-manager/development/default.nix @@ -25,14 +25,15 @@ with lib; package = pkgs.gitAndTools.gitFull; userName = "Victor Mignot"; userEmail = "dala@dalaran.fr"; - signing = mkIf config.my.pgp.enable { - key = "BEAFED3D"; + signing = { + key = "~/.ssh/id_ed25519_sk.pub"; signByDefault = true; }; extraConfig = { init = { defaultBranch = "main"; }; + gpg.format = "ssh"; core = { editor = "${pkgs.helix}/bin/hx"; }; diff --git a/modules/workstation/home-manager/gpg.nix b/modules/workstation/home-manager/gpg.nix deleted file mode 100644 index 3555b7b..0000000 --- a/modules/workstation/home-manager/gpg.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; -{ - options.my.pgp.enable = mkOption { - type = types.bool; - default = true; - example = false; - description = '' - Add GPG keyring and GPG Agent configuration. - ''; - }; - - config = mkIf config.my.pgp.enable { - programs.gpg.enable = true; - - services.gpg-agent = { - enable = true; - enableScDaemon = true; - enableSshSupport = true; - sshKeys = [ "40DE2FEE4D3C5E2C" ]; - pinentryPackage = pkgs.pinentry-curses; - }; - }; -} diff --git a/modules/workstation/home-manager/ssh.nix b/modules/workstation/home-manager/ssh.nix new file mode 100644 index 0000000..e508894 --- /dev/null +++ b/modules/workstation/home-manager/ssh.nix @@ -0,0 +1,8 @@ +{ ... }: +{ + services.ssh-agent.enable = true; + programs.ssh = { + enable = true; + forwardAgent = true; + }; +}