add gpg option to home-manager module
This commit is contained in:
parent
164a1cc64f
commit
f778bcb397
5 changed files with 67 additions and 1 deletions
36
home/modules/gpg/default.nix
Normal file
36
home/modules/gpg/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.gpg = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = ''
|
||||
whether enable gpg
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
config =
|
||||
let
|
||||
cfg = config.youthlic.programs.gpg;
|
||||
in
|
||||
lib.mkIf cfg.enable {
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
};
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
mutableKeys = true;
|
||||
mutableTrust = true;
|
||||
publicKeys = [
|
||||
{
|
||||
source = ./public-key.txt;
|
||||
trust = "ultimate";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue