feat(home-manager): manage gpg.conf with configuration from upstream dotfile repository
This commit is contained in:
parent
20cc8bee1b
commit
e5aef16a97
@ -1,6 +1,7 @@
|
|||||||
{ lib, pkgs, ... }: {
|
{ lib, pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./git.nix
|
./git.nix
|
||||||
|
./gnupg.nix
|
||||||
];
|
];
|
||||||
home.stateVersion = "24.11";
|
home.stateVersion = "24.11";
|
||||||
services.darkman = {
|
services.darkman = {
|
||||||
|
24
users/transcaffeine/home-manager/gnupg.nix
Normal file
24
users/transcaffeine/home-manager/gnupg.nix
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{ lib, ... }: {
|
||||||
|
programs.gpg = let
|
||||||
|
repo = (builtins.fetchGit {
|
||||||
|
url = "https://git.finally.coffee/transcaffeine/dotfiles.git";
|
||||||
|
ref = "main";
|
||||||
|
shallow = true;
|
||||||
|
});
|
||||||
|
gpgconf = builtins.listToAttrs (
|
||||||
|
map (entry: {
|
||||||
|
name = toString (lib.sublist 0 1 (lib.splitString " " entry));
|
||||||
|
value = toString (lib.sublist 1 100 (lib.splitString " " entry));
|
||||||
|
}) (
|
||||||
|
builtins.filter (value: value != "") (
|
||||||
|
lib.splitString "\n" (
|
||||||
|
lib.readFile (repo.outPath + "/config/gnupg/gpg.conf")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
in {
|
||||||
|
enable = true;
|
||||||
|
settings = gpgconf;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user