diff --git a/computational/configuration.nix b/computational/configuration.nix index a38cf80..e26fed7 100644 --- a/computational/configuration.nix +++ b/computational/configuration.nix @@ -42,6 +42,13 @@ ''; environment.etc."pipewire/pipewire.conf".text = builtins.readFile ./pipewire.conf; + + + # [DESKTOP / XORG / WAYLAND] + services.xserver = { + desktopManager.plasma5.enable = true; + displayManager.startx.enable = true; + }; # [NETWORKING] diff --git a/home/berry_config b/home/berry_config new file mode 100755 index 0000000..81cda1e --- /dev/null +++ b/home/berry_config @@ -0,0 +1,6 @@ +#!/bin/sh + +berryc resize_button 3 +berryc resize_mask mod4 +berryc set_font "SAX2 Nerd Font" +berryc edge_gap 0 40 0 0 diff --git a/home/polybar.ini b/home/polybar.ini new file mode 100644 index 0000000..90a5b1e --- /dev/null +++ b/home/polybar.ini @@ -0,0 +1,88 @@ +[bar/bar] +modules-right = tray pulseaudio battery date +modules-left = ewmh +padding-right = 15px +padding-left = 10px +bottom = true +height = 40px +background = #99000000 +font-0 = "SAX2 Nerd Font:size=16;3" +enable-ipc = true + +[module/date] +type = internal/date +date = %Y-%m-%d +time = %H:%M +label = %date% %time% +label-padding-left = 5px + +[module/ewmh] +type = internal/xworkspaces + +backgound-color = #999999 + +pin-workspaces = true +enable-click = true + +icon-0 = 0; ◉ +icon-1 = 1; ◉ +icon-2 = 2; ◉ +icon-3 = 3; ◉ +icon-default = + +label-active = %icon% +label-occupied = %icon% +label-empty = %icon% + +label-active-padding = 0.7 +label-occupied-padding = 0.7 +label-empty-padding = 0.7 + +label-active-foreground = #fff +label-occupied-foreground = #999 +label-empty-foreground = #999 + +[module/battery] +type = internal/battery + +full-at = 99 + +low-at = 10 + +battery = BAT0 +adapter = AC + +poll-interval = 5 + +format-full = +format-charging = +format-discharging = + +format-full-padding = 15px +format-charging-padding = 15px +format-discharging-padding = 15px + +ramp-capacity-0 =  +ramp-capacity-1 =  +ramp-capacity-2 =  +ramp-capacity-3 =  +ramp-capacity-4 =  + +[module/pulseaudio] +type = internal/pulseaudio + +use-ui-max = false +format-volume = + +label-muted = 󰖁 + +; Only applies if is used +ramp-volume-0 = 󰕿 +ramp-volume-1 = 󰖀 +ramp-volume-2 = 󰕾 + +[module/tray] +type = internal/tray + +format-margin = 8px +tray-spacing = 8px diff --git a/home/rachel.nix b/home/rachel.nix index 638a124..01e4954 100644 --- a/home/rachel.nix +++ b/home/rachel.nix @@ -85,7 +85,15 @@ in whalebird lean4 slippi-netplay + xwallpaper + networkmanagerapplet ]; + file.".config/berry/autostart" = { + source = ./berry_config; + }; + file."bin/xinitrc" = { + source = ./xinitrc; + }; stateVersion = "23.11"; }; @@ -411,7 +419,7 @@ in scrolling.history = 0; font = { normal.family = "SAX2 Nerd Font"; - size = 11; + size = 8; }; colors = { background = "#1d1f21"; @@ -460,5 +468,50 @@ in enable = true; pinentryFlavor = "qt"; }; + + sxhkd = { + enable = true; + keybindings = { + "super + Return" = "alacritty"; + "super + BackSpace" = "firefox"; + "super + r" = "rofi -show run"; + "super + p" = "cpypsk"; + "super + l" = "betterlockscreen -l"; + "super + Left" = "berryc snap_left"; + "super + Right" = "berryc snap_right"; + "super + m" = "berryc window_monocle"; + "super + {1,2,3,4}" = "berryc switch_workspace {0,1,2,3}"; + "super + shift + {1,2,3,4}" = "berryc send_to_workspace {0,1,2,3}"; + "super + f" = "berryc fullscreen_state"; + "super + {h,j,k,l}" = "berryc cardinal_focus {2,3,1,0}"; + "alt + Tab" = "berryc cycle_focus"; + "~button1" = "berryc pointer_focus"; + "Print" = "${pkgs.maim}/bin/maim -s ~/img/scrot$(date +%s).png"; + "XF86AudioMute" = "${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle"; + "XF86AudioRaiseVolume" = "${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%"; + "XF86AudioLowerVolume" = "${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%"; + "XF86MonBrightnessUp" = "${pkgs.brightnessctl}/bin/brightnessctl set 5%+"; + "XF86MonBrightnessDown" = "${pkgs.brightnessctl}/bin/brightnessctl set 5%-"; + }; + }; + + polybar = { + enable = true; + config = ./polybar.ini; + script = "polybar bar &"; + package = pkgs.polybarFull; + }; + + picom = { + enable = true; + }; + + dunst = { + enable = true; + }; + + betterlockscreen = { + enable = true; + }; }; } diff --git a/home/xinitrc b/home/xinitrc new file mode 100644 index 0000000..6f0c743 --- /dev/null +++ b/home/xinitrc @@ -0,0 +1,18 @@ +cd "$HOME" + +if test -z "$DBUS_SESSION_BUS_ADDRESS"; then + eval $(dbus-launch --exit-with-session --sh-syntax) +fi +systemctl --user import-environment DISPLAY XAUTHORITY + +if command -v dbus-update-activation-environment >/dev/null 2>&1; then + dbus-update-activation-environment DISPLAY XAUTHORITY +fi + +xwallpaper --zoom "$HOME"/img/wallpaper +nm-applet & +polybar & +sxhkd & +picom & +dusnt & +exec berry diff --git a/lambda/configuration.nix b/lambda/configuration.nix index 85ccd6d..2356838 100644 --- a/lambda/configuration.nix +++ b/lambda/configuration.nix @@ -27,6 +27,34 @@ services.udev.extraRules = '' KERNEL=="0000:00:14.0", SUBSYSTEM=="pci", ATTR{power/wakeup}="disabled" ''; + services.tlp = { + enable = true; + settings = { + TLP_DEFAULT_MODE = "BAT"; + DISK_IDLE_SECS_ON_AC = 0; + DISK_IDLE_SECS_ON_BAT = 5; + MAX_LOST_WORK_SECS_ON_AC = 15; + MAX_LOST_WORK_SECS_ON_BAT = 120; + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + CPU_SCALING_MIN_FREQ_ON_AC = 400000; + CPU_SCALING_MAX_FREQ_ON_AC = 4700000; + CPU_SCALING_MIN_FREQ_ON_BAT = 400000; + CPU_SCALING_MAX_FREQ_ON_BAT = 2700000; + CPU_ENERGY_PERF_POLICY_ON_AC = "balance_performance"; + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + CPU_MIN_PERF_ON_AC = 0; + CPU_MAX_PERF_ON_AC = 100; + CPU_MIN_PERF_ON_BAT = 0; + CPU_MAX_PERF_ON_BAT = 30; + CPU_BOOST_ON_AC = 1; + CPU_BOOST_ON_BAT = 0; + SCHED_POWERSAVE_ON_AC = 0; + SCHED_POWERSAVE_ON_BAT = 1; + NMI_WATCHDOG = 0; + DISK_DEVICES = "nvme0n1"; + }; + }; # [BOOT / DISK ENCRYPTION] boot.loader.efi.canTouchEfiVariables = true; @@ -51,6 +79,7 @@ }; }; }; + boot.kernelParams = [ "i915.enable_dpcd_backlight=1" ]; # [NETWORKING] networking.hostName = "lambda"; @@ -61,5 +90,12 @@ wifi.macAddress = "random"; }; + # [DESKTOP / XORG / WAYLAND] + services.xserver = { + windowManager.berry.enable = true; + displayManager.startx.enable = true; + dpi = 144; + }; + system.stateVersion = "23.11"; } diff --git a/shared/desktop.nix b/shared/desktop.nix index 5f50139..db4e153 100644 --- a/shared/desktop.nix +++ b/shared/desktop.nix @@ -23,7 +23,7 @@ # [NIX] nix = { settings = { - bash-prompt = "\\033[1m\\u\\033[0m@\\033[1m\\h\\033[0m: \\w\\n❄\\040"; + bash-prompt = "\\033[1m\\u\\033[0m@\\033[1m\\h\\033[0m: \\w\\n\\040"; experimental-features = [ "nix-command" "flakes" ]; auto-optimise-store = true; }; @@ -54,8 +54,6 @@ # [DESKTOP / XORG / WAYLAND] services.xserver = { enable = true; - desktopManager.plasma5.enable = true; - displayManager.startx.enable = true; xkb = { layout = "fox,sus"; options = "ctrl:nocaps";