From 21ed969ab75c82b195a61210418ef76ef48c73aa Mon Sep 17 00:00:00 2001 From: arcnmx Date: Sun, 24 Nov 2024 15:42:39 -0800 Subject: [PATCH] chore: nf-fmt-nix --- modules/nixos/gatus.nix | 56 ++++++++++++++++++-------------- modules/nixos/home-assistant.nix | 8 +++-- modules/nixos/nginx/vouch.nix | 5 +-- nixos/backups/restic.nix | 6 ++-- nixos/monitoring/gatus.nix | 9 ++--- nixos/unifi.nix | 3 +- nixos/users/kat.nix | 2 +- 7 files changed, 52 insertions(+), 37 deletions(-) diff --git a/modules/nixos/gatus.nix b/modules/nixos/gatus.nix index a714a882..64d57e4d 100644 --- a/modules/nixos/gatus.nix +++ b/modules/nixos/gatus.nix @@ -11,7 +11,11 @@ inherit (lib) types; cfg = config.services.gatus; - endpointModule = {name, lib, ...}: let + endpointModule = { + name, + lib, + ... + }: let inherit (lib) types; inherit (lib.options) mkOption mkEnableOption; inherit (lib.modules) mkOptionDefault; @@ -201,34 +205,37 @@ }; in { options.services.gatus = let - settingsModule = { ... }: { + settingsModule = {...}: { options = with types; { - /*endpoints = mkOption { + /* + endpoints = mkOption { type = listOf unspecified; #type = attrsOf (submodule endpointModule); #default = {}; - };*/ + }; + */ }; }; - in with types; { - hardening = { - enable = mkEnableOption "sandbox and harden service"; - icmp.enable = mkEnableOption "needed for ICMP probes"; - }; - user = mkOption { - type = nullOr str; - default = null; - }; + in + with types; { + hardening = { + enable = mkEnableOption "sandbox and harden service"; + icmp.enable = mkEnableOption "needed for ICMP probes"; + }; + user = mkOption { + type = nullOr str; + default = null; + }; - endpoints = mkOption { - type = attrsOf (submodule endpointModule); - default = {}; - }; + endpoints = mkOption { + type = attrsOf (submodule endpointModule); + default = {}; + }; - settings = mkOption { - type = submodule settingsModule; + settings = mkOption { + type = submodule settingsModule; + }; }; - }; config = let conf.assertions = let @@ -278,8 +285,9 @@ in { RestrictSUIDSGID = true; UMask = "0077"; }; - in mkMerge [ - (mkIf cfg.enable conf) - serviceConf - ]; + in + mkMerge [ + (mkIf cfg.enable conf) + serviceConf + ]; } diff --git a/modules/nixos/home-assistant.nix b/modules/nixos/home-assistant.nix index 62bd7569..9c3406ec 100644 --- a/modules/nixos/home-assistant.nix +++ b/modules/nixos/home-assistant.nix @@ -242,9 +242,11 @@ in { ]); }); env-canada = super.env-canada.overridePythonAttrs (old: { - dependencies = old.dependencies ++ [ - self.defusedxml - ]; + dependencies = + old.dependencies + ++ [ + self.defusedxml + ]; }); }; }; diff --git a/modules/nixos/nginx/vouch.nix b/modules/nixos/nginx/vouch.nix index d7a8028f..e0a50657 100644 --- a/modules/nixos/nginx/vouch.nix +++ b/modules/nixos/nginx/vouch.nix @@ -202,13 +202,14 @@ vouch.requireAuth = mkAlmostOptionDefault true; }; ${cfg.auth.errorLocation} = let - errorLocation = { xvars, ... }: let + errorLocation = {xvars, ...}: let loginUrl = "$vouch_url/login?url=${xvars.get.scheme}://${xvars.get.host}$request_uri&X-Vouch-Token=$auth_resp_jwt&error=$auth_resp_err"; in { xvars.enable = true; return = mkDefault "303 '${loginUrl}'"; }; - in mkIf (cfg.auth.errorLocation != null) errorLocation; + in + mkIf (cfg.auth.errorLocation != null) errorLocation; ${cfg.auth.requestLocation} = { config, xvars, diff --git a/nixos/backups/restic.nix b/nixos/backups/restic.nix index 77ef5103..b442013e 100644 --- a/nixos/backups/restic.nix +++ b/nixos/backups/restic.nix @@ -18,11 +18,13 @@ grocy.config = config.services.grocy; barcodebuddy.config = config.services.barcodebuddy; # XXX: kanidm currently unused - /*kanidm = { + /* + kanidm = { config = config.services.kanidm; enable = config.services.kanidm.enableServer; subpath = "kanidm/kanidm.db"; - };*/ + }; + */ mosquitto.config = config.services.mosquitto; plex = { config = config.services.plex; diff --git a/nixos/monitoring/gatus.nix b/nixos/monitoring/gatus.nix index 0ca2f7cd..f35e150c 100644 --- a/nixos/monitoring/gatus.nix +++ b/nixos/monitoring/gatus.nix @@ -210,10 +210,11 @@ in { name = "Gatus Logs"; link = "${grafana.link}/d/ae4jrpnh74ohsa/gatus"; }; - in mkMerge [ - [grafana prometheus] - (mkAfter [gatusLogs]) - ]; + in + mkMerge [ + [grafana prometheus] + (mkAfter [gatusLogs]) + ]; # Prometheus metrics...! metrics = true; diff --git a/nixos/unifi.nix b/nixos/unifi.nix index 5c32d17a..975b1b9d 100644 --- a/nixos/unifi.nix +++ b/nixos/unifi.nix @@ -17,7 +17,8 @@ in { nixpkgs = import gensokyo-zone.inputs.nixpkgs-2405 { inherit (pkgs) system config; }; - in mkDefault nixpkgs.mongodb-5_0; + in + mkDefault nixpkgs.mongodb-5_0; }; networking.firewall = mkIf cfg.enable { diff --git a/nixos/users/kat.nix b/nixos/users/kat.nix index 40808a39..da745b7c 100644 --- a/nixos/users/kat.nix +++ b/nixos/users/kat.nix @@ -18,7 +18,7 @@ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII74JrgGsDQ6r7tD7+k3ykxXV7DpeeFRscPMxrBsDPhz kat@goliath" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDkeBFF4xxZgeURLzNHcvUFxImmkQ3pxXtpj3mtSyHXB kat@koishi" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIC3RkyoQ74bb4NGv1H1bZAz5ROO0Zr6FT8TYpowgGUp kat@chen" - ]; + ]; }; users.groups.kat = {name, ...}: { gid = config.users.users.${name}.uid;