diff --git a/flake.nix b/flake.nix index a52a2f3..e91ad89 100644 --- a/flake.nix +++ b/flake.nix @@ -67,7 +67,7 @@ { # used with: `nix fmt` - formatter.${system} = pkgs.nixfmt-rfc-style; + formatter.${system} = pkgs.nixfmt-tree; nixosConfigurations = (import ./hosts inputs); diff --git a/hosts/collabora/default.nix b/hosts/collabora/default.nix index ca63ce6..3e9568e 100644 --- a/hosts/collabora/default.nix +++ b/hosts/collabora/default.nix @@ -27,4 +27,3 @@ in system.stateVersion = "25.11"; } - diff --git a/hosts/default.nix b/hosts/default.nix index c28df3b..7ddf705 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -74,7 +74,10 @@ let hostModule = cfg.module; unstable = cfg.unstable or false; extraModules = cfg.extraModules or [ ]; - specialArgs = { inherit authentik-nix; } // (cfg.specialArgs or { }); + specialArgs = { + inherit authentik-nix; + } + // (cfg.specialArgs or { }); } ) hostDefs; diff --git a/hosts/forgejo-runner/default.nix b/hosts/forgejo-runner/default.nix index bd928d7..ff954ef 100644 --- a/hosts/forgejo-runner/default.nix +++ b/hosts/forgejo-runner/default.nix @@ -61,4 +61,3 @@ in system.stateVersion = "25.11"; } - diff --git a/hosts/librenms/default.nix b/hosts/librenms/default.nix index f94eaac..9c3f07b 100644 --- a/hosts/librenms/default.nix +++ b/hosts/librenms/default.nix @@ -18,7 +18,10 @@ in enable = true; hostname = p.hosts.librenms; settings = { - "snmp.community" = [ "public" "homelab" ]; + "snmp.community" = [ + "public" + "homelab" + ]; }; }; diff --git a/modules/monitoring/prometheus.nix b/modules/monitoring/prometheus.nix index 5bc4575..978a2b7 100644 --- a/modules/monitoring/prometheus.nix +++ b/modules/monitoring/prometheus.nix @@ -74,7 +74,8 @@ in } ]; } - ] ++ cfg.extraScrapeConfigs; + ] + ++ cfg.extraScrapeConfigs; }; services.grafana = { diff --git a/modules/services/collabora-online.nix b/modules/services/collabora-online.nix index 928360c..412059b 100644 --- a/modules/services/collabora-online.nix +++ b/modules/services/collabora-online.nix @@ -55,24 +55,21 @@ in services.collabora-online = { enable = true; - settings = - { - net.listen = "0.0.0.0"; + settings = { + net.listen = "0.0.0.0"; - # terminate TLS at Caddy, NOT in coolwsd - ssl.enable = false; - ssl.termination = true; + # terminate TLS at Caddy, NOT in coolwsd + ssl.enable = false; + ssl.termination = true; - # allow WOPI (Nextcloud etc.) - storage.wopi."@allow" = true; - } - // lib.optionalAttrs (cfg.trustedDomains != [ ]) { - # Restrict which hosts may use WOPI (e.g. only your Nextcloud). - # Collabora expects regexes here, so escape dots. - storage.wopi.host = map - (d: builtins.replaceStrings [ "." ] [ "\\." ] d) - cfg.trustedDomains; - }; + # allow WOPI (Nextcloud etc.) + storage.wopi."@allow" = true; + } + // lib.optionalAttrs (cfg.trustedDomains != [ ]) { + # Restrict which hosts may use WOPI (e.g. only your Nextcloud). + # Collabora expects regexes here, so escape dots. + storage.wopi.host = map (d: builtins.replaceStrings [ "." ] [ "\\." ] d) cfg.trustedDomains; + }; }; networking.firewall.allowedTCPPorts = [ diff --git a/modules/services/forgejo-runner.nix b/modules/services/forgejo-runner.nix index d586da1..ef369e6 100644 --- a/modules/services/forgejo-runner.nix +++ b/modules/services/forgejo-runner.nix @@ -97,4 +97,3 @@ in }; } - diff --git a/modules/services/ilpost-addict.nix b/modules/services/ilpost-addict.nix index 21100bb..ac2ab62 100644 --- a/modules/services/ilpost-addict.nix +++ b/modules/services/ilpost-addict.nix @@ -16,10 +16,14 @@ let sha256 = "sha256-kL7tVHXZunqGFztbVx850QQ1U5h5wY1ltIONWXwe7QQ="; }; - phpPackage = pkgs.php.withExtensions ({ enabled, all }: enabled ++ [ - all.curl - all.dom - ]); + phpPackage = pkgs.php.withExtensions ( + { enabled, all }: + enabled + ++ [ + all.curl + all.dom + ] + ); in { @@ -51,7 +55,13 @@ in }; poolSettings = lib.mkOption { - type = with lib.types; attrsOf (oneOf [ str int bool ]); + type = + with lib.types; + attrsOf (oneOf [ + str + int + bool + ]); default = { "pm" = "dynamic"; "pm.max_children" = 8; @@ -133,11 +143,13 @@ in user = cfg.user; group = cfg.group; phpPackage = phpPackage; - settings = lib.mapAttrs (name: lib.mkDefault) { - "listen.owner" = config.services.caddy.user; - "listen.group" = config.services.caddy.group; - "chdir" = cfg.dataDir; - } // cfg.poolSettings; + settings = + lib.mapAttrs (name: lib.mkDefault) { + "listen.owner" = config.services.caddy.user; + "listen.group" = config.services.caddy.group; + "chdir" = cfg.dataDir; + } + // cfg.poolSettings; }; # Caddy configuration for serving PHP @@ -169,4 +181,3 @@ in }) ]; } - diff --git a/modules/services/n8n.nix b/modules/services/n8n.nix index 1115116..a38c786 100644 --- a/modules/services/n8n.nix +++ b/modules/services/n8n.nix @@ -67,7 +67,11 @@ in }; # Add npm/nodejs to n8n's PATH - systemd.services.n8n.path = [ pkgs.nodejs pkgs.gnutar pkgs.gzip ]; + systemd.services.n8n.path = [ + pkgs.nodejs + pkgs.gnutar + pkgs.gzip + ]; }) diff --git a/modules/services/nextcloud.nix b/modules/services/nextcloud.nix index ba8fe3e..a0c1331 100644 --- a/modules/services/nextcloud.nix +++ b/modules/services/nextcloud.nix @@ -68,7 +68,7 @@ in package = pkgs.nextcloud32; hostName = "cloud.${cfg.proxy.domain}"; https = true; - + secretFile = cfg.secretFile; settings = { diff --git a/modules/services/rutorrent.nix b/modules/services/rutorrent.nix index 9f1908a..b798720 100644 --- a/modules/services/rutorrent.nix +++ b/modules/services/rutorrent.nix @@ -263,9 +263,9 @@ in cp -r ${rutorrentPkgs}/php ${cfg.dataDir}/ ${optionalString (cfg.plugins != [ ]) - ''cp -r ${ + "cp -r ${ concatMapStringsSep " " (p: "${rutorrentPkgs}/plugins/${p}") cfg.plugins - } ${cfg.dataDir}/plugins/'' + } ${cfg.dataDir}/plugins/" } chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir}/{conf,share,logs,plugins}