From 96be934cde1b34aab729af91530d24b53422b214 Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Tue, 18 Jul 2023 23:58:42 +0300 Subject: [PATCH] Mosh and some gpg stuff --- home/features/cli/gpg.nix | 30 +++++++++++++++++++++++ home/features/cli/ssh.nix | 7 +++++- home/features/desktop/wezterm/default.nix | 5 ++-- 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/home/features/cli/gpg.nix b/home/features/cli/gpg.nix index e69de29..677c39d 100644 --- a/home/features/cli/gpg.nix +++ b/home/features/cli/gpg.nix @@ -0,0 +1,30 @@ +{ pkgs, config, ... }: +let + pinentry = + if config.gtk.enable then { + packages = [ pkgs.pinentry-gnome pkgs.gcr ]; + name = "gnome3"; + } else { + packages = [ pkgs.pinentry-curses ]; + name = "curses"; + }; +in +{ + home.packages = pinentry.packages; + + # TODO: consider ssh support + services.gpg-agent = { + enable = true; + pinentryFlavor = pinentry.name; + }; + + programs.gpg = { + enable = true; + settings = { + trust-model = "tofu+pgp"; + }; + # publicKeys = [{ + # trust = 5; + # }]; + }; +} diff --git a/home/features/cli/ssh.nix b/home/features/cli/ssh.nix index 2624ddd..b144b07 100644 --- a/home/features/cli/ssh.nix +++ b/home/features/cli/ssh.nix @@ -1,6 +1,11 @@ -{ ... }: { +{ pkgs, ... }: { programs.ssh.enable = true; + home.packages = with pkgs; [ + mosh # SSH replacement for slow connections + ]; + + # TODO: persistence # home.persistence = { # "/persist/home/adrielus".directories = [ ".ssh" ]; # }; diff --git a/home/features/desktop/wezterm/default.nix b/home/features/desktop/wezterm/default.nix index f17edf6..b1251ff 100644 --- a/home/features/desktop/wezterm/default.nix +++ b/home/features/desktop/wezterm/default.nix @@ -1,5 +1,6 @@ -{ pkgs, config, ... }: { - home.packages = [ pkgs.wezterm ]; +{ upkgs, config, ... }: { + # REASON: newer version + home.packages = [ upkgs.wezterm ]; # Create link to config xdg.configFile."wezterm/colorscheme.lua".text = config.satellite.colorscheme.lua;