From 7cd63f026cb7dc14945750226834f5677d0a3865 Mon Sep 17 00:00:00 2001 From: Redyf Date: Sun, 12 May 2024 19:44:20 -0300 Subject: [PATCH 01/16] feat: add nord theme --- home/redyf/cli-apps/fzf/default.nix | 56 +++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 15 deletions(-) diff --git a/home/redyf/cli-apps/fzf/default.nix b/home/redyf/cli-apps/fzf/default.nix index a29addb1..35a82f4f 100644 --- a/home/redyf/cli-apps/fzf/default.nix +++ b/home/redyf/cli-apps/fzf/default.nix @@ -1,23 +1,49 @@ -_: { +_: let + catppuccin = { + bg = "-1"; + "bg+" = "-1"; + hl = "#ed8796"; + "hl+" = "#ed8796"; + fg = "#cad3f5"; + "fg+" = "#cad3f5"; + header = "#ed8796"; + info = "#c6a0f6"; + pointer = "#f4dbd6"; + marker = "#f4dbd6"; + prompt = "#c6a0f6"; + spinner = "#f4dbd6"; + }; + nord = { + fg = "#e5e9f0"; + bg = "#3b4252"; + hl = "#81a1c1"; + "fg+" = "#e5e9f0"; + "bg+" = "#3b4252"; + "hl+" = "#81a1c1"; + info = "#eacb8a"; + prompt = "#bf6069"; + pointer = "#b48dac"; + marker = "#a3be8b"; + spinner = "#b48dac"; + header = "#a3be8b"; + }; +in { programs.fzf = { enable = true; enableZshIntegration = true; tmux = { enableShellIntegration = true; }; - colors = { - bg = "-1"; - "bg+" = "-1"; - hl = "#ed8796"; - "hl+" = "#ed8796"; - fg = "#cad3f5"; - "fg+" = "#cad3f5"; - header = "#ed8796"; - info = "#c6a0f6"; - pointer = "#f4dbd6"; - marker = "#f4dbd6"; - prompt = "#c6a0f6"; - spinner = "#f4dbd6"; - }; + colors = catppuccin; + defaultOptions = [ + "--preview='bat --color=always {}'" + "--multi" + "--height 100%" + "--layout=reverse-list" + "--border=none" + "--info=inline" + "--bind shift-up:preview-page-up,shift-down:preview-page-down" + "--header='CTRL-c or ESC to quit'" + ]; }; } From 37d325d7042191a1e7c6a3cf2b3b8b40efdf36bd Mon Sep 17 00:00:00 2001 From: Redyf Date: Sun, 12 May 2024 19:44:35 -0300 Subject: [PATCH 02/16] feat: Add new modules for starship --- home/redyf/cli-apps/starship/default.nix | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/home/redyf/cli-apps/starship/default.nix b/home/redyf/cli-apps/starship/default.nix index 407701d7..af42d3d7 100644 --- a/home/redyf/cli-apps/starship/default.nix +++ b/home/redyf/cli-apps/starship/default.nix @@ -8,7 +8,8 @@ settings = # Catppuccin { - scan_timeout = 10; + scan_timeout = 30; + command_timeout = 2000; add_newline = false; line_break.disabled = false; right_format = '' @@ -46,6 +47,13 @@ style = "bold blue"; }; + direnv = { + format = "[$symbol$loaded/$allowed]($style) "; + symbol = "direnv "; + style = "bold orange"; + disabled = true; + }; + docker_context = { disabled = true; }; @@ -74,6 +82,12 @@ symbol = "[ ]($style)"; }; + haskell = { + format = "via [$symbol($version )]($style)"; + symbol = "λ "; + style = "bold purple"; + }; + kubernetes = { symbol = "☸ "; disabled = false; @@ -101,6 +115,13 @@ version_format = "v$raw(blue)"; }; + ocaml = { + format = "via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"; + symbol = "🐫 "; + style = "bold yellow"; + version_format = "v$raw"; + }; + package = { format = "is [$symbol$version]($style) "; symbol = " "; From 46cf1cb365f61b5a8e79dfa451632ade296d6da2 Mon Sep 17 00:00:00 2001 From: Redyf Date: Sun, 12 May 2024 19:45:00 -0300 Subject: [PATCH 03/16] chore: switch to Fira Code Nerd Font --- home/redyf/desktop/addons/alacritty/default.nix | 12 ++++++------ home/redyf/desktop/addons/kitty/default.nix | 15 ++++++++------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/home/redyf/desktop/addons/alacritty/default.nix b/home/redyf/desktop/addons/alacritty/default.nix index ca3d1a04..89192f73 100644 --- a/home/redyf/desktop/addons/alacritty/default.nix +++ b/home/redyf/desktop/addons/alacritty/default.nix @@ -13,21 +13,21 @@ in { }; }; font = { - size = 13; + size = 16; normal = { - family = "MonoLisa"; + family = "Fira Mono Nerd Font"; style = "Medium Italic"; }; bold = { - family = "MonoLisa"; + family = "Fira Mono Nerd Font"; style = "Bold"; }; italic = { - family = "MonoLisa"; + family = "Fira Mono Nerd Font"; style = "Italic"; }; bold_italic = { - family = "MonoLisa"; + family = "Fira Mono Nerd Font"; style = "Bold Italic"; }; offset = { @@ -40,7 +40,7 @@ in { }; }; window = { - opacity = 1; + opacity = 0.95; decorations = "none"; padding = { x = 10; diff --git a/home/redyf/desktop/addons/kitty/default.nix b/home/redyf/desktop/addons/kitty/default.nix index 44b4a85c..ec4f9d34 100644 --- a/home/redyf/desktop/addons/kitty/default.nix +++ b/home/redyf/desktop/addons/kitty/default.nix @@ -5,14 +5,13 @@ enableZshIntegration = true; mode = "no-cursor"; }; - # theme = "Catppuccin-Mocha"; + theme = "Catppuccin-Mocha"; font = { - # name = "Berkeley Mono Regular Nerd Font Complete"; - name = "FiraMono Nerd Font"; - # name = "LiterationMono Nerd Font"; + name = "FiraCode Nerd Font"; + # name = "JetBrainsMono Nerd Font"; # name = "MonoLisa"; # package = pkgs.monolisa-script; - size = 11; + size = 16; }; # https://www.monolisa.dev/faq#how-to-enable-stylistic-sets-for-the-kitty-terminal extraConfig = '' @@ -31,7 +30,7 @@ sync_to_monitor = "yes"; # Background - background_opacity = "0.98"; + background_opacity = "0.95"; # Cursor cursor_shape = "block"; @@ -62,7 +61,7 @@ term = "xterm-256color"; # Themes - include = "themes/custom-mocha.conf"; + # include = "themes/custom-mocha.conf"; # include = "themes/oxocarbon-dark.conf"; # terminal_select_modifiers = "alt"; @@ -91,6 +90,8 @@ "ctrl+shift+c" = "copy_to_clipboard"; "ctrl+shift+v" = "paste_from_clipboard"; "ctrl+shift+s" = "paste_from_selection"; + "ctrl+shift+=" = "increase_font_size"; + "ctrl+shift+-" = "decrease_font_size"; "ctrl+shift+up" = "scroll_line_up"; "ctrl+shift+k" = "scroll_line_up"; "ctrl+shift+down" = "scroll_line_down"; From af97a3e0c7b89d92236c4afe688abd33a1559bf9 Mon Sep 17 00:00:00 2001 From: Redyf Date: Sun, 12 May 2024 19:45:36 -0300 Subject: [PATCH 04/16] chore: delete unused waybar config --- home/redyf/desktop/addons/waybar/default.nix | 11 +- .../desktop/addons/waybar/default/config.nix | 237 ---------- .../addons/waybar/default/machiatto.css | 37 -- .../desktop/addons/waybar/default/style.nix | 419 ------------------ 4 files changed, 4 insertions(+), 700 deletions(-) delete mode 100644 home/redyf/desktop/addons/waybar/default/config.nix delete mode 100644 home/redyf/desktop/addons/waybar/default/machiatto.css delete mode 100644 home/redyf/desktop/addons/waybar/default/style.nix diff --git a/home/redyf/desktop/addons/waybar/default.nix b/home/redyf/desktop/addons/waybar/default.nix index 42b76711..59e17111 100644 --- a/home/redyf/desktop/addons/waybar/default.nix +++ b/home/redyf/desktop/addons/waybar/default.nix @@ -12,17 +12,14 @@ # waybar_config = import ./nixbar/config.nix {inherit osConfig config lib pkgs;}; # waybar_style = import ./nixbar/style.nix {inherit (config) colorscheme;}; # Tokyonight - # waybar_config = import ./tokyonight/config.nix {inherit osConfig config lib pkgs;}; - # waybar_style = import ./tokyonight/style.nix {inherit (config) colorscheme;}; + waybar_config = import ./tokyonight/config.nix {inherit osConfig config lib pkgs;}; + waybar_style = import ./tokyonight/style.nix {inherit (config) colorscheme;}; # Catppuccin # waybar_config = import ./catppuccin/config.nix { inherit osConfig config lib pkgs; }; # waybar_style = import ./catppuccin/style.nix { inherit (config) colorscheme; }; - # New bar - # waybar_config = import ./default/config.nix { inherit osConfig config lib pkgs; }; - # waybar_style = import ./default/style.nix { inherit (config) colorscheme; }; # Simple bar - waybar_config = import ./simple/config.nix {inherit osConfig config lib pkgs;}; - waybar_style = import ./simple/style.nix {inherit (config) colorscheme;}; + # waybar_config = import ./simple/config.nix {inherit osConfig config lib pkgs;}; + # waybar_style = import ./simple/style.nix {inherit (config) colorscheme;}; in { programs.waybar = { enable = true; diff --git a/home/redyf/desktop/addons/waybar/default/config.nix b/home/redyf/desktop/addons/waybar/default/config.nix deleted file mode 100644 index 7c60a5ad..00000000 --- a/home/redyf/desktop/addons/waybar/default/config.nix +++ /dev/null @@ -1,237 +0,0 @@ -_: { - mainBar = { - layer = "top"; # Waybar at top layer - position = "top"; # Waybar position (top|bottom|left|right) - height = 30; - margin = "0 0 0 0"; - modules-left = [ - "custom/launcher" - "hyprland/workspaces" - "custom/swap" - "tray" - "hyprland/mode" - "custom/cava-internal" - "mpd#2" - "mpd#3" - "mpd#4" - "mpd" - ]; - modules-center = ["clock"]; - modules-right = [ - "pulseaudio" - "temperature" - "memory" - "network" - "custom/power" - ]; - "hyprland/workspaces" = { - disable-scroll = true; - all-outputs = true; - format = "{icon}"; - format-icons = { - "1" = ""; - "2" = ""; - "3" = ""; - "4" = ""; - "5" = ""; - "6" = ""; - "7" = ""; - "8" = ""; - "9" = ""; - "10" = ""; - }; - }; - "mpd" = { - tooltip = true; - tooltip-format = "{artist} - {album} - {title} - Total Time : {totalTime:%M:%S}"; - format = " {elapsedTime:%M:%S}"; - format-disconnected = "⚠ Disconnected"; - format-stopped = " Not Playing"; - on-click = "mpc toggle"; - state-icons = { - playing = ""; - paused = ""; - }; - }; - "mpd#2" = { - format = ""; - format-disconnected = ""; - format-paused = ""; - format-stopped = ""; - on-click = "mpc -q pause && mpc -q prev && mpc -q start"; - }; - "mpd#3" = { - interval = 1; - format = "{stateIcon}"; - format-disconnected = ""; - format-paused = "{stateIcon}"; - format-stopped = ""; - state-icons = { - paused = ""; - playing = ""; - }; - }; - "mpd#4" = { - format = ""; - format-disconnected = ""; - format-paused = ""; - format-stopped = ""; - on-click = "mpc -q pause && mpc -q next && mpc -q start"; - }; - "custom/swap" = { - on-click = "~/.config/waybar/scripts/swap.sh"; - tooltip = "Swap between waybar configs"; - format = "Bg  "; - }; - "custom/mpd" = { - format = " {title} - {artist}"; - interval = 5; - exec = "mpc current --format='\"title\":\"%title%\",\"artist\":\"%artist%\"'"; - }; - "custom/cava-internal" = { - exec = "sh ~/.config/waybar/scripts/Cava.sh"; - format = "{}"; - tooltip = false; - on-click = "hyprlandmsg reload & pkill waybar & waybar"; - layer = "below"; - output = "all"; - }; - "hyprland/mode" = { - format = "{}"; - }; - "hyprland/window" = { - format = "~ {app_id}"; - }; - "idle_inhibitor" = { - format = "{icon}"; - format-icons = { - activated = ""; - deactivated = ""; - }; - }; - "tray" = { - icon-size = 14; - spacing = 5; - }; - "clock" = { - tooltip-format = "{calendar}"; - calendar = { - mode = "month"; - mode-mon-col = 3; - weeks-pos = "right"; - on-scroll = 1; - on-click-right = "mode"; - format = { - months = "{}"; - days = "{}"; - weeks = "W{}"; - weekdays = "{}"; - today = "{}"; - }; - }; - }; - # "actions": { - # "on-click-right": "mode", - # "on-click-forward": "tz_up", - # "on-click-backward": "tz_down", - # "on-scroll-up": "shift_up", - # "on-scroll-down": "shift_down" - # }, - # "format": " {:%a %d %b  %I:%M %p}", //12 hour format - # // "format": " {:%d %m %Y  %H:%M}", //24 hour format - # "format-alt": " {:%d/%m/%Y  %H:%M:%S}", - # // //"timezones": [ "Kolkata" ], - # // //"max-length": 200 - # "interval": 1 - # }, - # // "clock": { - # // "format": " {:%H:%M:%S}", - # // "format-alt": " {:%A, %B %d, %Y (%R)}", - # // "tooltip-format": "{calendar}", - # // "calendar": { - # // "mode" : "month", - # // "mode-mon-col" : 3, - # // "weeks-pos" : "right", - # // "on-scroll" : 1, - # // "on-click-right": "mode", - # // "format": { - # // "months": "{}", - # // "days": "{}", - # // "weeks": "W{}", - # // "weekdays": "{}", - # // "today": "{}" - # // } - # // }, - # // "actions": { - # // "on-click-right": "mode", - # // "on-click-forward": "tz_up", - # // "on-click-backward": "tz_down", - # // "on-scroll-up": "shift_up", - # // "on-scroll-down": "shift_down" - # // }, - # // "interval": 1 - # // }, - "cpu" = { - format = "﬙ {usage: >3}%"; - on-click = "alacritty -e htop"; - }; - "memory" = { - format = " {: >3}%"; - on-click = "alacritty -e htop"; - }; - "temperature" = { - hwmon-path = "/sys/class/hwmon/hwmon1/temp1_input"; - critical-threshold = 80; - format = " {temperatureC}°C"; - }; - "backlight" = { - format = "{icon} {percent: >3}%"; - format-icons = ["" ""]; - on-scroll-down = "light -A 5 && light -G | cut -d'.' -f1 > $hyprlandSOCK.wob"; - on-scroll-up = "light -U 5 && light -G | cut -d'.' -f1 > $hyprlandSOCK.wob"; - }; - "battery" = { - states = { - warning = 30; - critical = 15; - }; - format = "{icon} {capacity: >3}%"; - format-icons = ["" "" "" "" ""]; - }; - "network" = { - format = "⚠ Disabled"; - format-wifi = " {essid}"; - format-ethernet = " Wired"; - format-disconnected = "⚠ Disconnected"; - on-click = "nm-connection-editor"; - }; - "pulseaudio" = { - scroll-step = 1; - format = "{icon} {volume: >3}%"; - format-bluetooth = "{icon} {volume: >3}%"; - format-muted = " muted"; - format-icons = { - headphones = ""; - handsfree = ""; - headset = ""; - phone = ""; - portable = ""; - car = ""; - default = ["" ""]; - }; - on-click = "pavucontrol"; - on-scroll-up = "pamixer -ui 2 && pamixer --get-volume > $hyprlandSOCK.wob"; - on-scroll-down = "pamixer -ud 2 && pamixer --get-volume > $hyprlandSOCK.wob"; - }; - "custom/power" = { - format = "⏻"; - on-click = "nwgbar"; - tooltip = false; - }; - "custom/launcher" = { - format = " "; - on-click = "exec nwg-drawer -c 7 -is 70 -spacing 23"; - tooltip = false; - }; - }; -} diff --git a/home/redyf/desktop/addons/waybar/default/machiatto.css b/home/redyf/desktop/addons/waybar/default/machiatto.css deleted file mode 100644 index 68804731..00000000 --- a/home/redyf/desktop/addons/waybar/default/machiatto.css +++ /dev/null @@ -1,37 +0,0 @@ -/* -* -* Catppuccin Macchiato palette -* Maintainer: rubyowo -* -*/ - -@define-color base #24273a; -@define-color mantle #1e2030; -@define-color crust #181926; - -@define-color text #cad3f5; -@define-color subtext0 #a5adcb; -@define-color subtext1 #b8c0e0; - -@define-color surface0 #363a4f; -@define-color surface1 #494d64; -@define-color surface2 #5b6078; - -@define-color overlay0 #6e738d; -@define-color overlay1 #8087a2; -@define-color overlay2 #939ab7; - -@define-color blue #8aadf4; -@define-color lavender #b7bdf8; -@define-color sapphire #7dc4e4; -@define-color sky #91d7e3; -@define-color teal #8bd5ca; -@define-color green #a6da95; -@define-color yellow #eed49f; -@define-color peach #f5a97f; -@define-color maroon #ee99a0; -@define-color red #ed8796; -@define-color mauve #c6a0f6; -@define-color pink #f5bde6; -@define-color flamingo #f0c6c6; -@define-color rosewater #f4dbd6; diff --git a/home/redyf/desktop/addons/waybar/default/style.nix b/home/redyf/desktop/addons/waybar/default/style.nix deleted file mode 100644 index 42c4a7db..00000000 --- a/home/redyf/desktop/addons/waybar/default/style.nix +++ /dev/null @@ -1,419 +0,0 @@ -_: '' - /* ============================================================================= - * - * Waybar configuration - * - * Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration - * - * =========================================================================== */ - - /* ----------------------------------------------------------------------------- - * Keyframes - * -------------------------------------------------------------------------- */ - - @import "machiatto.css"; - - /* - Polar Night - nord0 #2e3440 - nord1 #3b4252 - nord2 #434c5e - nord3 #4c566a - Snow Storm - nord4 #d8dee9 - nord5 #e5e9f0 - nord6 #eceff4 - Frost - nord7 #8fbcbb - nord8 #88c0d0 - nord9 #81a1c1 - nord10 #5e81ac - Aurora - nord11 #bf616a - nord12 #d08770 - nord13 #ebcb8b - nord14 #a3be8c - nord15 #b48ead - */ - - /* ----------------------------------------------------------------------------- - * Base styles - * -------------------------------------------------------------------------- */ - - /* Reset all styles */ - - * { - color: @lavender; - border: 0; - padding: 0 0; - font-family: UbuntuMono; - /* font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; */ - /* font-family: "Hack Nerd Font"; */ - font-size: 14px; - font-weight: bold; - /* padding-bottom:4px; - padding-top: 4px; */ - } - - window#waybar { - border: 0px solid rgba(0, 0, 0, 0); - /* border-radius: 10px; */ - /* background:#2d2a2e; */ - /* background-color: rgba(36, 39, 58, 0.85); */ - background-color: rgba(0, 0, 0, 0); - /* background-color: shade(#1e1e2e, 0.95); */ - } - - #workspaces button { - color: @base; - border-radius: 50%; - /* background-color: @base; */ - margin: 0px 0px; - padding: 4 6 2 0; - } - - #workspaces button:hover { - color: @mauve; - box-shadow: none; - /* Remove predefined box-shadow */ - text-shadow: none; - /* Remove predefined text-shadow */ - border: 0px; - background: none; - } - - #workspaces button:hover * { - color: @mauve; - background-color: @base; - } - - #workspaces * { - color: whitesmoke; - } - - #workspaces { - border-style: solid; - background-color: @base; - opacity: 1; - border-radius: 10px; - margin: 8px 0px 8px 8px; - } - - #workspaces button.focused { - color: @mauve; - border-radius: 20px; - padding: 10px; - /* background-color: @flamingo; */ - } - - #workspaces button.focused * { - color: @mauve; - } - - #mode { - color: #ebcb8b; - } - - #clock, - #custom-swap, - #custom-cava-internal, - #battery, - #cpu, - #memory, - #idle_inhibitor, - #temperature, - #custom-keyboard-layout, - #backlight, - #network, - #pulseaudio, - #mode, - #tray, - #custom-power, - #custom-pacman, - #custom-launcher, - #mpd { - padding: 5px 8px; - border-style: solid; - background-color: shade(@base, 1); - opacity: 1; - margin: 8px 0; - } - - /* ----------------------------------------------------------------------------- - * Module styles - * -------------------------------------------------------------------------- */ - #mpd { - border-radius: 10px; - color: @mauve; - margin-left: 5px; - background-color: rgba(0, 0, 0, 0); - } - - #mpd.2 { - border-radius: 10px 0px 0px 10px; - margin: 8px 0px 8px 6px; - padding: 4px 12px 4px 10px; - } - - #mpd.3 { - border-radius: 0px 0px 0px 0px; - margin: 8px 0px 8px 0px; - padding: 4px; - } - - #mpd.4 { - border-radius: 0px 10px 10px 0px; - margin: 8px 0px 8px 0px; - padding: 4px 10px 4px 14px; - } - - #mpd.2, - #mpd.3, - #mpd.4 { - background-color: @base; - font-size: 14px; - } - - #mode { - border-radius: 10px; - color: @mauve; - margin-right: 5px; - } - - #custom-cava-internal { - border-radius: 10px; - color: @mauve; - } - - #custom-swap { - border-radius: 10px; - color: @base; - margin-left: 15px; - background-color: @mauve; - } - - #clock { - /* background-color:#a3be8c; */ - color: @sky; - border-radius: 10px; - margin: 8px 10px; - } - - #backlight { - color: @yellow; - /* border-bottom: 2px solid @yellow; */ - border-radius: 10px 0 0 10px; - } - - #battery { - color: #d8dee9; - /* border-bottom: 2px solid #d8dee9; */ - border-radius: 0 10px 10px 0; - margin-right: 10px; - } - - #battery.charging { - color: #81a1c1; - /* border-bottom: 2px solid #81a1c1; */ - } - - @keyframes blink { - to { - color: @red; - /* border-bottom: 2px solid @red; */ - } - } - - #battery.critical:not(.charging) { - color: #bf616a; - /* border-bottom: 2px solid #bf616a; */ - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; - } - - #cpu { - color: @sky; - /* border-bottom: 2px solid @sky; */ - } - - #cpu #cpu-icon { - color: @sky; - } - - #memory { - color: @sky; - border-radius: 0 10px 10px 0; - margin-right: 5px; - } - - #network.disabled { - color: #bf616a; - /* border-bottom: 2px solid #bf616a; */ - } - - #network { - color: @green; - /* border-bottom: 2px solid @green; */ - border-radius: 10px; - margin-right: 5px; - } - - #network.disconnected { - color: #bf616a; - /* border-bottom: 2px solid #bf616a; */ - } - - #pulseaudio { - color: @flamingo; - border-radius: 10px; - margin-right: 5px; - /* border-bottom: 2px solid @flamingo; */ - } - - #pulseaudio.muted { - color: #3b4252; - border-radius: 10px; - margin-right: 5px; - /* border-bottom: 2px solid #3b4252; */ - } - - #temperature { - color: @teal; - /* border-bottom: 2px solid @teal; */ - border-radius: 10px 0 0 10px; - } - - #temperature.critical { - color: @red; - /* border-bottom: 2px solid @red; */ - } - - #idle_inhibitor { - background-color: #ebcb8b; - color: @base; - } - - #tray { - /* background-color: @base; */ - margin: 8px 10px; - border-radius: 10px; - } - - #custom-launcher, - #custom-power {} - - #custom-launcher { - background-color: @mauve; - color: @base; - border-radius: 10px; - padding: 10px; - margin-left: 15px; - } - - #custom-power { - color: @base; - background-color: @red; - border-radius: 10px; - margin-left: 5px; - margin-right: 15px; - } - - #window { - border-style: hidden; - margin-left: 10px; - /* margin-top:1px; - padding: 8px 1rem; */ - margin-right: 10px; - color: #eceff4; - } - - #custom-keyboard-layout { - color: @peach; - /* border-bottom: 2px solid @peach; */ - border-radius: 0 10px 10px 0; - margin-right: 10px; - } - - - - /* window#waybar { - background: #2d2a2e; - } - - * { - color: #c8b9a9; - font-family: Ubuntu Mono, sans-serif; - font-size: 12px; - } - - #workspaces button.focused { - color: #f2e5bc; - } - - #workspaces button { - color: #c8b9a9; - } - - .separator { - background-color: #c8b9a9; - } - - #mode { - color: #ebcb8b; - } - - #clock { - color: #a3be8c; - } - - #battery { - color: #d8dee9; - } - - #battery.charging { - color: #b48ead; - } - - #battery.critical:not(.charging) { - color: #bf616a; - } - - #cpu { - color: #a3be8c; - } - - #memory { - color: #d3869b; - } - - #network { - color: #8fbcbb; - } - - #network.disabled { - color: #bf616a; - } - - #network.disconnected { - color: #bf616a; - } - - #pulseaudio { - color: #b48ead; - } - - #pulseaudio.muted { - color: #bf616a; - } - - #temperature { - color: #8fbcbb; - } - - #temperature.critical { - color: #bf616a; - } */ -'' From 71edb935ed8916301144111f6bb6afc503f608c7 Mon Sep 17 00:00:00 2001 From: Redyf Date: Sun, 12 May 2024 19:47:19 -0300 Subject: [PATCH 05/16] fix: Ghost monitor enabled There is a new kernel/driver bug that makes your system detects an extra monitor, I only have 1 monitor but 2 were being detected. --- home/redyf/desktop/hyprland/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/home/redyf/desktop/hyprland/default.nix b/home/redyf/desktop/hyprland/default.nix index 68a5e287..f6fa460e 100644 --- a/home/redyf/desktop/hyprland/default.nix +++ b/home/redyf/desktop/hyprland/default.nix @@ -69,14 +69,16 @@ in { ]; wayland.windowManager.hyprland = { enable = true; - package = pkgs.hyprland; # hyprlandFlake or pkgs.hyprland + package = hyprlandFlake; # hyprlandFlake or pkgs.hyprland xwayland = { enable = true; }; settings = { "$mainMod" = "SUPER"; monitor = [ - ",highrr,auto,auto" + "DP-3,1920x1080@165,0x0,1" + "Unknown-1,disable" + # ",highrr,auto,auto" ]; env = [ "XCURSOR_SIZE,32" @@ -108,8 +110,12 @@ in { }; }; + cursor = { + enable_hyprcursor = true; + }; + general = { - gaps_in = 0; + gaps_in = 2; gaps_out = 0; border_size = 0; "col.active_border" = "${catppuccin_border}"; @@ -161,7 +167,6 @@ in { misc = { vfr = true; # misc:no_vfr -> misc:vfr. bool, heavily recommended to leave at default on. Saves on CPU usage. vrr = false; # misc:vrr -> Adaptive sync of your monitor. 0 (off), 1 (on), 2 (fullscreen only). Default 0 to avoid white flashes on select hardware. - enable_hyprcursor = true; }; dwindle = { @@ -250,7 +255,9 @@ in { # "SUPER $mainMod CTRL, 0, movetoworkspace, 10" # "SUPER $mainMod CTRL, left, movetoworkspace, -1" # "SUPER $mainMod CTRL, right, movetoworkspace, +1" + # same as above, but doesnt switch to the workspace + "SUPER $mainMod SHIFT, 1, movetoworkspacesilent, 1" "SUPER $mainMod SHIFT, 2, movetoworkspacesilent, 2" "SUPER $mainMod SHIFT, 3, movetoworkspacesilent, 3" From 2a150636efcffcecf94a8c9b7c38e353da59d282 Mon Sep 17 00:00:00 2001 From: Redyf Date: Sun, 12 May 2024 19:47:38 -0300 Subject: [PATCH 06/16] feat: add flameshot and picom for awesomewm --- home/redyf/desktop/awesomewm.nix | 269 +++++++++++++++++++++++++++++++ 1 file changed, 269 insertions(+) diff --git a/home/redyf/desktop/awesomewm.nix b/home/redyf/desktop/awesomewm.nix index 93e1ec98..c414118b 100644 --- a/home/redyf/desktop/awesomewm.nix +++ b/home/redyf/desktop/awesomewm.nix @@ -6,5 +6,274 @@ recursive = true; }; }; + packages = with pkgs; [ + flameshot + ]; + }; + services = { + picom = { + enable = true; + package = with pkgs; picom; + settings = { + ################################# + # Animations # + ################################# + + transition-length = 10; + transition-pow-x = 0.1; + transition-pow-y = 0.1; + transition-pow-w = 0.1; + transition-pow-h = 0.1; + size-transition = true; + + ################################# + # Fading # + ################################# + + fading = true; + fade-in-step = 0.1; + fade-out-step = 0.1; + + ################################# + # Background-Blurring # + ################################# + + blur = { + method = "kernel"; + strength = 6; + background = false; + background-frame = false; + background-fixed = false; + kern = "3x3box"; + }; + + ################################# + # General Settings # + ################################# + + # Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. + # daemon = false + + # Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`. + # `xrender` is the default one. + # + experimental-backends = true; + backend = "glx"; + #backend = "xrender"; + + # Enable/disable VSync. + vsync = false; + # vsync = true + + # Enable remote control via D-Bus. See the *D-BUS API* section below for more details. + # dbus = false + + # Try to detect WM windows (a non-override-redirect window with no + # child that has 'WM_STATE') and mark them as active. + # + # mark-wmwin-focused = false + mark-wmwin-focused = true; + + # Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused. + # mark-ovredir-focused = false + mark-ovredir-focused = true; + + # Try to detect windows with rounded corners and don't consider them + # shaped windows. The accuracy is not very high, unfortunately. + # + # detect-rounded-corners = false + detect-rounded-corners = true; + + # Detect '_NET_WM_OPACITY' on client windows, useful for window managers + # not passing '_NET_WM_OPACITY' of client windows to frame windows. + # + # detect-client-opacity = false + detect-client-opacity = true; + + # Specify refresh rate of the screen. If not specified or 0, picom will + # try detecting this with X RandR extension. + # + refresh-rate = 165; + # refresh-rate = 0 + + # Limit picom to repaint at most once every 1 / 'refresh_rate' second to + # boost performance. This should not be used with + # vsync drm/opengl/opengl-oml + # as they essentially does sw-opti's job already, + # unless you wish to specify a lower refresh rate than the actual value. + # + # sw-opti = + + # Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, + # rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, + # provided that the WM supports it. + # + # use-ewmh-active-win = false + + # Unredirect all windows if a full-screen opaque window is detected, + # to maximize performance for full-screen windows. Known to cause flickering + # when redirecting/unredirecting windows. paint-on-overlay may make the flickering less obvious. + # + unredir-if-possible = false; + + # Delay before unredirecting the window, in milliseconds. Defaults to 0. + # unredir-if-possible-delay = 0 + + # Conditions of windows that shouldn't be considered full-screen for unredirecting screen. + # unredir-if-possible-exclude = [] + + # Use 'WM_TRANSIENT_FOR' to group windows, and consider windows + # in the same group focused at the same time. + # + # detect-transient = false + detect-transient = true; + + # Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same + # group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if + # detect-transient is enabled, too. + # + detect-client-leader = false; + # detect-client-leader = true + + # Resize damaged region by a specific number of pixels. + # A positive value enlarges it while a negative one shrinks it. + # If the value is positive, those additional pixels will not be actually painted + # to screen, only used in blur calculation, and such. (Due to technical limitations, + # with use-damage, those pixels will still be incorrectly painted to screen.) + # Primarily used to fix the line corruption issues of blur, + # in which case you should use the blur radius value here + # (e.g. with a 3x3 kernel, you should use `--resize-damage 1`, + # with a 5x5 one you use `--resize-damage 2`, and so on). + # May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly. + # + # resize-damage = 1 + + # Specify a list of conditions of windows that should be painted with inverted color. + # Resource-hogging, and is not well tested. + # + # invert-color-include = [] + + # GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer. + # Might cause incorrect opacity when rendering transparent content (but never + # practically happened) and may not work with blur-background. + # My tests show a 15% performance boost. Recommended. + # + # glx-no-stencil = false + + # GLX backend: Avoid rebinding pixmap on window damage. + # Probably could improve performance on rapid window content changes, + # but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.). + # Recommended if it works. + # + # glx-no-rebind-pixmap = false + + # Disable the use of damage information. + # This cause the whole screen to be redrawn everytime, instead of the part of the screen + # has actually changed. Potentially degrades the performance, but might fix some artifacts. + # The opposing option is use-damage + # + # no-use-damage = false + #use-damage = true (Causing Weird Black semi opaque rectangles when terminal is opened) + #Changing use-damage to false fixes the problem + use-damage = false; + + # Use X Sync fence to sync clients' draw calls, to make sure all draw + # calls are finished before picom starts drawing. Needed on nvidia-drivers + # with GLX backend for some users. + # + # xrender-sync-fence = false + + # GLX backend: Use specified GLSL fragment shader for rendering window contents. + # See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl` + # in the source tree for examples. + # + # glx-fshader-win = '' + + # Force all windows to be painted with blending. Useful if you + # have a glx-fshader-win that could turn opaque pixels transparent. + # + # force-win-blend = false + + # Do not use EWMH to detect fullscreen windows. + # Reverts to checking if a window is fullscreen based only on its size and coordinates. + # + # no-ewmh-fullscreen = false + + # Dimming bright windows so their brightness doesn't exceed this set value. + # Brightness of a window is estimated by averaging all pixels in the window, + # so this could comes with a performance hit. + # Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0) + # + # max-brightness = 1.0 + + # Make transparent windows clip other windows like non-transparent windows do, + # instead of blending on top of them. + # + # transparent-clipping = false + + # Set the log level. Possible values are: + # "trace", "debug", "info", "warn", "error" + # in increasing level of importance. Case doesn't matter. + # If using the "TRACE" log level, it's better to log into a file + # using *--log-file*, since it can generate a huge stream of logs. + # + # log-level = "debug" + log-level = "info"; + + # Set the log file. + # If *--log-file* is never specified, logs will be written to stderr. + # Otherwise, logs will to written to the given file, though some of the early + # logs might still be written to the stderr. + # When setting this option from the config file, it is recommended to use an absolute path. + # + # log-file = '/path/to/your/log/file' + + # Show all X errors (for debugging) + # show-all-xerrors = false + + # Write process ID to a file. + # write-pid-path = '/path/to/your/log/file' + + # Window type settings + # + # 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard: + # "unknown", "desktop", "dock", "toolbar", "menu", "utility", + # "splash", "dialog", "normal", "dropdown_menu", "popup_menu", + # "tooltip", "notification", "combo", and "dnd". + # + # Following per window-type options are available: :: + # + # fade, shadow::: + # Controls window-type-specific shadow and fade settings. + # + # opacity::: + # Controls default opacity of the window type. + # + # focus::: + # Controls whether the window of this type is to be always considered focused. + # (By default, all window types except "normal" and "dialog" has this on.) + # + # full-shadow::: + # Controls whether shadow is drawn under the parts of the window that you + # normally won't be able to see. Useful when the window has parts of it + # transparent, and you want shadows in those areas. + # + # redir-ignore::: + # Controls whether this type of windows should cause screen to become + # redirected again after been unredirected. If you have unredir-if-possible + # set, and doesn't want certain window to cause unnecessary screen redirection, + # you can set this to `true`. + # + wintypes = { + tooltip = { + fade = true; + shadow = true; + opacity = 1; + focus = true; + full-shadow = true; + }; + }; + }; + }; }; } From d28ca4f1fb093da94d8233113f9be111c9308c9a Mon Sep 17 00:00:00 2001 From: Redyf Date: Sun, 12 May 2024 19:47:52 -0300 Subject: [PATCH 07/16] feat: enable awesomewm --- home/redyf/desktop/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/home/redyf/desktop/default.nix b/home/redyf/desktop/default.nix index 39c99c21..a88daf1f 100644 --- a/home/redyf/desktop/default.nix +++ b/home/redyf/desktop/default.nix @@ -3,7 +3,6 @@ _: { ./addons ./gtk ./hyprland - # ./awesomewm.nix - ./xmonad.nix + ./awesomewm.nix ]; } From c0cc7fddee428bffc570d23fc92934b3acd84021 Mon Sep 17 00:00:00 2001 From: Redyf Date: Sun, 12 May 2024 19:48:19 -0300 Subject: [PATCH 08/16] chore: delete unused modules --- home/redyf/hardware/audio/default.nix | 9 --------- home/redyf/hardware/default.nix | 5 ----- home/redyf/system/battery/default.nix | 24 ------------------------ home/redyf/system/default.nix | 2 -- 4 files changed, 40 deletions(-) delete mode 100644 home/redyf/hardware/audio/default.nix delete mode 100644 home/redyf/hardware/default.nix delete mode 100644 home/redyf/system/battery/default.nix diff --git a/home/redyf/hardware/audio/default.nix b/home/redyf/hardware/audio/default.nix deleted file mode 100644 index effe90c6..00000000 --- a/home/redyf/hardware/audio/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{pkgs, ...}: { - # sound.enable = true; - # security.rtkit.enable = true; - # programs.noisetorch.enable = true; - home.packages = with pkgs; [ - # easyeffects - pavucontrol - ]; -} diff --git a/home/redyf/hardware/default.nix b/home/redyf/hardware/default.nix deleted file mode 100644 index a65a0bf8..00000000 --- a/home/redyf/hardware/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -_: { - imports = [ - ./audio - ]; -} diff --git a/home/redyf/system/battery/default.nix b/home/redyf/system/battery/default.nix deleted file mode 100644 index 58dc941c..00000000 --- a/home/redyf/system/battery/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -_: { - # Better scheduling for CPU cycles - thanks System76!!! - services.system76-scheduler.settings.cfsProfiles.enable = true; - - # Enable TLP (better than gnomes internal power manager) - services.tlp = { - enable = true; - settings = { - CPU_BOOST_ON_AC = 1; - CPU_BOOST_ON_BAT = 0; - CPU_SCALING_GOVERNOR_ON_AC = "performance"; - CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; - }; - }; - - # Disable GNOMEs power management - services.power-profiles-daemon.enable = false; - - # Enable powertop - powerManagement.powertop.enable = true; - - # Enable thermald (only necessary if on Intel CPUs) - services.thermald.enable = true; -} diff --git a/home/redyf/system/default.nix b/home/redyf/system/default.nix index 8335bc55..0a10de98 100644 --- a/home/redyf/system/default.nix +++ b/home/redyf/system/default.nix @@ -1,8 +1,6 @@ _: { imports = [ - # ./battery # ./boot - # ./env ./fonts ./nix ./shell From 012fc1a4f14641689089ca96148f4794219d235a Mon Sep 17 00:00:00 2001 From: Redyf Date: Sun, 12 May 2024 19:49:06 -0300 Subject: [PATCH 09/16] chore: remove some fonts --- home/redyf/system/fonts/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/home/redyf/system/fonts/default.nix b/home/redyf/system/fonts/default.nix index 8b967a97..4337cb4f 100644 --- a/home/redyf/system/fonts/default.nix +++ b/home/redyf/system/fonts/default.nix @@ -5,12 +5,11 @@ font-awesome fira-code-symbols material-design-icons - (nerdfonts.override {fonts = ["FiraMono" "JetBrainsMono" "LiberationMono"];}) + (nerdfonts.override {fonts = ["FiraCode" "JetBrainsMono"];}) noto-fonts powerline-symbols monolisa-script # sf-mono-liga-bin - # berkeley # geist-font ]; }; From 41adcd52bca9b53bc8979f44581a502a16d615a3 Mon Sep 17 00:00:00 2001 From: Redyf Date: Sun, 12 May 2024 19:50:48 -0300 Subject: [PATCH 10/16] feat: enable flameshot and make tiling first priority on awesomewm --- home/redyf/desktop/awesomewm/main/layouts.lua | 11 ++++++----- home/redyf/desktop/awesomewm/rc.lua | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/home/redyf/desktop/awesomewm/main/layouts.lua b/home/redyf/desktop/awesomewm/main/layouts.lua index 0a5011a1..f893f7e9 100644 --- a/home/redyf/desktop/awesomewm/main/layouts.lua +++ b/home/redyf/desktop/awesomewm/main/layouts.lua @@ -8,12 +8,13 @@ local _M = {} function _M.get() -- Table of layouts to cover with awful.layout.inc, order matters. local layouts = { - -- awful.layout.suit.floating, -- 1: - awful.layout.suit.tile, -- 2: - awful.layout.suit.tile.left, -- 3: - -- awful.layout.suit.tile.bottom, -- 4: - -- awful.layout.suit.tile.top, -- 5: + awful.layout.suit.tile, -- 1: + awful.layout.suit.tile.left, -- 2: + awful.layout.suit.tile.bottom, -- 3: + awful.layout.suit.tile.top, -- 4: + + awful.layout.suit.floating, -- 5: awful.layout.suit.fair, -- 6: awful.layout.suit.fair.horizontal, -- 7: diff --git a/home/redyf/desktop/awesomewm/rc.lua b/home/redyf/desktop/awesomewm/rc.lua index 5dc3bec8..1314d117 100644 --- a/home/redyf/desktop/awesomewm/rc.lua +++ b/home/redyf/desktop/awesomewm/rc.lua @@ -97,3 +97,4 @@ require("main.signals") awful.spawn.with_shell("xset r rate 150 25") -- set keyboard repeat rate awful.spawn.with_shell("xrandr --output DP-0 --mode 1920x1080 --rate 165 --primary") -- set monitor resolution and refresh rate awful.spawn.with_shell("nitrogen --restore") -- set wallpaper +awful.spawn.with_shell("flameshot") -- set wallpaper From e58d7b4057e67a48a93e2a9daa8168e9b531f4c1 Mon Sep 17 00:00:00 2001 From: Redyf Date: Sun, 12 May 2024 19:51:24 -0300 Subject: [PATCH 11/16] feat: enable hardware acceleration for insomnia --- pkgs/insomnia.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/insomnia.nix b/pkgs/insomnia.nix index 32c2a885..94dfc75e 100644 --- a/pkgs/insomnia.nix +++ b/pkgs/insomnia.nix @@ -23,7 +23,7 @@ in source "${makeWrapper}/nix-support/setup-hook" wrapProgram $out/bin/${pname} \ - --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" + --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --use-gl=desktop}}" install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop From 8b7d633bbd84729d4cedfb192dda482b69177d13 Mon Sep 17 00:00:00 2001 From: Redyf Date: Sun, 12 May 2024 19:51:35 -0300 Subject: [PATCH 12/16] fix: go nix-shell not working --- shells/go/shell.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shells/go/shell.nix b/shells/go/shell.nix index 08065294..513a8904 100644 --- a/shells/go/shell.nix +++ b/shells/go/shell.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: +{pkgs ? import {}}: pkgs.mkShell { nativeBuildInputs = with pkgs; [ go From 2a997234ab9e8ba5c60102205a03a1433da32618 Mon Sep 17 00:00:00 2001 From: Redyf Date: Sun, 12 May 2024 19:52:31 -0300 Subject: [PATCH 13/16] chore: switch to new hyprland input Got it from hyprland's github, you need to switch to it if you use the nix flake. --- flake.nix | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index cd89b66f..6bd0965e 100644 --- a/flake.nix +++ b/flake.nix @@ -9,9 +9,8 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - hyprland.url = "github:hyprwm/hyprland"; + hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; waybar-hyprland.url = "github:hyprwm/hyprland"; - xdg-portal-hyprland.url = "github:hyprwm/xdg-desktop-portal-hyprland"; nur.url = "github:nix-community/NUR"; Neve.url = "github:redyf/Neve"; disko.url = "github:nix-community/disko"; @@ -22,11 +21,6 @@ flake = false; }; - berkeley-mono = { - url = "github:redyf/test"; - flake = false; - }; - monolisa-script = { url = "github:redyf/test2"; flake = false; @@ -69,14 +63,38 @@ useUserPackages = true; useGlobalPkgs = false; extraSpecialArgs = {inherit inputs disko;}; - users.redyf = ./home/desktop/home.nix; + users.redyf = ./home/redyf/home.nix; }; } hyprland.nixosModules.default - {programs.hyprland.enable = true;} disko.nixosModules.disko ]; }; + # selene = nixpkgs.lib.nixosSystem { + # system = "x86_64-linux"; + # specialArgs = { + # inherit + # inputs + # hyprland + # disko + # ; + # }; + # modules = [ + # ./hosts/selene/configuration.nix + # home-manager.nixosModules.home-manager + # { + # home-manager = { + # useUserPackages = true; + # useGlobalPkgs = false; + # extraSpecialArgs = {inherit inputs disko;}; + # users.selene = ./home/selene/home.nix; + # }; + # } + # hyprland.nixosModules.default + # {programs.hyprland.enable = false;} + # disko.nixosModules.disko + # ]; + # }; }; devShells = forAllSystems (system: let pkgs = nixpkgsFor.${system}; From d11464e1b08fe99654afee1530d96992e50a5980 Mon Sep 17 00:00:00 2001 From: Redyf Date: Sun, 12 May 2024 19:52:46 -0300 Subject: [PATCH 14/16] chore: remove unneeded packages --- home/redyf/tools/languages/python/default.nix | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/home/redyf/tools/languages/python/default.nix b/home/redyf/tools/languages/python/default.nix index 7975401a..a225448c 100644 --- a/home/redyf/tools/languages/python/default.nix +++ b/home/redyf/tools/languages/python/default.nix @@ -1,11 +1,6 @@ {pkgs, ...}: { home.packages = with pkgs; [ poetry - (python311.withPackages (ps: - with ps; [ - # black # Python formatter - pynvim - # flake8 # Linter for Python - ])) + python3 ]; } From 1ddef9014ff985a6bcd38b7dc44b589bfa833c67 Mon Sep 17 00:00:00 2001 From: Redyf Date: Sun, 12 May 2024 19:54:00 -0300 Subject: [PATCH 15/16] feat: switch to hyprland flake and nvidia open source driver --- home/redyf/tools/languages/default.nix | 15 ++-- hosts/redyf/configuration.nix | 96 ++++++++++++-------------- 2 files changed, 52 insertions(+), 59 deletions(-) diff --git a/home/redyf/tools/languages/default.nix b/home/redyf/tools/languages/default.nix index 397486a8..51f05403 100644 --- a/home/redyf/tools/languages/default.nix +++ b/home/redyf/tools/languages/default.nix @@ -1,15 +1,16 @@ _: { imports = [ ./c - # ./clojure - # ./dart - # ./elixir ./go - # ./java - ./javascript - # ./lua - # ./python ./rust + ./ocaml + ./python + ./javascript # ./sql + # ./java + # ./lua + # ./elixir + # ./clojure + # ./dart ]; } diff --git a/hosts/redyf/configuration.nix b/hosts/redyf/configuration.nix index 23fa6166..9321977f 100644 --- a/hosts/redyf/configuration.nix +++ b/hosts/redyf/configuration.nix @@ -30,7 +30,7 @@ device = "nodev"; efiSupport = true; useOSProber = true; - configurationLimit = 5; + configurationLimit = 8; theme = pkgs.fetchFromGitHub { @@ -45,7 +45,7 @@ hardware = { nvidia = { - open = false; + open = true; nvidiaSettings = true; powerManagement.enable = true; modesetting.enable = true; @@ -61,8 +61,9 @@ environment = { variables = { EDITOR = "nvim"; - GBM_BACKEND = "nvidia-drm"; LIBVA_DRIVER_NAME = "nvidia"; + XDG_SESSION_TYPE = "wayland"; + GBM_BACKEND = "nvidia-drm"; __GLX_VENDOR_LIBRARY_NAME = "nvidia"; __GL_GSYNC_ALLOWED = "1"; __GL_VRR_ALLOWED = "0"; # Controls if Adaptive Sync should be used. Recommended to set as “0” to avoid having problems on some games. @@ -130,8 +131,8 @@ fontconfig = { enable = true; defaultFonts = { - serif = ["Iosevka Aile, Times, Noto Serif"]; - sansSerif = ["Iosevka Aile, Helvetica Neue LT Std, Helvetica, Noto Sans"]; + serif = ["Times, Noto Serif"]; + sansSerif = ["Helvetica Neue LT Std, Helvetica, Noto Sans"]; monospace = ["Courier Prime, Courier, Noto Sans Mono"]; }; }; @@ -139,15 +140,17 @@ programs = { zsh.enable = true; - noisetorch = { + hyprland = { + enable = true; + package = inputs.hyprland.packages.${pkgs.system}.hyprland; + }; + noisetorch.enable = true; + nh = { enable = false; + clean.enable = false; + clean.extraArgs = "--keep-since 4d --keep 3"; + flake = "/home/redyf/nixdots"; }; - # nh = { - # enable = false; - # clean.enable = false; - # clean.extraArgs = "--keep-since 4d --keep 3"; - # flake = "/home/redyf/nixdots"; - # }; }; # Enables docker in rootless mode @@ -161,7 +164,7 @@ }; time.timeZone = "America/Bahia"; - + # i18n = { defaultLocale = "pt_BR.UTF-8"; extraLocaleSettings = { @@ -207,10 +210,10 @@ nixpkgs = { config = { allowUnfree = true; + allowBroken = true; }; }; - # Configure keymap in X11 sound.enable = true; services = { pipewire = { @@ -224,8 +227,15 @@ }; sshd.enable = true; - # Enable CUPS to print documents. - # printing.enable = true; + libinput = { + enable = true; + mouse = { + accelProfile = "flat"; + }; + touchpad = { + accelProfile = "flat"; + }; + }; xserver = { enable = true; displayManager = { @@ -241,30 +251,12 @@ }; windowManager = { awesome = { - enable = false; + enable = true; luaModules = with pkgs.luaPackages; [ luarocks # luadbi-mysql ]; }; - xmonad = { - enable = true; - enableContribAndExtras = true; - enableConfiguredRecompile = false; - extraPackages = hpkgs: [ - hpkgs.xmobar - ]; - config = builtins.readFile ../../home/redyf/desktop/xmonad/xmonad.hs; - }; - }; - libinput = { - enable = true; - mouse = { - accelProfile = "flat"; - }; - touchpad = { - accelProfile = "flat"; - }; }; xkb = { variant = ""; @@ -274,27 +266,27 @@ }; logmein-hamachi.enable = false; flatpak.enable = false; - autorandr = { - enable = true; - profiles = { - redyf = { - config = { - DP-0 = { - enable = true; - primary = true; - mode = "1920x1080"; - rate = "165.00"; - position = "0x0"; - }; - }; - }; - }; - }; + # autorandr = { + # enable = true; + # profiles = { + # redyf = { + # config = { + # DP-0 = { + # enable = true; + # primary = true; + # mode = "1920x1080"; + # rate = "165.00"; + # position = "0x0"; + # }; + # }; + # }; + # }; + # }; }; environment.systemPackages = with pkgs; [ git - inputs.xdg-portal-hyprland.packages.${system}.xdg-desktop-portal-hyprland + xdg-desktop-portal-hyprland ]; system.stateVersion = "22.11"; # Did you read the comment? From 4460a00b86b0b9236cc809e1cd54a7915b5fed64 Mon Sep 17 00:00:00 2001 From: Redyf Date: Sun, 12 May 2024 19:57:08 -0300 Subject: [PATCH 16/16] feat: update flake.lock --- flake.lock | 278 +++++++++++------------------------------------------ 1 file changed, 54 insertions(+), 224 deletions(-) diff --git a/flake.lock b/flake.lock index 22739c3a..f537d71d 100644 --- a/flake.lock +++ b/flake.lock @@ -20,22 +20,6 @@ "type": "github" } }, - "berkeley-mono": { - "flake": false, - "locked": { - "lastModified": 1713384223, - "narHash": "sha256-JIAi5aJQFOu6RL0SxYAX5NyIpzRll+Ydxx3CMxI8SRo=", - "owner": "redyf", - "repo": "test", - "rev": "f25e5d36872d314e4cfd6736a3909f163e6fadca", - "type": "github" - }, - "original": { - "owner": "redyf", - "repo": "test", - "type": "github" - } - }, "devshell": { "inputs": { "flake-utils": "flake-utils_2", @@ -64,11 +48,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1713875178, - "narHash": "sha256-FFJ4dojuziC6HLxugW+2YJ1P+m5veDq0WZSpZRSm/SY=", + "lastModified": 1715445235, + "narHash": "sha256-SUu+oIWn+xqQIOlwfwNfS9Sek4i1HKsrLJchsDReXwA=", "owner": "nix-community", "repo": "disko", - "rev": "dea314155a9b8a4de242bdd4c005ba8a5dce8385", + "rev": "159d87ea5b95bbdea46f0288a33c5e1570272725", "type": "github" }, "original": { @@ -235,11 +219,11 @@ ] }, "locked": { - "lastModified": 1713818326, - "narHash": "sha256-aw3xbVPJauLk/bbrlakIYxKpeuMWzA2feGrkIpIuXd8=", + "lastModified": 1715380449, + "narHash": "sha256-716+f9Rj3wjSyD1xitCv2FcYbgPz1WIVDj+ZBclH99Y=", "owner": "nix-community", "repo": "home-manager", - "rev": "67de98ae6eed5ad6f91b1142356d71a87ba97f21", + "rev": "d7682620185f213df384c363288093b486b2883f", "type": "github" }, "original": { @@ -310,36 +294,38 @@ "hyprland": { "inputs": { "hyprcursor": "hyprcursor", - "hyprland-protocols": "hyprland-protocols", "hyprlang": "hyprlang", "hyprwayland-scanner": "hyprwayland-scanner", "nixpkgs": "nixpkgs_4", "systems": "systems_4", - "wlroots": "wlroots", "xdph": "xdph" }, "locked": { - "lastModified": 1713886692, - "narHash": "sha256-q/vi+a8LnfdT1VQMszZ350N6/si0geQjJroatj7MXOI=", - "owner": "hyprwm", - "repo": "hyprland", - "rev": "bb4646bbdf7d3490c2442347d852a62470aec2aa", - "type": "github" + "lastModified": 1715468612, + "narHash": "sha256-pA0lpLJ3a+EhOCpEdksx5UlzXTcOaZzISppKKLYwAeg=", + "ref": "refs/heads/main", + "rev": "33a7b7bb6b307d6e4a093f75ffdda0419cd7ffaf", + "revCount": 4671, + "submodules": true, + "type": "git", + "url": "https://github.com/hyprwm/Hyprland" }, "original": { - "owner": "hyprwm", - "repo": "hyprland", - "type": "github" + "submodules": true, + "type": "git", + "url": "https://github.com/hyprwm/Hyprland" } }, "hyprland-protocols": { "inputs": { "nixpkgs": [ "hyprland", + "xdph", "nixpkgs" ], "systems": [ "hyprland", + "xdph", "systems" ] }, @@ -361,35 +347,12 @@ "inputs": { "nixpkgs": [ "waybar-hyprland", + "xdph", "nixpkgs" ], "systems": [ "waybar-hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1691753796, - "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-protocols", - "type": "github" - } - }, - "hyprland-protocols_3": { - "inputs": { - "nixpkgs": [ - "xdg-portal-hyprland", - "nixpkgs" - ], - "systems": [ - "xdg-portal-hyprland", + "xdph", "systems" ] }, @@ -457,28 +420,6 @@ "type": "github" } }, - "hyprlang_3": { - "inputs": { - "nixpkgs": [ - "xdg-portal-hyprland", - "nixpkgs" - ], - "systems": "systems_6" - }, - "locked": { - "lastModified": 1713121246, - "narHash": "sha256-502X0Q0fhN6tJK7iEUA8CghONKSatW/Mqj4Wappd++0=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "78fcaa27ae9e1d782faa3ff06c8ea55ddce63706", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, "hyprwayland-scanner": { "inputs": { "nixpkgs": [ @@ -491,11 +432,11 @@ ] }, "locked": { - "lastModified": 1713730424, - "narHash": "sha256-MqYjTvQCxwuDIuAaqIEuyqserm5PYr0auiHHPuYFN/k=", + "lastModified": 1715287423, + "narHash": "sha256-B7AJIjOyWgVMKhu7DlOnWa0VprdhywUVHuB/j+EwSxM=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "7c9c8adfe7e424faa0c5ce6e8be90157fda53c06", + "rev": "e2fc1c0eb8b392110588f478cce644348ead7271", "type": "github" }, "original": { @@ -516,11 +457,11 @@ ] }, "locked": { - "lastModified": 1713730424, - "narHash": "sha256-MqYjTvQCxwuDIuAaqIEuyqserm5PYr0auiHHPuYFN/k=", + "lastModified": 1715287423, + "narHash": "sha256-B7AJIjOyWgVMKhu7DlOnWa0VprdhywUVHuB/j+EwSxM=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "7c9c8adfe7e424faa0c5ce6e8be90157fda53c06", + "rev": "e2fc1c0eb8b392110588f478cce644348ead7271", "type": "github" }, "original": { @@ -599,11 +540,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1713687659, - "narHash": "sha256-Yd8KuOBpZ0Slau/NxFhMPJI0gBxeax0vq/FD0rqKwuQ=", + "lastModified": 1715037484, + "narHash": "sha256-OUt8xQFmBU96Hmm4T9tOWTu4oCswCzoVl+pxSq/kiFc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f2d7a289c5a5ece8521dd082b81ac7e4a57c2c5c", + "rev": "ad7efee13e0d216bf29992311536fce1d3eefbef", "type": "github" }, "original": { @@ -615,11 +556,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1713537308, - "narHash": "sha256-XtTSSIB2DA6tOv+l0FhvfDMiyCmhoRbNB+0SeInZkbk=", + "lastModified": 1715087517, + "narHash": "sha256-CLU5Tsg24Ke4+7sH8azHWXKd0CFd4mhLWfhYgUiDBpQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5c24cf2f0a12ad855f444c30b2421d044120c66f", + "rev": "b211b392b8486ee79df6cdfb1157ad2133427a29", "type": "github" }, "original": { @@ -631,11 +572,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1713714899, - "narHash": "sha256-+z/XjO3QJs5rLE5UOf015gdVauVRQd2vZtsFkaXBq2Y=", + "lastModified": 1715266358, + "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6143fc5eeb9c4f00163267708e26191d1e918932", + "rev": "f1010e0469db743d14519a1efd37e23f8513d714", "type": "github" }, "original": { @@ -647,27 +588,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1713537308, - "narHash": "sha256-XtTSSIB2DA6tOv+l0FhvfDMiyCmhoRbNB+0SeInZkbk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5c24cf2f0a12ad855f444c30b2421d044120c66f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_7": { - "locked": { - "lastModified": 1712963716, - "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "lastModified": 1715087517, + "narHash": "sha256-CLU5Tsg24Ke4+7sH8azHWXKd0CFd4mhLWfhYgUiDBpQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "rev": "b211b392b8486ee79df6cdfb1157ad2133427a29", "type": "github" }, "original": { @@ -703,11 +628,11 @@ }, "nur": { "locked": { - "lastModified": 1713894351, - "narHash": "sha256-GpfPtLUNTQdW0JAnN/t+5oFYW1WTf0jBdAeqnBGdp6M=", + "lastModified": 1715463961, + "narHash": "sha256-FWGL+0DVOPdHnM+yWzHZW46bC+z0fpZrwvHiPV4RPe8=", "owner": "nix-community", "repo": "NUR", - "rev": "47948d07d138a4f746f8b42abb7db07f8b0f92a4", + "rev": "88bbe752f191c5b2ae376746c6e85ef951eed594", "type": "github" }, "original": { @@ -749,7 +674,6 @@ "root": { "inputs": { "Neve": "Neve", - "berkeley-mono": "berkeley-mono", "disko": "disko", "home-manager": "home-manager_2", "hyprland": "hyprland", @@ -757,8 +681,7 @@ "nixpkgs": "nixpkgs_5", "nur": "nur", "sf-mono-liga-src": "sf-mono-liga-src", - "waybar-hyprland": "waybar-hyprland", - "xdg-portal-hyprland": "xdg-portal-hyprland" + "waybar-hyprland": "waybar-hyprland" } }, "sf-mono-liga-src": { @@ -852,53 +775,21 @@ "type": "github" } }, - "systems_6": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_7": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, "waybar-hyprland": { "inputs": { "hyprcursor": "hyprcursor_2", - "hyprland-protocols": "hyprland-protocols_2", "hyprlang": "hyprlang_2", "hyprwayland-scanner": "hyprwayland-scanner_2", "nixpkgs": "nixpkgs_6", "systems": "systems_5", - "wlroots": "wlroots_2", "xdph": "xdph_2" }, "locked": { - "lastModified": 1713886692, - "narHash": "sha256-q/vi+a8LnfdT1VQMszZ350N6/si0geQjJroatj7MXOI=", + "lastModified": 1715468612, + "narHash": "sha256-AF5bXnJqS7sj9ioJ/X6g1vg91nM9rtpf4iMIdPLjrRc=", "owner": "hyprwm", "repo": "hyprland", - "rev": "bb4646bbdf7d3490c2442347d852a62470aec2aa", + "rev": "33a7b7bb6b307d6e4a093f75ffdda0419cd7ffaf", "type": "github" }, "original": { @@ -907,67 +798,9 @@ "type": "github" } }, - "wlroots": { - "flake": false, - "locked": { - "lastModified": 1713731601, - "narHash": "sha256-bdcKdtLkusvv85DNuJsajZLFeq7bXp+x5AGP1Sd4wD8=", - "owner": "hyprwm", - "repo": "wlroots-hyprland", - "rev": "5c1d51c5a2793480f5b6c4341ad0797052aec2ea", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "wlroots-hyprland", - "rev": "5c1d51c5a2793480f5b6c4341ad0797052aec2ea", - "type": "github" - } - }, - "wlroots_2": { - "flake": false, - "locked": { - "lastModified": 1713731601, - "narHash": "sha256-bdcKdtLkusvv85DNuJsajZLFeq7bXp+x5AGP1Sd4wD8=", - "owner": "hyprwm", - "repo": "wlroots-hyprland", - "rev": "5c1d51c5a2793480f5b6c4341ad0797052aec2ea", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "wlroots-hyprland", - "rev": "5c1d51c5a2793480f5b6c4341ad0797052aec2ea", - "type": "github" - } - }, - "xdg-portal-hyprland": { - "inputs": { - "hyprland-protocols": "hyprland-protocols_3", - "hyprlang": "hyprlang_3", - "nixpkgs": "nixpkgs_7", - "systems": "systems_7" - }, - "locked": { - "lastModified": 1713724432, - "narHash": "sha256-dtU1y4oj/0Y42oauzm93ucFg1AoqETnQ21bmXTIUng0=", - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "rev": "9ace6f969ce495185df34cc6254fb9d297765478", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "type": "github" - } - }, "xdph": { "inputs": { - "hyprland-protocols": [ - "hyprland", - "hyprland-protocols" - ], + "hyprland-protocols": "hyprland-protocols", "hyprlang": [ "hyprland", "hyprlang" @@ -982,11 +815,11 @@ ] }, "locked": { - "lastModified": 1713724432, - "narHash": "sha256-dtU1y4oj/0Y42oauzm93ucFg1AoqETnQ21bmXTIUng0=", + "lastModified": 1714662532, + "narHash": "sha256-Pj2xGSYhapYbXL7sk7TTlOtCZcTfPQoL3fPbZeg7L4Y=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "9ace6f969ce495185df34cc6254fb9d297765478", + "rev": "1f228ba2f1f254195c0b571302b37482861abee3", "type": "github" }, "original": { @@ -997,10 +830,7 @@ }, "xdph_2": { "inputs": { - "hyprland-protocols": [ - "waybar-hyprland", - "hyprland-protocols" - ], + "hyprland-protocols": "hyprland-protocols_2", "hyprlang": [ "waybar-hyprland", "hyprlang" @@ -1015,11 +845,11 @@ ] }, "locked": { - "lastModified": 1713724432, - "narHash": "sha256-dtU1y4oj/0Y42oauzm93ucFg1AoqETnQ21bmXTIUng0=", + "lastModified": 1714662532, + "narHash": "sha256-Pj2xGSYhapYbXL7sk7TTlOtCZcTfPQoL3fPbZeg7L4Y=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "9ace6f969ce495185df34cc6254fb9d297765478", + "rev": "1f228ba2f1f254195c0b571302b37482861abee3", "type": "github" }, "original": {