ctucx.git: nixfiles

ctucx' nixfiles

commit 34258747abddefa67312ccdd634f6dee77e03bcf
parent 4a9e72ef0126fc1a0344b4405f371cebda596711
Author: Leah (ctucx) <git@ctu.cx>
Date: Tue, 11 Jun 2024 16:36:30 +0200

fixes for nixpkgs 24.05
8 files changed, 21 insertions(+), 148 deletions(-)
diff --git a/configurations/common/programs/gpg.nix b/configurations/common/programs/gpg.nix
@@ -97,7 +97,7 @@ in {
           enableSshSupport   = true;
           enableExtraSocket  = true;
 
-          pinentryFlavor     = "gnome3";
+          pinentryPackage    = pkgs.pinentry-gnome3;
 
           defaultCacheTtl    = 600;
           defaultCacheTtlSsh = 600;
diff --git a/configurations/darwin/default.nix b/configurations/darwin/default.nix
@@ -33,7 +33,7 @@
   home-manager = {
     useUserPackages = true;
 
-    users.leah.imports            = [ inputs.mac-app-util.homeManagerModules.default ];
+#    users.leah.imports            = [ inputs.mac-app-util.homeManagerModules.default ];
     users.leah.home.homeDirectory = lib.mkForce "/Users/leah/";
     users.leah.home.packages      = with pkgs; [
       bgiparser
diff --git a/configurations/linux/programs/alacritty.nix b/configurations/linux/programs/alacritty.nix
@@ -25,9 +25,9 @@ in {
           settings = {
             window.opacity = 0.9;
 
-            font.normal = {
-              family = "DejaVu Sans Mono";
-              size = 9.0;
+            font = {
+              size          = 12.0;
+              normal.family = "DejaVu Sans Mono";
             };
 
             colors = {
diff --git a/configurations/linux/programs/sway.nix b/configurations/linux/programs/sway.nix
@@ -129,7 +129,7 @@ in {
             }; 
 
             "*" = {
-              bg = "~/Pictures/photos.ctu.cx/Bahnbilder/2019.06/20190622-153441.jpg fill";
+#              bg = "~/Pictures/photos.ctu.cx/Bahnbilder/2019.06/20190622-153441.jpg fill";
               scale = lib.mkDefault "1";
             };
 
diff --git a/flake.nix b/flake.nix
@@ -17,7 +17,7 @@
           inherit inputs;
         };
         modules = [
-          inputs.mac-app-util.darwinModules.default
+#           inputs.mac-app-util.darwinModules.default
           ./machines/blechkasten/darwin-configuration.nix
         ];
       };

@@ -45,6 +45,7 @@
         system.nixos.revision       = lib.mkIf (inputs.nixpkgs.sourceInfo ? rev) inputs.nixpkgs.sourceInfo.rev;
       };
 
+      coladose         = import ./machines/coladose/configuration.nix;
       briefkasten      = import ./machines/briefkasten/configuration.nix;
 
       trabbi           = import ./machines/trabbi/configuration.nix;
diff --git a/machines/coladose/0001-drm-i915-dsi-Go-back-to-the-previous-INIT_OTP-DISPLA.patch b/machines/coladose/0001-drm-i915-dsi-Go-back-to-the-previous-INIT_OTP-DISPLA.patch
@@ -1,121 +0,0 @@
-From d66b7307f68403559faab9bcc1e1a32e813fbc64 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
-Date: Fri, 1 Mar 2024 19:43:35 +0200
-Subject: [PATCH] drm/i915/dsi: Go back to the previous INIT_OTP/DISPLAY_ON
- order, mostly
-
-Reinstate commit 88b065943cb5 ("drm/i915/dsi: Do display on
-sequence later on icl+"), for the most part. Turns out some
-machines (eg. Chuwi Minibook X) really do need that updated order.
-It is also the order the Windows driver uses.
-
-However we can't just undo the revert since that would again
-break Lenovo 82TQ. After staring at the VBT sequences for both
-machines I've concluded that the Lenovo 82TQ sequences look
-somewhat broken:
- - INIT_OTP is not present at all
- - what should be in INIT_OTP is found in DISPLAY_ON
- - what should be in DISPLAY_ON is found in BACKLIGHT_ON
-   (along with the actual backlight stuff)
-
-The Chuwi Minibook X on the other hand has a full complement
-of sequences in its VBT.
-
-So let's try to deal with the broken sequences in the
-Lenovo 82TQ VBT by simply swapping the (non-existent)
-INIT_OTP sequence with the DISPLAY_ON sequence. Thus we
-execute DISPLAY_ON when intending to execute INIT_OTP,
-and execute nothing at all when intending to execute
-DISPLAY_ON. That should be 100% equivalent to the
-revert, for such broken VBTs.
-
-Cc: stable@vger.kernel.org
-Fixes: dc524d05974f ("Revert "drm/i915/dsi: Do display on sequence later on icl+"")
-References: https://gitlab.freedesktop.org/drm/intel/-/issues/10071
-Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10334
----
- drivers/gpu/drm/i915/display/icl_dsi.c    |  3 +-
- drivers/gpu/drm/i915/display/intel_bios.c | 39 +++++++++++++++++++++--
- 2 files changed, 39 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c
-index eda4a8b88590..ac456a2275db 100644
---- a/drivers/gpu/drm/i915/display/icl_dsi.c
-+++ b/drivers/gpu/drm/i915/display/icl_dsi.c
-@@ -1155,7 +1155,6 @@ static void gen11_dsi_powerup_panel(struct intel_encoder *encoder)
- 	}
- 
- 	intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_INIT_OTP);
--	intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_DISPLAY_ON);
- 
- 	/* ensure all panel commands dispatched before enabling transcoder */
- 	wait_for_cmds_dispatched_to_panel(encoder);
-@@ -1256,6 +1255,8 @@ static void gen11_dsi_enable(struct intel_atomic_state *state,
- 	/* step6d: enable dsi transcoder */
- 	gen11_dsi_enable_transcoder(encoder);
- 
-+	intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_DISPLAY_ON);
-+
- 	/* step7: enable backlight */
- 	intel_backlight_enable(crtc_state, conn_state);
- 	intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_BACKLIGHT_ON);
-diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
-index 343726de9aa7..e989cb012637 100644
---- a/drivers/gpu/drm/i915/display/intel_bios.c
-+++ b/drivers/gpu/drm/i915/display/intel_bios.c
-@@ -1955,8 +1955,8 @@ static int get_init_otp_deassert_fragment_len(struct drm_i915_private *i915,
-  * these devices we split the init OTP sequence into a deassert sequence and
-  * the actual init OTP part.
-  */
--static void fixup_mipi_sequences(struct drm_i915_private *i915,
--				 struct intel_panel *panel)
-+static void vlv_fixup_mipi_sequences(struct drm_i915_private *i915,
-+				     struct intel_panel *panel)
- {
- 	u8 *init_otp;
- 	int len;
-@@ -2000,6 +2000,41 @@ static void fixup_mipi_sequences(struct drm_i915_private *i915,
- 	panel->vbt.dsi.sequence[MIPI_SEQ_INIT_OTP] = init_otp + len - 1;
- }
- 
-+/*
-+ * Some machines (eg. Lenovo 82TQ) appear to have broken
-+ * VBT sequences:
-+ * - INIT_OTP is not present at all
-+ * - what should be in INIT_OTP is in DISPLAY_ON
-+ * - what should be in DISPLAY_ON is in BACKLIGHT_ON
-+ *   (along with the actual backlight stuff)
-+ *
-+ * To make those work we simply swap DISPLAY_ON and INIT_OTP.
-+ *
-+ * TODO: Do we need to limit this to specific machines,
-+ *       or examine the contents of the sequences to
-+ *       avoid false positives?
-+ */
-+static void icl_fixup_mipi_sequences(struct drm_i915_private *i915,
-+				     struct intel_panel *panel)
-+{
-+	if (!panel->vbt.dsi.sequence[MIPI_SEQ_INIT_OTP] &&
-+	    panel->vbt.dsi.sequence[MIPI_SEQ_DISPLAY_ON]) {
-+		drm_dbg_kms(&i915->drm, "Broken VBT: Swapping INIT_OTP and DISPLAY_ON sequences\n");
-+
-+		swap(panel->vbt.dsi.sequence[MIPI_SEQ_INIT_OTP],
-+		     panel->vbt.dsi.sequence[MIPI_SEQ_DISPLAY_ON]);
-+	}
-+}
-+
-+static void fixup_mipi_sequences(struct drm_i915_private *i915,
-+				 struct intel_panel *panel)
-+{
-+	if (DISPLAY_VER(i915) >= 11)
-+		icl_fixup_mipi_sequences(i915, panel);
-+	else if (IS_VALLEYVIEW(i915))
-+		vlv_fixup_mipi_sequences(i915, panel);
-+}
-+
- static void
- parse_mipi_sequence(struct drm_i915_private *i915,
- 		    struct intel_panel *panel)
--- 
-2.43.0
-
diff --git a/machines/coladose/configuration.nix b/machines/coladose/configuration.nix
@@ -18,12 +18,6 @@
 
     kernelParams   = [ "fbcon=rotate:1" ];
     kernelPackages = pkgs.linuxPackages_latest;
-    kernelPatches  = [
-      {
-        name = "fix DSI init";
-        patch = ./0001-drm-i915-dsi-Go-back-to-the-previous-INIT_OTP-DISPLA.patch;
-      }
-    ];
   };
 
   networking.wireless.iwd = {
diff --git a/machines/trabbi/matrix/synapse.nix b/machines/trabbi/matrix/synapse.nix
@@ -27,10 +27,10 @@
   services = {
     postgresql = {
       enable        = true;
-      ensureUsers = [{
-        name = "matrix-sliding-sync-proxy";
-        ensurePermissions."DATABASE syncv3" = "ALL PRIVILEGES";
-      }];
+      # ensureUsers = [{
+      #   name = "matrix-sliding-sync-proxy";
+      #   ensurePermissions."DATABASE syncv3" = "ALL PRIVILEGES";
+      # }];
       ensureDatabases = [ "syncv3" ];
       initialScript = pkgs.writeText "synapse-init.sql" ''
         CREATE ROLE "matrix-synapse" WITH LOGIN;

@@ -41,19 +41,18 @@
       '';
     };
 
+    matrix-sliding-sync = {
+      enable = true;
+      environmentFile = config.age.secrets.matrix-sliding-sync-env.path;
+      settings = {
+        SYNCV3_SERVER   = "https://matrix.ctu.cx";
+        SYNCV3_BINDADDR = "[::1]:8009";
+      };
+    };
+
     matrix-synapse = {
       enable         = true;
       withJemalloc   = true;
-
-      sliding-sync = {
-        enable = true;
-        environmentFile = config.age.secrets.matrix-sliding-sync-env.path;
-        settings = {
-          SYNCV3_SERVER   = "https://matrix.ctu.cx";
-          SYNCV3_BINDADDR = "[::1]:8009";
-        };
-      };
-
       settings       = {
         server_name                     = "ctu.cx";
         public_baseurl                  = "https://matrix.ctu.cx/";