lots of updates

This commit is contained in:
Matt Nish-Lapidus 2024-11-29 12:28:08 -05:00
parent 11c3a4b076
commit c7be0ba0dd
6 changed files with 131 additions and 245 deletions

View file

@ -8,7 +8,7 @@
tab q w e r t y u i o p [ ] \
caps a s d f g h j k l ; ' ret
lsft z x c v b n m , . / rsft
lctl lmet lalt spc ralt rmet)
lctrl lmet lalt spc ralt rctrl)
(defalias
supesc (tap-hold-next-release 200 esc lmet)

217
flake.lock generated
View file

@ -1,60 +1,5 @@
{
"nodes": {
"flake-compat": {
"locked": {
"lastModified": 1717312683,
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixpkgs-wayland",
"nix-eval-jobs",
"nixpkgs"
]
},
"locked": {
"lastModified": 1722555600,
"narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "8471fe90ad337a8074e957b69ca4d0089218391d",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -100,25 +45,6 @@
"url": "https://github.com/kmonad/kmonad?dir=nix"
}
},
"lib-aggregate": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1732450403,
"narHash": "sha256-qYjJeHYUHDgfDsvMpIf9TRz0oAoMwvYP75XHObDjWIg=",
"owner": "nix-community",
"repo": "lib-aggregate",
"rev": "c817444fb8a3042c26be57d8640fb744bc1b516c",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "lib-aggregate",
"type": "github"
}
},
"musnix": {
"inputs": {
"nixpkgs": [
@ -139,34 +65,13 @@
"type": "github"
}
},
"nix-eval-jobs": {
"inputs": {
"flake-parts": "flake-parts",
"nix-github-actions": "nix-github-actions",
"nixpkgs": "nixpkgs_2",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1732631228,
"narHash": "sha256-/7Wyhp00yecUMPNz79gGZpjos8OLHqOfdiWWIQfZA1M=",
"owner": "nix-community",
"repo": "nix-eval-jobs",
"rev": "8f56354b794624689851b2d86c2ce0209cc8f0cf",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-eval-jobs",
"type": "github"
}
},
"nix-flatpak": {
"locked": {
"lastModified": 1732304879,
"narHash": "sha256-/DOW8VadE//HA6tuV2++NowYWi7Wa/FmJHXRJoTQnfQ=",
"lastModified": 1732867134,
"narHash": "sha256-YGtFJ/4SE37evvHX+OkS2klRdHlO7HvovaaxR/yWuWg=",
"owner": "gmodena",
"repo": "nix-flatpak",
"rev": "c84579946c03c996916be0fb6e1340f444c277af",
"rev": "01ca2cbd9fb5c29d73fac327f5a9a2a1a222e218",
"type": "github"
},
"original": {
@ -175,28 +80,6 @@
"type": "github"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
"nixpkgs-wayland",
"nix-eval-jobs",
"nixpkgs"
]
},
"locked": {
"lastModified": 1731952509,
"narHash": "sha256-p4gB3Rhw8R6Ak4eMl8pqjCPOLCZRqaehZxdZ/mbFClM=",
"owner": "nix-community",
"repo": "nix-github-actions",
"rev": "7b5f051df789b6b20d259924d349a9ba3319b226",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-github-actions",
"type": "github"
}
},
"nix-ld": {
"inputs": {
"nixpkgs": [
@ -249,21 +132,6 @@
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1732410305,
"narHash": "sha256-/hxIKRTBsdrnudJWDGaBN8wIjHovqVAVxXdi8ByVtck=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "87b6978992e2eb605732fba842cad0a7e14b2047",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1732350895,
@ -280,45 +148,6 @@
"type": "github"
}
},
"nixpkgs-wayland": {
"inputs": {
"flake-compat": "flake-compat",
"lib-aggregate": "lib-aggregate",
"nix-eval-jobs": "nix-eval-jobs",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1732803609,
"narHash": "sha256-k8N4oGnoVP3W4wH2fEIPOw9oGsoUhSUhJ+Si+j5qMTE=",
"owner": "nix-community",
"repo": "nixpkgs-wayland",
"rev": "790e2744814101364d435eee99fe1d0112abc686",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs-wayland",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1732238832,
"narHash": "sha256-sQxuJm8rHY20xq6Ah+GwIUkF95tWjGRd1X8xF+Pkk38=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8edf06bea5bcbee082df1b7369ff973b91618b8d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
@ -328,45 +157,7 @@
"nix-ld": "nix-ld",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-wayland": "nixpkgs-wayland"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs-wayland",
"nix-eval-jobs",
"nixpkgs"
]
},
"locked": {
"lastModified": 1723303070,
"narHash": "sha256-krGNVA30yptyRonohQ+i9cnK+CfCpedg6z3qzqVJcTs=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "14c092e0326de759e16b37535161b3cb9770cea3",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
"nixpkgs-stable": "nixpkgs-stable"
}
}
},

View file

@ -25,11 +25,6 @@
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs-wayland = {
url = "github:nix-community/nixpkgs-wayland";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-ld.url = "github:Mic92/nix-ld";
nix-ld.inputs.nixpkgs.follows = "nixpkgs";
};

View file

@ -161,7 +161,6 @@
bitwarden-desktop
tailscale
font-manager
ulauncher
vice
gpu-viewer
@ -517,23 +516,9 @@
systemd.user.enable = true;
systemd.user.sessionVariables = {
GSK_RENDERER = "ngl";
GSK_RENDERER = "gl";
MOZ_ENABLE_WAYLAND = 1;
};
systemd.user.services.ulauncher = {
Unit = {
Description = "Start Ulauncher";
PartOf=["grapical-session.target"];
};
Install = {
after = [ "graphical-session.target" ];
};
Service = {
ExecStart = ''${pkgs.ulauncher}/bin/ulauncher --hide-window'';
};
};
home.file.".npmrc".source = ../dotfiles/dot_npmrc;
# xdg.configFile."kmonad".source = ../dotfiles/dot_config/kmonad;

View file

@ -44,11 +44,11 @@
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 8;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_6_11;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot = {
initrd.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
kernelParams = [ "nvidia-drm.fbdev=1" "nvidia_drm.modeset=1" "amdgpu.sg_display=0"]; # "amd_pstate=guided"
kernelParams = [ "nvidia-drm.fbdev=1" "nvidia_drm.modeset=1"];
};
systemd.services.tailscaled.after = ["NetworkManager-wait-online.service"];
@ -96,6 +96,20 @@
forceFullCompositionPipeline = true;
package = config.boot.kernelPackages.nvidiaPackages.beta;
#package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
# version = "565.57.01";
# sha256_64bit = "sha256-buvpTlheOF6IBPWnQVLfQUiHv4GcwhvZW3Ks0PsYLHo=";
# sha256_aarch64 = "sha256-aDVc3sNTG4O3y+vKW87mw+i9AqXCY29GVqEIUlsvYfE=";
# openSha256 = "sha256-/tM3n9huz1MTE6KKtTCBglBMBGGL/GOHi5ZSUag4zXA=";
# settingsSha256 = "sha256-H7uEe34LdmUFcMcS6bz7sbpYhg9zPCb/5AmZZFTx1QA=";
# persistencedSha256 = "sha256-hdszsACWNqkCh8G4VBNitDT85gk9gJe1BlQ8LdrYIkg=";
# patchesOpen = [
# ./nvidia-6_12-patch
# ];
#};
prime = {
amdgpuBusId = "PCI:101:0:0";
nvidiaBusId = "PCI:1:0:0";
@ -278,10 +292,6 @@
services.kmonad = {
enable = true;
keyboards = {
# quefrency = {
# device = "/dev/input/by-id/usb-Keebio_Quefrency_Rev._5-event-kbd";
# config = builtins.readFile ../../dotfiles/dot_config/kmonad/quefrency.kbd;
# };
sinc = {
device = "/dev/input/by-id/usb-Keebio_Sinc_Rev._4-event-kbd";
config = builtins.readFile ../../dotfiles/dot_config/kmonad/sinc.kbd;
@ -363,10 +373,10 @@
# enable the OpenSSH daemon.
services.openssh.enable = true;
# services.avahi = {
# enable = true;
# nssmdns = true;
# };
services.avahi = {
enable = true;
nssmdns4 = true;
};
# add user accounts
users.users.emenel = {

View file

@ -0,0 +1,105 @@
diff --git a/kernel-open/nvidia-drm/nvidia-drm-drv.c b/kernel-open/nvidia-drm/nvidia-drm-drv.c
index 8cb94219..27b3cbd9 100644
--- a/kernel-open/nvidia-drm/nvidia-drm-drv.c
+++ b/kernel-open/nvidia-drm/nvidia-drm-drv.c
@@ -100,6 +100,11 @@
#include <drm/drm_atomic_helper.h>
#endif
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)
+#include <drm/drm_client.h>
+#endif
+
static int nv_drm_revoke_modeset_permission(struct drm_device *dev,
struct drm_file *filep,
NvU32 dpyId);
@@ -147,7 +152,7 @@
#if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
-#if defined(NV_DRM_OUTPUT_POLL_CHANGED_PRESENT)
+
static void nv_drm_output_poll_changed(struct drm_device *dev)
{
struct drm_connector *connector = NULL;
@@ -191,7 +196,7 @@
nv_drm_connector_list_iter_end(&conn_iter);
#endif
}
-#endif /* NV_DRM_OUTPUT_POLL_CHANGED_PRESENT */
+
static struct drm_framebuffer *nv_drm_framebuffer_create(
struct drm_device *dev,
@@ -229,9 +234,7 @@
.atomic_check = nv_drm_atomic_check,
.atomic_commit = nv_drm_atomic_commit,
- #if defined(NV_DRM_OUTPUT_POLL_CHANGED_PRESENT)
- .output_poll_changed = nv_drm_output_poll_changed,
- #endif
+
};
static void nv_drm_event_callback(const struct NvKmsKapiEvent *event)
@@ -1711,6 +1714,10 @@
.read = drm_read,
.llseek = noop_llseek,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)
+ // Rel. commit. "fs: move FMODE_UNSIGNED_OFFSET to fop_flags" (Christian Brauner, 9 Aug 2024)
+ .fop_flags = FOP_UNSIGNED_OFFSET,
+#endif
};
static const struct drm_ioctl_desc nv_drm_ioctls[] = {
@@ -1939,6 +1946,20 @@
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)
+static int hotplug_helper_client_hotplug(struct drm_client_dev *client)
+{
+ nv_drm_output_poll_changed(client->dev);
+ return 0;
+}
+
+static const struct drm_client_funcs nv_hotplug_helper_client_funcs = {
+ .owner = THIS_MODULE,
+ .hotplug = hotplug_helper_client_hotplug,
+};
+#endif
+
+
/*
* Helper function for allocate/register DRM device for given NVIDIA GPU ID.
@@ -2029,8 +2050,27 @@
nv_dev->next = dev_list;
dev_list = nv_dev;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)
+ /* Register a DRM client for receiving hotplug events */
+ struct drm_client_dev *client = kzalloc(sizeof(*client), GFP_KERNEL);
+ if (client == NULL || drm_client_init(dev, client,
+ "nv-hotplug-helper", &nv_hotplug_helper_client_funcs)) {
+ printk(KERN_WARNING "Failed to initialize the nv-hotplug-helper DRM client.");
+ goto failed_drm_client_init;
+ }
+
+ drm_client_register(client);
+ pr_info("Registered the nv-hotplug-helper DRM client.");
+#endif
+
return; /* Success */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)
+failed_drm_client_init:
+
+ kfree(client);
+#endif
+
failed_drm_register:
nv_drm_dev_free(dev);