file cleanup, conditional motd

This commit is contained in:
2026-06-14 08:35:44 -05:00
parent fcb8961c69
commit 11d3fcd8ec
27 changed files with 407 additions and 409 deletions
+7 -24
View File
@@ -1,13 +1,11 @@
{
pkgs,
nixpkgs-unstable,
config,
lib,
...
}: let
service = "ollama";
cfg = config.homelab.${service};
sec = config.sops.secrets;
homelab = config.homelab;
in {
options.homelab.${service} = {
@@ -41,7 +39,10 @@ in {
};
motd = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = service;
default =
if cfg.enable
then service
else null;
};
};
@@ -59,10 +60,6 @@ in {
createHome = true;
group = service;
extraGroups = [];
# if you wanna attempt system ssh again
#openssh.authorizedKeys.keyFiles = [
# "${cfg.data_dir}/.ssh/authorized_keys"
#];
};
# declare the gitea service
@@ -94,25 +91,11 @@ in {
'';
};
# add to glance
# homelab.glance.links.services = [{
# title = service;
# url = "https://git.${homelab.base_domain}";
# error-url = "http://${homelab.host_ip}:${toString cfg.port}";
# check-url = "http://${homelab.host_ip}:${toString cfg.port}";
# icon = "di:${service}"; }];
# manage secrets with sops
# sops.secrets = {
# "${service}_database_password" = {
# owner = service;
# group = service;
# };
# };
# add to backups
homelab.backups.baks = {
${service} = {paths = [cfg.data_dir];};
${service} = {
paths = [cfg.data_dir "/var/lib/private"];
};
};
};
}
+7 -16
View File
@@ -1,13 +1,11 @@
{
pkgs,
nixpkgs-unstable,
config,
lib,
...
}: let
service = "open-webui";
cfg = config.homelab.${service};
sec = config.sops.secrets;
homelab = config.homelab;
in {
options.homelab.${service} = {
@@ -41,7 +39,10 @@ in {
};
motd = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = service;
default =
if cfg.enable
then service
else null;
};
};
@@ -59,10 +60,6 @@ in {
createHome = true;
group = service;
extraGroups = [];
# if you wanna attempt system ssh again
#openssh.authorizedKeys.keyFiles = [
# "${cfg.data_dir}/.ssh/authorized_keys"
#];
};
# declare the gitea service
@@ -100,17 +97,11 @@ in {
}
];
# manage secrets with sops
# sops.secrets = {
# "${service}_database_password" = {
# owner = service;
# group = service;
# };
# };
# add to backups
homelab.backups.baks = {
${service} = {paths = [cfg.data_dir];};
${service} = {
paths = [cfg.data_dir "/var/lib/private"];
};
};
};
}