diff --git a/flake.lock b/flake.lock index e49aea6..4f0d4b6 100644 --- a/flake.lock +++ b/flake.lock @@ -548,6 +548,21 @@ "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": { "locked": { "lastModified": 1636416043, @@ -888,6 +903,7 @@ "home-manager": "home-manager", "home-manager-utils": "home-manager-utils", "landingpage": "landingpage", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_3", "nixpkgs-fmt": "nixpkgs-fmt", "nixpkgs-legacy": "nixpkgs-legacy", diff --git a/flake.nix b/flake.nix index bd011ab..d2fbeeb 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,11 @@ flake = false; }; nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11"; + nixos-hardware = { + url = "github:nixos/nixos-hardware"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + # colmena # ------- colmena = { @@ -77,13 +82,14 @@ , grocy-scanner , home-manager , home-manager-utils + , nixos-hardware , nixpkgs , nixpkgs-fmt - , nixpkgs-unstable , nixpkgs-legacy + , nixpkgs-unstable + , permown , polygon-art , private_assets - , permown , secrets , sops-nix , retiolum @@ -179,6 +185,7 @@ deployment.tags = [ "desktop" "online" "private" ]; imports = [ grocy-scanner.nixosModule + nixos-hardware.nixosModules.lenovo-thinkpad-x220 ]; home-manager.users.mainUser = { imports = [ @@ -208,6 +215,7 @@ deployment.tags = [ "server" "online" "private" ]; imports = [ grocy-scanner.nixosModule + nixos-hardware.nixosModules.lenovo-thinkpad-x220 ]; }; @@ -215,7 +223,10 @@ deployment.targetHost = "${name}.private"; deployment.tags = [ "server" "online" "private" ]; imports = [ + nixos-hardware.nixosModules.common-cpu-intel + nixos-hardware.nixosModules.common-gpu-intel ]; + }; bobi = { name, nodes, pkgs, ... }: { diff --git a/nixos/machines/pepe/jellyfin.nix b/nixos/machines/pepe/jellyfin.nix index 02e4aee..cad704f 100644 --- a/nixos/machines/pepe/jellyfin.nix +++ b/nixos/machines/pepe/jellyfin.nix @@ -3,4 +3,9 @@ services.jellyfin.enable = true; services.jellyfin.openFirewall = true; users.groups."syncthing".members = [ "jellyfin" ]; + hardware.opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + }; } diff --git a/nixos/machines/robi/configuration.nix b/nixos/machines/robi/configuration.nix index d861327..3baa093 100644 --- a/nixos/machines/robi/configuration.nix +++ b/nixos/machines/robi/configuration.nix @@ -28,6 +28,7 @@ ./vaultwarden.nix ./nginx.nix ./wireguard.nix + ./jellyfin.nix #../../system/server diff --git a/nixos/machines/robi/jellyfin.nix b/nixos/machines/robi/jellyfin.nix new file mode 100644 index 0000000..a2ae7b3 --- /dev/null +++ b/nixos/machines/robi/jellyfin.nix @@ -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; + }; +} diff --git a/nixos/machines/sterni/configuration.nix b/nixos/machines/sterni/configuration.nix index ca17c47..49eeeee 100644 --- a/nixos/machines/sterni/configuration.nix +++ b/nixos/machines/sterni/configuration.nix @@ -86,12 +86,17 @@ # for congress and streaming hardware.opengl = { 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; driSupport32Bit = true; }; - nixpkgs.config.packageOverrides = pkgs: { - vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; - }; + #nixpkgs.config.packageOverrides = pkgs: { + # vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; + #}; } diff --git a/nixos/system/server/default.nix b/nixos/system/server/default.nix index 0528a48..6bcf08e 100644 --- a/nixos/system/server/default.nix +++ b/nixos/system/server/default.nix @@ -12,7 +12,7 @@ # make sure laptops stay awake when closing the montior services.logind.lidSwitch = "ignore"; powerManagement.enable = false; - powerManagement.scsiLinkPolicy = "min_power"; + #powerManagement.scsiLinkPolicy = "min_power"; # config vim programs.custom.vim.enable = true;