Move gpg config to nix
This commit is contained in:
parent
850f5b40bc
commit
4ba1fc005b
2 changed files with 32 additions and 20 deletions
20
flake.nix
20
flake.nix
|
@ -91,12 +91,17 @@
|
||||||
nixFiles = builtins.filter (name: builtins.match ".*\\.nix" name != null) langFiles;
|
nixFiles = builtins.filter (name: builtins.match ".*\\.nix" name != null) langFiles;
|
||||||
configs = map (file: import (langDir + "/${file}") { inherit pkgs treefmt; }) nixFiles;
|
configs = map (file: import (langDir + "/${file}") { inherit pkgs treefmt; }) nixFiles;
|
||||||
helixLanguages = {
|
helixLanguages = {
|
||||||
language = map (cfg: cfg.helix.language) (
|
directory = ".helix";
|
||||||
(builtins.filter (cfg: builtins.hasAttr "language" cfg.helix) (
|
filename = "languages.toml";
|
||||||
builtins.filter (cfg: builtins.hasAttr "helix" cfg) configs
|
content = {
|
||||||
))
|
language = map (cfg: cfg.helix.language) (
|
||||||
);
|
(builtins.filter (cfg: builtins.hasAttr "language" cfg.helix) (
|
||||||
language-server = builtins.foldl' (acc: cfg: acc // (cfg.helix.language-server or { })) { } configs;
|
builtins.filter (cfg: builtins.hasAttr "helix" cfg) configs
|
||||||
|
))
|
||||||
|
);
|
||||||
|
language-server = builtins.foldl' (acc: cfg: acc // (cfg.helix.language-server or { })) { } configs;
|
||||||
|
};
|
||||||
|
file = tomlFormatter.generate "languages.toml" helixLanguages.content;
|
||||||
};
|
};
|
||||||
treefmtPrograms = builtins.foldl' (
|
treefmtPrograms = builtins.foldl' (
|
||||||
acc: cfg: deepMerge acc (cfg.treefmt.programs or { })
|
acc: cfg: deepMerge acc (cfg.treefmt.programs or { })
|
||||||
|
@ -117,7 +122,6 @@
|
||||||
acc: cfg: acc // (cfg.devshell.devshellStartup or { })
|
acc: cfg: acc // (cfg.devshell.devshellStartup or { })
|
||||||
) { } configs;
|
) { } configs;
|
||||||
};
|
};
|
||||||
helixLanguagesFile = tomlFormatter.generate "languages.toml" helixLanguages;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
_module.args.pkgs = pkgs;
|
_module.args.pkgs = pkgs;
|
||||||
|
@ -185,7 +189,7 @@
|
||||||
helix_config = {
|
helix_config = {
|
||||||
text = ''
|
text = ''
|
||||||
mkdir -p .helix
|
mkdir -p .helix
|
||||||
${pkgs.uutils-coreutils-noprefix}/bin/ln -fs ${helixLanguagesFile} ./.helix/languages.toml
|
${pkgs.uutils-coreutils-noprefix}/bin/ln -fs ${helixLanguages.file} ./${helixLanguages.directory}/${helixLanguages.filename}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
pre-commit.text = ''
|
pre-commit.text = ''
|
||||||
|
|
|
@ -189,18 +189,18 @@ in
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
# TODO: Disable Guix integration
|
# TODO: Disable Guix integration
|
||||||
# git = {
|
git = {
|
||||||
# enable = true;
|
enable = true;
|
||||||
# delta = {
|
delta = {
|
||||||
# enable = true;
|
enable = true;
|
||||||
# };
|
};
|
||||||
# signing = {
|
signing = {
|
||||||
# format = "openpgp";
|
format = "openpgp";
|
||||||
# signByDefault = true;
|
signByDefault = true;
|
||||||
# };
|
};
|
||||||
# userEmail = "contact@ethanreece.com";
|
userEmail = "contact@ethanreece.com";
|
||||||
# userName = "Ethan Reece";
|
userName = "Ethan Reece";
|
||||||
# };
|
};
|
||||||
gh = {
|
gh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -430,6 +430,14 @@ in
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
arrpc.enable = true;
|
arrpc.enable = true;
|
||||||
|
gpg-agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSshSupport = true;
|
||||||
|
pinentry = {
|
||||||
|
package = pkgs.pinentry-all;
|
||||||
|
program = "pinentry";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
targets.genericLinux.enable = true;
|
targets.genericLinux.enable = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue