From f921a55b26a0d21e41b4d2a9547a7009aae09f71 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy <dmitriy@pleshevski.ru> Date: Mon, 6 Jan 2025 08:23:48 +0300 Subject: [PATCH] host/asus: fix opening telegram issue --- hosts/asus-gl553vd/configuration.nix | 4 +++- hosts/asus-gl553vd/hardware-configuration/default.nix | 5 +++++ modules/nixos/programs/communication/telegram.nix | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/hosts/asus-gl553vd/configuration.nix b/hosts/asus-gl553vd/configuration.nix index 39eb0c5..28ca1ae 100644 --- a/hosts/asus-gl553vd/configuration.nix +++ b/hosts/asus-gl553vd/configuration.nix @@ -1,4 +1,4 @@ -{ globalData, pkgs, ... }: +{ pkgs, ... }: { imports = [ @@ -31,6 +31,8 @@ package = pkgs.unstable.ollama; }; + # Fix boot issue + containers.telegram.bindMounts."/dev/dri/card1" = { }; local.programs.communication = { telegram = { diff --git a/hosts/asus-gl553vd/hardware-configuration/default.nix b/hosts/asus-gl553vd/hardware-configuration/default.nix index f4c18bf..4eaedd7 100644 --- a/hosts/asus-gl553vd/hardware-configuration/default.nix +++ b/hosts/asus-gl553vd/hardware-configuration/default.nix @@ -30,6 +30,11 @@ hardware.bluetooth.enable = true; + hardware.graphics = { + enable = true; + enable32Bit = true; + }; + services.logind.extraConfig = '' # don’t shutdown when power button is short-pressed HandlePowerKey=ignore diff --git a/modules/nixos/programs/communication/telegram.nix b/modules/nixos/programs/communication/telegram.nix index 7b20a67..35dc89a 100644 --- a/modules/nixos/programs/communication/telegram.nix +++ b/modules/nixos/programs/communication/telegram.nix @@ -33,6 +33,13 @@ in autoStart = true; ephemeral = true; + allowedDevices = [ + { + modifier = "r"; + node = "/dev/dri"; + } + ]; + bindMounts = lib.mkMerge [ { "/tmp/.X11-unix" = { };