fix: minor fixes and shit

This commit is contained in:
jacekpoz 2023-10-13 23:11:29 +02:00
parent 20a5885099
commit 0cb9f263bd
No known key found for this signature in database
GPG key ID: 94E812A8B12AAE3C
4 changed files with 83 additions and 105 deletions

View file

@ -1,9 +1,9 @@
{
config,
config',
pkgs,
lib,
inputs,
config',
...
}: {
nixpkgs = {
@ -29,15 +29,7 @@
efi.canTouchEfiVariables = true;
};
kernelPackages = pkgs.linuxPackages_zen;
extraModulePackages = with config.boot.kernelPackages; [
(
ddcci-driver.overrideAttrs (o: {
#patches = (o.patches or [ ]) ++ [
# ./ddcci_semaphore_fix.patch
#];
})
)
];
extraModulePackages = with config.boot.kernelPackages; [ ddcci-driver ];
kernelModules = [ "ddcci" ];
initrd.kernelModules = [ "amdgpu" ];
kernelParams = [

View file

@ -1,16 +0,0 @@
diff --git a/ddcci/ddcci.c b/ddcci/ddcci.c
index ea76352..3c75b90 100644
--- a/ddcci/ddcci.c
+++ b/ddcci/ddcci.c
@@ -39,7 +39,11 @@ static int autoprobe_addr_count = 5;
static dev_t ddcci_cdev_first;
static dev_t ddcci_cdev_next;
static dev_t ddcci_cdev_end;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
+static DEFINE_SEMAPHORE(core_lock, 1);
+#else
static DEFINE_SEMAPHORE(core_lock);
+#endif
struct bus_type ddcci_bus_type;
EXPORT_SYMBOL_GPL(ddcci_bus_type);

View file

@ -1,9 +1,9 @@
{
lib,
config',
inputs,
lib,
pkgs,
self,
config',
...
}: {
home-manager = {

View file

@ -15,84 +15,86 @@ in {
substituters = [ "https://helix.cachix.org" ];
trusted-public-keys = [ "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" ];
};
programs.helix = {
enable = true;
package = inputs.helix.packages.${pkgs.system}.default.overrideAttrs (self: {
makeWrapperArgs = with pkgs;
self.makeWrapperArgs
or []
++ [
"--suffix"
"PATH"
":"
(lib.makeBinPath [
rustfmt
rust-analyzer
nil
clang-tools
nodePackages.bash-language-server
nodePackages.vscode-css-languageserver-bin
nodePackages.vscode-langservers-extracted
])
];
});
settings = {
theme = "catppuccin_mocha";
editor = {
scrolloff = 7;
mouse = false;
middle-click-paste = false;
line-number = "relative";
auto-completion = false;
auto-format = false;
completion-replace = true;
true-color = true;
undercurl = true;
rulers = [ 80 ];
bufferline = "multiple";
color-modes = true;
lsp = {
display-messages = true;
display-inlay-hints = true;
};
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
auto-pairs = false;
whitespace.render.newline = "all";
indent-guides.render = true;
};
};
languages = {
language-server = {
nil = {
command = lib.getExe pkgs.nil;
config.nil.formatting.command = [ "${lib.getExe pkgs.alejandra}" "-q" ];
};
clangd = {
command = "${pkgs.clang-tools}/bin/clangd";
clangd.fallbackFlags = [ "-std=c++2b" ];
};
vscode-css-language-server = {
command = "${pkgs.nodePackages.vscode-css-languageserver-bin}/bin/css-languageserver";
args = [ "--stdio" ];
};
};
language = [
{
name = "rust";
home-manager.users.${config'.username} = {
programs.helix = {
enable = true;
package = inputs.helix.packages.${pkgs.system}.default.overrideAttrs (self: {
makeWrapperArgs = with pkgs;
self.makeWrapperArgs
or []
++ [
"--suffix"
"PATH"
":"
(lib.makeBinPath [
rustfmt
rust-analyzer
nil
clang-tools
nodePackages.bash-language-server
nodePackages.vscode-css-languageserver-bin
nodePackages.vscode-langservers-extracted
])
];
});
settings = {
theme = "catppuccin_mocha";
editor = {
scrolloff = 7;
mouse = false;
middle-click-paste = false;
line-number = "relative";
auto-completion = false;
auto-format = false;
}
{
name = "html";
file-types = [ "html" ];
}
{
name = "c";
}
];
completion-replace = true;
true-color = true;
undercurl = true;
rulers = [ 80 ];
bufferline = "multiple";
color-modes = true;
lsp = {
display-messages = true;
display-inlay-hints = true;
};
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
auto-pairs = false;
whitespace.render.newline = "all";
indent-guides.render = true;
};
};
languages = {
language-server = {
nil = {
command = lib.getExe pkgs.nil;
config.nil.formatting.command = [ "${lib.getExe pkgs.alejandra}" "-q" ];
};
clangd = {
command = "${pkgs.clang-tools}/bin/clangd";
clangd.fallbackFlags = [ "-std=c++2b" ];
};
vscode-css-language-server = {
command = "${pkgs.nodePackages.vscode-css-languageserver-bin}/bin/css-languageserver";
args = [ "--stdio" ];
};
};
language = [
{
name = "rust";
auto-format = false;
}
{
name = "html";
file-types = [ "html" ];
}
{
name = "c";
}
];
};
};
};
};