From 07afbe8b808c9940c4326406a124da6231f61f38 Mon Sep 17 00:00:00 2001 From: "christoph.hollizeck" Date: Wed, 27 Mar 2024 20:52:06 +0100 Subject: [PATCH] bluetooth still not working but at least I am tyding up the config --- flake.lock | 6 +- .../nixos/apps/cli-apps/nixvim/default.nix | 61 +++++++++---------- modules/nixos/submodules/basics/default.nix | 5 ++ .../system/hardware/bluetooth/default.nix | 10 +++ modules/nixos/system/locale/default.nix | 2 + systems/x86_64-linux/yggdrasil/hardware.nix | 8 +-- 6 files changed, 51 insertions(+), 41 deletions(-) diff --git a/flake.lock b/flake.lock index d544043..ff0eb1a 100644 --- a/flake.lock +++ b/flake.lock @@ -272,11 +272,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1711124224, - "narHash": "sha256-l0zlN/3CiodvWDtfBOVxeTwYSRz93muVbXWSpaMjXxM=", + "lastModified": 1711460390, + "narHash": "sha256-akSgjDZL6pVHEfSE6sz1DNSXuYX6hq+P/1Z5IoYWs7E=", "owner": "nixos", "repo": "nixpkgs", - "rev": "56528ee42526794d413d6f244648aaee4a7b56c0", + "rev": "44733514b72e732bd49f5511bd0203dea9b9a434", "type": "github" }, "original": { diff --git a/modules/nixos/apps/cli-apps/nixvim/default.nix b/modules/nixos/apps/cli-apps/nixvim/default.nix index 6a85a93..adfaa62 100644 --- a/modules/nixos/apps/cli-apps/nixvim/default.nix +++ b/modules/nixos/apps/cli-apps/nixvim/default.nix @@ -80,20 +80,20 @@ in { }; }; - harpoon = { - enable = true; - enableTelescope = true; - keymaps = { - addFile = "a"; - toggleQuickMenu = "ha"; - navFile = { - "1" = ""; - "2" = ""; - "3" = ""; - "4" = ""; + harpoon = { + enable = true; + enableTelescope = true; + keymaps = { + addFile = "a"; + toggleQuickMenu = "ha"; + navFile = { + "1" = ""; + "2" = ""; + "3" = ""; + "4" = ""; + }; }; }; - }; treesitter = { enable = true; @@ -160,28 +160,27 @@ in { }; }; - - rainbow-delimiters = { - enable = true; - }; - nvim-colorizer.enable = true; - - undotree.enable = true; - - which-key = { - enable = true; - registrations = { - "K" = "Code hover"; - "gf" = "Code references"; - "gd" = "Code definitions"; - "gi" = "Implementations"; - "gt" = "Type definition"; + rainbow-delimiters = { + enable = true; }; - }; + nvim-colorizer.enable = true; - trouble.enable = true; + undotree.enable = true; - markdown-preview.enable = true; + which-key = { + enable = true; + registrations = { + "K" = "Code hover"; + "gf" = "Code references"; + "gd" = "Code definitions"; + "gi" = "Implementations"; + "gt" = "Type definition"; + }; + }; + + trouble.enable = true; + + markdown-preview.enable = true; }; }; }; diff --git a/modules/nixos/submodules/basics/default.nix b/modules/nixos/submodules/basics/default.nix index 218e464..34cc8eb 100644 --- a/modules/nixos/submodules/basics/default.nix +++ b/modules/nixos/submodules/basics/default.nix @@ -22,6 +22,11 @@ in { ripgrep fzf colorls + + #optional + pciutils + usbutils + htop ]; wyrdgard = { diff --git a/modules/nixos/system/hardware/bluetooth/default.nix b/modules/nixos/system/hardware/bluetooth/default.nix index 3b75599..708ac94 100644 --- a/modules/nixos/system/hardware/bluetooth/default.nix +++ b/modules/nixos/system/hardware/bluetooth/default.nix @@ -14,6 +14,10 @@ in { }; config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + libsForQt5.bluez-qt + ]; + hardware.bluetooth = { enable = true; powerOnBoot = true; @@ -25,6 +29,12 @@ in { }; }; + fileSystems."/var/lib/bluetooth" = { + device = "/persist/var/lib/bluetooth"; + options = ["bind" "noauto" "x-systemd.automount"]; + noCheck = true; + }; + # https://github.com/NixOS/nixpkgs/issues/170573 }; } diff --git a/modules/nixos/system/locale/default.nix b/modules/nixos/system/locale/default.nix index 23e6e06..fb6d206 100644 --- a/modules/nixos/system/locale/default.nix +++ b/modules/nixos/system/locale/default.nix @@ -17,6 +17,8 @@ in { i18n.defaultLocale = "en_US.UTF-8"; i18n.extraLocaleSettings = { + LANG = "en_US.UTF-8"; + LC_ALL = "en_US.UTF-8"; LC_ADDRESS = "de_DE.UTF-8"; LC_IDENTIFICATION = "de_DE.UTF-8"; LC_MEASUREMENT = "de_DE.UTF-8"; diff --git a/systems/x86_64-linux/yggdrasil/hardware.nix b/systems/x86_64-linux/yggdrasil/hardware.nix index d69d9ba..61ada1e 100644 --- a/systems/x86_64-linux/yggdrasil/hardware.nix +++ b/systems/x86_64-linux/yggdrasil/hardware.nix @@ -14,7 +14,7 @@ boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"]; boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-amd"]; + boot.kernelModules = ["kvm-amd" "btusb"]; boot.extraModulePackages = []; fileSystems."/" = { @@ -27,12 +27,6 @@ fsType = "vfat"; }; - fileSystems."/var/lib/bluetooth" = { - device = "/persist/var/lib/bluetooth"; - options = ["bind" "noauto" "x-systemd.automount"]; - noCheck = true; - }; - swapDevices = []; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking