optimizing

This commit is contained in:
Matt Nish-Lapidus 2024-10-01 16:57:09 -04:00
parent cef0ebd264
commit b417858ff5
4 changed files with 58 additions and 13 deletions

View file

@ -1,5 +1,5 @@
(defcfg
input (device-file "/dev/input/by-id/usb-Keebio_Quefrency_Rev._5-event-kbd")
input (device-file "/dev/input/by-id/usb-Keebio_Quefrency_Rev._5-event-if02")
output (uinput-sink "kmonad-quefrency")
fallthrough true
)

1
dotfiles/dot_npmrc Normal file
View file

@ -0,0 +1 @@
prefix=~/.npm-packages

View file

@ -46,7 +46,7 @@
gst_all_1.gstreamer
alsa-oss
fontconfig
powertop
usbutils
pciutils
util-linux
@ -64,8 +64,6 @@
sbcl
nodejs_18
platformio-core
real_time_config_quick_scan
borgmatic
kanata-with-cmd
wezterm
@ -131,6 +129,7 @@
libreoffice
plexamp
carla
wireplumber
audacity
supercollider-with-plugins
bitwig-studio
@ -152,6 +151,9 @@
openscad-lsp
plugdata
pavucontrol
qpwgraph
alsa-utils
# Audio plugins (LV2, VST2, VST3, LADSPA)
distrho
@ -168,7 +170,7 @@
username = "emenel";
homeDirectory = "/home/emenel";
sessionPath = [ "/home/emenel/.config/emacs/bin" ];
sessionPath = [ "/home/emenel/.config/emacs/bin" "/home/emenel/.npm-packages/bin" ];
sessionVariables = {
EDITOR = "emacsclient -r";
@ -282,8 +284,10 @@
"io.github.zen_browser.zen"
"com.github.johnfactotum.QuickLookup"
"com.heroicgameslauncher.hgl"
"io.github.dyegoaurelio.simple-wireplumber-gui"
];
home.file.".npmrc".source = ../dotfiles/dot_npmrc;
xdg.configFile."kmonad".source = ../dotfiles/dot_config/kmonad;
xdg.configFile."just".source = ../dotfiles/dot_config/just/justfile;
xdg.configFile."starship.toml".source = ../dotfiles/dot_config/starship.toml;

View file

@ -13,7 +13,7 @@
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_zen;
boot.kernelPackages = pkgs.linuxPackages_6_10;
systemd.services.tailscaled.after = ["NetworkManager-wait-online.service"];
@ -30,6 +30,8 @@
openrazer.users = [ "emenel" ];
graphics.enable = true;
enableAllFirmware = true;
nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "555.58.02";
@ -62,7 +64,7 @@
# Currently alpha-quality/buggy, so false is currently the recommended setting.
open = false;
forceFullCompositionPipeline = true;
#forceFullCompositionPipeline = true;
prime = {
amdgpuBusId = "PCI:0:2:0";
@ -104,10 +106,10 @@
# Select internationalisation properties.
i18n.defaultLocale = "en_CA.UTF-8";
nix.nixPath = [ "nixos-config=/home/emenel/source/nixos-config" ];
nix.nixPath = [ "nixos-config=/home/emenel/source/nixos-config" "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos" ];
nix.package = pkgs.nixFlakes;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [ "nix-command" "flakes" "repl-flake" ];
# Enable the X11 windowing system
services.xserver.enable = true;
@ -156,7 +158,16 @@
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
wireplumber.enable = true;
wireplumber.enable = true;
# extraConfig.pipewire."92-low-latency" = {
# "context.properties" = {
# "default.clock.rate" = 48000;
# "default.clock.quantum" = 32;
# "default.clock.min-quantum" = 32;
# "default.clock.max-quantum" = 32;
# };
# };
};
# Enable touchpad support (enabled default in most desktopManager).
@ -166,7 +177,7 @@
users.users.emenel = {
isNormalUser = true;
description = "emenel";
extraGroups = [ "networkmanager" "wheel" "uinput" "input" "audio" "video" "libvirtd" "nvidia" "cups" ];
extraGroups = [ "networkmanager" "wheel" "uinput" "input" "audio" "video" "libvirtd" "nvidia" "cups" "openrazer"];
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFvtBCUQEi7r6mXdaULEaMMvGH1IWZBX9tXpjbIECar2 matt@emenel.ca" ];
packages = with pkgs; [
git
@ -175,6 +186,7 @@
# enable fish and launch it from bash for interactive shells
programs.fish.enable = true;
environment.pathsToLink = [ "/share/fish" ];
programs.bash = {
interactiveShellInit = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
@ -201,6 +213,8 @@
rsync
kmonad
gnupg
openrazer-daemon
tlp
];
#programs.gnupg.enable = true;
@ -212,13 +226,14 @@
geary
seahorse
gnome-music
gnome-tour
];
services.kmonad = {
enable = true;
keyboards = {
quefrency = {
device = "/dev/input/by-id/usb-Keebio_Quefrency_Rev._5-event-kbd";
device = "/dev/input/by-id/usb-Keebio_Quefrency_Rev._5-event-kbd";
config = builtins.readFile ../../dotfiles/dot_config/kmonad/quefrency.kbd;
};
razer = {
@ -251,7 +266,32 @@
extraCompatPackages = [ pkgs.proton-ge-bin ];
};
# Enable the OpenSSH daemon.
powerManagement.enable = true;
services.power-profiles-daemon.enable = false;
services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 20;
#Optional helps save long term battery health
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
};
};
# powerManagement.powertop.enable = true;
# services.thermald.enable = true;
# enable the OpenSSH daemon.
services.openssh.enable = true;
#serivces.openssh.permitRootLogin = "no";
#services.openssh.passwordAuthentication = true;