From dae3149a93cab4d1140526e15eb928d275f56128 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Fri, 7 Apr 2023 19:35:15 +0300 Subject: 2023-04-07 --- modules/common/common/nix/default.nix | 2 +- modules/common/profiles/email.nix | 22 +++++++++++++++++++--- modules/common/subversion.nix | 2 +- 3 files changed, 21 insertions(+), 5 deletions(-) (limited to 'modules/common') diff --git a/modules/common/common/nix/default.nix b/modules/common/common/nix/default.nix index c06296d..dc73d68 100644 --- a/modules/common/common/nix/default.nix +++ b/modules/common/common/nix/default.nix @@ -99,7 +99,7 @@ with lib; { patches = [./patches/alejandra-no-ads.patch]; }); - inherit (pkgsPR "224461" "sha256-5+GjqIYkHXfOFRFOZUiy+/OJ0USHrDp5vJebv3XErbw=") ntfy-sh; + inherit (pkgsPR "225109" "sha256-aLQcBwo2y92bn/nugidJtFCCEdkNOkSsTeoZ5B2Qt1c=") libvlc; } // (with super; let np = nodePackages; diff --git a/modules/common/profiles/email.nix b/modules/common/profiles/email.nix index e289c2e..9cc12d7 100644 --- a/modules/common/profiles/email.nix +++ b/modules/common/profiles/email.nix @@ -39,7 +39,18 @@ in { attrs ]; - pass = path: "${config.hm.programs.password-store.package}/bin/pass show ${path}"; + getPassword = { + path, + line ? 0, + }: + assert (builtins.isInt line); + concatStringsSep " " ( + [ + "${config.hm.programs.password-store.package}/bin/pass show ${path}" + ] + ++ optional (line > 0) + "| ${pkgs.gnused}/bin/sed -e '${toString line}!d'" + ); in rec { shire = mkAccount rec { address = my.email; @@ -64,7 +75,9 @@ in { tls.enable = true; }; userName = "azahi@shire.net"; - passwordCommand = pass "email/shire.net/azahi"; + passwordCommand = getPassword { + path = "email/shire.net/azahi"; + }; }; yahoo = mkAccount rec { @@ -74,7 +87,10 @@ in { flavor = "yahoo.com"; userName = "admin@yahoo.com"; - passwordCommand = pass "email/yahoo.com/admin"; + passwordCommand = getPassword { + path = "email/yahoo.com/admin"; + line = 2; + }; }; }; }; diff --git a/modules/common/subversion.nix b/modules/common/subversion.nix index 077f449..40ea07d 100644 --- a/modules/common/subversion.nix +++ b/modules/common/subversion.nix @@ -46,7 +46,7 @@ in { }; }; - packages = with pkgs; [(subversionClient.override {saslSupport = true;})]; + packages = [(pkgs.subversionClient.override {saslSupport = true;})]; }; }; } -- cgit v1.2.3