chore: reformat codebase

This commit is contained in:
Gabriel Arazas 2023-01-07 16:06:34 +08:00
parent d9e7f7c67e
commit 4c34a87366
7 changed files with 88 additions and 77 deletions

View File

@ -340,9 +340,12 @@
networking.hostName = lib.mkOverride 2000 host';
})
(lib'.optionalAttrs (lib'.hasAttr host' images)
(let
(
let
imageFormat = images.${host'}.format;
in inputs.nixos-generators.nixosModules.${imageFormat}))
in
inputs.nixos-generators.nixosModules.${imageFormat}
))
hostSharedConfig
path
];
@ -388,7 +391,8 @@
# My custom packages, available in here as well. Though, I mainly support
# "x86_64-linux". I just want to try out supporting other systems.
packages = forAllSystems (system: let
packages = forAllSystems (system:
let
pkgs = import nixpkgs { inherit system overlays; };
in
inputs.flake-utils.lib.flattenTree (import ./pkgs { inherit pkgs; })
@ -445,7 +449,8 @@
# sensitive info such as the hostname and such. A helpful tip would be
# ignoring the shell entry by simply prefixing it with a space which most
# command-line shells have support for (e.g., Bash, zsh, fish).
deploy.nodes = let
deploy.nodes =
let
nixosConfigurations = lib'.mapAttrs'
(name: value:
lib'.nameValuePair "nixos-${name}" {
@ -469,7 +474,8 @@
};
})
self.homeManagerConfigurations;
in nixosConfigurations // homeManagerConfigurations;
in
nixosConfigurations // homeManagerConfigurations;
# How to make yourself slightly saner than before. So far the main checks
# are for deploy nodes.

View File

@ -27,7 +27,8 @@
type = "ed25519";
}];
sops.secrets = let
sops.secrets =
let
getKey = key: {
inherit key;
sopsFile = ./secrets/secrets.yaml;

View File

@ -220,7 +220,8 @@ in
CREATE SCHEMA AUTHORIZATION ${user.name};
'')
config.services.postgresql.ensureUsers;
in pkgs.writeText "plover-initial-postgresql-script" ''
in
pkgs.writeText "plover-initial-postgresql-script" ''
${lib.concatStringsSep "\n" perUserSchemas}
'';
@ -554,10 +555,12 @@ in
IdentityFile ${config.sops.secrets."plover/borg/ssh-key".path}
'';
systemd.tmpfiles.rules = let
systemd.tmpfiles.rules =
let
# To be used similarly to $GITEA_CUSTOM variable.
giteaCustomDir = "${config.services.gitea.stateDir}/custom";
in [
in
[
"L+ ${giteaCustomDir}/templates/home.tmpl - - - - ${./files/gitea/home.tmpl}"
"L+ ${giteaCustomDir}/public/img/logo.svg - - - - ${./files/gitea/logo.svg}"
"L+ ${giteaCustomDir}/public/img/logo.png - - - - ${./files/gitea/logo.png}"

View File

@ -126,7 +126,8 @@ in
withDependencies = true;
webserver.enable = true;
jobs = mkJobs {
jobs = mkJobs
{
db = lib.importJSON ./data/jobs.archivebox.json;
} // {
computer = {

View File

@ -170,7 +170,9 @@ class Outline(object):
if not category:
continue
category_hierarchy = filter(lambda split: split.strip(), category.split("/"))
category_hierarchy = filter(
lambda split: split.strip(), category.split("/")
)
first_category_split = first(None, category_hierarchy)
if first_category_split is None:
continue
@ -231,10 +233,7 @@ def create_jobs_from_outline(root_outline: Outline, categories=[]):
for subscription in outline.subscriptions:
# There are some things that are meant not to be shown (i.e.,
# `categories`) so we're putting it in a data template.
subscription_data = {
"name": subscription.name,
"url": subscription.url
}
subscription_data = {"name": subscription.name, "url": subscription.url}
if subscription.description:
subscription_data["description"] = subscription.description

View File

@ -26,7 +26,8 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = with qt5; [
autoreconfHook pkg-config
autoreconfHook
pkg-config
wrapQtAppsHook
qtbase
qtwebchannel