feat: gpg signing in homelab

This commit is contained in:
Gustavo "Guz" L. de Mello
2024-04-10 17:27:15 -03:00
parent c51e185615
commit 61368b409a
2 changed files with 28 additions and 21 deletions

View File

@@ -18,6 +18,14 @@
profiles.locale.enable = true;
programs.gnupg.agent = {
enable = true;
pinentryPackage = pkgs.pinentry-tty;
settings = {
default-cache-ttl = 3600 * 24;
};
};
home-manager-helper.enable = true;
home-manager-helper.users."guz" = {
name = "guz";

View File

@@ -1,9 +1,9 @@
{ config
, lib
, pkgs
, ...
}:
let
{
config,
lib,
pkgs,
...
}: let
cfg = config.programs.nih;
cli = pkgs.writeShellScriptBin "nih" ''
# Since alias= doesn't work in bash scripts
@@ -26,23 +26,22 @@ let
${builtins.readFile ./cli.sh}
'';
in
{
imports = [ ];
in {
imports = [];
options.programs.nih = with lib;
with lib.types; {
enable = mkEnableOption "";
host = mkOption {
type = str;
};
flakeDir = mkOption {
type = str;
};
cli = mkOption {
type = bool;
default = cfg.enable;
};
with lib.types; {
enable = mkEnableOption "";
host = mkOption {
type = str;
};
flakeDir = mkOption {
type = str;
};
cli = mkOption {
type = bool;
default = cfg.enable;
};
};
config = with lib;
mkIf cfg.enable {
environment.systemPackages = [