From c124529a32a0550d9f5e702c1cea48e7cdf65569 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Sat, 21 May 2022 06:34:35 -0500 Subject: [PATCH] fixing fflof, bat changes, emacs overlay and firefox tridactyl --- LightlyShaders/default.nix | 17 +++----- LightlyShaders/result | 2 +- README.org | 74 ++++++++++++++++++++------------ awesome/init.fnl | 3 +- awesome/keybindings.fnl | 3 +- fish/config.fish | 2 +- scripts/fflof | 6 ++- scripts/kderofi-rbw | 2 + system/kaladin/configuration.nix | 10 +++-- system/syl/configuration.nix | 18 +++++--- user/home.nix | 37 ++++++++++++++++ 11 files changed, 121 insertions(+), 53 deletions(-) diff --git a/LightlyShaders/default.nix b/LightlyShaders/default.nix index 064d1b1..7c2b5ed 100644 --- a/LightlyShaders/default.nix +++ b/LightlyShaders/default.nix @@ -1,5 +1,5 @@ { - stdenv, + mkDerivation, lib, fetchFromGitHub, qtbase, @@ -12,14 +12,13 @@ kguiaddons, kcoreaddons, systemsettings, - plasma-framework, cmake, extra-cmake-modules, libepoxy, libXdmcp }: -stdenv.mkDerivation rec { +mkDerivation rec { pname = "LightlyShaders"; version = "0.0.2"; @@ -43,25 +42,23 @@ stdenv.mkDerivation rec { kguiaddons kcoreaddons systemsettings - plasma-framework + libepoxy + libXdmcp ]; nativeBuildInputs = [ - stdenv cmake extra-cmake-modules - libepoxy - libXdmcp ]; preConfigure = '' local modulepath=$(kf5-config --install module) local datapath=$(kf5-config --install data) - local servicepath=$(kf5-config --install services) + local servicespath=$(kf5-config --install services) substituteInPlace CMakeLists.txt \ - --replace "\''${MODULEPATH}" "$out/''${modulepath#/nix/store/*/}" \ + --replace "\''${MODULEPATH}" "$out/''${KDE_INSTALL_QTPLUGINDIR}" \ --replace "\''${DATAPATH}" "$out/''${datapath#/nix/store/*/}" \ - --replace "\''${SERVICES_INSTALL_DIR}" "$out/''${servicepath#/nix/store/*/}" + --replace "\''${SERVICES_INSTALL_DIR}" "$out/''${servicespath#/nix/store/*/}" ''; meta = with lib; { diff --git a/LightlyShaders/result b/LightlyShaders/result index 91c1118..16b1117 120000 --- a/LightlyShaders/result +++ b/LightlyShaders/result @@ -1 +1 @@ -/nix/store/l5xy1js7xmgvdcn1z13mbd595p6zprqd-LightlyShaders-0.0.2 \ No newline at end of file +/nix/store/9zw7rwdbj8kkvy3mm5y44frlm2mg0lil-LightlyShaders-0.0.2 \ No newline at end of file diff --git a/README.org b/README.org index 45b5279..6ecadc8 100644 --- a/README.org +++ b/README.org @@ -204,7 +204,8 @@ kde-cli-tools gzip htop btop -firefox +brave +# firefox kate kdialog openlp @@ -234,7 +235,7 @@ jellyfin-mpv-shim pfetch macchina gimp -scribus +powertop #+end_src Here are some dev tools that I often have on a few devices. @@ -247,6 +248,7 @@ gnumake gcc gdb clang +clang-tools cmake extra-cmake-modules pkg-config @@ -266,32 +268,30 @@ Let's create our own custom LightlyShaders package. This is in it's own file for (libsForQt5.callPackage ../../LightlyShaders {}) #+end_src +Firefox has it's own setup +#+NAME: firefox +#+begin_src nix +nixpkgs.config.firefox.enableTridactyl = true; +#+end_src Here are the two main overlays I like to use. One for Emacs and another for the AwesomeWM. +For some reason the emacs overlay has a specific sha256. So I'll create it in each config. #+NAME: overlays #+begin_src nix -nixpkgs.overlays = [ - - (import (builtins.fetchTarball { - url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz; - sha256 = "1rhmvww15mkix7fg8gd7r5hwlszi4zlwzxyr02yfwfsf5hh0n0d9"; - })) - - (self: super: - { - myAwesome = super.awesome.overrideAttrs (old: rec { - pname = "myAwesome"; - version = "git-20220508-c539e0e"; - src = super.fetchFromGitHub { - owner = "awesomeWM"; - repo = "awesome"; - rev = "c539e0e4350a42f813952fc28dd8490f42d934b3"; - sha256 = "EDAL7NnLF2BiVI8DAlEciiZtDmwXOzCPypGTrlN/OoQ="; - }; - }); - } - ) -]; +(self: super: + { + myAwesome = super.awesome.overrideAttrs (old: rec { + pname = "myAwesome"; + version = "git-20220508-c539e0e"; + src = super.fetchFromGitHub { + owner = "awesomeWM"; + repo = "awesome"; + rev = "c539e0e4350a42f813952fc28dd8490f42d934b3"; + sha256 = "EDAL7NnLF2BiVI8DAlEciiZtDmwXOzCPypGTrlN/OoQ="; + }; + }); + } +) #+end_src *** Emacs @@ -357,7 +357,7 @@ Notice how I am including all of my software here. It may be a big file, but hav }; <> - + # Configure keymap in X11 services.xserver.layout = "us"; # services.xserver.xkbOptions = "eurosign:e"; @@ -383,6 +383,8 @@ Notice how I am including all of my software here. It may be a big file, but hav CPU_SCALING_GOVERNOR_ON_BAT="powersave"; CPU_ENERGY_PERF_POLICY_ON_AC="balance_performance"; CPU_ENERGY_PERF_POLICY_ON_BAT="power"; + PCIE_ASPM_ON_AC="default"; + PCIE_ASPM_ON_BAT="powersupersave"; SCHED_POWERSAVE_ON_AC=0; SCHED_POWERSAVE_ON_BAT=1; START_CHARGE_THRESH_BAT1=70; @@ -416,6 +418,8 @@ Notice how I am including all of my software here. It may be a big file, but hav virtualisation.waydroid.enable = true; + # <> + # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ @@ -433,7 +437,15 @@ Notice how I am including all of my software here. It may be a big file, but hav <> ]; - <> + nixpkgs.overlays = [ + + (import (builtins.fetchTarball { + url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz; + sha256 = "09rsqmz7i7lyays59b9600z11qqr6h6lcskw1zzp54yw2csxn2ix"; + })) + + <> + ]; <> @@ -622,7 +634,15 @@ Kaladin is my desktop machine. A powerhouse for the most part with a recent i7 a <> ]; - <> + nixpkgs.overlays = [ + + (import (builtins.fetchTarball { + url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz; + sha256 = "1rhmvww15mkix7fg8gd7r5hwlszi4zlwzxyr02yfwfsf5hh0n0d9"; + })) + + <> + ]; <> diff --git a/awesome/init.fnl b/awesome/init.fnl index 0c93f28..6ffb53a 100644 --- a/awesome/init.fnl +++ b/awesome/init.fnl @@ -758,9 +758,10 @@ (awful.spawn.once "picom --experimental-backend") (awful.spawn.once "/usr/lib/polkit-kde-authentication-agent-1") +(awful.spawn.once "kwalletd5") (awful.spawn.once "feh --bg-fill /home/chris/Pictures/wallpapers/tech.jpg") (awful.spawn.once "bluetoothctl power on") -;; (awful.spawn.once "nextcloud --background") +(awful.spawn.once "systemctl --user restart nextcloud-client.service") (awful.spawn.once "rbw-agent") (awful.spawn.once "killall jellyfin-mpv-shim && jellyfin-mpv-shim") (awful.spawn.once "xset r rate 220 90") diff --git a/awesome/keybindings.fnl b/awesome/keybindings.fnl index 92244b8..583c7e6 100644 --- a/awesome/keybindings.fnl +++ b/awesome/keybindings.fnl @@ -182,7 +182,8 @@ {:description "select pass" :group "apps" }) (awful.key [ modkey shift ] "w" (fn [] (awful.spawn "libreoffice --writer")) {:description "Open Writer" :group "apps" }) - (awful.key [modkey] "b" (fn [] (awful.spawn "qblof")) + ;;ff + (awful.key [modkey] "b" (fn [] (awful.spawn "fflof")) {:description "launch browser" :group "apps"}) ;; rofi (awful.key [] "Menu" (fn [] (awful.spawn "/home/chris/.config/rofi/launchers-git/launcher.sh")) diff --git a/fish/config.fish b/fish/config.fish index 5ffea74..e83338a 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -227,7 +227,7 @@ if status is-login end # macchina -pfetch +# pfetch ### Start plasma wayland # if status is-login # if test -z "$DISPLAY" -a "$XDG_VTNR" = 1 diff --git a/scripts/fflof b/scripts/fflof index 5f4285b..35c9680 100755 --- a/scripts/fflof +++ b/scripts/fflof @@ -1,9 +1,10 @@ -#!/bin/sh +#!/usr/bin/env bash export MOZ_ENABLE_WAYLAND=1 echo $MOZ_ENABLE_WAYLAND # Check to see if firefox is running if [ $(pgrep -c firefox) -gt 0 ]; then + echo "ff running" if [ $XDG_SESSION_TYPE = "x11" ]; then #X11 @@ -19,7 +20,8 @@ if [ $(pgrep -c firefox) -gt 0 ]; then fi else if [ $KDE_FULL_SESSION = "true" ]; then - ww -f firefox -c firefox + echo "KDE" + /home/chris/bin/ww -f firefox -c firefox exit else # WAYLAND diff --git a/scripts/kderofi-rbw b/scripts/kderofi-rbw index bb4b1b6..39ef7f9 100755 --- a/scripts/kderofi-rbw +++ b/scripts/kderofi-rbw @@ -13,6 +13,8 @@ else #echo "this is not hidpi" fi +export YDOTOOL_SOCKET=/tmp/ydotools + # Get all password files and create an array root=~/.password-store CACHE=~/.local/tmp/pass_rofi diff --git a/system/kaladin/configuration.nix b/system/kaladin/configuration.nix index fd5813c..6b817cd 100644 --- a/system/kaladin/configuration.nix +++ b/system/kaladin/configuration.nix @@ -174,7 +174,8 @@ gzip htop btop - firefox + brave + # firefox kate kdialog openlp @@ -204,7 +205,7 @@ pfetch macchina gimp - scribus + powertop blender neofetch # Dev tools @@ -215,6 +216,7 @@ gcc gdb clang + clang-tools cmake extra-cmake-modules pkg-config @@ -230,12 +232,12 @@ ]; nixpkgs.overlays = [ - + (import (builtins.fetchTarball { url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz; sha256 = "1rhmvww15mkix7fg8gd7r5hwlszi4zlwzxyr02yfwfsf5hh0n0d9"; })) - + (self: super: { myAwesome = super.awesome.overrideAttrs (old: rec { diff --git a/system/syl/configuration.nix b/system/syl/configuration.nix index 29306a8..729267f 100644 --- a/system/syl/configuration.nix +++ b/system/syl/configuration.nix @@ -60,7 +60,7 @@ displayManager.sddm.enable = true; desktopManager.plasma5.enable = true; }; - + # Configure keymap in X11 services.xserver.layout = "us"; # services.xserver.xkbOptions = "eurosign:e"; @@ -97,6 +97,8 @@ CPU_SCALING_GOVERNOR_ON_BAT="powersave"; CPU_ENERGY_PERF_POLICY_ON_AC="balance_performance"; CPU_ENERGY_PERF_POLICY_ON_BAT="power"; + PCIE_ASPM_ON_AC="default"; + PCIE_ASPM_ON_BAT="powersupersave"; SCHED_POWERSAVE_ON_AC=0; SCHED_POWERSAVE_ON_BAT=1; START_CHARGE_THRESH_BAT1=70; @@ -139,6 +141,8 @@ virtualisation.waydroid.enable = true; + # nixpkgs.config.firefox.enableTridactyl = true; + # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ @@ -198,7 +202,8 @@ gzip htop btop - firefox + brave + # firefox kate kdialog openlp @@ -228,7 +233,7 @@ pfetch macchina gimp - scribus + powertop neofetch afetch yafetch @@ -245,6 +250,7 @@ gcc gdb clang + clang-tools cmake extra-cmake-modules pkg-config @@ -260,12 +266,12 @@ ]; nixpkgs.overlays = [ - + (import (builtins.fetchTarball { url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz; - sha256 = "1rhmvww15mkix7fg8gd7r5hwlszi4zlwzxyr02yfwfsf5hh0n0d9"; + sha256 = "09rsqmz7i7lyays59b9600z11qqr6h6lcskw1zzp54yw2csxn2ix"; })) - + (self: super: { myAwesome = super.awesome.overrideAttrs (old: rec { diff --git a/user/home.nix b/user/home.nix index a0f28f4..2058c87 100644 --- a/user/home.nix +++ b/user/home.nix @@ -14,6 +14,7 @@ # You can update Home Manager without changing this value. See # the Home Manager release notes for a list of state version # changes in each release. + home.stateVersion = "21.11"; # Did you read the comment? # Let Home Manager install and manage itself. programs.home-manager.enable = true; @@ -296,6 +297,25 @@ recursive = true; }; + programs.firefox = { + enable = true; + package = pkgs.firefox-wayland.override { + cfg = { + enableTridactylNative = true; + }; + }; + profiles.chris = { + name = "default"; + path = "nw77o6yc.default"; + isDefault = true; + }; + }; + + home.file.".mozilla/firefox/nw77o6yc.default/chrome" = { + source = ../firefox/chrome; + recursive = true; + }; + home.file.".config/tridactyl" = { source = ../tridactyl; recursive = true; @@ -408,4 +428,21 @@ }; }; + systemd.user.services = { + ydotoold = { + Unit = { + Description = "An auto-input utility for wayland"; + Documentation = [ "man:ydotool(1)" "man:ydotoold(8)" ]; + }; + + Service = { + ExecStart = "/run/current-system/sw/bin/ydotoold --socket-path /tmp/ydotools"; + }; + + Install = { + WantedBy = ["default.target"]; + }; + }; + }; + }