From 5b3d352f453b39037f238c047fb07c2031f429da Mon Sep 17 00:00:00 2001 From: beanigen Date: Thu, 1 May 2025 18:23:52 +0800 Subject: [PATCH] g --- base/callisto/configuration.nix | 44 +++++++++++++++++++++++- base/callisto/hardware-configuration.nix | 7 ++++ base/callisto/keymap.kbd | 24 +++++++++++++ home/nixvim/default.nix | 1 + home/waybar/config | 19 +++++++--- home/waybar/style.css | 13 ++++++- 6 files changed, 102 insertions(+), 6 deletions(-) create mode 100644 base/callisto/keymap.kbd diff --git a/base/callisto/configuration.nix b/base/callisto/configuration.nix index 66c533b..7d45e34 100644 --- a/base/callisto/configuration.nix +++ b/base/callisto/configuration.nix @@ -24,6 +24,19 @@ }; }; }; + services.gvfs.enable = true; + services.kmonad = { + enable = true; + keyboards.thinkpad = { + device = "/dev/input/by-path/platform-i8042-serio-0-event-kbd"; + config = (builtins.readFile ./keymap.kbd); + defcfg = { + enable = true; + fallthrough = true; + compose.key = null; + }; + }; + }; programs.steam.enable = true; virtualisation.libvirtd = { enable = true; @@ -86,6 +99,10 @@ }; services.tlp.enable = true; + services.tlp.settings = { + CPU_SCALING_GOVERNOR_ON_BAT = "ondemand"; + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + }; hardware.graphics = { enable = true; extraPackages = with pkgs; [ @@ -124,6 +141,27 @@ networking.hostName = "callisto"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + systemd.services.trackpad-fix = { + description = "Fixes the thinkpad touchpad being total shit"; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.tcl-8_6}/bin/tclsh /home/maya/unshit.tcl"; + ExecStop = "pkill tclsh"; + Restart = "on-failure"; + }; + wantedBy = ["default.target"]; + + + }; + systemd.services.fuckyou = { + description = "h"; + after = ["suspend.target"]; + wantedBy = ["suspend.target"]; + serviceConfig = { + Type = "simple"; + ExecStart = "systemctl --no-block restart trackpad-fix.service"; + }; + }; xdg.portal = { enable = true; @@ -194,7 +232,7 @@ users.users.maya = { isNormalUser = true; description = "Maya"; - extraGroups = [ "networkmanager" "wheel" "libvirtd" ]; + extraGroups = [ "networkmanager" "wheel" "libvirtd" "input" "uinput" ]; packages = with pkgs; [ # thunderbird git @@ -214,6 +252,10 @@ # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. lutris playerctl + undervolt + s-tui + stress + xfsprogs # wget ]; diff --git a/base/callisto/hardware-configuration.nix b/base/callisto/hardware-configuration.nix index f9a9c39..16860e8 100644 --- a/base/callisto/hardware-configuration.nix +++ b/base/callisto/hardware-configuration.nix @@ -11,6 +11,13 @@ boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.kernelModules = [ ]; boot.kernelParams = [ "resume" ]; + services.undervolt = { + enable = true; + tempBat = 80; + tempAc = 95; + coreOffset = -75; + gpuOffset = -95; + }; boot.kernelModules = [ "kvm-intel" "sierra_net" ]; boot.extraModulePackages = [ ]; boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; diff --git a/base/callisto/keymap.kbd b/base/callisto/keymap.kbd new file mode 100644 index 0000000..874a016 --- /dev/null +++ b/base/callisto/keymap.kbd @@ -0,0 +1,24 @@ +(defsrc + grv 1 2 3 4 5 6 7 8 9 0 - = bspc + 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 cmp rctl +) +(deflayer qwerty + grv 1 2 3 4 5 6 7 8 9 0 - = bspc + tab q w e r t y u i o p [ ] \ + @ext 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 cmp rctl +) +(defalias + ext (layer-toggle extend) +) +(deflayer extend + grv 1 2 3 4 5 6 7 8 9 0 - = bspc + tab q up e ~ t y u i o p [ ] \ + caps left down right f g h j k l ; ' ret + lsft z x c v b n m , . / rsft + lctl lmet KeyPreviousSong KeyPlayPause KeyNextSong rmet cmp rctl +) diff --git a/home/nixvim/default.nix b/home/nixvim/default.nix index f6316f9..001438c 100644 --- a/home/nixvim/default.nix +++ b/home/nixvim/default.nix @@ -23,6 +23,7 @@ lsp = { enable = true; servers.cssls.enable = true; + servers.clangd.enable = true; servers.pylsp.enable = true; servers.html = { enable = true; diff --git a/home/waybar/config b/home/waybar/config index 5332e64..92192c7 100644 --- a/home/waybar/config +++ b/home/waybar/config @@ -42,11 +42,7 @@ }, "group/audio": { "orientation": "inherit", -<<<<<<< HEAD "modules": ["wireplumber", ], -======= - "modules": ["wireplumber"], ->>>>>>> 6c567ff (help) "on-click": "pavucontrol", }, "group/mpdg": { @@ -96,6 +92,11 @@ "bat": "BAT0", "interval": 5, "format-icons": [" ", " ", " ", " ", " "], + "states": { + "warning": 30, + "critical": 15, + "dead": 5 + }, "format": "{icon} {capacity}%", "tooltip-format": "BAT0, {power}W" }, @@ -103,6 +104,11 @@ "bat": "BAT1", "interval": 5, "format-icons": [" ", " ", " ", " ", " "], + "states": { + "warning": 30, + "critical": 15, + "dead": 5 + }, "format": "{icon} {capacity}%", "tooltip-format": "BAT1, {power}W" }, @@ -110,6 +116,11 @@ "bat": "BAT2", "interval": 5, "format-icons": [" ", " ", " ", " ", " "], + "states": { + "warning": 30, + "critical": 15, + "dead": 5 + }, "format": "{icon} {capacity}%", "tooltip-format": "BAT2, {power}W" }, diff --git a/home/waybar/style.css b/home/waybar/style.css index 81d2c75..4f4baac 100644 --- a/home/waybar/style.css +++ b/home/waybar/style.css @@ -48,6 +48,17 @@ window#waybar { min-height: 0; margin: 0.2em; } +#battery.warning { + border: 0.2em solid @yellow; +} +#battery.critical { + border: 0.2em solid @red; +} +#battery.dead { + background: @surface0; + color: @surface2; + border: 0.2em solid @overlay1; +} #dtray { margin: 0px 10px 0px; padding: 0px 10px 0px; @@ -58,7 +69,7 @@ window#waybar { } #mpd.stopped { background-color: @surface0; - border: 0; + border: 0 } #mpd.playing { background: @mauve;