chore: reformat codebase

This commit is contained in:
Gabriel Arazas 2023-06-29 14:17:38 +08:00
parent 52b66fa47d
commit 53f7cf6e83
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
5 changed files with 55 additions and 48 deletions

View File

@ -33,9 +33,11 @@ in
${lib.concatStringsSep "\n" perUserSchemas} ${lib.concatStringsSep "\n" perUserSchemas}
''; '';
settings = let settings =
let
credsDir = path: "/run/credentials/postgresql.service/${path}"; credsDir = path: "/run/credentials/postgresql.service/${path}";
in { in
{
# Still doing the secure schema usage pattern. # Still doing the secure schema usage pattern.
search_path = "\"$user\""; search_path = "\"$user\"";
@ -58,7 +60,8 @@ in
# Setting this up for TLS. # Setting this up for TLS.
systemd.services.postgresql = { systemd.services.postgresql = {
requires = [ "acme-finished-${postgresqlDomain}.target" ]; requires = [ "acme-finished-${postgresqlDomain}.target" ];
serviceConfig.LoadCredential = let serviceConfig.LoadCredential =
let
certDirectory = config.security.acme.certs."${postgresqlDomain}".directory; certDirectory = config.security.acme.certs."${postgresqlDomain}".directory;
certCredentialPath = path: "${path}:${certDirectory}/${path}"; certCredentialPath = path: "${path}:${certDirectory}/${path}";
in in

View File

@ -16,14 +16,16 @@ in
{ {
environment.systemPackages = [ pkgs.wireguard-tools ]; environment.systemPackages = [ pkgs.wireguard-tools ];
sops.secrets = let sops.secrets =
let
getKey = key: { getKey = key: {
inherit key; inherit key;
sopsFile = ../../secrets/secrets.yaml; sopsFile = ../../secrets/secrets.yaml;
}; };
getSecrets = secrets: getSecrets = secrets:
(lib.mapAttrs' (name: config: (lib.mapAttrs'
(name: config:
lib.nameValuePair lib.nameValuePair
"plover/${name}" "plover/${name}"
((getKey name) // config)) ((getKey name) // config))

View File

@ -46,9 +46,11 @@ in {
}; };
# A fuzzy finder that enables fuzzy finding not furry finding, a common misconception. # A fuzzy finder that enables fuzzy finding not furry finding, a common misconception.
programs.fzf = let programs.fzf =
let
fd = "${lib.getBin pkgs.fd}/bin/fd"; fd = "${lib.getBin pkgs.fd}/bin/fd";
in { in
{
enable = true; enable = true;
changeDirWidgetCommand = "${fd} --type d"; changeDirWidgetCommand = "${fd} --type d";
defaultCommand = "${fd} --type f"; defaultCommand = "${fd} --type f";