formatting and dont creat enable option

This commit is contained in:
Osman Faruk Bayram 2025-02-07 15:56:09 +03:00
parent ac433255a4
commit b17a9f9754
2 changed files with 5 additions and 11 deletions

View file

@ -24,7 +24,6 @@
enableJellyfin = true; enableJellyfin = true;
}; };
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;

View file

@ -4,27 +4,22 @@
lib, lib,
... ...
}: { }: {
options = { options = {
myModules.enableJellyfin = { myModules.enableJellyfin = lib.mkOption {
enable = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = false; default = false;
description = "Enable Jellyfin media server"; description = "Enable Jellyfin media server";
}; };
}; };
};
config = lib.mkMerge [ config = lib.mkMerge [
(lib.mkIf config.myModules.enableJellyfin { (lib.mkIf config.myModules.enableJellyfin {
services.jellyfin = { services.jellyfin = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;
}; };
networking.firewall.allowedTCPPorts = [8096]; networking.firewall.allowedTCPPorts = [8096];
}) })
]; ];
} }