diff --git a/flake.nix b/flake.nix index 4b5a2d2..f9368d7 100644 --- a/flake.nix +++ b/flake.nix @@ -57,10 +57,21 @@ extraSpecialArgs = {inherit inputs;}; # Pass flake inputs to our config modules = [ ./users/tacocat/home.nix + ./users/tacocat/wayland ]; }; + # homeConfigurations."tacocat-X11" = inputs.home-manager.lib.homeManagerConfiguration { + # inherit pkgs; + # extraSpecialArgs = {inherit inputs;}; # Pass flake inputs to our config + # modules = [ + # ./users/tacocat/home.nix + # ./users/tacocat/X11 + # ]; + # }; + #outputs home-manager activation package for use on non-NixOS, i think? packages.${system}."tacocat" = self.homeConfigurations."tacocat".activationPackage; + # packages.${system}."tacocat-X11" = self.homeConfigurations."tacocat-X11".activationPackage; }; } diff --git a/hosts/JWST/configuration.nix b/hosts/JWST/configuration.nix index 47e69e9..f01698c 100644 --- a/hosts/JWST/configuration.nix +++ b/hosts/JWST/configuration.nix @@ -10,7 +10,6 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix - ./river.nix ./secrets ]; @@ -19,6 +18,7 @@ efi.efiSysMountPoint = "/boot/efi"; grub = { efiSupport = true; + configurationLimit = 10; device = "nodev"; extraEntriesBeforeNixOS = true; # still primarily using void extraEntries = '' @@ -31,6 +31,13 @@ }; nix.settings.experimental-features = ["nix-command" "flakes"]; + nix.settings.auto-optimise-store = true; + + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 1w"; + }; networking.hostName = "JWST"; networking.networkmanager.enable = true; @@ -78,10 +85,22 @@ ]; }; + programs.river.enable = true; + programs.river.extraPackages = with pkgs; [ + swaylock + swayidle + dunst + wlsunset + nm-applet + grim + slurp + waybar + wbg + ]; + environment = { systemPackages = with pkgs; [ vim - wget ]; defaultPackages = with pkgs; [ perl diff --git a/users/tacocat/home.nix b/users/tacocat/home.nix index 4e6a09d..6b166b8 100644 --- a/users/tacocat/home.nix +++ b/users/tacocat/home.nix @@ -29,6 +29,8 @@ bat comic-mono maple-mono + jetbrains-mono + (nerdfonts.override {fonts = ["FiraMono"]; } ) pandoc jdk20 pdftk @@ -38,19 +40,14 @@ fonts.fontconfig.enable = true; - xdg.configFile."river" = { - source = ./river; - executable = true; - recursive = true; - }; - - xdg.configFile."river/background.jpg".source = ./background.jpg; + news.display = "silent"; imports = [ ./programs ./shell ./helix ./emacs + ./wayland ]; # Let Home Manager install and manage itself. diff --git a/users/tacocat/river/process b/users/tacocat/river/process deleted file mode 100755 index a2111f3..0000000 --- a/users/tacocat/river/process +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -# /usr/libexec/xdg-desktop-portal -r & -# /usr/libexec/xdg-desktop-portal-wlr -r & - -# pipewire & -wlsunset -S 8:00 -s 23:30 & -waybar -c ~/.config/waybar/river/config -s ~/.config/waybar/river/style.css & -nm-applet --indicator & -dunst & -swayidle -w timeout 600 'swaylock -f -c 14171d' & - -# for void linux -~/.config/river/void-setup diff --git a/users/tacocat/shell/bash.nix b/users/tacocat/shell/bash.nix index 3acf61d..90af1f9 100644 --- a/users/tacocat/shell/bash.nix +++ b/users/tacocat/shell/bash.nix @@ -2,6 +2,7 @@ programs.bash = { enable = true; enableCompletion = true; + enableVteIntegration = true; bashrcExtra = '' PS1='[\u@\h \W]\$ ' diff --git a/users/tacocat/shell/zsh.nix b/users/tacocat/shell/zsh.nix index ea8eb36..423bc08 100644 --- a/users/tacocat/shell/zsh.nix +++ b/users/tacocat/shell/zsh.nix @@ -7,6 +7,7 @@ enable = true; enableAutosuggestions = true; enableCompletion = true; + enableVteIntegration = true; syntaxHighlighting.enable = true; autocd = true; defaultKeymap = null; diff --git a/users/tacocat/wayland/default.nix b/users/tacocat/wayland/default.nix new file mode 100644 index 0000000..5a8f98e --- /dev/null +++ b/users/tacocat/wayland/default.nix @@ -0,0 +1,25 @@ +{pkgs, ...}: +{ + specialisation.wayland.configuration = { + imports = [ + ./waybar + ]; + }; + + xdg.configFile."river" = { + source = ./river; + executable = true; + recursive = true; + }; + + xdg.configFile."river/background.jpg".source = ../background.jpg; + + home.packages = with pkgs; [ + wl-clipboard + swaylock + swayidle + wbg + ]; + + programs.rofi.package = pkgs.rofi-wayland-unwrapped; +} diff --git a/users/tacocat/river/init b/users/tacocat/wayland/river/init similarity index 100% rename from users/tacocat/river/init rename to users/tacocat/wayland/river/init diff --git a/users/tacocat/wayland/river/process b/users/tacocat/wayland/river/process new file mode 100755 index 0000000..2de4acc --- /dev/null +++ b/users/tacocat/wayland/river/process @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +wlsunset -S 8:00 -s 23:30 & +waybar & +nm-applet --indicator & +dunst & + +# void linux specific setup +if test -f ~/.config/river/void-setup; then + exec ~/.config/river/void-setup + exit +fi + +exec swayidle -w \ + timeout 600 'swaylock -f -c 14171d' \ + before-sleep 'swaylock -f -c 14171d' diff --git a/users/tacocat/river/reload b/users/tacocat/wayland/river/reload similarity index 88% rename from users/tacocat/river/reload rename to users/tacocat/wayland/river/reload index ba395f7..7448cf7 100755 --- a/users/tacocat/river/reload +++ b/users/tacocat/wayland/river/reload @@ -6,5 +6,6 @@ killall nm-applet killall dunst killall swayidle killall wbg +killall void-setup ~/.config/river/init diff --git a/users/tacocat/wayland/waybar/config b/users/tacocat/wayland/waybar/config new file mode 100644 index 0000000..5f30f0a --- /dev/null +++ b/users/tacocat/wayland/waybar/config @@ -0,0 +1,194 @@ +{ + "layer": "top", + "position": "top", + + "modules-left": [ + "river/mode", + "river/tags", + "custom/arrow10", + "river/window" + ], + + "modules-right": [ + "custom/arrow9", + "pulseaudio", + "custom/arrow8", + "network", + "custom/arrow7", + "memory", + "custom/arrow6", + "cpu", + "custom/arrow5", + "temperature", + "custom/arrow4", + "battery", + "custom/arrow2", + "tray", + "clock#date", + "custom/arrow1", + "clock#time" + ], + + // Modules + + "battery": { + "interval": 10, + "states": { + "warning": 30, + "critical": 15 + }, + "format-time": "{H}:{M:02}", + "format": "{icon} {capacity}% ({time})", + "format-charging": " {capacity}% ({time})", + "format-charging-full": " {capacity}%", + "format-full": "{icon} {capacity}%", + "format-alt": "{icon} {power}W", + "format-icons": [ + "", + "", + "", + "", + "" + ], + "tooltip": false + }, + + "clock#time": { + "interval": 10, + "format": "{:%H:%M}", + "tooltip": false + }, + + "clock#date": { + "interval": 20, + "format": "{:%e %b %Y}", + "tooltip": false + //"tooltip-format": "{:%e %B %Y}" + }, + + "cpu": { + "interval": 5, + "tooltip": false, + "format": " {usage}%", + "format-alt": " {load}", + "states": { + "warning": 70, + "critical": 90 + } + }, + + "memory": { + "interval": 5, + "format": "RAM: {used:0.1f}G/{total:0.1f}G", + "states": { + "warning": 70, + "critical": 90 + }, + "tooltip": false + }, + + "network": { + "interval": 5, + "format-wifi": " {essid} ({signalStrength}%)", + "format-ethernet": " {ifname}", + "format-disconnected": "No connection", + "format-alt": " {ipaddr}/{cidr}", + "tooltip": false + }, + + "river/mode": { + "format": "{}", + }, + + "river/window": { + "format": "{}", + "max-length": 79, + "tooltip": false, + }, + + "river/tags": { + "num-tags": 9, + }, + + "pulseaudio": { + "format": "{icon} {volume}%", + "format-bluetooth": "{icon} {volume}%", + "format-muted": "", + "format-icons": { + "default": ["", ""] + }, + "scroll-step": 1, + "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle", + "tooltip": false + }, + + "temperature": { + "critical-threshold": 90, + "interval": 5, + "thermal-zone": 1, + "format": "{icon} {temperatureC}°", + "format-icons": [ + "", + "", + "", + "", + "" + ], + "tooltip": false + }, + + "tray": { + "icon-size": 18, + "spacing": 10 + }, + + "custom/arrow1": { + "format": "", + "tooltip": false + }, + + "custom/arrow2": { + "format": "", + "tooltip": false + }, + + "custom/arrow3": { + "format": "", + "tooltip": false + }, + + "custom/arrow4": { + "format": "", + "tooltip": false + }, + + "custom/arrow5": { + "format": "", + "tooltip": false + }, + + "custom/arrow6": { + "format": "", + "tooltip": false + }, + + "custom/arrow7": { + "format": "", + "tooltip": false + }, + + "custom/arrow8": { + "format": "", + "tooltip": false + }, + + "custom/arrow9": { + "format": "", + "tooltip": false + }, + + "custom/arrow10": { + "format": "", + "tooltip": false + } +} diff --git a/users/tacocat/wayland/waybar/default.nix b/users/tacocat/wayland/waybar/default.nix new file mode 100644 index 0000000..718f291 --- /dev/null +++ b/users/tacocat/wayland/waybar/default.nix @@ -0,0 +1,162 @@ +{ + programs.waybar = { + enable = true; + style = ./style.css; + settings = { + mainBar = { + layer = "top"; + position = "top"; + modules-left = [ + "river/mode" + "river/tags" + "custom/arrow10" + "river/window" + ]; + modules-right = [ + "custom/arrow9" + "pulseaudio" + "custom/arrow8" + "network" + "custom/arrow7" + "memory" + "custom/arrow6" + "cpu" + "custom/arrow5" + "temperature" + "custom/arrow4" + "battery" + "custom/arrow2" + "tray" + "clock#date" + "custom/arrow1" + "clock#time" + ]; + "pulseaudio" = { + format = "{icon} {volume}%"; + format-bluetooth = "{icon} {volume}%"; + format-muted = ""; + format-icons.default = [ "" "" ]; + scroll-step = 1; + tooltip = false; + }; + "network" = { + interval = 5; + format-wifi = " {essid} ({signalStrength}%)"; + format-ethernet = " {ifname}"; + format-disconnected = "No connection"; + format-alt = " {ipaddr}/{cidr}"; + tooltip = false; + }; + "river/mode" = { + format = "{}"; + }; + "river/window" = { + format = "{}"; + max-length = 79; + tooltip = false; + }; + "river/tags" = { + num-tags = 9; + }; + "temperature" = { + critical-threshold = 90; + interval = 5; + thermal-zone = 1; + format = "{icon} {temperatureC}°"; + format-icons = [ + "" + "" + "" + "" + "" + ]; + tooltip = false; + }; + "memory" = { + interval = 5; + format = "RAM: {used:0.1f}G/{total:0.1f}G"; + states = { + warning = 70; + critical = 90; + }; + tooltip = false; + }; + "cpu" = { + interval = 5; + tooltip = false; + format = " {usage}%"; + format-alt = " {load}"; + states = { + warning = 70; + critical = 90; + }; + }; + "battery" = { + interval = 10; + states = { + warning = 25; + critical = 15; + }; + format-time = "{H}:{M:02}"; + format = "{icon} {capacity}% ({time})"; + format-charging = " {capacity}% ({time})"; + format-charging-full = " {capacity}%"; + format-full = "{icon} {capacity}%"; + format-alt = "{icon} {power}W"; + format-icons = [ + "" + "" + "" + "" + "" + ]; + tooltip = false; + }; + "tray" = { + icon-size = 18; + spacing = 10; + }; + "custom/arrow1" = { + format = ""; + tooltip = false; + }; + "custom/arrow2" = { + format = ""; + tooltip = false; + }; + "custom/arrow3" = { + format = ""; + tooltip = false; + }; + "custom/arrow4" = { + format = ""; + tooltip = false; + }; + "custom/arrow5" = { + format = ""; + tooltip = false; + }; + "custom/arrow6" = { + format = ""; + tooltip = false; + }; + "custom/arrow7" = { + format = ""; + tooltip = false; + }; + "custom/arrow8" = { + format = ""; + tooltip = false; + }; + "custom/arrow9" = { + format = ""; + tooltip = false; + }; + "custom/arrow10" = { + format = ""; + tooltip = false; + }; + }; + }; + }; +} diff --git a/users/tacocat/wayland/waybar/style.css b/users/tacocat/wayland/waybar/style.css new file mode 100644 index 0000000..5bfe8e6 --- /dev/null +++ b/users/tacocat/wayland/waybar/style.css @@ -0,0 +1,296 @@ +/* Keyframes */ + +@keyframes blink-critical { + to { + /*color: @white;*/ + background-color: @critical; + } +} + + +/* Styles */ + +/* Colors (gruvbox) */ +/* @define-color black #282828; */ +@define-color black #393552; +/* @define-color red #cc241d; */ +@define-color red #EB6F92; +@define-color green #98971a; +@define-color yellow #d79921; +/* @define-color blue #458588; */ +@define-color blue #9CCFD8; +/* @define-color purple #b16286; */ +@define-color purple #C4A7E7; +@define-color aqua #689d6a; +@define-color gray #a89984; +@define-color brgray #928374; +@define-color bfred #fb4934; +@define-color brred #EA9A97; +@define-color brgreen #b8bb26; +/* @define-color bryellow #fabd2f; */ +@define-color bryellow #F6C177; +/* @define-color brblue #83a598; */ +@define-color brblue #85ACB0; +@define-color brpurple #d3869b; +@define-color braqua #8ec07c; +@define-color white #ebdbb2; +/* @define-color bg2 #504945; */ +@define-color bg2 #6E6A86; + +@define-color warning @bfred; +@define-color critical @bfred; +@define-color mode @black; +@define-color unfocused @bg2; +@define-color focused @red; +@define-color inactive @blue; +@define-color sound @purple; +@define-color network @blue; +@define-color memory @brred; +@define-color cpu @brblue; +@define-color temp @bryellow; +@define-color layout @bryellow; +@define-color battery @braqua; +@define-color date @black; +@define-color time @white; + +/* Reset all styles */ +* { + border: none; + border-radius: 0; + min-height: 0; + margin: 0; + padding: 0; + box-shadow: none; + text-shadow: none; + icon-shadow: none; +} + +/* The whole bar */ +#waybar { + background: rgba(40, 40, 40, 0.8784313725); /* #282828e0 */ + color: @white; + font-family: JetBrains Mono; + font-size: 10pt; + /*font-weight: bold;*/ +} + +/* Each module */ +#mode, +#battery, +#clock, +#cpu, +#language, +#memory, +#mode, +#network, +#pulseaudio, +#temperature, +#tray, +#backlight, +#idle_inhibitor, +#disk, +#user, +#mpris { + padding-left: 8pt; + padding-right: 8pt; +} + +/* Each critical module */ +#memory.critical, +#cpu.critical, +#temperature.critical, +#battery.critical.discharging { + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; + animation-name: blink-critical; + animation-duration: 1s; +} + +/* Each warning */ +#network.disconnected, +#memory.warning, +#cpu.warning, +#temperature.warning, +#battery.warning.discharging { + color: @warning; +} + +/* And now modules themselves in their respective order */ + +/* Current sway mode (resize etc) */ +#mode { + color: @white; + background: @mode; +} + +/* Workspaces stuff */ +#workspaces button { + /*font-weight: bold;*/ + padding-left: 4pt; + padding-right: 4pt; + color: @white; + background: @unfocused; +} + +/* Inactive (on unfocused output) */ +#workspaces button.visible { + color: @white; + background: @inactive; +} + +/* Active (on focused output) */ +#workspaces button.focused { + color: @black; + background: @focused; +} + +/* Contains an urgent window */ +#workspaces button.urgent { + color: @black; + background: @warning; +} + +/* Style when cursor is on the button */ +#workspaces button:hover { + background: @black; + color: @white; +} + +#tags button { + /*font-weight: bold;*/ + padding-left: 4pt; + padding-right: 4pt; + color: @white; + background: @unfocused; +} + +#tags button.occupied { + color: @black; + background: @inactive; +} + +#tags button.focused { + color: @black; + background: @focused; +} + +#tags button.urgent { + color: @black; + background: @warning; +} + +#window { + margin-right: 35pt; + margin-left: 35pt; +} + +#pulseaudio { + background: @sound; + color: @black; + font-family: FiraMono Nerd Font; +} + +#network { + background: @network; + color: @black; +} + +#memory { + background: @memory; + color: @black; +} + +#cpu { + background: @cpu; + color: @black; +} + +#temperature { + background: @temp; + color: @black; +} + +#language { + background: @layout; + color: @black; +} + +#battery { + background: @battery; + color: @black; +} + +#tray { + background: @date; +} + +#clock.date { + background: @date; + color: @white; +} + +#clock.time { + background: @time; + color: @black; +} + +#custom-arrow1 { + font-size: 11pt; + color: @time; + background: @date; +} + +#custom-arrow2 { + font-size: 11pt; + color: @date; + background: @battery; +} + +#custom-arrow3 { + font-size: 11pt; + color: @layout; + background: @battery; +} + +#custom-arrow4 { + font-size: 11pt; + color: @battery; + background: @temp; +} + +#custom-arrow5 { + font-size: 11pt; + color: @temp; + background: @cpu; +} + +#custom-arrow6 { + font-size: 11pt; + color: @cpu; + background: @memory; +} + +#custom-arrow7 { + font-size: 11pt; + color: @memory; + background: @network; +} + +#custom-arrow8 { + font-size: 11pt; + color: @network; + background: @sound; +} + +#custom-arrow9 { + font-size: 11pt; + color: @sound; + background: transparent; +} + +#custom-arrow10 { + font-size: 11pt; + color: @unfocused; + background: transparent; +}