chore: reformat codebase

This commit is contained in:
Gabriel Arazas 2023-06-08 21:19:17 +08:00
parent 9d99235d94
commit 1bdda28ffe
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
7 changed files with 94 additions and 82 deletions

View File

@ -231,18 +231,22 @@ in
# We're using wg-quick here as this host is using network managers that can
# differ between workflows (i.e., GNOME and KDE Plasma using NetworkManager,
# others might be using systemd-networkd).
networking.wg-quick.interfaces.wireguard0 = let
networking.wg-quick.interfaces.wireguard0 =
let
domains = [
"~plover.foodogsquared.one"
"~0.27.172.in-addr.arpa"
];
in {
in
{
privateKeyFile = config.sops.secrets."ni/wireguard/private-key".path;
listenPort = wireguardPort;
dns = with interfaces.internal; [ IPv4.adress IPv6.address ];
postUp = let
postUp =
let
resolvectl = "${lib.getBin pkgs.systemd}/bin/resolvectl";
in ''
in
''
${resolvectl} domain %i ${lib.concatStringsSep " " domains}
'';

View File

@ -165,7 +165,8 @@ in
${replaceSecretBin} '#mailboxSecurityKey#' '${secretsPath "dns/${domain}/mailbox-security-key"}' '${domainZoneFile'}'
${replaceSecretBin} '#mailboxSecurityKeyRecord#' '${secretsPath "dns/${domain}/mailbox-security-key-record"}' '${domainZoneFile'}'
'';
serviceConfig.LoadCredential = let
serviceConfig.LoadCredential =
let
certDirectory = certs."${dnsDomainName}".directory;
in
[

View File

@ -137,7 +137,8 @@ in
# Gitea service module will have to set up certain things first which is
# why we have to go first.
preStart = let
preStart =
let
giteaBin = "${lib.getBin config.services.gitea.package}/bin/gitea";
giteaAdminUsername = lib.escapeShellArg "foodogsquared";
in

View File

@ -62,7 +62,8 @@ in
# Modifying it a little bit for per-user schema.
systemd.services.keycloak = {
preStart = let
preStart =
let
psqlBin = "${lib.getBin config.services.postgresql.package}/bin/psql";
in
lib.mkAfter ''

View File

@ -61,7 +61,7 @@ let
note of the commands used for each type as documented from
`config.home.mutableFile.<name>.type`.
'';
default = [];
default = [ ];
example = [ "--depth" "1" ];
};
};
@ -136,7 +136,8 @@ in
script = pkgs.writeShellScript "fetch-mutable-files" ''
${lib.concatStringsSep "\n" mutableFilesCmds}
'';
in builtins.toString script;
in
builtins.toString script;
};
Install.WantedBy = [ "default.target" ];

View File

@ -6,9 +6,11 @@
home-manager.url = "github:nix-community/home-manager";
};
outputs = { nixpkgs, home-manager, ... }: let
outputs = { nixpkgs, home-manager, ... }:
let
system = "x85_64-linux";
in {
in
{
nixosConfigurations.desktop = nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./hosts/desktop ];

View File

@ -354,12 +354,14 @@ in
};
systemd.user.services.fetch-mutable-files = {
Service.ExecStartPost = let
Service.ExecStartPost =
let
script = pkgs.writeShellScript "post-fetch-mutable-files" ''
# Automate installation of Doom Emacs.
${config.xdg.configHome}/emacs/bin/doom install --no-config --no-fonts --install --force
${config.xdg.configHome}/emacs/bin/doom sync
'';
in builtins.toString script;
in
builtins.toString script;
};
}