fixing fflof, bat changes, emacs overlay and firefox tridactyl

This commit is contained in:
Chris Cochrun 2022-05-21 06:34:35 -05:00
parent 26a00cee12
commit c124529a32
11 changed files with 121 additions and 53 deletions

View file

@ -1,5 +1,5 @@
{ {
stdenv, mkDerivation,
lib, lib,
fetchFromGitHub, fetchFromGitHub,
qtbase, qtbase,
@ -12,14 +12,13 @@
kguiaddons, kguiaddons,
kcoreaddons, kcoreaddons,
systemsettings, systemsettings,
plasma-framework,
cmake, cmake,
extra-cmake-modules, extra-cmake-modules,
libepoxy, libepoxy,
libXdmcp libXdmcp
}: }:
stdenv.mkDerivation rec { mkDerivation rec {
pname = "LightlyShaders"; pname = "LightlyShaders";
version = "0.0.2"; version = "0.0.2";
@ -43,25 +42,23 @@ stdenv.mkDerivation rec {
kguiaddons kguiaddons
kcoreaddons kcoreaddons
systemsettings systemsettings
plasma-framework libepoxy
libXdmcp
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
stdenv
cmake cmake
extra-cmake-modules extra-cmake-modules
libepoxy
libXdmcp
]; ];
preConfigure = '' preConfigure = ''
local modulepath=$(kf5-config --install module) local modulepath=$(kf5-config --install module)
local datapath=$(kf5-config --install data) local datapath=$(kf5-config --install data)
local servicepath=$(kf5-config --install services) local servicespath=$(kf5-config --install services)
substituteInPlace CMakeLists.txt \ substituteInPlace CMakeLists.txt \
--replace "\''${MODULEPATH}" "$out/''${modulepath#/nix/store/*/}" \ --replace "\''${MODULEPATH}" "$out/''${KDE_INSTALL_QTPLUGINDIR}" \
--replace "\''${DATAPATH}" "$out/''${datapath#/nix/store/*/}" \ --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; { meta = with lib; {

View file

@ -1 +1 @@
/nix/store/l5xy1js7xmgvdcn1z13mbd595p6zprqd-LightlyShaders-0.0.2 /nix/store/9zw7rwdbj8kkvy3mm5y44frlm2mg0lil-LightlyShaders-0.0.2

View file

@ -204,7 +204,8 @@ kde-cli-tools
gzip gzip
htop htop
btop btop
firefox brave
# firefox
kate kate
kdialog kdialog
openlp openlp
@ -234,7 +235,7 @@ jellyfin-mpv-shim
pfetch pfetch
macchina macchina
gimp gimp
scribus powertop
#+end_src #+end_src
Here are some dev tools that I often have on a few devices. Here are some dev tools that I often have on a few devices.
@ -247,6 +248,7 @@ gnumake
gcc gcc
gdb gdb
clang clang
clang-tools
cmake cmake
extra-cmake-modules extra-cmake-modules
pkg-config pkg-config
@ -266,18 +268,17 @@ Let's create our own custom LightlyShaders package. This is in it's own file for
(libsForQt5.callPackage ../../LightlyShaders {}) (libsForQt5.callPackage ../../LightlyShaders {})
#+end_src #+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. 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 #+NAME: overlays
#+begin_src nix #+begin_src nix
nixpkgs.overlays = [ (self: super:
(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 { myAwesome = super.awesome.overrideAttrs (old: rec {
pname = "myAwesome"; pname = "myAwesome";
@ -290,8 +291,7 @@ nixpkgs.overlays = [
}; };
}); });
} }
) )
];
#+end_src #+end_src
*** Emacs *** Emacs
@ -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_SCALING_GOVERNOR_ON_BAT="powersave";
CPU_ENERGY_PERF_POLICY_ON_AC="balance_performance"; CPU_ENERGY_PERF_POLICY_ON_AC="balance_performance";
CPU_ENERGY_PERF_POLICY_ON_BAT="power"; 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_AC=0;
SCHED_POWERSAVE_ON_BAT=1; SCHED_POWERSAVE_ON_BAT=1;
START_CHARGE_THRESH_BAT1=70; 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; virtualisation.waydroid.enable = true;
# <<firefox>>
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ 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
<<lightlyshaders>> <<lightlyshaders>>
]; ];
nixpkgs.overlays = [
(import (builtins.fetchTarball {
url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz;
sha256 = "09rsqmz7i7lyays59b9600z11qqr6h6lcskw1zzp54yw2csxn2ix";
}))
<<overlays>> <<overlays>>
];
<<emacs>> <<emacs>>
@ -622,7 +634,15 @@ Kaladin is my desktop machine. A powerhouse for the most part with a recent i7 a
<<lightlyshaders>> <<lightlyshaders>>
]; ];
nixpkgs.overlays = [
(import (builtins.fetchTarball {
url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz;
sha256 = "1rhmvww15mkix7fg8gd7r5hwlszi4zlwzxyr02yfwfsf5hh0n0d9";
}))
<<overlays>> <<overlays>>
];
<<emacs>> <<emacs>>

View file

@ -758,9 +758,10 @@
(awful.spawn.once "picom --experimental-backend") (awful.spawn.once "picom --experimental-backend")
(awful.spawn.once "/usr/lib/polkit-kde-authentication-agent-1") (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 "feh --bg-fill /home/chris/Pictures/wallpapers/tech.jpg")
(awful.spawn.once "bluetoothctl power on") (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 "rbw-agent")
(awful.spawn.once "killall jellyfin-mpv-shim && jellyfin-mpv-shim") (awful.spawn.once "killall jellyfin-mpv-shim && jellyfin-mpv-shim")
(awful.spawn.once "xset r rate 220 90") (awful.spawn.once "xset r rate 220 90")

View file

@ -182,7 +182,8 @@
{:description "select pass" :group "apps" }) {:description "select pass" :group "apps" })
(awful.key [ modkey shift ] "w" (fn [] (awful.spawn "libreoffice --writer")) (awful.key [ modkey shift ] "w" (fn [] (awful.spawn "libreoffice --writer"))
{:description "Open Writer" :group "apps" }) {: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"}) {:description "launch browser" :group "apps"})
;; rofi ;; rofi
(awful.key [] "Menu" (fn [] (awful.spawn "/home/chris/.config/rofi/launchers-git/launcher.sh")) (awful.key [] "Menu" (fn [] (awful.spawn "/home/chris/.config/rofi/launchers-git/launcher.sh"))

View file

@ -227,7 +227,7 @@ if status is-login
end end
# macchina # macchina
pfetch # pfetch
### Start plasma wayland ### Start plasma wayland
# if status is-login # if status is-login
# if test -z "$DISPLAY" -a "$XDG_VTNR" = 1 # if test -z "$DISPLAY" -a "$XDG_VTNR" = 1

View file

@ -1,9 +1,10 @@
#!/bin/sh #!/usr/bin/env bash
export MOZ_ENABLE_WAYLAND=1 export MOZ_ENABLE_WAYLAND=1
echo $MOZ_ENABLE_WAYLAND echo $MOZ_ENABLE_WAYLAND
# Check to see if firefox is running # Check to see if firefox is running
if [ $(pgrep -c firefox) -gt 0 ]; then if [ $(pgrep -c firefox) -gt 0 ]; then
echo "ff running"
if [ $XDG_SESSION_TYPE = "x11" ]; then if [ $XDG_SESSION_TYPE = "x11" ]; then
#X11 #X11
@ -19,7 +20,8 @@ if [ $(pgrep -c firefox) -gt 0 ]; then
fi fi
else else
if [ $KDE_FULL_SESSION = "true" ]; then if [ $KDE_FULL_SESSION = "true" ]; then
ww -f firefox -c firefox echo "KDE"
/home/chris/bin/ww -f firefox -c firefox
exit exit
else else
# WAYLAND # WAYLAND

View file

@ -13,6 +13,8 @@ else
#echo "this is not hidpi" #echo "this is not hidpi"
fi fi
export YDOTOOL_SOCKET=/tmp/ydotools
# Get all password files and create an array # Get all password files and create an array
root=~/.password-store root=~/.password-store
CACHE=~/.local/tmp/pass_rofi CACHE=~/.local/tmp/pass_rofi

View file

@ -174,7 +174,8 @@
gzip gzip
htop htop
btop btop
firefox brave
# firefox
kate kate
kdialog kdialog
openlp openlp
@ -204,7 +205,7 @@
pfetch pfetch
macchina macchina
gimp gimp
scribus powertop
blender blender
neofetch neofetch
# Dev tools # Dev tools
@ -215,6 +216,7 @@
gcc gcc
gdb gdb
clang clang
clang-tools
cmake cmake
extra-cmake-modules extra-cmake-modules
pkg-config pkg-config

View file

@ -97,6 +97,8 @@
CPU_SCALING_GOVERNOR_ON_BAT="powersave"; CPU_SCALING_GOVERNOR_ON_BAT="powersave";
CPU_ENERGY_PERF_POLICY_ON_AC="balance_performance"; CPU_ENERGY_PERF_POLICY_ON_AC="balance_performance";
CPU_ENERGY_PERF_POLICY_ON_BAT="power"; 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_AC=0;
SCHED_POWERSAVE_ON_BAT=1; SCHED_POWERSAVE_ON_BAT=1;
START_CHARGE_THRESH_BAT1=70; START_CHARGE_THRESH_BAT1=70;
@ -139,6 +141,8 @@
virtualisation.waydroid.enable = true; virtualisation.waydroid.enable = true;
# nixpkgs.config.firefox.enableTridactyl = true;
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -198,7 +202,8 @@
gzip gzip
htop htop
btop btop
firefox brave
# firefox
kate kate
kdialog kdialog
openlp openlp
@ -228,7 +233,7 @@
pfetch pfetch
macchina macchina
gimp gimp
scribus powertop
neofetch neofetch
afetch afetch
yafetch yafetch
@ -245,6 +250,7 @@
gcc gcc
gdb gdb
clang clang
clang-tools
cmake cmake
extra-cmake-modules extra-cmake-modules
pkg-config pkg-config
@ -263,7 +269,7 @@
(import (builtins.fetchTarball { (import (builtins.fetchTarball {
url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz; url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz;
sha256 = "1rhmvww15mkix7fg8gd7r5hwlszi4zlwzxyr02yfwfsf5hh0n0d9"; sha256 = "09rsqmz7i7lyays59b9600z11qqr6h6lcskw1zzp54yw2csxn2ix";
})) }))
(self: super: (self: super:

View file

@ -14,6 +14,7 @@
# You can update Home Manager without changing this value. See # You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version # the Home Manager release notes for a list of state version
# changes in each release. # changes in each release.
home.stateVersion = "21.11"; # Did you read the comment?
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;
@ -296,6 +297,25 @@
recursive = true; 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" = { home.file.".config/tridactyl" = {
source = ../tridactyl; source = ../tridactyl;
recursive = true; 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"];
};
};
};
} }