losurdo: improve X11 and Bluetooth support
authorJulien Moutinho <julm@sourcephile.fr>
Sun, 25 Apr 2021 23:40:08 +0000 (01:40 +0200)
committerJulien Moutinho <julm@sourcephile.fr>
Sun, 25 Apr 2021 23:56:47 +0000 (01:56 +0200)
flake.lock
hosts/losurdo/hardware.nix
hosts/losurdo/system.nix
hosts/losurdo/xserver.nix
nixos/defaults.nix
nixos/profiles/hardware/dl10j.nix

index 35bd4fc4a4c951caf78fb035d83ab83a8674037f..89738e5a5a2333bcaf9037db8d31bbf82dea080a 100644 (file)
@@ -2,11 +2,11 @@
   "nodes": {
     "flake-utils": {
       "locked": {
-        "lastModified": 1617631617,
-        "narHash": "sha256-PARRCz55qN3gy07VJZIlFeOX420d0nGF0RzGI/9hVlw=",
+        "lastModified": 1618217525,
+        "narHash": "sha256-WGrhVczjXTiswQaoxQ+0PTfbLNeOQM6M36zvLn78AYg=",
         "owner": "numtide",
         "repo": "flake-utils",
-        "rev": "b2c27d1a81b0dc266270fa8aeecebbd1807fc610",
+        "rev": "c6169a2772643c4a93a0b5ac1c61e296cba68544",
         "type": "github"
       },
       "original": {
         ]
       },
       "locked": {
-        "lastModified": 1617625888,
-        "narHash": "sha256-GuVivqQPZUskBhu4uQAgWhGI1sVuqz7nRMV+Rc+yWBU=",
+        "lastModified": 1617824794,
+        "narHash": "sha256-UGkvzx0nIXHhNq/KwJLjXvKAQRE2V33MuX+UirvqrkQ=",
         "owner": "nix-community",
         "repo": "home-manager",
-        "rev": "f019c1cf16d0019d332ef43cffa0bd9bf007252b",
+        "rev": "2aa20ae969f2597c4df10a094440a66e9d7f8c86",
         "type": "github"
       },
       "original": {
@@ -47,7 +47,7 @@
         ]
       },
       "locked": {
-        "narHash": "sha256-SjlbhXwiJEHYOWrUrnptbvWeC+1sGrj0NOMqWkMfn8A=",
+        "narHash": "sha256-6GpORBj41T5+WpD3/ZhrQO1XktUN+a/IDo2a410rhW0=",
         "path": "./julm-nix",
         "type": "path"
       },
index 69fae97d03e963d308d628b99ed4138112c11161..f48bb9b38f8df5fd0c08937b28cee3922b10bc83 100644 (file)
@@ -5,20 +5,13 @@ imports = [
   ../../nixos/profiles/systems/zramSwap.nix
 ];
 
+hardware.opengl.enable = true;
+
 # The 32-bit host id of the host, formatted as 8 hexadecimal characters.
 # You should try to make this id unique among your hosts.
 # Manually generated with : head -c4 /dev/urandom | od -A none -t x4 | cut -d ' ' -f 2
 networking.hostId = "e18f71a6";
 
-hardware.opengl = {
-  extraPackages = [
-    pkgs.intel-media-driver # LIBVA_DRIVER_NAME=iHD
-    pkgs.vaapiIntel         # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
-    pkgs.vaapiVdpau
-    pkgs.libvdpau-va-gl
-  ];
-};
-
 boot.loader.grub.devices = [
   #"/dev/disk/by-id/nvme-Samsung_SSD_970_EVO_Plus_250GB_S4EUNJ0N211426T"
   #"/dev/disk/by-id/usb-Generic-_Multi-Card_20071114173400000-0:0"
index 6d6a478cdefed758e2ab71c28b4b11d3de8a0cd7..9e12dcda33382bbbbfc58d36cae3a75a0010617e 100644 (file)
@@ -16,7 +16,8 @@ nix.gc.options = "--delete-older-than 7d";
 # and let mosh work smoothly.
 services.logind.killUserProcesses = false;
 
-hardware.opengl.enable = true;
+hardware.bluetooth.enable = true;
+#services.blueman.enable = true;
 
 documentation.nixos = {
   enable = false; # NOTE: useless on a server, and CPU intensive.
@@ -24,10 +25,11 @@ documentation.nixos = {
 
 boot.kernelParams = [
   # Rotate the consoles anti-clockwise.
-  "fbcon=rotate:3"
+  #"fbcon=rotate:3"
 ];
 
 environment.systemPackages = with pkgs; [
+  bluez
   cryptsetup
   direnv
   f3
index f59d30157fd8c491269146b89afa569c836d74fe..e864b76ef78997ef40d009eadc762c2d50065c3b 100644 (file)
@@ -3,9 +3,10 @@ let inherit (config.users) users; in
 {
 services.xserver = {
   enable = true;
-  layout = "fr";
-  xkbOptions = "eurosign:e";
+  layout = "fr,us";
+  xkbOptions = "eurosign:e, compose:menu, grp:alt_space_toggle";
   libinput.enable = true;
+  exportConfiguration = true; # link /usr/share/X11/ properly
   desktopManager = {
     session = [
       # Let the session be generated by home-manager
@@ -26,12 +27,16 @@ services.xserver = {
     };
   };
 };
+environment.systemPackages = [
+  pkgs.arandr
+];
+console.useXkbConfig = true;
 sound.enable = true;
 hardware.pulseaudio.enable = true;
-/*
 programs.x2goserver = {
   enable = true;
 };
+/*
 environment.sessionVariables = {
   PATH = [ "/usr/local/bin" ];
 };
index b8446c4821d6f6ee8a506c0ecd36eeb113547403..9c986601326ccada2c69aa02ef8152051a65d68f 100644 (file)
@@ -60,7 +60,7 @@ i18n = {
 
 console = {
   font   = "Lat2-Terminus16";
-  keyMap = "fr";
+  keyMap = lib.mkDefault "fr";
 };
 
 # Always try to start all the units (default.target)
index b488e437a487b06ba7750548a389e8b9738f5c99..38ce9386fa8265b0b64d9732cf12f21aae67b850 100644 (file)
@@ -1,6 +1,14 @@
 { pkgs, lib, config, host, ... }:
 {
 hardware.cpu.intel.updateMicrocode = true;
+hardware.opengl = {
+  extraPackages = [
+    pkgs.intel-media-driver # LIBVA_DRIVER_NAME=iHD
+    pkgs.vaapiIntel         # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
+    pkgs.vaapiVdpau
+    pkgs.libvdpau-va-gl
+  ];
+};
 nix = {
   # Too CPU hungry for the DL10J, for too little Mio saved
   autoOptimiseStore = false;