chore: nf-fmt-nix

This commit is contained in:
arcnmx 2024-11-24 15:42:39 -08:00
parent 179ac7ac55
commit 21ed969ab7
7 changed files with 52 additions and 37 deletions

View file

@ -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,16 +205,19 @@
};
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; {
in
with types; {
hardening = {
enable = mkEnableOption "sandbox and harden service";
icmp.enable = mkEnableOption "needed for ICMP probes";
@ -278,7 +285,8 @@ in {
RestrictSUIDSGID = true;
UMask = "0077";
};
in mkMerge [
in
mkMerge [
(mkIf cfg.enable conf)
serviceConf
];

View file

@ -242,7 +242,9 @@ in {
]);
});
env-canada = super.env-canada.overridePythonAttrs (old: {
dependencies = old.dependencies ++ [
dependencies =
old.dependencies
++ [
self.defusedxml
];
});

View file

@ -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,

View file

@ -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;

View file

@ -210,7 +210,8 @@ in {
name = "Gatus Logs";
link = "${grafana.link}/d/ae4jrpnh74ohsa/gatus";
};
in mkMerge [
in
mkMerge [
[grafana prometheus]
(mkAfter [gatusLogs])
];

View file

@ -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 {