use my module options
This commit is contained in:
parent
11fc735d23
commit
c7a1e9613f
13 changed files with 13 additions and 118 deletions
|
|
@ -5,16 +5,8 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
osbmModules.enableCaddy = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Caddy server";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.osbmModules.enableCaddy {
|
||||
(lib.mkIf config.osbmModules.services.caddy.enable {
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
# package = pkgs.caddy.withPlugins {
|
||||
|
|
|
|||
|
|
@ -28,16 +28,8 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
options = {
|
||||
osbmModules.enableCloudflareDyndns = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable a service to push my public IP address to my Cloudflare domain.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.osbmModules.enableCloudflareDyndns {
|
||||
(lib.mkIf config.osbmModules.services.cloudflare-dyndns.enable {
|
||||
services.cloudflare-dyndns = {
|
||||
package = cloudflare-dyndns-5-3;
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -4,16 +4,8 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
osbmModules.enableCloudflared = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Cloudflare tunnels";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.osbmModules.enableCloudflared {
|
||||
(lib.mkIf config.osbmModules.services.cloudflared.enable {
|
||||
services.cloudflared = {
|
||||
enable = true;
|
||||
certificateFile = "/home/osbm/.cloudflared/cert.pem";
|
||||
|
|
|
|||
|
|
@ -4,16 +4,8 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
osbmModules.enableForgejo = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Forgejo server";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.osbmModules.enableForgejo {
|
||||
(lib.mkIf config.osbmModules.services.forgejo.enable {
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
|
|
|
|||
|
|
@ -4,16 +4,8 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
osbmModules.enableGlance = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Glance server";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.osbmModules.enableGlance {
|
||||
(lib.mkIf config.osbmModules.services.glance.enable {
|
||||
services.glance = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
|
|
|
|||
|
|
@ -4,16 +4,8 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
osbmModules.enableHydra = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Hydra continuous integration server";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.osbmModules.enableHydra {
|
||||
(lib.mkIf config.osbmModules.services.hydra.enable {
|
||||
services.hydra = {
|
||||
enable = true;
|
||||
port = 3000;
|
||||
|
|
|
|||
|
|
@ -4,16 +4,8 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
osbmModules.enableJellyfin = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Jellyfin media server";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.osbmModules.enableJellyfin {
|
||||
(lib.mkIf config.osbmModules.services.jellyfin.enable {
|
||||
services.jellyfin = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
|
|
|
|||
|
|
@ -5,16 +5,8 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
osbmModules.enableNextcloud = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Nextcloud server";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.osbmModules.enableNextcloud {
|
||||
(lib.mkIf config.osbmModules.services.nextcloud.enable {
|
||||
environment.etc."nextcloud-admin-pass".text = "m7eJ4KJ1NK33JE%51";
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -4,18 +4,8 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
osbmModules = {
|
||||
enableOllama = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Ollama services.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.osbmModules.enableOllama {
|
||||
(lib.mkIf config.osbmModules.services.ollama.enable {
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
acceleration = "cuda";
|
||||
|
|
|
|||
|
|
@ -4,16 +4,8 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
osbmModules.enableOpenssh = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable OpenSSH service";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.osbmModules.enableOpenssh {
|
||||
(lib.mkIf config.osbmModules.services.openssh.enable {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
startWhenNeeded = true;
|
||||
|
|
|
|||
|
|
@ -4,16 +4,8 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
osbmModules.enableSyncthing = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Syncthing file synchronization service";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.osbmModules.enableSyncthing {
|
||||
(lib.mkIf config.osbmModules.services.syncthing.enable {
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
openDefaultPorts = true;
|
||||
|
|
|
|||
|
|
@ -5,13 +5,6 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
osbmModules.enableTailscale = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable Tailscale VPN";
|
||||
};
|
||||
};
|
||||
|
||||
# i have 4 machines, 2 of them are always at home
|
||||
# pochita (raspberry pi 5) and ymir (desktop)
|
||||
|
|
@ -20,7 +13,7 @@
|
|||
# and i have a laptop named tartarus
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.osbmModules.enableTailscale {
|
||||
(lib.mkIf config.osbmModules.services.tailscale.enable {
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
port = 51513;
|
||||
|
|
|
|||
|
|
@ -4,16 +4,8 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
osbmModules.enableVaultwarden = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Vaultwarden server";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.osbmModules.enableVaultwarden {
|
||||
(lib.mkIf config.osbmModules.services.vaultwarden.enable {
|
||||
services.vaultwarden = {
|
||||
enable = true;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue