Compare commits

..

13 Commits

18 changed files with 431 additions and 272 deletions
+3
View File
@@ -10,6 +10,7 @@
- [*] nie wyłączaj głądzika przy pisaniu
- [*] prędkość przewijania na gładziku
- domyślne programy - rozpisać jakie
- libreoffice writer dla .doc
- [*] wskaźnik myszy
- menedżer plików
- rozwinięty terminal
@@ -85,3 +86,5 @@
26. https://redlib.nadeko.net/r/unixporn/comments/1l5ll27/hyprland_i_3_quickshell/
27. Donut browser, Camoufox
28. cups, sane w home-manager
29. earlyoom
30. Llama.cpp, expose via tailscale, allow from homelab's openwebui
Generated
+223 -13
View File
@@ -1,5 +1,26 @@
{
"nodes": {
"acer-wmi-ext": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1776998627,
"narHash": "sha256-n0ENc4Xi1d3ApoHTRsfssC6AAroFgIKXJzJFykxNanY=",
"owner": "Lumpiasty",
"repo": "acer-wmi-ext",
"rev": "d0be381bbd661ed4bb327a9c92b980a0b9edacac",
"type": "github"
},
"original": {
"owner": "Lumpiasty",
"ref": "main",
"repo": "acer-wmi-ext",
"type": "github"
}
},
"cf": {
"locked": {
"lastModified": 1756852014,
@@ -23,11 +44,11 @@
]
},
"locked": {
"lastModified": 1776481103,
"narHash": "sha256-Shpva2KLLCPrccheErmYM7lFj9oNZukp9Rt5OyK+lz4=",
"lastModified": 1776913134,
"narHash": "sha256-/9vfRJTDh9Y4Duo862rzDqBIN7cEFTsAffVZ/UvxVas=",
"owner": "sadjow",
"repo": "claude-code-nix",
"rev": "bd9193ae204d0c05a69c9d943ee71c0de57454c9",
"rev": "20e4b82d08d97bf45d78f32c31eb3509db1c2f2a",
"type": "github"
},
"original": {
@@ -37,6 +58,33 @@
"type": "github"
}
},
"cppnix": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts",
"git-hooks-nix": "git-hooks-nix",
"nixpkgs": [
"nixbsd",
"nixpkgs"
],
"nixpkgs-23-11": "nixpkgs-23-11",
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1771531533,
"narHash": "sha256-E6uWPzQoMpzUb+2kcrxaYsfhUXjyIAoTpI6DPtbe1Y0=",
"owner": "rhelmot",
"repo": "nix",
"rev": "d623444c12428e69a3269d3b4b40200f2b4618fc",
"type": "github"
},
"original": {
"owner": "rhelmot",
"ref": "freebsd-safe",
"repo": "nix",
"type": "github"
}
},
"crane": {
"locked": {
"lastModified": 1765145449,
@@ -84,6 +132,36 @@
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_3": {
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"revCount": 69,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1627913399,
@@ -99,6 +177,28 @@
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixbsd",
"cppnix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@@ -132,6 +232,41 @@
"type": "github"
}
},
"git-hooks-nix": {
"inputs": {
"flake-compat": [
"nixbsd",
"cppnix"
],
"gitignore": [
"nixbsd",
"cppnix"
],
"nixpkgs": [
"nixbsd",
"cppnix",
"nixpkgs"
],
"nixpkgs-stable": [
"nixbsd",
"cppnix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1734279981,
"narHash": "sha256-NdaCraHPp8iYMWzdXAt5Nv6sA3MUzlCiGiR586TCwo0=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "aa9f40c906904ebd83da78e7f328cd8aeaeae785",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
@@ -161,11 +296,11 @@
]
},
"locked": {
"lastModified": 1776454077,
"narHash": "sha256-7zSUFWsU0+jlD7WB3YAxQ84Z/iJurA5hKPm8EfEyGJk=",
"lastModified": 1776964438,
"narHash": "sha256-AF0cby9Xuijr5qaFpYKbm1mExV956Hk233bel6QxpFw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "565e5349208fe7d0831ef959103c9bafbeac0681",
"rev": "e09259dd2e147d35ef889784b51e89b0a10ffe15",
"type": "github"
},
"original": {
@@ -199,6 +334,27 @@
"type": "github"
}
},
"mini-tmpfiles": {
"inputs": {
"nixpkgs": [
"nixbsd",
"nixpkgs"
]
},
"locked": {
"lastModified": 1742754557,
"narHash": "sha256-nGxgiNhA94eSl8jcQwCboJ5Ed132z8yrFdOoT+rf8bE=",
"owner": "nixos-bsd",
"repo": "mini-tmpfiles",
"rev": "534ee577692c7092fdcd035f89bc29b663c6f9ca",
"type": "github"
},
"original": {
"owner": "nixos-bsd",
"repo": "mini-tmpfiles",
"type": "github"
}
},
"nix-flatpak": {
"locked": {
"lastModified": 1767983141,
@@ -238,13 +394,33 @@
"type": "github"
}
},
"nixbsd": {
"inputs": {
"cppnix": "cppnix",
"flake-compat": "flake-compat_3",
"mini-tmpfiles": "mini-tmpfiles",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1777600581,
"narHash": "sha256-DbKmDIFNLqR8xXnSepJPr29FngkiPDa8+vAErZRrQUA=",
"path": "/home/user/Projects/nixbsd",
"type": "path"
},
"original": {
"path": "/home/user/Projects/nixbsd",
"type": "path"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1775490113,
"narHash": "sha256-2ZBhDNZZwYkRmefK5XLOusCJHnoeKkoN95hoSGgMxWM=",
"lastModified": 1776830795,
"narHash": "sha256-PAfvLwuHc1VOvsLcpk6+HDKgMEibvZjCNvbM1BJOA7o=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "c775c2772ba56e906cbeb4e0b2db19079ef11ff7",
"rev": "72674a6b5599e844c045ae7449ba91f803d44ebc",
"type": "github"
},
"original": {
@@ -256,11 +432,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1776169885,
"narHash": "sha256-l/iNYDZ4bGOAFQY2q8y5OAfBBtrDAaPuRQqWaFHVRXM=",
"lastModified": 1776548001,
"narHash": "sha256-ZSK0NL4a1BwVbbTBoSnWgbJy9HeZFXLYQizjb2DPF24=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4bd9165a9165d7b5e33ae57f3eecbcb28fb231c9",
"rev": "b12141ef619e0a9c1c84dc8c684040326f27cdcc",
"type": "github"
},
"original": {
@@ -270,9 +446,41 @@
"type": "github"
}
},
"nixpkgs-23-11": {
"locked": {
"lastModified": 1717159533,
"narHash": "sha256-oamiKNfr2MS6yH64rUn99mIZjc45nGJlj9eGth/3Xuw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446",
"type": "github"
}
},
"nixpkgs-regression": {
"locked": {
"lastModified": 1643052045,
"narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
}
},
"peerix": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-compat": "flake-compat_4",
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs"
@@ -340,11 +548,13 @@
},
"root": {
"inputs": {
"acer-wmi-ext": "acer-wmi-ext",
"claude-code": "claude-code",
"home-manager": "home-manager",
"lanzaboote": "lanzaboote",
"nix-flatpak": "nix-flatpak",
"nix-sweep": "nix-sweep",
"nixbsd": "nixbsd",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"peerix": "peerix",
+10
View File
@@ -30,6 +30,14 @@
url = "git+ssh://git@gitea.lumpiasty.xyz/Lumpiasty/peerix.git"; # fork of github:sophronesis/peerix
inputs.nixpkgs.follows = "nixpkgs";
};
acer-wmi-ext = {
url = "github:Lumpiasty/acer-wmi-ext/main";
inputs.nixpkgs.follows = "nixpkgs";
};
nixbsd = {
url = "path:/home/user/Projects/nixbsd";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixos-hardware, ... }@inputs:
@@ -37,11 +45,13 @@
nixosConfigurations =
let
mkNixosSystem = import lib/mkNixosSystem.nix inputs;
mkNixbsdSystem = import lib/mkNixbsdSystem.nix inputs;
in
with nixos-hardware.nixosModules; {
x260 = mkNixosSystem lenovo-thinkpad-x260 hosts/x260.nix;
acer = mkNixosSystem {} hosts/acer.nix;
gaming-pc = mkNixosSystem {} hosts/gaming-pc.nix;
bestieTest = mkNixbsdSystem hosts/bestieTest.nix;
};
};
}
+23 -3
View File
@@ -11,7 +11,6 @@
name = "Lumpiasty";
email = "arek.dzski@gmail.com";
};
signing.format = null; # New default
};
programs.vscode = {
@@ -47,12 +46,33 @@
nodejs_24
codex
claude-code
opencode
(
# Wrapping opencode to set the OPENCODE_ENABLE_EXA environment variable
runCommand "opencode" {
buildInputs = [ makeWrapper ];
} ''
mkdir -p $out/bin
makeWrapper ${pkgs.opencode}/bin/opencode $out/bin/opencode \
--set OPENCODE_ENABLE_EXA "1"
''
)
winbox4
amdgpu_top
dua
];
# Inject the opencode-claude-auth plugin into the user's opencode.json without
# overwriting it — replaces any stale store path for this plugin and adds if absent.
home.activation.opencodeClaudeAuth = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
cfg="$HOME/.config/opencode/opencode.json"
mkdir -p "$(dirname "$cfg")"
[ -f "$cfg" ] || echo '{}' > "$cfg"
tmp=$(mktemp)
${pkgs.jq}/bin/jq --arg path "file://${pkgs.opencode-claude-auth}" '
.plugin = ((.plugin // []) | map(select(test("opencode-claude-auth") | not)) + [$path])
' "$cfg" > "$tmp" && mv "$tmp" "$cfg"
'';
# SSH config
programs.ssh = {
enable = true;
@@ -95,4 +115,4 @@
''
);
};
}
}
+6
View File
@@ -15,6 +15,12 @@
programs.gpg.enable = true;
programs.git.signing = {
format = "openpgp";
key = "EA287B39E5F69945";
signByDefault = true;
};
programs.bash.enable = lib.mkDefault true;
};
}
+11 -25
View File
@@ -8,41 +8,27 @@
vesktop
spotify
pass-wayland
(teamspeak6-client.overrideAttrs (old: {
version = "6.0.0-beta3";
src = pkgs.fetchurl {
url = "https://files.teamspeak-services.com/pre_releases/client/6.0.0-beta3/teamspeak-client.tar.gz";
sha256 = "sha256-KR9wVjqqoV2ZNJj+zjErR5TdYS7Y/HcaXAQekX1NzDM=";
};
}))
teamspeak6-client
easyeffects
libreoffice-qt6-fresh
vlc
inkscape
# Working aroung bug of qtpass
# https://github.com/IJHack/QtPass/issues/663
(
# https://nixos.wiki/wiki/Nix_Cookbook#Wrapping_packages
runCommand "qtpass" {
buildInputs = [ makeWrapper ];
} ''
mkdir $out
# Link every top-level folder from pkgs.hello to our new target
ln -s ${qtpass}/* $out
# Except the bin folder
rm $out/bin
mkdir $out/bin
# creating a wrapper
makeWrapper ${qtpass}/bin/qtpass $out/bin/qtpass \
--set QT_QPA_PLATFORM xcb
''
)
(qtpass.overrideAttrs (old: rec {
version = "1.7.0";
src = pkgs.fetchFromGitHub {
owner = "IJHack";
repo = "QtPass";
tag = "v${version}";
hash = "sha256-0qbKM24v7xRiuBEs+rHP2l1W8bCl7uJRc3jzpDdjp/c=";
};
}))
signal-desktop
transmission_4-qt6
thunderbird
pwgen
siyuan
gimp
ventoy-full-qt
];
programs.librewolf.enable = true;
services.easyeffects.enable = true;
+30
View File
@@ -0,0 +1,30 @@
{ config, pkgs, lib, ... }: {
nixpkgs.hostPlatform = "x86_64-freebsd";
nixpkgs.config.allowUnsupportedSystem = true;
users.users.root.initialPassword = "toor";
networking.dhcpcd.wait = "background";
users.users.bestie = {
isNormalUser = true;
description = "your bestie";
extraGroups = [ "wheel" ];
inherit (config.users.users.root) initialPassword;
};
services.sshd.enable = true;
boot.loader.stand-freebsd.enable = true;
fileSystems."/" = {
device = "/dev/gpt/nixos";
fsType = "ufs";
};
fileSystems."/boot" = {
device = "/dev/msdosfs/ESP";
fsType = "msdosfs";
};
virtualisation.vmVariant.virtualisation.diskImage = "./${config.system.name}.qcow2";
}
+60
View File
@@ -0,0 +1,60 @@
{
self,
nixpkgs,
nixbsd,
home-manager,
nix-flatpak,
plasma-manager,
lanzaboote,
claude-code,
nix-sweep,
peerix,
acer-wmi-ext,
...
}:
hostConfig:
nixbsd.lib.nixbsdSystem {
modules = [
# Cross-compile FreeBSD from Linux, builds dispatched to remote builder
{
nixpkgs.buildPlatform = "x86_64-linux";
nixpkgs.config.allowUnsupportedSystem = true;
nixpkgs.overlays = [
(final: prev: {
# No-op emulator for FreeBSD - builds happen on remote builder where binaries run natively
freebsdEmulator = prev.runCommand "freebsd-emulator" { } ''
mkdir -p $out/bin
cat > $out/bin/freebsd-exec << 'SCRIPT'
#!/bin/sh
exec "$@"
SCRIPT
chmod +x $out/bin/freebsd-exec
'';
# Override mesonEmulatorHook to not require a real emulator for FreeBSD
mesonEmulatorHook =
let
canExec = prev.stdenv.hostPlatform.canExecute prev.stdenv.targetPlatform;
emulatorPath = "${final.freebsdEmulator}/bin/freebsd-exec";
in
if canExec then
prev.mesonEmulatorHook
else
prev.makeSetupHook
{
name = "mesonEmulatorHook";
substitutions = {
crossFile = prev.writeText "cross-file.conf" ''
[binaries]
exe_wrapper = '${prev.lib.escape [ "'" "\\" ] emulatorPath}'
'';
};
}
"${nixpkgs.outPath}/pkgs/build-support/setup-hooks/meson/emulator-hook.sh";
})
];
}
hostConfig
];
}
+6 -1
View File
@@ -8,6 +8,7 @@
claude-code,
nix-sweep,
peerix,
acer-wmi-ext,
...
}:
hardwareConfig: hostConfig:
@@ -17,10 +18,14 @@ nixpkgs.lib.nixosSystem {
specialArgs = {
inherit nix-flatpak;
inherit plasma-manager;
inherit acer-wmi-ext;
};
modules = [
{
nixpkgs.overlays = [ claude-code.overlays.default ];
nixpkgs.overlays = [
claude-code.overlays.default
acer-wmi-ext.overlays.default
];
nix.settings = {
substituters = [ "https://claude-code.cachix.org" ];
trusted-public-keys = [ "claude-code.cachix.org-1:YeXf2aNu7UTX8Vwrze0za1WEDS+4DuI2kVeWEE4fsRk=" ];
+34
View File
@@ -6,14 +6,48 @@ let
else if config.boot.loader.systemd-boot.enable then
config.boot.loader.systemd-boot.configurationLimit
else null;
# NixBSD builder VM SSH key (needs to be readable by root/nix-daemon)
builderKeyDir = "/etc/nix/builder-keys";
in
{
nix = {
daemonIOSchedClass = "idle";
daemonCPUSchedPolicy = "idle";
settings.trusted-users = [ "root" "user" ];
# FreeBSD remote builder VM (NixBSD)
distributedBuilds = true;
buildMachines = [
{
hostName = "192.168.122.100";
system = "x86_64-freebsd";
sshUser = "root";
sshKey = "${builderKeyDir}/nixbsd-builder";
maxJobs = 8;
speedFactor = 1;
supportedFeatures = [ "big-parallel" ];
}
];
settings.builders-use-substitutes = true;
};
# Install the builder SSH key where root/nix-daemon can read it
system.activationScripts.nixbsd-builder-key = ''
mkdir -p ${builderKeyDir}
cp /home/user/Projects/nixbsd-flake/keys/builder ${builderKeyDir}/nixbsd-builder
chmod 600 ${builderKeyDir}/nixbsd-builder
chown root:root ${builderKeyDir}/nixbsd-builder
'';
# Skip host key checking for the local builder VM (keys change on rebuild)
programs.ssh.extraConfig = ''
Host 192.168.122.100
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
LogLevel ERROR
'';
# Clean up nix store from old configurations usinx nix-sweep
services.nix-sweep = {
enable = true;
+5
View File
@@ -8,4 +8,9 @@
nixpkgs.overlays = [
(import ../../overlays/pkgs.nix)
];
# Ventoy has some blobs making it insecure
nixpkgs.config.permittedInsecurePackages = [
"ventoy-qt5-1.1.10"
];
}
+1
View File
@@ -10,6 +10,7 @@
tree
usbutils
pciutils
efibootmgr
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
+1 -15
View File
@@ -1,18 +1,4 @@
self: super:
{
ddccontrol = super.callPackage ../pkgs/ddccontrol {};
# Pin some kde packages to 6.3.1, 6.3.2 breaks thunderbolt
# kdePackages = super.kdePackages.overrideScope(kdeFinal: kdePrev: {
# kwin = kdePrev.kwin.overrideAttrs (prevAttrs: {
# src = super.fetchurl {
# url = "mirror://kde/stable/plasma/6.3.1/kwin-6.3.1.tar.xz";
# hash = "sha256-mlC6DqpiCXg73vu2aOV9DL36cc6Ov70X/kRtttdz8kI=";
# };
# version = "6.3.1";
# });
# });
linuxPackages = super.linuxPackages.extend (lpself: lpsuper: {
acer-wmi-ext = lpsuper.callPackage ../pkgs/acer-wmi-ext {};
acer-wmi-battery = lpsuper.callPackage ../pkgs/acer-wmi-battery {};
});
opencode-claude-auth = super.callPackage ../pkgs/opencode-claude-auth {};
}
-50
View File
@@ -1,50 +0,0 @@
# Custom module for Acer WMI features, like battery charge limit
{
lib,
stdenv,
fetchFromGitHub,
kernel
}:
stdenv.mkDerivation {
pname = "acer-wmi-battery";
version = "0.0.0";
src = fetchFromGitHub {
owner = "frederik-h";
repo = "acer-wmi-battery";
rev = "0889d3ea54655eaa88de552b334911ce7375952f";
sha256 = "sha256-mI6Ob9BmNfwqT3nndWf3jkz8f7tV10odkTnfApsNo+A=";
};
nativeBuildInputs = [ kernel.moduleBuildDependencies ];
# Makefile provided in repo is useless, hardcoded paths, not using it
setSourceRoot = ''
export sourceRoot=$(pwd)/source
'';
makeFlags = [
"-C"
"${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"M=$(sourceRoot)"
];
patchPhase = ''
cat > Kbuild <<EOF
obj-m := acer-wmi-battery.o
EOF
'';
buildFlags = [ "modules" ];
installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ];
installTargets = [ "modules_install" ];
meta = {
description = "Acer WMI kernel module for battery charge limit";
homepage = "https://github.com/frederik-h/acer-wmi-battery";
license = lib.licenses.gpl2;
platforms = lib.platforms.linux;
};
}
-57
View File
@@ -1,57 +0,0 @@
# Custom module for Acer WMI features, like battery charge limit and fan control
{
lib,
stdenv,
fetchFromGitHub,
kernel
}:
stdenv.mkDerivation {
pname = "acer-wmi-ext";
version = "0.0.0";
src = fetchFromGitHub {
owner = "TenSeventy7";
repo = "acer-wmi-ext";
rev = "78aaf9392e1fbdd62c3ec9944e9615505485ec04";
sha256 = "sha256-AmhBnZiy7llYqHB9gD6T7lK4L2qhtl5pBWAf+H+V8hE=";
};
nativeBuildInputs = [ kernel.moduleBuildDependencies ];
# Makefile provided in repo is useless, hardcoded paths, not using it
setSourceRoot = ''
export sourceRoot=$(pwd)/source
'';
makeFlags = [
"-C"
"${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"M=$(sourceRoot)"
];
patchPhase = ''
# Add support for Acer Swift 14 (SFG14-63) model
# Using values found by playing with performance settings in acer's software on windows
# https://github.com/hirschmann/nbfc/wiki/Probe-the-EC's-registers
# Also, disable USB control because not sure, need to verify
patch -p1 < ${./sfg14-63.patch}
# Create Kbuild file for module
cat > Kbuild <<EOF
obj-m := acer-wmi-ext.o
EOF
'';
buildFlags = [ "modules" ];
installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ];
installTargets = [ "modules_install" ];
meta = {
description = "Acer WMI kernel module for battery charge limit and fan control";
homepage = "https://github.com/TenSeventy7/acer-wmi-ext";
license = lib.licenses.gpl2;
platforms = lib.platforms.linux;
};
}
-44
View File
@@ -1,44 +0,0 @@
diff --git a/acer-wmi-ext.c b/acer-wmi-ext.c
index 24112bf..7829c19 100644
--- a/acer-wmi-ext.c
+++ b/acer-wmi-ext.c
@@ -69,9 +69,9 @@ struct set_battery_health_control_output {
enum battery_mode { HEALTH_MODE = 1, CALIBRATION_MODE = 2 };
-#define ACER_SYSTEM_CONTROL_MODE_EC_OFFSET 0x45
+#define ACER_SYSTEM_CONTROL_MODE_EC_OFFSET 0x10
enum system_control_mode {
- SYSTEM_CONTROL_BALANCED = 1,
+ SYSTEM_CONTROL_BALANCED = 0,
SYSTEM_CONTROL_SILENT = 2,
SYSTEM_CONTROL_PERFORMANCE = 3,
};
@@ -146,9 +146,9 @@ static struct quirk_entry quirk_unknown = {
static struct quirk_entry quirk_acer_system_control_mode = {
.system_control_mode = 1,
};
-static struct quirk_entry quirk_acer_sfg174_73 = {
+static struct quirk_entry quirk_acer_sfg14_63 = {
.system_control_mode = 1, // Enable system control mode for this model
- .usb_charge_mode = 1, // Enable USB charge mode for this model
+ .usb_charge_mode = 0, // Disable USB charge mode for this model
};
/*
@@ -165,12 +165,12 @@ static int __init dmi_matched(const struct dmi_system_id *dmi)
static const struct dmi_system_id acer_quirks[] __initconst = {
{
.callback = dmi_matched,
- .ident = "Acer Swift SFG14-73",
+ .ident = "Acer Swift SFG14-63",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Swift SFG14-73"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Swift SFG14-63"),
},
- .driver_data = &quirk_acer_sfg174_73,
+ .driver_data = &quirk_acer_sfg14_63,
},
};
-64
View File
@@ -1,64 +0,0 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
autoreconfHook,
intltool,
libxml2,
pciutils,
pkg-config,
gtk2,
ddccontrol-db,
}:
stdenv.mkDerivation rec {
pname = "ddccontrol";
version = "1.0.3";
src = fetchFromGitHub {
owner = "ddccontrol";
repo = "ddccontrol";
rev = version;
sha256 = "sha256-qyD6i44yH3EufIW+LA/LBMW20Tejb49zvsDfv6YFD6c=";
};
nativeBuildInputs = [
autoreconfHook
intltool
pkg-config
];
buildInputs = [
libxml2
pciutils
gtk2
ddccontrol-db
];
configureFlags = [
"--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
];
prePatch = ''
substituteInPlace configure.ac \
--replace \
"\$""{datadir}/ddccontrol-db" \
"${ddccontrol-db}/share/ddccontrol-db"
substituteInPlace src/ddcpci/Makefile.am \
--replace "chmod 4711" "chmod 0711"
'';
preConfigure = ''
intltoolize --force
'';
meta = with lib; {
description = "Program used to control monitor parameters by software";
homepage = "https://github.com/ddccontrol/ddccontrol";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with lib.maintainers; [ pakhfn ];
};
}
+18
View File
@@ -0,0 +1,18 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation {
pname = "opencode-claude-auth";
version = "1.5.0";
src = fetchurl {
url = "https://registry.npmjs.org/opencode-claude-auth/-/opencode-claude-auth-1.5.0.tgz";
hash = "sha512-5NSL+x++VTe2ZrFSznXKv7imiKObIBz0QXPuL+g1NAXAcdTGcbEbQBvvHZeIaSBNjmwpY2MR67Yez1f3LlPl7w==";
};
dontBuild = true;
installPhase = ''
mkdir -p $out
cp -r ./ $out/
'';
}