feat: Cleanup and more packages

Added gamescope
Waybar add storage and slight adjustments to widgets
Added click actions for waybar widgets
Reduced cleanup time on nix store
This commit is contained in:
Kyle Brown 2023-12-01 11:52:08 -08:00
parent d3f29bdd81
commit a8c9073d29
7 changed files with 58 additions and 48 deletions

View file

@ -1,10 +1,5 @@
{pkgs, ...}: let
nerd-fonts = [
"FiraCode"
"DroidSansMono"
"JetBrainsMono"
"FantasqueSansMono"
"Iosevka"
"Meslo"
];
in {
@ -17,11 +12,7 @@ in {
++ builtins.attrValues {
inherit
(pkgs)
fira-code
open-fonts
powerline-fonts
liberation_ttf
iosevka
meslo-lgs-nf # p10k
;
};

View file

@ -1,11 +1,13 @@
{pkgs, ...}: {
services.printing.enable = true;
hardware.keyboard.qmk.enable = true;
environment.systemPackages = with pkgs; [
qmk # Only install on headed machines
gnome.adwaita-icon-theme
gnome.gnome-themes-extra
firefox-wayland
discord
qt5.qtwayland
qt6.qmake
qt6.qtwayland

View file

@ -7,11 +7,7 @@
hardware.opengl.driSupport32Bit = true;
programs.steam = {
enable = true;
package = pkgs.steam.override {
extraPkgs = pkgs:
with pkgs; [
gamescope
];
};
remotePlay.openFirewall = true;
gamescopeSession.enable = true;
};
}

View file

@ -19,7 +19,7 @@
nix.settings.auto-optimise-store = true;
nix.optimise.automatic = true;
nix.settings.keep-derivations = false; # saves space. Turn off for easier debugging
#nix.settings.keep-derivations = false; # saves space. Turn off for easier debugging
nix.settings.trusted-users = [
"root"
@ -33,7 +33,7 @@
nix.gc = {
automatic = true;
dates = "daily";
dates = "monthly";
options = "--delete-older-than 14d";
};

View file

@ -15,6 +15,17 @@
# modern cat
programs.bat.enable = true;
programs.direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
};
services.lorri = {
enable = true;
enableNotifications = true;
};
home.packages = with pkgs;
[
# Make sure ZSH is installed
@ -75,8 +86,6 @@
# nix tools
nix-prefetch-github
direnv
nix-direnv
alejandra # nix code formatter
]
++ lib.optionals stdenv.isDarwin [

View file

@ -5,7 +5,7 @@
programs.discord = {
enable = true;
wrapDiscord = true;
wrapDiscord = false;
};
programs.mangohud.enable = true;

View file

@ -1,5 +1,7 @@
{
config,
pkgs,
stylix,
osConfig,
...
}: let
@ -15,48 +17,46 @@
else if osConfig.networking.hostName == "amy"
then "/sys/class/hwmon/hwmon4/temp1_input"
else "";
in {
programs.waybar.enable = true;
programs.waybar.settings = {
mainBar = {
layer = "bottom";
layer = "top";
position = "top";
height = 24;
modules-left = ["hyprland/workspaces" "sway/mode" "wlr/taskbar"];
modules-left = ["hyprland/workspaces" "wlr/taskbar"];
modules-center = ["hyprland/window" "gamemode"];
modules-right = ["network" "pulseaudio" "cpu" "custom/cpu_freq" "temperature" "memory" "battery" "tray" "clock"];
modules-right = ["network" "pulseaudio" "disk" "cpu" "temperature" "memory" "battery" "tray" "clock"];
"hyprland/workspaces".sort-by-number = true;
"hyprland/workspaces" = {
sort-by-number = true;
on-click = "activate";
format = "{icon}";
persistent-workspaces = {
"1" = "[]";
"2" = "[]";
"3" = "[]";
"4" = "[]";
};
format-icons = {
"urgent" = "";
"active" = "";
"default" = "";
};
};
"tray"."spacing" = 2;
"sway/mode" = {
format = "<span style=\"italic\">{}</span>";
};
"clock" = {
format = " {:%a %b %d %R}";
};
"cpu" = {
"interval" = 2;
"format" = "{usage}% ";
};
"custom/cpu_freq" = {
format = "{}MHz ";
interval = 5;
exec =
pkgs.writeShellScript "cpuFreq"
''
${pkgs.busybox}/bin/cat /proc/cpuinfo | \
${pkgs.busybox}/bin/grep MHz | \
${pkgs.busybox}/bin/cut -c 12-15 | \
${pkgs.busybox}/bin/tr '\n' ' ' | \
${pkgs.busybox}/bin/awk '{s+=$1}END{print "",s/NR}' RS=" " | \
${pkgs.busybox}/bin/cut -c 2-5
'';
"format" = "{usage}% {avg_frequency}GHz";
"on-click" = "${pkgs.alacritty}/bin/alacritty -e ${pkgs.bottom}/bin/btm";
};
"battery" = {
@ -71,7 +71,15 @@ in {
"format-icons" = ["" "" "" "" ""];
};
"memory"."format" = "{used:0.1f}G/{total:0.1f}G ";
"memory" = {
"format" = "{used:0.1f}G/{total:0.1f}G ";
"on-click" = "${pkgs.alacritty}/bin/alacritty -e ${pkgs.bottom}/bin/btm";
};
"disk" = {
"format" = "{used}/{total} ";
"path" = "/";
};
"network" = {
"interface" = "${networkInterface.eth}";
@ -81,6 +89,7 @@ in {
"format-wifi" = "Up: {bandwidthUpBits} Down: {bandwidthDownBits} {essid} ({signalStrength}%) ";
"tooltip-format-wifi" = "{ifname} {essid} ({signalStrength}%) ";
"format-disconnected" = "Disconnected ";
"on-click" = "${pkgs.alacritty}/bin/alacritty -e ${pkgs.networkmanager}/bin/nmtui";
};
"pulseaudio" = {
@ -96,13 +105,16 @@ in {
"car" = "";
"default" = ["" ""];
};
"on-click" = "pavucontrol";
"on-click" = "${pkgs.pavucontrol}/bin/pavucontrol";
};
"temperature" = {
"hwmon-path" = "/sys/class/hwmon/hwmon2/temp1_input";
"hwmon-path" = "${hwmon}";
"format" = "{}°C";
"critical-threshold" = 80;
"on-click" = "${pkgs.alacritty}/bin/alacritty -e ${pkgs.bottom}/bin/btm";
};
"gamemode" = {
"format" = "{glyph}";
"format-alt" = "{glyph} {count}";