working on jellyfin

This commit is contained in:
Ingolf Wagner 2023-01-23 20:04:50 +01:00
parent 72612b2c3f
commit 82d8270b2d
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
7 changed files with 56 additions and 7 deletions

View file

@ -548,6 +548,21 @@
"type": "github" "type": "github"
} }
}, },
"nixos-hardware": {
"locked": {
"lastModified": 1673803274,
"narHash": "sha256-zaJDlHFXewT4KUsidMpRcPE+REymGH1Y3Eoc3Pjv4Xs=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "7bd6b87b3712e68007823e8dd5c37ee9b114fee3",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1636416043, "lastModified": 1636416043,
@ -888,6 +903,7 @@
"home-manager": "home-manager", "home-manager": "home-manager",
"home-manager-utils": "home-manager-utils", "home-manager-utils": "home-manager-utils",
"landingpage": "landingpage", "landingpage": "landingpage",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"nixpkgs-fmt": "nixpkgs-fmt", "nixpkgs-fmt": "nixpkgs-fmt",
"nixpkgs-legacy": "nixpkgs-legacy", "nixpkgs-legacy": "nixpkgs-legacy",

View file

@ -8,6 +8,11 @@
flake = false; flake = false;
}; };
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
nixos-hardware = {
url = "github:nixos/nixos-hardware";
inputs.nixpkgs.follows = "nixpkgs";
};
# colmena # colmena
# ------- # -------
colmena = { colmena = {
@ -77,13 +82,14 @@
, grocy-scanner , grocy-scanner
, home-manager , home-manager
, home-manager-utils , home-manager-utils
, nixos-hardware
, nixpkgs , nixpkgs
, nixpkgs-fmt , nixpkgs-fmt
, nixpkgs-unstable
, nixpkgs-legacy , nixpkgs-legacy
, nixpkgs-unstable
, permown
, polygon-art , polygon-art
, private_assets , private_assets
, permown
, secrets , secrets
, sops-nix , sops-nix
, retiolum , retiolum
@ -179,6 +185,7 @@
deployment.tags = [ "desktop" "online" "private" ]; deployment.tags = [ "desktop" "online" "private" ];
imports = [ imports = [
grocy-scanner.nixosModule grocy-scanner.nixosModule
nixos-hardware.nixosModules.lenovo-thinkpad-x220
]; ];
home-manager.users.mainUser = { home-manager.users.mainUser = {
imports = [ imports = [
@ -208,6 +215,7 @@
deployment.tags = [ "server" "online" "private" ]; deployment.tags = [ "server" "online" "private" ];
imports = [ imports = [
grocy-scanner.nixosModule grocy-scanner.nixosModule
nixos-hardware.nixosModules.lenovo-thinkpad-x220
]; ];
}; };
@ -215,7 +223,10 @@
deployment.targetHost = "${name}.private"; deployment.targetHost = "${name}.private";
deployment.tags = [ "server" "online" "private" ]; deployment.tags = [ "server" "online" "private" ];
imports = [ imports = [
nixos-hardware.nixosModules.common-cpu-intel
nixos-hardware.nixosModules.common-gpu-intel
]; ];
}; };
bobi = { name, nodes, pkgs, ... }: { bobi = { name, nodes, pkgs, ... }: {

View file

@ -3,4 +3,9 @@
services.jellyfin.enable = true; services.jellyfin.enable = true;
services.jellyfin.openFirewall = true; services.jellyfin.openFirewall = true;
users.groups."syncthing".members = [ "jellyfin" ]; users.groups."syncthing".members = [ "jellyfin" ];
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
} }

View file

@ -28,6 +28,7 @@
./vaultwarden.nix ./vaultwarden.nix
./nginx.nix ./nginx.nix
./wireguard.nix ./wireguard.nix
./jellyfin.nix
#../../system/server #../../system/server

View file

@ -0,0 +1,11 @@
{ config, lib, pkgs, ... }:
{
services.jellyfin.enable = true;
services.jellyfin.openFirewall = false;
users.groups."syncthing".members = [ "jellyfin" ];
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
}

View file

@ -86,12 +86,17 @@
# for congress and streaming # for congress and streaming
hardware.opengl = { hardware.opengl = {
enable = true; enable = true;
extraPackages = [ pkgs.vaapiIntel ]; # extraPackages = [
# intel-media-driver # LIBVA_DRIVER_NAME=iHD
# vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
# vaapiVdpau
# libvdpau-va-gl
# ];
driSupport = true; driSupport = true;
driSupport32Bit = true; driSupport32Bit = true;
}; };
nixpkgs.config.packageOverrides = pkgs: { #nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; # vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
}; #};
} }

View file

@ -12,7 +12,7 @@
# make sure laptops stay awake when closing the montior # make sure laptops stay awake when closing the montior
services.logind.lidSwitch = "ignore"; services.logind.lidSwitch = "ignore";
powerManagement.enable = false; powerManagement.enable = false;
powerManagement.scsiLinkPolicy = "min_power"; #powerManagement.scsiLinkPolicy = "min_power";
# config vim # config vim
programs.custom.vim.enable = true; programs.custom.vim.enable = true;