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`
formatter.${system} = pkgs.nixfmt-rfc-style;
formatter.${system} = pkgs.nixfmt-tree;
nixosConfigurations = (import ./hosts inputs);

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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 = [

View file

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

View file

@ -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
})
];
}

View file

@ -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
];
})

View file

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