This commit is contained in:
pazpi 2026-02-15 23:20:36 +01:00
parent e641c5b9b4
commit 256689e389
No known key found for this signature in database
12 changed files with 54 additions and 38 deletions

View file

@ -67,7 +67,7 @@
{ {
# used with: `nix fmt` # used with: `nix fmt`
formatter.${system} = pkgs.nixfmt-rfc-style; formatter.${system} = pkgs.nixfmt-tree;
nixosConfigurations = (import ./hosts inputs); nixosConfigurations = (import ./hosts inputs);

View file

@ -27,4 +27,3 @@ in
system.stateVersion = "25.11"; system.stateVersion = "25.11";
} }

View file

@ -74,7 +74,10 @@ let
hostModule = cfg.module; hostModule = cfg.module;
unstable = cfg.unstable or false; unstable = cfg.unstable or false;
extraModules = cfg.extraModules or [ ]; extraModules = cfg.extraModules or [ ];
specialArgs = { inherit authentik-nix; } // (cfg.specialArgs or { }); specialArgs = {
inherit authentik-nix;
}
// (cfg.specialArgs or { });
} }
) hostDefs; ) hostDefs;

View file

@ -61,4 +61,3 @@ in
system.stateVersion = "25.11"; system.stateVersion = "25.11";
} }

View file

@ -18,7 +18,10 @@ in
enable = true; enable = true;
hostname = p.hosts.librenms; hostname = p.hosts.librenms;
settings = { settings = {
"snmp.community" = [ "public" "homelab" ]; "snmp.community" = [
"public"
"homelab"
];
}; };
}; };

View file

@ -74,7 +74,8 @@ in
} }
]; ];
} }
] ++ cfg.extraScrapeConfigs; ]
++ cfg.extraScrapeConfigs;
}; };
services.grafana = { services.grafana = {

View file

@ -55,8 +55,7 @@ in
services.collabora-online = { services.collabora-online = {
enable = true; enable = true;
settings = settings = {
{
net.listen = "0.0.0.0"; net.listen = "0.0.0.0";
# terminate TLS at Caddy, NOT in coolwsd # terminate TLS at Caddy, NOT in coolwsd
@ -69,9 +68,7 @@ in
// lib.optionalAttrs (cfg.trustedDomains != [ ]) { // lib.optionalAttrs (cfg.trustedDomains != [ ]) {
# Restrict which hosts may use WOPI (e.g. only your Nextcloud). # Restrict which hosts may use WOPI (e.g. only your Nextcloud).
# Collabora expects regexes here, so escape dots. # Collabora expects regexes here, so escape dots.
storage.wopi.host = map storage.wopi.host = map (d: builtins.replaceStrings [ "." ] [ "\\." ] d) cfg.trustedDomains;
(d: builtins.replaceStrings [ "." ] [ "\\." ] d)
cfg.trustedDomains;
}; };
}; };

View file

@ -97,4 +97,3 @@ in
}; };
} }

View file

@ -16,10 +16,14 @@ let
sha256 = "sha256-kL7tVHXZunqGFztbVx850QQ1U5h5wY1ltIONWXwe7QQ="; sha256 = "sha256-kL7tVHXZunqGFztbVx850QQ1U5h5wY1ltIONWXwe7QQ=";
}; };
phpPackage = pkgs.php.withExtensions ({ enabled, all }: enabled ++ [ phpPackage = pkgs.php.withExtensions (
{ enabled, all }:
enabled
++ [
all.curl all.curl
all.dom all.dom
]); ]
);
in in
{ {
@ -51,7 +55,13 @@ in
}; };
poolSettings = lib.mkOption { poolSettings = lib.mkOption {
type = with lib.types; attrsOf (oneOf [ str int bool ]); type =
with lib.types;
attrsOf (oneOf [
str
int
bool
]);
default = { default = {
"pm" = "dynamic"; "pm" = "dynamic";
"pm.max_children" = 8; "pm.max_children" = 8;
@ -133,11 +143,13 @@ in
user = cfg.user; user = cfg.user;
group = cfg.group; group = cfg.group;
phpPackage = phpPackage; phpPackage = phpPackage;
settings = lib.mapAttrs (name: lib.mkDefault) { settings =
lib.mapAttrs (name: lib.mkDefault) {
"listen.owner" = config.services.caddy.user; "listen.owner" = config.services.caddy.user;
"listen.group" = config.services.caddy.group; "listen.group" = config.services.caddy.group;
"chdir" = cfg.dataDir; "chdir" = cfg.dataDir;
} // cfg.poolSettings; }
// cfg.poolSettings;
}; };
# Caddy configuration for serving PHP # Caddy configuration for serving PHP
@ -169,4 +181,3 @@ in
}) })
]; ];
} }

View file

@ -67,7 +67,11 @@ in
}; };
# Add npm/nodejs to n8n's PATH # 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
];
}) })

View file

@ -263,9 +263,9 @@ in
cp -r ${rutorrentPkgs}/php ${cfg.dataDir}/ cp -r ${rutorrentPkgs}/php ${cfg.dataDir}/
${optionalString (cfg.plugins != [ ]) ${optionalString (cfg.plugins != [ ])
''cp -r ${ "cp -r ${
concatMapStringsSep " " (p: "${rutorrentPkgs}/plugins/${p}") cfg.plugins 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} chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir}/{conf,share,logs,plugins}