mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 11:36:05 +01:00
gpg: add module
This commit is contained in:
parent
8991fe2e90
commit
0db26fc3ab
7 changed files with 114 additions and 0 deletions
|
|
@ -39,6 +39,7 @@ import nmt {
|
|||
// import ./modules/misc/fontconfig
|
||||
// import ./modules/programs/alacritty
|
||||
// import ./modules/programs/bash
|
||||
// import ./modules/programs/gpg
|
||||
// import ./modules/programs/ssh
|
||||
// import ./modules/programs/tmux
|
||||
// import ./modules/programs/zsh;
|
||||
|
|
|
|||
3
tests/modules/programs/gpg/default.nix
Normal file
3
tests/modules/programs/gpg/default.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
gpg-override-defaults = ./override-defaults.nix;
|
||||
}
|
||||
19
tests/modules/programs/gpg/override-defaults-expected.conf
Normal file
19
tests/modules/programs/gpg/override-defaults-expected.conf
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
cert-digest-algo SHA512
|
||||
charset utf-8
|
||||
default-preference-list SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed
|
||||
fixed-list-mode
|
||||
keyid-format 0xlong
|
||||
list-options show-uid-validity
|
||||
|
||||
no-emit-version
|
||||
no-symkey-cache
|
||||
personal-cipher-preferences AES256 AES192 AES
|
||||
personal-compress-preferences ZLIB BZIP2 ZIP Uncompressed
|
||||
personal-digest-preferences SHA512 SHA384 SHA256
|
||||
require-cross-certification
|
||||
s2k-cipher-algo AES128
|
||||
s2k-digest-algo SHA512
|
||||
throw-keyids
|
||||
use-agent
|
||||
verify-options show-uid-validity
|
||||
with-fingerprint
|
||||
21
tests/modules/programs/gpg/override-defaults.nix
Normal file
21
tests/modules/programs/gpg/override-defaults.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
no-comments = false;
|
||||
s2k-cipher-algo = "AES128";
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.gnupg/gpg.conf
|
||||
assertFileContent home-files/.gnupg/gpg.conf ${./override-defaults-expected.conf}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue