feat: init media server system profile
This commit is contained in:
parent
d2bd5abbed
commit
dc8a3d5dd1
7 changed files with 71 additions and 2 deletions
|
|
@ -6,7 +6,7 @@
|
|||
../../profiles
|
||||
];
|
||||
|
||||
activeProfiles = ["base" "nvidia"];
|
||||
activeProfiles = ["base" "nvidia" "mediaServer"];
|
||||
|
||||
systemModules.user = {
|
||||
ooks.enable = true;
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
networking = {
|
||||
hostName = "ooksdesk";
|
||||
useDHCP = true;
|
||||
# useDHCP = true;
|
||||
};
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxKernel.packages.linux_zen;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
./virtualisation.nix
|
||||
./pipewire.nix
|
||||
./security.nix
|
||||
./services
|
||||
];
|
||||
|
||||
|
||||
|
|
|
|||
14
system/modules/services/default.nix
Normal file
14
system/modules/services/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./jellyfin
|
||||
];
|
||||
|
||||
options.systemModules.services = {
|
||||
jellyfin = {
|
||||
enable = lib.mkEnableOption "Enable jellyfin service module";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
32
system/modules/services/jellyfin/default.nix
Normal file
32
system/modules/services/jellyfin/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.systemModules.services.jellyfin;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
jellyfin
|
||||
jellyfin-web
|
||||
jellyfin-ffmpeg
|
||||
];
|
||||
services.jellyfin = {
|
||||
user = "jellyfin";
|
||||
group = "media";
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
users.users.jellyfin = {
|
||||
isSystemUser = true;
|
||||
group = "media";
|
||||
};
|
||||
users.groups.media = {};
|
||||
|
||||
fileSystems."/media" = {
|
||||
device = "/dev/disk/by-label/ooksmedia";
|
||||
fsType = "ntfs";
|
||||
options = [ "rw" "uid=1000" "gid=991" "umask=002" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -15,6 +15,7 @@ in
|
|||
"audio"
|
||||
] ++ ifTheyExist [
|
||||
"git"
|
||||
"media"
|
||||
"network"
|
||||
"libvirtd"
|
||||
"deluge"
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ in
|
|||
./nvidia
|
||||
./gaming
|
||||
./laptop
|
||||
./mediaServer
|
||||
];
|
||||
|
||||
options = {
|
||||
|
|
@ -33,6 +34,9 @@ in
|
|||
nvidia = {
|
||||
enable = lib.mkEnableOption "Enable the nvidia profile";
|
||||
};
|
||||
mediaServer = {
|
||||
enable = lib.mkEnableOption "Enable the mediaServer profile";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
17
system/profiles/mediaServer/default.nix
Normal file
17
system/profiles/mediaServer/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.systemProfile.mediaServer;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../../modules
|
||||
];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemModules = {
|
||||
services = {
|
||||
jellyfin.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue