Merge branch 'master' into auto-update/2026-02-13
Some checks failed
Auto Update Build / build (pull_request) Has been cancelled

This commit is contained in:
pazpi 2026-02-15 23:21:11 +01:00
commit 6ac38299e0
17 changed files with 82 additions and 48 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

@ -32,13 +32,20 @@ in
lxc-standard.enable = true; lxc-standard.enable = true;
}; };
virtualisation.proxmox.enable = true; virtualisation = {
proxmox.enable = true;
podman.enable = true;
};
}; };
programs = { programs = {
nix-ld.enable = true; nix-ld.enable = true;
}; };
environment.systemPackages = with pkgs; [
just-lsp
];
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;

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

@ -14,6 +14,7 @@
virtualisation = { virtualisation = {
proxmox.enable = true; proxmox.enable = true;
docker.enable = true;
}; };
}; };

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,24 +55,21 @@ 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
ssl.enable = false; ssl.enable = false;
ssl.termination = true; ssl.termination = true;
# allow WOPI (Nextcloud etc.) # allow WOPI (Nextcloud etc.)
storage.wopi."@allow" = true; storage.wopi."@allow" = true;
} }
// 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;
};
}; };
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [

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 (
all.curl { enabled, all }:
all.dom enabled
]); ++ [
all.curl
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 =
"listen.owner" = config.services.caddy.user; lib.mapAttrs (name: lib.mkDefault) {
"listen.group" = config.services.caddy.group; "listen.owner" = config.services.caddy.user;
"chdir" = cfg.dataDir; "listen.group" = config.services.caddy.group;
} // cfg.poolSettings; "chdir" = cfg.dataDir;
}
// 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

@ -68,7 +68,7 @@ in
package = pkgs.nextcloud32; package = pkgs.nextcloud32;
hostName = "cloud.${cfg.proxy.domain}"; hostName = "cloud.${cfg.proxy.domain}";
https = true; https = true;
secretFile = cfg.secretFile; secretFile = cfg.secretFile;
settings = { settings = {

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}

View file

@ -32,7 +32,7 @@ in
isNormalUser = true; isNormalUser = true;
hashedPassword = "$y$j9T$oWLCV1hnGPyOGabMfAS3p1$/iwouRZGwQXcv6IHnLuT3I9.pmeXNpcHxq.b8xfitr1"; hashedPassword = "$y$j9T$oWLCV1hnGPyOGabMfAS3p1$/iwouRZGwQXcv6IHnLuT3I9.pmeXNpcHxq.b8xfitr1";
shell = pkgs.bash; shell = pkgs.bash;
extraGroups = [ "wheel" ]; extraGroups = [ "wheel" ] ++ lib.optionals config.virtualisation.docker.enable [ "docker" ];
openssh.authorizedKeys.keys = sshKeys.infra-core; openssh.authorizedKeys.keys = sshKeys.infra-core;
}; };

View file

@ -14,13 +14,10 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
virtualisation = { virtualisation = {
docker = { docker.enable = true;
storageDriver = "overlay2";
};
oci-containers.backend = "docker"; oci-containers.backend = "docker";
}; };
}; };
} }

View file

@ -13,15 +13,28 @@ in
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
# Enable common container config files in /etc/containers
virtualisation.containers.enable = true;
virtualisation = { virtualisation = {
podman = { podman = {
enable = true; enable = true;
};
oci-containers.backend = "podman"; # Create a `docker` alias for podman, to use it as a drop-in replacement
dockerCompat = true;
# Required for containers under podman-compose to be able to talk to each other.
defaultNetwork.settings.dns_enabled = true;
};
}; };
# Useful other development tools
environment.systemPackages = with pkgs; [
dive # look into docker image layers
podman-tui # status of containers in the terminal
docker-compose # start group of containers for dev
podman-compose # start group of containers for dev
];
# Depending on the host filesystem # Depending on the host filesystem
# virtualisation.containers.storage.settings = { # virtualisation.containers.storage.settings = {
# storage = { # storage = {