chore: reformat codebase

This commit is contained in:
Gabriel Arazas 2023-10-09 20:48:01 +08:00
parent 7d55e45f70
commit 3ee04bb812
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
8 changed files with 79 additions and 68 deletions

View File

@ -273,13 +273,15 @@ in
# Set up the firewall. Take note the ports with the transport layer being
# accepted in Bind.
networking.firewall = let
networking.firewall =
let
ports = [
53 # DNS
853 # DNS-over-TLS/DNS-over-QUIC
dnsOverHTTPSPort
];
in {
in
{
allowedUDPPorts = ports;
allowedTCPPorts = ports;
};

View File

@ -117,7 +117,8 @@ in
# Setting up with secure schema usage pattern.
systemd.services.grafana = {
preStart = let
preStart =
let
grafanaDatabaseUser = config.services.grafana.settings.database.user;
psql = lib.getExe' config.services.postgresql.package "psql";
in
@ -128,13 +129,15 @@ in
'';
};
sops.secrets = let
sops.secrets =
let
grafanaFileAttributes = {
owner = config.users.users.grafana.name;
group = config.users.users.grafana.group;
mode = "0400";
};
in lib.getSecrets ../../secrets/secrets.yaml {
in
lib.getSecrets ../../secrets/secrets.yaml {
"grafana/database/password" = grafanaFileAttributes;
"grafana/users/admin/password" = grafanaFileAttributes;
};

View File

@ -80,18 +80,20 @@ in {
enable = true;
config = {
ytdl-format = "(webm,mkv,mp4)[height<=?1280]";
ytdl-raw-options-append = let
ytdl-raw-options-append =
let
options = {
yes-playlist = "";
};
options' = lib.mapAttrsToList (n: v: "${n}=${v}") options;
in lib.concatStringsSep "," options';
in
lib.concatStringsSep "," options';
ordered-chapters = true;
ab-loop-count = "inf";
chapter-seek-threshold = 15.0;
osc = false;
sub-auto = "fuzzy";
hwdec= "auto";
hwdec = "auto";
};
bindings = {

View File

@ -48,7 +48,8 @@ in
policies = {
AppAutoUpdate = false;
Containers.Default = let
Containers.Default =
let
mkContainer = name: color: icon: {
inherit name color icon;
};

View File

@ -3,10 +3,12 @@
let
cfg = config.programs.blender;
addons = let
addons =
let
blenderVersion = lib.versions.majorMinor cfg.package.version;
in
pkgs.runCommand "blender-system-resources" {
pkgs.runCommand "blender-system-resources"
{
passAsFile = [ "paths" ];
paths = cfg.addons ++ [ cfg.package ];
nativeBuildInputs = with pkgs; [ outils ];

View File

@ -64,7 +64,8 @@ let
settingsFile' = "/var/lib/vouch-proxy/${name}-config.yml";
in
lib.nameValuePair "vouch-proxy-${name}" {
preStart = if (settings != { } && settingsFile == null)
preStart =
if (settings != { } && settingsFile == null)
then ''
${pkgs.writeScript
"vouch-proxy-replace-secrets"