Compare commits
No commits in common. "1346cb93af4c5042af051105a4737e9fe25e8ea0" and "a193b02ce039ba5a05af9896622a79bd47d85ac3" have entirely different histories.
1346cb93af
...
a193b02ce0
@ -56,7 +56,7 @@
|
||||
];
|
||||
};
|
||||
in {
|
||||
inherit (pkgs) wayqt dfl-ipc dfl-applications dfl-utils qtgreet xwaylandvideobridge obs-cli rgb_keyboard;
|
||||
inherit (pkgs) wayqt dfl-ipc dfl-applications dfl-utils qtgreet xwaylandvideobridge obs-cli;
|
||||
};
|
||||
});
|
||||
}
|
||||
|
@ -166,8 +166,6 @@
|
||||
kernel.sysctl = {
|
||||
# League of Legends under Linux
|
||||
"abi.vsyscall32" = 0;
|
||||
# Fedora 39
|
||||
"vm.max_map_count" = 2147483642;
|
||||
};
|
||||
|
||||
extraModulePackages = [ kernel.vendor-reset ];
|
||||
|
@ -19,11 +19,10 @@
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci"
|
||||
"aesni-intel"
|
||||
# NOTE: See https://github.com/NixOS/nixos-hardware/blob/master/common/pc/laptop/acpi_call.nix
|
||||
#"acpi_call" ];
|
||||
];
|
||||
kernelModules = [ "dm-snapshot" "aesni-intel" ];
|
||||
kernelModules = [ "dm-snapshot" ];
|
||||
luks.devices = {
|
||||
cryptroot = {
|
||||
device = "/dev/disk/by-uuid/e1011c40-e1a9-4ce6-b89f-f14b046639c1";
|
||||
|
@ -20,7 +20,7 @@ in {
|
||||
(pkgs.callPackage ./wrapper.nix {
|
||||
inherit (pkgs) retroarch;
|
||||
cores = with pkgs.libretro; [
|
||||
mgba mupen64plus melonds desmume dolphin pcsx2
|
||||
mgba mupen64plus melonds desmume dolphin
|
||||
];
|
||||
})
|
||||
|
||||
|
@ -7,15 +7,7 @@ in {
|
||||
enable = lib.mkEnableOption "Enable and configure gamemode";
|
||||
};
|
||||
|
||||
config = let
|
||||
keyboardBrightnessScript = pkgs.writeShellScript "keyboard-brightness.sh" ''
|
||||
${pkgs.rgb_keyboard}/bin/rgb_keyboard -l ripple -b "$1"
|
||||
'';
|
||||
in lib.mkIf cfg.enable {
|
||||
security.sudo.extraConfig = ''
|
||||
${config.ptw.system.singleUser} ALL = (ALL) NOPASSWD: ${keyboardBrightnessScript}
|
||||
'';
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.gamemode = {
|
||||
enable = true;
|
||||
enableRenice = true;
|
||||
@ -37,28 +29,14 @@ in {
|
||||
};
|
||||
|
||||
custom = let
|
||||
switchScript = groupName: "${pkgs.dbus}/bin/dbus-send --print-reply --dest=org.fcitx.Fcitx5 /controller org.fcitx.Fcitx.Controller1.SwitchInputMethodGroup string:'${groupName}'";
|
||||
switchScript = groupName: pkgs.writeShellScript "switch-input-group.sh" ''
|
||||
${pkgs.dbus}/bin/dbus-send --print-reply --dest=org.fcitx.Fcitx5 /controller org.fcitx.Fcitx.Controller1.SwitchInputMethodGroup string:'${groupName}'
|
||||
'';
|
||||
pauseFcitx = switchScript "Group 2";
|
||||
resumeFcitx = switchScript "Group 1";
|
||||
|
||||
# The scripts
|
||||
start = pkgs.writeShellScript "gamemode-start.sh" ''
|
||||
# Disable Fcitx's IME
|
||||
${pauseFcitx}
|
||||
|
||||
# Turn on the keyboard lights
|
||||
${config.security.wrapperDir}/sudo ${keyboardBrightnessScript} 1
|
||||
'';
|
||||
end = pkgs.writeShellScript "gamemode-end.sh" ''
|
||||
# Resume Fcitx's IME
|
||||
${resumeFcitx}
|
||||
|
||||
# Turn off the keyboard lights
|
||||
${config.security.wrapperDir}/sudo ${keyboardBrightnessScript} 0
|
||||
'';
|
||||
in {
|
||||
start = "${start}";
|
||||
end = "${end}";
|
||||
start = ''${pauseFcitx}'';
|
||||
end = ''${resumeFcitx}'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,30 +0,0 @@
|
||||
{
|
||||
stdenv
|
||||
, fetchFromGitHub
|
||||
, gcc, gnumake
|
||||
, libusb
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rgb_keyboard";
|
||||
version = "20230430";
|
||||
src = fetchFromGitHub {
|
||||
owner = "PapaTutuWawa";
|
||||
repo = "rgb_keyboard";
|
||||
rev = "5bbdafea77ef3c3eb47081494f3b58abcd5c4e27";
|
||||
sha256 = "0m5hvlhqncy1qn5v6gpsz9qd2p4cvcjjnma08vb4b2ybq4kfv7qw";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
libusb
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
${gnumake}/bin/make build
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin/
|
||||
cp rgb_keyboard $out/bin/
|
||||
'';
|
||||
}
|
@ -123,6 +123,4 @@ in {
|
||||
gajim = prev.callPackage ./applications/networking/instant-messengers/gajim/default.nix {
|
||||
nbxmpp = prev.python3.pkgs.callPackage ./applications/networking/instant-messengers/gajim/nbxmpp.nix {};
|
||||
};
|
||||
|
||||
rgb_keyboard = prev.callPackage ./applications/desktop/rgb_keyboard/default.nix {};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user