From 06396fa2d898ba2a7ba45e1eb7c89da728263128 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Wed, 6 Mar 2024 23:20:18 -0300 Subject: [PATCH 01/53] chore: update flake --- flake.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index 05838f9..cb83a39 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "astronvim": { "flake": false, "locked": { - "lastModified": 1708524813, - "narHash": "sha256-fUfh00iYhLJ89wdvtOLM5vAQkZGXanNboqkUWW6Y3Y4=", + "lastModified": 1709218186, + "narHash": "sha256-1nfMx9XaTOfuz1IlvepJdEfrX539RRVN5RXzUR00tfk=", "owner": "AstroNvim", "repo": "AstroNvim", - "rev": "e7483c864e67fed4d1737c3ba76fe9c50b50ad12", + "rev": "d36af2f75369e3621312c87bd0e377e7d562fc72", "type": "github" }, "original": { @@ -41,11 +41,11 @@ ] }, "locked": { - "lastModified": 1708806879, - "narHash": "sha256-MSbxtF3RThI8ANs/G4o1zIqF5/XlShHvwjl9Ws0QAbI=", + "lastModified": 1709578243, + "narHash": "sha256-hF96D+c2PBmAFhymMw3z8hou++lqKtZ7IzpFbYeL1/Y=", "owner": "nix-community", "repo": "home-manager", - "rev": "4ee704cb13a5a7645436f400b9acc89a67b9c08a", + "rev": "23ff9821bcaec12981e32049e8687f25f11e5ef3", "type": "github" }, "original": { @@ -66,11 +66,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1708817736, - "narHash": "sha256-GZEoru+4uNIGEZ8j1TPaxZwM+ApIngHU/iX3sIGgUO4=", + "lastModified": 1709577222, + "narHash": "sha256-rPtjRFwfjXLZZI6sPUdtojVV4aC86c/uswZurd0ibPU=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "f534ac3fc462d8af923d2a1ab8ef58f62639a1ea", + "rev": "f3c92e75c8746901898b59abf2a1412bb16cbb54", "type": "github" }, "original": { @@ -116,11 +116,11 @@ ] }, "locked": { - "lastModified": 1708681732, - "narHash": "sha256-ULZZLZ9C33G13IaXLuAc4oTzHUvnATI8Fj2u6gzMfT0=", + "lastModified": 1708787654, + "narHash": "sha256-7ACgM3ZuAhPqurXHUvR2nWMRcnmzGGPjLK6q4DSTelI=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "f4466367ef0a92a6425d482050dc2b8840c0e644", + "rev": "0fce791ba2334aca183f2ed42399518947550d0d", "type": "github" }, "original": { @@ -131,11 +131,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1708655239, - "narHash": "sha256-ZrP/yACUvDB+zbqYJsln4iwotbH6CTZiTkANJ0AgDv4=", + "lastModified": 1709237383, + "narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=", "owner": "nixos", "repo": "nixpkgs", - "rev": "cbc4211f0afffe6dfd2478a62615dd5175a13f9a", + "rev": "1536926ef5621b09bba54035ae2bb6d806d72ac8", "type": "github" }, "original": { @@ -270,11 +270,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1708803660, - "narHash": "sha256-B2y46ecQurFvK7c1Cjh1suZC0vVOOw9TB3DJfXlU0dA=", + "lastModified": 1709571181, + "narHash": "sha256-wFovpJpRy45RjdkHtFKuXBkddEly+Jrc4JzggGFmfgY=", "owner": "sxyazi", "repo": "yazi", - "rev": "42cbedbe42936f61170d049f1b77541a5ab66e3d", + "rev": "497aa26f755fdb60d7e538a79b933beaa2be2fef", "type": "github" }, "original": { From 5547c1a100b91b5eff145e2052240d1ecdc9055c Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Wed, 6 Mar 2024 23:20:34 -0300 Subject: [PATCH 02/53] feat: update mangohud options --- programs/mangohud.nix | 46 ++++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/programs/mangohud.nix b/programs/mangohud.nix index 4aa1860..ca9c8a1 100644 --- a/programs/mangohud.nix +++ b/programs/mangohud.nix @@ -11,35 +11,38 @@ gl_vsync = 0; # GPU Statistics + gpu_core_clock = true; + gpu_fan = true; + gpu_junction_temp = true; + gpu_load_change = true; + gpu_load_color = [ "39F900" "FDFD09" "B22222" ]; + gpu_load_value = [ 60 90 ]; + gpu_mem_clock = true; + gpu_mem_temp = true; + gpu_power = true; gpu_stats = true; gpu_temp = true; - gpu_core_clock = true; - gpu_mem_clock = true; - gpu_power = true; - gpu_load_change = true; - gpu_load_value = [ 60 90 ]; - gpu_load_color = [ "39F900" "FDFD09" "B22222" ]; + gpu_voltage = true; # CPU Statistics + cpu_load_change = true; + cpu_load_color = [ "39F900" "FDFD09" "B22222" ]; + cpu_load_value = [ 60 90 ]; + cpu_mhz = true; + cpu_power = true; cpu_stats = true; cpu_temp = true; - cpu_power = true; - cpu_mhz = true; - cpu_load_change = true; - cpu_load_value = [ 60 90 ]; - cpu_load_color = [ "39F900" "FDFD09" "B22222" ]; # IO Statistics - io_stats = true; io_read = true; + io_stats = true; io_write = true; - # RAM Statistics - vram = true; ram = true; swap = true; + vram = true; # FPS Statistics fps = true; @@ -56,6 +59,21 @@ # Make so MangoHud starts hidden. no_display = true; + # Show whether the GPU is throttling. + throttling_status = true; + + # Show wine/proton version. + wine = true; + + # Show the vulkan driver in-use. + vulkan_driver = true; + + # Display the process' memory usage. + procmem = true; + + # Show the application's architecture. + arch = true; + # Where to output log files. output_folder = /home/wizardlink/.config/MangoHud; }; From c645cb6c6a1a4b94776a0f32ee24a29a7ddaa82f Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Wed, 6 Mar 2024 23:20:45 -0300 Subject: [PATCH 03/53] fix: make wezterm use x11 as it broke again! :) --- programs/wezterm/default.nix | 2 +- programs/wezterm/wezterm.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/programs/wezterm/default.nix b/programs/wezterm/default.nix index a2d56d2..66a1d5c 100644 --- a/programs/wezterm/default.nix +++ b/programs/wezterm/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ ... }: { programs.wezterm = { diff --git a/programs/wezterm/wezterm.lua b/programs/wezterm/wezterm.lua index 5af4061..92ee0d1 100644 --- a/programs/wezterm/wezterm.lua +++ b/programs/wezterm/wezterm.lua @@ -2,6 +2,7 @@ local wezterm = require("wezterm") return { color_scheme = "Catppuccin Frappe", + enable_wayland = false, -- Unfortunately broken on Hyprland, AGAIN font = wezterm.font("FantasqueSansM Nerd Font"), font_size = 13, hide_tab_bar_if_only_one_tab = true, From 0e44f344d53bcf66b70a26f5798e6977ddf7d2e3 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Wed, 6 Mar 2024 23:22:31 -0300 Subject: [PATCH 04/53] feat: create simple script for nixos-rebuild swithc --- switch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 switch diff --git a/switch b/switch new file mode 100755 index 0000000..dc20a6f --- /dev/null +++ b/switch @@ -0,0 +1,12 @@ +#!/etc/profiles/per-user/wizardlink/bin/fish + +function build + sudo nixos-rebuild switch --flake ~/.system\#nixos $argv[1] +end + +if test "--fast" = "$argv[1]" + build --fast +else + build +end + From 57be7eb2d1b9515768500c3a1757c264deae219f Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 7 Mar 2024 00:34:25 -0300 Subject: [PATCH 05/53] feat: add window rules for windowkill --- programs/hyprland/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/programs/hyprland/default.nix b/programs/hyprland/default.nix index ff0a67e..7890dcc 100644 --- a/programs/hyprland/default.nix +++ b/programs/hyprland/default.nix @@ -260,6 +260,11 @@ windowrulev2 = noanim,class:^(xwaylandvideobridge)$ windowrulev2 = nofocus,class:^(xwaylandvideobridge)$ windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$ + + # Rules for windowkill + windowrule = noborder, ^(steam_app_2726450)$ + windowrule = pin, ^(steam_app_2726450)$ + windowrule = opacity 0.9, ^(steam_app_2726450)$ ''; }; } From 022559228bbe915166b4ac5fc5644e7e538f6e4e Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Fri, 15 Mar 2024 23:38:34 -0300 Subject: [PATCH 06/53] fix: change layout keybind for the correct keyboard --- programs/hyprland/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/hyprland/default.nix b/programs/hyprland/default.nix index 7890dcc..499a64e 100644 --- a/programs/hyprland/default.nix +++ b/programs/hyprland/default.nix @@ -196,7 +196,7 @@ # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod CTRL, F, fakefullscreen - bind = $mainMod CTRL, K, exec, hyprctl switchxkblayout ducky-ducky-one2-mini-rgb next + bind = $mainMod CTRL, K, exec, hyprctl switchxkblayout www.hfd.cn-monsgeek-keyboard-1 next bind = $mainMod CTRL, L, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy bind = $mainMod CTRL, P, exec, ~/.local/share/scripts/hyprland/screenshot_area.sh bind = $mainMod CTRL, V, pin From 6784de8ef7a501875cd7449e5e3732e07c8e3ae0 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Fri, 15 Mar 2024 23:39:07 -0300 Subject: [PATCH 07/53] chore: update flake lock and remove yazi from flake --- flake.lock | 176 ++++++++++++++++++++++++----------------------------- flake.nix | 6 -- 2 files changed, 80 insertions(+), 102 deletions(-) diff --git a/flake.lock b/flake.lock index cb83a39..9ce2f4f 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "astronvim": { "flake": false, "locked": { - "lastModified": 1709218186, - "narHash": "sha256-1nfMx9XaTOfuz1IlvepJdEfrX539RRVN5RXzUR00tfk=", + "lastModified": 1710405330, + "narHash": "sha256-dgKjLA+Ovq0bjdTBvwf03cyELS1h0Mb2CeHXT4Uu1DM=", "owner": "AstroNvim", "repo": "AstroNvim", - "rev": "d36af2f75369e3621312c87bd0e377e7d562fc72", + "rev": "2fcb9e20c13aaa3653421017236ec076db3a4c00", "type": "github" }, "original": { @@ -16,24 +16,6 @@ "type": "github" } }, - "flake-utils": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1694529238, - "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -41,11 +23,11 @@ ] }, "locked": { - "lastModified": 1709578243, - "narHash": "sha256-hF96D+c2PBmAFhymMw3z8hou++lqKtZ7IzpFbYeL1/Y=", + "lastModified": 1710532761, + "narHash": "sha256-SUXGZNrXX05YA9G6EmgupxhOr3swI1gcxLUeDMUhrEY=", "owner": "nix-community", "repo": "home-manager", - "rev": "23ff9821bcaec12981e32049e8687f25f11e5ef3", + "rev": "206f457fffdb9a73596a4cb2211a471bd305243d", "type": "github" }, "original": { @@ -54,23 +36,50 @@ "type": "github" } }, + "hyprcursor": { + "inputs": { + "hyprlang": "hyprlang", + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1710257359, + "narHash": "sha256-43re5pzE/cswFAgw92/ugsB3+d5ufDaCcLtl9ztKfBo=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "1761f6cefd77f4fcd2039d930c88d6716ddc4974", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, "hyprland": { "inputs": { + "hyprcursor": "hyprcursor", "hyprland-protocols": "hyprland-protocols", - "hyprlang": "hyprlang", + "hyprlang": "hyprlang_2", "nixpkgs": [ "nixpkgs" ], - "systems": "systems", + "systems": "systems_2", "wlroots": "wlroots", "xdph": "xdph" }, "locked": { - "lastModified": 1709577222, - "narHash": "sha256-rPtjRFwfjXLZZI6sPUdtojVV4aC86c/uswZurd0ibPU=", + "lastModified": 1710547119, + "narHash": "sha256-xLxbGRsKs40j+4tKeHydW1VUpCPOizYcduYQvBUitoY=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "f3c92e75c8746901898b59abf2a1412bb16cbb54", + "rev": "19c90048d65a5660384d2fb865926a366696d6be", "type": "github" }, "original": { @@ -105,6 +114,29 @@ } }, "hyprlang": { + "inputs": { + "nixpkgs": [ + "hyprland", + "hyprcursor", + "nixpkgs" + ], + "systems": "systems" + }, + "locked": { + "lastModified": 1709914708, + "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprlang_2": { "inputs": { "nixpkgs": [ "hyprland", @@ -116,11 +148,11 @@ ] }, "locked": { - "lastModified": 1708787654, - "narHash": "sha256-7ACgM3ZuAhPqurXHUvR2nWMRcnmzGGPjLK6q4DSTelI=", + "lastModified": 1709914708, + "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "0fce791ba2334aca183f2ed42399518947550d0d", + "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", "type": "github" }, "original": { @@ -131,11 +163,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1709237383, - "narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=", + "lastModified": 1710451336, + "narHash": "sha256-pP86Pcfu3BrAvRO7R64x7hs+GaQrjFes+mEPowCfkxY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "1536926ef5621b09bba54035ae2bb6d806d72ac8", + "rev": "d691274a972b3165335d261cc4671335f5c67de9", "type": "github" }, "original": { @@ -150,33 +182,7 @@ "astronvim": "astronvim", "home-manager": "home-manager", "hyprland": "hyprland", - "nixpkgs": "nixpkgs", - "yazi": "yazi" - } - }, - "rust-overlay": { - "inputs": { - "flake-utils": [ - "yazi", - "flake-utils" - ], - "nixpkgs": [ - "yazi", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1701224160, - "narHash": "sha256-qnMmxNMKmd6Soel0cfauyMJ+LzuZbvmiDQPSIuTbQ+M=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "4a080e26d55eaedb95ab1bf8eeaeb84149c10f12", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" + "nixpkgs": "nixpkgs" } }, "systems": { @@ -196,16 +202,16 @@ }, "systems_2": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", + "repo": "default-linux", "type": "github" } }, @@ -213,18 +219,18 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1708558866, - "narHash": "sha256-Mz6hCtommq7RQfcPnxLINigO4RYSNt23HeJHC6mVmWI=", + "lastModified": 1709983277, + "narHash": "sha256-wXWIJLd4F2JZeMaihWVDW/yYXCLEC8OpeNJZg9a9ly8=", "owner": "wlroots", "repo": "wlroots", - "rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5", + "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", "type": "gitlab" }, "original": { "host": "gitlab.freedesktop.org", "owner": "wlroots", "repo": "wlroots", - "rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5", + "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", "type": "gitlab" } }, @@ -248,11 +254,11 @@ ] }, "locked": { - "lastModified": 1708696469, - "narHash": "sha256-shh5wmpeYy3MmsBfkm4f76yPsBDGk6OLYRVG+ARy2F0=", + "lastModified": 1709299639, + "narHash": "sha256-jYqJM5khksLIbqSxCLUUcqEgI+O2LdlSlcMEBs39CAU=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "1b713911c2f12b96c2574474686e4027ac4bf826", + "rev": "2d2fb547178ec025da643db57d40a971507b82fe", "type": "github" }, "original": { @@ -260,28 +266,6 @@ "repo": "xdg-desktop-portal-hyprland", "type": "github" } - }, - "yazi": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": [ - "nixpkgs" - ], - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1709571181, - "narHash": "sha256-wFovpJpRy45RjdkHtFKuXBkddEly+Jrc4JzggGFmfgY=", - "owner": "sxyazi", - "repo": "yazi", - "rev": "497aa26f755fdb60d7e538a79b933beaa2be2fef", - "type": "github" - }, - "original": { - "owner": "sxyazi", - "repo": "yazi", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index a55289d..4f85e7b 100644 --- a/flake.nix +++ b/flake.nix @@ -14,12 +14,6 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - # CLI file manager. - yazi = { - url = "github:sxyazi/yazi"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - # Neovim distribution astronvim = { url = "github:AstroNvim/AstroNvim"; From 3ea5c64fa33509f494bc8e6b6cd396d81962b27a Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Fri, 15 Mar 2024 23:39:44 -0300 Subject: [PATCH 08/53] feat: change desktop theming --- programs/hyprland/default.nix | 4 +- programs/waybar.nix | 542 ++++++++--------------------- scripts/hyprland/start_services.sh | 4 +- theming/sddm.nix | 4 +- 4 files changed, 155 insertions(+), 399 deletions(-) diff --git a/programs/hyprland/default.nix b/programs/hyprland/default.nix index 499a64e..78eac0a 100644 --- a/programs/hyprland/default.nix +++ b/programs/hyprland/default.nix @@ -120,8 +120,8 @@ gaps_in = 6 gaps_out = 18 border_size = 2 - col.active_border = $lavender $red 15deg - col.inactive_border = $yellow $sapphire 15deg + col.active_border = $base $surface0 $red 45deg + col.inactive_border = $base $surface0 $yellow 45deg layout = dwindle } diff --git a/programs/waybar.nix b/programs/waybar.nix index d8b7ecc..6517828 100644 --- a/programs/waybar.nix +++ b/programs/waybar.nix @@ -1,45 +1,135 @@ -{ pkgs, ... }: +{ ... }: { programs.waybar = { enable = true; - package = (pkgs.waybar.overrideAttrs (oldAttrs: { - mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; - }) - ); - settings = { mainBar = { layer = "top"; - position = "top"; + margin = "10px 10px 0"; + height = 30; + modules-left = [ - "hyprland/submap" "hyprland/workspaces" - "custom/arrow10" - "hyprland/window" + ]; + modules-center = [ + "clock" ]; modules-right = [ - "custom/arrow9" "pulseaudio" - "custom/arrow8" "network" - "custom/arrow7" "memory" - "custom/arrow6" "cpu" - "custom/arrow5" "temperature" - "custom/arrow4" "battery" - "custom/arrow3" "hyprland/language" - "custom/arrow2" "tray" - "clock#date" - "custom/arrow1" - "clock#time" ]; + "hyprland/workspaces" = { + format = "{icon}"; + + format-icons = { + active = ""; + default = ""; + empty = ""; + persistent = ""; + special = ""; + urgent = ""; + }; + }; + + clock = { + format = "{:%H:%M} "; + 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-backward = "tz_down"; + on-click-forward = "tz_up"; + on-click-right = "mode"; + on-scroll-down = "shift_down"; + on-scroll-up = "shift_up"; + }; + }; + }; + + pulseaudio = { + format = "{icon} {volume}%"; + format-bluetooth = "{icon} {volume}%"; + format-muted = ""; + format-icons = { + headphone = ""; + hands-free = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = [ + "" + "" + ]; + }; + scroll-step = 1; + on-click = "pactl set-sink-mute @DEFAULT_SINK@ toggle"; + tooltip = false; + }; + + + network = { + interval = 5; + format = " {bandwidthUpBits} 󰇙 {bandwidthDownBits} "; + format-disconnected = " No connection"; + tooltip-format-wifi = " {essid} ({signalStrength}%)"; + }; + + memory = { + interval = 5; + format = " {percentage}%"; + states = { + warning = 70; + critical = 90; + }; + "tooltip-format" = " {used:0.1f}G/{total:0.1f}G"; + }; + + cpu = { + interval = 5; + tooltip = false; + format = " {usage}%"; + format-alt = " {load}"; + states = { + warning = 70; + critical = 90; + }; + }; + + temperature = { + critical-threshold = 90; + interval = 5; + format = "{icon} {temperatureC}°"; + format-icons = [ + "" + "" + "" + "" + "" + ]; + tooltip = false; + }; + # Module configuration battery = { interval = 10; @@ -64,159 +154,24 @@ 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; - }; - }; - "hyprland/language" = { - format = " {}"; - min-length = 5; - #"on-click" = "swaymsg 'input * xkb_switch_layout next'"; - tooltip = false; - }; - - memory = { - interval = 5; - format = "🧠 {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; - }; - - "hyprland/submap" = { - format = "{}"; - tooltip = false; - }; - - "hyprland/window" = { - format = "{}"; - max-length = 30; - tooltip = false; - }; - - pulseaudio = { - format = "{icon} {volume}%"; - format-bluetooth = "{icon} {volume}%"; - format-muted = ""; - format-icons = { - headphone = ""; - hands-free = ""; - headset = ""; - phone = ""; - portable = ""; - car = ""; - default = [ - "" - "" - ]; - }; - scroll-step = 1; - on-click = "pactl set-sink-mute @DEFAULT_SINK@ toggle"; - tooltip = false; - }; - - temperature = { - critical-threshold = 90; - interval = 5; - format = "{icon} {temperatureC}°"; - format-icons = [ - "" - "" - "" - "" - "" - ]; + format = " {}"; + format-en = "EN/US"; + format-pt-br = "PT/BR"; + #"on-click" = "hyprctl switchxkblayout www.hfd.cn-monsgeek-keyboard-1 next"; 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; + spacing = 10; }; }; }; style = '' + /* Using https://github.com/catppuccin/catppuccin for color reference. */ + /* Keyframes */ @keyframes blink-critical { to { @@ -225,260 +180,61 @@ } } - /* Styles */ - - /* Colors (gruvbox) */ - @define-color black #282828; - @define-color red #cc241d; - @define-color green #98971a; - @define-color yellow #d79921; - @define-color blue #458588; - @define-color purple #b16286; - @define-color aqua #689d6a; - @define-color gray #a89984; - @define-color brgray #928374; - @define-color brred #fb4934; - @define-color brgreen #b8bb26; - @define-color bryellow #fabd2f; - @define-color brblue #83a598; - @define-color brpurple #d3869b; - @define-color braqua #8ec07c; - @define-color white #ebdbb2; - @define-color bg2 #504945; - - - @define-color warning @bryellow; - @define-color critical @red; - @define-color mode @black; - @define-color unfocused @bg2; - @define-color focused @braqua; - @define-color inactive @purple; - @define-color sound @brpurple; - @define-color network @purple; - @define-color memory @braqua; - @define-color cpu @green; - @define-color temp @brgreen; - @define-color layout @bryellow; - @define-color battery @aqua; - @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; + all: unset; + color: #c6d0f5; + font-family: "FantasqueSansM Nerd Font", 'Courier New', Courier, monospace; + font-size: 16px; } - /* The whole bar */ - #waybar { - background: rgba(40, 40, 40, 0.8784313725); /* #282828e0 */ - color: @white; - font-family: JetBrains Mono, Siji; - font-size: 10pt; - /*font-weight: bold;*/ + .modules-left, + .modules-right, + .modules-center { + padding: 0 20px; + border-radius: 10px; + background-color: rgba(48, 52, 70, 0.85); } - /* Each module */ - #battery, - #clock, - #cpu, - #language, - #memory, - #mode, - #network, - #pulseaudio, - #temperature, - #tray, - #backlight, - #idle_inhibitor, - #disk, - #user, - #mpris { - padding-left: 8pt; - padding-right: 8pt; + tooltip { + background-color: rgba(48, 52, 70, 0.85); + border-radius: 10px; + padding: 8px; } - /* Each critical module */ - #mode, - #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; + tooltip label { + color: #c6d0f5; } - /* Each warning */ - #network.disconnected, - #memory.warning, - #cpu.warning, - #temperature.warning, - #battery.warning.discharging { - color: @warning; + #workspaces { + margin-left: -5px; + padding-left: 0px; } - /* 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: 2pt; - padding-right: 2pt; - color: @white; - background: @unfocused; + margin: 0 8px; } - /* 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; + background: #414559; + border: none; } - #window { - margin-right: 35pt; - margin-left: 35pt; + #clock { + padding: 0 10px; } - #pulseaudio { - background: @sound; - color: @black; - } - - #network { - background: @network; - color: @white; - } - - #memory { - background: @memory; - color: @black; - } - - #cpu { - background: @cpu; - color: @white; - } - - #temperature { - background: @temp; - color: @black; - } - - #language { - background: @layout; - color: @black; - } - - #battery { - background: @battery; - color: @white; + #network, #cpu, #memory, #language, #temperature, #pulseaudio { + margin: 0 8px; } #tray { - background: @date; + margin-left: 8px; } - #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: @layout; - } - - #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; + #tray menu { + background-color: rgba(48, 52, 70, 0.85); + border-radius: 10px; + padding: 8px; } ''; }; diff --git a/scripts/hyprland/start_services.sh b/scripts/hyprland/start_services.sh index c70cfcc..b688669 100755 --- a/scripts/hyprland/start_services.sh +++ b/scripts/hyprland/start_services.sh @@ -9,10 +9,10 @@ waybar & ## Start wallpaper daemon and set one. # OUTPUT_1="DP-2" -IMAGE_1="/mnt/internal/personal/wallpapers/wallhaven-g71xoe.jpg" +IMAGE_1="/mnt/internal/personal/wallpapers/wallhaven-z8e3wo.png" OUTPUT_2="DP-3" -IMAGE_2="/mnt/internal/personal/wallpapers/wallhaven-3zjexv.jpg" +IMAGE_2="/mnt/internal/personal/wallpapers/wallhaven-g7ze63.jpg" function load_wallpapers() { swww img -t any --transition-bezier 0.0,0.0,1.0,1.0 --transition-duration .8 --transition-step 255 --transition-fps 60 -o $OUTPUT_1 $IMAGE_1; diff --git a/theming/sddm.nix b/theming/sddm.nix index 7a8fff3..ec16288 100644 --- a/theming/sddm.nix +++ b/theming/sddm.nix @@ -1,11 +1,11 @@ { pkgs }: let - imgLink = "https://w.wallhaven.cc/full/1p/wallhaven-1p398w.jpg"; + imgLink = "https://w.wallhaven.cc/full/yj/wallhaven-yjq257.png"; image = pkgs.fetchurl { url = imgLink; - sha256 = "5347bc5a114db8afe9d189682a75565e8d0bc46e003f714879d6957729224335"; + sha256 = "sha256-lrQv8VAks86zMzRaF9VEZotp78O9M7/dV8jZNTRb6SY="; }; in pkgs.stdenv.mkDerivation { From 2b294c684bb623e3b90b87709ed461cf6c79f894 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Fri, 15 Mar 2024 23:40:18 -0300 Subject: [PATCH 09/53] fix: use correct yazi package --- nixos.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos.nix b/nixos.nix index 220ae1d..2fcffec 100644 --- a/nixos.nix +++ b/nixos.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, custom-neovim, yazi, ... }: +{ config, pkgs, ... }: { ## @@ -291,7 +291,7 @@ zoxide # File managing - yazi.packages.${pkgs.system}.default + yazi ## Libraries libsForQt5.qt5.qtgraphicaleffects From bd35849b640b8cdbd2e9271128e4f35833836ebe Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Fri, 15 Mar 2024 23:40:37 -0300 Subject: [PATCH 10/53] chore: remove unused packages --- home-manager.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/home-manager.nix b/home-manager.nix index 56fc555..abf1b3b 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -94,7 +94,6 @@ # Gaming dolphin-emu - mindustry-wayland path-of-building protontricks vkbasalt @@ -115,7 +114,6 @@ ## Desktop environment cliphist - eww-wayland grim mako polkit-kde-agent From 8948a42df014d896e9430ec8ceb11fd9e53b1cae Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Fri, 15 Mar 2024 23:41:01 -0300 Subject: [PATCH 11/53] fix(home-manager): remove unecessary fish section --- home-manager.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/home-manager.nix b/home-manager.nix index abf1b3b..fe42e26 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -56,8 +56,6 @@ # Allow unfree packages nixpkgs.config.allowUnfree = true; - # Configure fish - # The home.packages option allows you to install Nix packages into your # environment. home.packages = with pkgs; [ From d3ea5450731806c4f309cf2b7c7288d22d43d6eb Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Mon, 18 Mar 2024 02:19:49 -0300 Subject: [PATCH 12/53] feat: a sleeker choice of colours for the window borders --- programs/hyprland/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/hyprland/default.nix b/programs/hyprland/default.nix index 78eac0a..7247f92 100644 --- a/programs/hyprland/default.nix +++ b/programs/hyprland/default.nix @@ -120,8 +120,8 @@ gaps_in = 6 gaps_out = 18 border_size = 2 - col.active_border = $base $surface0 $red 45deg - col.inactive_border = $base $surface0 $yellow 45deg + col.active_border = $base $surface0 $green 45deg + col.inactive_border = $base $surface0 $blue 45deg layout = dwindle } From f8bb16902ae9ab5d39bc2658f897e9ef8eb26e15 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Mon, 18 Mar 2024 02:20:23 -0300 Subject: [PATCH 13/53] feat(nvim): use and configure treesitter from lua, not nix --- programs/neovim/default.nix | 43 ----------------- programs/neovim/user/plugins/treesitter.lua | 51 ++++++++++++++++++++- 2 files changed, 49 insertions(+), 45 deletions(-) diff --git a/programs/neovim/default.nix b/programs/neovim/default.nix index 97e4c53..dbc4f92 100644 --- a/programs/neovim/default.nix +++ b/programs/neovim/default.nix @@ -57,48 +57,5 @@ { "nvim/lua/resession/extensions".source = "${astronvim}/lua/resession/extensions"; } { "nvim/lua/lazy_snapshot.lua".source = "${astronvim}/lua/lazy_snapshot.lua"; } { "nvim/lua/user".source = ./user; } - { - "nvim/parser".source = - let - parsers = pkgs.symlinkJoin { - name = "treesitter-parsers"; - paths = (pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: with plugins; [ - bash - c - cmake - cpp - css - cuda - dockerfile - gdscript - glsl - godot_resource - html - javascript - jsdoc - json - jsonc - lua - lua - markdown - markdown_inline - nim - nim_format_string - nix - objc - proto - python - query - tsx - typescript - vim - vimdoc - vue - yaml - ])).dependencies; - }; - in - "${parsers}/parser"; - } ]; } diff --git a/programs/neovim/user/plugins/treesitter.lua b/programs/neovim/user/plugins/treesitter.lua index c717d37..ecc9a37 100644 --- a/programs/neovim/user/plugins/treesitter.lua +++ b/programs/neovim/user/plugins/treesitter.lua @@ -2,7 +2,54 @@ return { "nvim-treesitter/nvim-treesitter", opts = function(_, opts) -- add more things to the ensure_installed table protecting against community packs modifying it - opts.ensure_installed = nil - opts.automatic_installation = false + local utils = require "astronvim.utils" + opts.incremental_selection = { + enable = true, + keymaps = { + init_selection = "", -- Ctrl + Space + node_incremental = "", + scope_incremental = "", -- Alt + Space + node_decremental = "", -- Backspace + }, + } + opts.ignore_install = { "gotmpl" } + opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, { + -- Programming + "c", + "cmake", + "cpp", + "css", + "gdscript", + "godot_resource", + "html", + "javascript", + "jsdoc", + "lua", + "nim", + "nim_format_string", + "objc", + "proto", + "python", + "tsx", + "typescript", + "vue", + -- Scripting + "bash", + "glsl", + -- Configuring + "dockerfile", + "json", + "jsonc", + "nix", + "yaml", + -- Misc + "cuda", + "markdown", + "markdown_inline", + "query", + -- VIM + "vim", + "vimdoc", + }) end, } From d784cb02418ff00d0793191a4999b461aad04143 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Mon, 18 Mar 2024 02:20:57 -0300 Subject: [PATCH 14/53] chore(waybar): turns out without pulseaudio it looks sleeker --- programs/waybar.nix | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/programs/waybar.nix b/programs/waybar.nix index 6517828..d884ffb 100644 --- a/programs/waybar.nix +++ b/programs/waybar.nix @@ -16,7 +16,6 @@ "clock" ]; modules-right = [ - "pulseaudio" "network" "memory" "cpu" @@ -66,28 +65,6 @@ }; }; - pulseaudio = { - format = "{icon} {volume}%"; - format-bluetooth = "{icon} {volume}%"; - format-muted = ""; - format-icons = { - headphone = ""; - hands-free = ""; - headset = ""; - phone = ""; - portable = ""; - car = ""; - default = [ - "" - "" - ]; - }; - scroll-step = 1; - on-click = "pactl set-sink-mute @DEFAULT_SINK@ toggle"; - tooltip = false; - }; - - network = { interval = 5; format = " {bandwidthUpBits} 󰇙 {bandwidthDownBits} "; @@ -223,7 +200,7 @@ padding: 0 10px; } - #network, #cpu, #memory, #language, #temperature, #pulseaudio { + #network, #cpu, #memory, #language, #temperature { margin: 0 8px; } From caa804bf86ae4726daf2187b025cfa2e4be06751 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Mon, 25 Mar 2024 22:29:41 -0300 Subject: [PATCH 15/53] chore: use nixfmt instead of nixpkgs-fmt and add zenergy kernel module --- flake.nix | 50 ++++++++------------ kernel/zenergy.nix | 43 +++++++++++++++++ nixos.nix | 59 +++++++++++++++++------- programs/neovim/default.nix | 2 +- programs/neovim/user/plugins/null-ls.lua | 2 +- 5 files changed, 107 insertions(+), 49 deletions(-) create mode 100644 kernel/zenergy.nix diff --git a/flake.nix b/flake.nix index 4f85e7b..e55e22a 100644 --- a/flake.nix +++ b/flake.nix @@ -21,40 +21,28 @@ }; }; - outputs = - { self - , home-manager - , hyprland - , nixpkgs - , ... - } @ inputs: - let - system = "x86_64-linux"; - in - { - nixosConfigurations."nixos" = - let - specialArgs = inputs; - modules = [ - ./nixos.nix + outputs = { self, home-manager, hyprland, nixpkgs, ... }@inputs: + let system = "x86_64-linux"; + in { + nixosConfigurations."nixos" = let + specialArgs = inputs; + modules = [ + ./nixos.nix - hyprland.nixosModules.default - { - programs.hyprland.enable = true; - } + hyprland.nixosModules.default + { programs.hyprland.enable = true; } - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = inputs; - home-manager.users.wizardlink = import ./home-manager.nix; - } - ]; - in - nixpkgs.lib.nixosSystem { inherit system specialArgs modules; }; + home-manager.extraSpecialArgs = inputs; + home-manager.users.wizardlink = import ./home-manager.nix; + } + ]; + in nixpkgs.lib.nixosSystem { inherit system specialArgs modules; }; - formatter = nixpkgs.legacyPackages.${system}.nixpkgs-fmt; + formatter."${system}" = nixpkgs.legacyPackages.${system}.nixfmt; }; } diff --git a/kernel/zenergy.nix b/kernel/zenergy.nix new file mode 100644 index 0000000..d489edd --- /dev/null +++ b/kernel/zenergy.nix @@ -0,0 +1,43 @@ +{ lib, stdenv, fetchFromGitHub, kernel, kmod }: + +let + kernelDirectory = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; +in +stdenv.mkDerivation { + pname = "zenergy"; + version = "a3e124477ee8197015481156b90100d49fa3cd84"; + + src = fetchFromGitHub { + owner = "BoukeHaarsma23"; + repo = "zenergy"; + rev = "a3e124477ee8197015481156b90100d49fa3cd84"; + hash = "sha256-s1aoipSsLKO23kTd2uGxVUpqYSeitiz3UIoDIxg/Dj8="; + }; + + hardeningDisable = [ "format" "pic" ]; + + makeFlags = kernel.makeFlags ++ [ + "KDIR=${kernelDirectory}" + ]; + + preBuild = '' + substituteInPlace Makefile --replace-fail "PWD modules_install" "PWD INSTALL_MOD_PATH=$out modules_install" + ''; + + nativeBuildInputs = [ kmod ] ++ kernel.moduleBuildDependencies; + + installPhase = '' + make modules_install KDIR=${kernelDirectory} + ''; + + outputs = [ "out" ]; + + meta = with lib; { + description = "Based on AMD_ENERGY driver, but with some jiffies added so non-root users can read it safely."; + homepage = "https://github.com/BoukeHaarsma23/zenergy"; + license = licenses.gpl2Only; + maintainers = with maintainers; [ wizardlink ]; + platforms = platforms.linux; + outputsToInstall = [ "out" ]; + }; +} diff --git a/nixos.nix b/nixos.nix index 2fcffec..4dc2056 100644 --- a/nixos.nix +++ b/nixos.nix @@ -9,14 +9,13 @@ ## NIXOS ## ## - imports = - [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - # Include service configuration - ./services/caddy.nix - ./services/jellyfin.nix - ]; + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + # Include service configuration + ./services/caddy.nix + ./services/jellyfin.nix + ]; # Enable experimental features nix.settings.experimental-features = [ "nix-command" "flakes" ]; @@ -44,13 +43,18 @@ ## # Kernel - boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; + boot.kernelPackages = pkgs.linuxPackages_latest; # Add AMD drivers. boot.initrd.kernelModules = [ "amdgpu" ]; # TODO: FIX IT BEING BEING OVERWRITTEN - boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; + boot.extraModulePackages = [ + config.boot.kernelPackages.v4l2loopback + (pkgs.callPackage ./kernel/zenergy.nix { + kernel = pkgs.linux_xanmod_latest; + }) + ]; # Bootloader. boot.loader = { @@ -87,12 +91,16 @@ 8211 # Palworld ]; - allowedTCPPortRanges = [ - { from = 1714; to = 1764; } # KDEConnect - ]; - allowedUDPPortRanges = [ - { from = 1714; to = 1764; } # KDEConnect - ]; + allowedTCPPortRanges = [{ + from = 1714; + to = 1764; + } # KDEConnect + ]; + allowedUDPPortRanges = [{ + from = 1714; + to = 1764; + } # KDEConnect + ]; }; # Or disable the firewall altogether. # networking.firewall.enable = false; @@ -125,9 +133,18 @@ # Select internationalisation properties. i18n = { defaultLocale = "en_US.UTF-8"; + supportedLocales = [ + "C.UTF-8/UTF-8" + "en_GB.UTF-8/UTF-8" + "en_US.UTF-8/UTF-8" + "ja_JP.UTF-8/UTF-8" + "pt_BR.UTF-8/UTF-8" + ]; extraLocaleSettings = { + LANGUAGE = "en_US.UTF-8"; LC_ADDRESS = "en_US.UTF-8"; + LC_ALL = "en_US.UTF-8"; LC_IDENTIFICATION = "en_US.UTF-8"; LC_MEASUREMENT = "pt_BR.UTF-8"; LC_MONETARY = "en_US.UTF-8"; @@ -137,6 +154,11 @@ LC_TELEPHONE = "pt_BR.UTF-8"; LC_TIME = "en_GB.UTF-8"; }; + + inputMethod = { + enabled = "fcitx5"; + fcitx5.addons = [ pkgs.fcitx5-mozc pkgs.fcitx5-gtk ]; + }; }; # Enable CUPS to print documents. @@ -315,6 +337,11 @@ ## SERVICES # ## + services.udev.extraRules = '' + # Monsgeek M1 + KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="fffe", ATTRS{idProduct}=="0005", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl" + ''; + # Enable flatpak services.flatpak.enable = true; diff --git a/programs/neovim/default.nix b/programs/neovim/default.nix index dbc4f92..5006f5d 100644 --- a/programs/neovim/default.nix +++ b/programs/neovim/default.nix @@ -33,7 +33,7 @@ # Nix nil - nixpkgs-fmt + nixfmt # TypeScript nodePackages.typescript-language-server diff --git a/programs/neovim/user/plugins/null-ls.lua b/programs/neovim/user/plugins/null-ls.lua index 0631e7d..9e850fd 100644 --- a/programs/neovim/user/plugins/null-ls.lua +++ b/programs/neovim/user/plugins/null-ls.lua @@ -11,7 +11,7 @@ return { -- Set a formatter -- null_ls.builtins.formatting.stylua, -- null_ls.builtins.formatting.prettier, - null_ls.builtins.formatting.nixpkgs_fmt, + null_ls.builtins.formatting.nixfmt, null_ls.builtins.formatting.prettier, null_ls.builtins.formatting.rustfmt, null_ls.builtins.formatting.stylua, From f2911ce776035efc2bb64f8188d40fbf66bf7c38 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Mon, 25 Mar 2024 22:33:01 -0300 Subject: [PATCH 16/53] fix: apply nixfmt and add element desktop app --- home-manager.nix | 70 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 52 insertions(+), 18 deletions(-) diff --git a/home-manager.nix b/home-manager.nix index fe42e26..2ee5aea 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -70,6 +70,7 @@ # Utilities brightnessctl discord + element firefox pavucontrol pulseaudio @@ -126,25 +127,21 @@ qt6Packages.qtwayland # Create an FHS environment using the command `fhs`, enabling the execution of non-NixOS packages in NixOS! - ( - let base = pkgs.appimageTools.defaultFhsEnvArgs; in - pkgs.buildFHSUserEnv (base // { - name = "fhs"; - targetPkgs = pkgs: ( + (let base = pkgs.appimageTools.defaultFhsEnvArgs; + in pkgs.buildFHSUserEnv (base // { + name = "fhs"; + targetPkgs = pkgs: + ( # pkgs.buildFHSUserEnv provides only a minimal FHS environment, # lacking many basic packages needed by most software. # Therefore, we need to add them manually. # # pkgs.appimageTools provides basic packages required by most software. - (base.targetPkgs pkgs) ++ (with pkgs; [ - nodejs - ]) - ); - profile = "export FHS=1"; - runScript = "bash"; - extraOutputsToInstall = [ "dev" ]; - }) - ) + (base.targetPkgs pkgs) ++ (with pkgs; [ nodejs ])); + profile = "export FHS=1"; + runScript = "bash"; + extraOutputsToInstall = [ "dev" ]; + })) ]; # @@ -155,7 +152,8 @@ # plain files is through 'home.file'. home.file = { # Cattpuccin theme for fish shell. - ".config/fish/themes/Catppuccin-Frappe.theme".source = ./programs/fish/Catppuccin-Frappe.theme; + ".config/fish/themes/Catppuccin-Frappe.theme".source = + ./programs/fish/Catppuccin-Frappe.theme; # Configuration for gamemode, for running games with optimizations. ".config/gamemode.ini".source = ./programs/gamemode.ini; @@ -165,7 +163,12 @@ ## Kvantum's theme configuration. ".config/Kvantum/Catppuccin-Frappe-Lavender" = { - source = "${pkgs.catppuccin-kvantum.override { accent = "Lavender"; variant = "Frappe"; } }/share/Kvantum/Catppuccin-Frappe-Lavender"; + source = "${ + pkgs.catppuccin-kvantum.override { + accent = "Lavender"; + variant = "Frappe"; + } + }/share/Kvantum/Catppuccin-Frappe-Lavender"; }; ".config/Kvantum/kvantum.kvconfig".text = '' @@ -177,7 +180,8 @@ ## Themeing configuration for qt5 and qt6 ".config/qt5ct/colors".source = ./theming/qt5ct; - ".config/qt6ct/colors".source = ./theming/qt5ct; # We use the qt5ct because it's the SAME spec + ".config/qt6ct/colors".source = + ./theming/qt5ct; # We use the qt5ct because it's the SAME spec ## # Configure pipewire for microphone noise supression. @@ -232,7 +236,6 @@ ".config/yazi".source = ./programs/yazi; }; - ## Theming home.pointerCursor = { package = pkgs.catppuccin-cursors.frappeLavender; @@ -282,4 +285,35 @@ "x-scheme-handler/https" = "firefox"; "x-scheme-handler/unknown" = "firefox"; }; + + systemd.user.services = { + palserver = { + Unit = { Description = "Palworld Server"; }; + + Service = { + ExecStart = + "/etc/profiles/per-user/wizardlink/bin/fhs -c 'EpicApp=PalServer ./PalServer.sh -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS'"; + Restart = "always"; + #RuntimeMaxSec = "4h"; + Type = "simple"; + WorkingDirectory = "/mnt/ssd/Games/Steam/steamapps/common/PalServer"; + }; + + Install = { WantedBy = [ "default.target" ]; }; + }; + + foundry = { + Unit = { Description = "FoundryVTT server"; }; + + Service = { + ExecStart = + "/etc/profiles/per-user/wizardlink/bin/fhs -c 'node ./resources/app/main.js'"; + Restart = "on-failure"; + Type = "simple"; + WorkingDirectory = "/mnt/ssd/Games/FoundryVTT/FoundryProgram"; + }; + + Install = { WantedBy = [ "default.target" ]; }; + }; + }; } From da04a29d2e73dcf4bca5be7f061b79cabfb0fd87 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Mon, 25 Mar 2024 22:33:38 -0300 Subject: [PATCH 17/53] feat: add fcitx5 to the start services --- scripts/hyprland/start_services.sh | 35 +++++++++++++++++------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/scripts/hyprland/start_services.sh b/scripts/hyprland/start_services.sh index b688669..d044e5e 100755 --- a/scripts/hyprland/start_services.sh +++ b/scripts/hyprland/start_services.sh @@ -1,10 +1,30 @@ #!/bin/sh +# +# Make sure xdg-desktop-portal-hyprland has access to what it needs +# +dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP & + +# +# Start authentication polkit. +# +/nix/store/$(ls -la /nix/store | rg '^d.*polkit-kde-agent.*\d$' | awk '{print $9}')/libexec/polkit-kde-authentication-agent-1 & + # # Start waybar. # waybar & +# +# Start xwaylandvideobridge +# +xwaylandvideobridge & + +# +# Start fcitx5 +# +fcitx5 & + # ## Start wallpaper daemon and set one. # @@ -30,11 +50,6 @@ load_wallpapers & # mako & -# -# Start authentication polkit. -# -/nix/store/$(ls -la /nix/store | rg '^d.*polkit-kde-agent.*\d$' | awk '{print $9}')/libexec/polkit-kde-authentication-agent-1 & - # # Refresh kdeconnect connections # @@ -47,13 +62,3 @@ wl-paste -w cliphist store & # Need this to be able to paste in xwayland applications. wl-paste -t text -w sh -c 'xclip -selection clipboard -o > /dev/null 2> /dev/null || xclip -selection clipboard' - -# -# Start xwaylandvideobridge -# -xwaylandvideobridge & - -# -# Make sure xdg-desktop-portal-hyprland has access to what it needs -# -dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP & From 557e604094ef61b85f6926a995e7f09c4f164a3b Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Mon, 25 Mar 2024 22:34:02 -0300 Subject: [PATCH 18/53] chore: minor waybar changes --- programs/waybar.nix | 48 ++++++++------------------------------------- 1 file changed, 8 insertions(+), 40 deletions(-) diff --git a/programs/waybar.nix b/programs/waybar.nix index d884ffb..bfae1a2 100644 --- a/programs/waybar.nix +++ b/programs/waybar.nix @@ -1,5 +1,4 @@ -{ ... }: -{ +{ ... }: { programs.waybar = { enable = true; @@ -9,21 +8,10 @@ margin = "10px 10px 0"; height = 30; - modules-left = [ - "hyprland/workspaces" - ]; - modules-center = [ - "clock" - ]; - modules-right = [ - "network" - "memory" - "cpu" - "temperature" - "battery" - "hyprland/language" - "tray" - ]; + modules-left = [ "hyprland/workspaces" ]; + modules-center = [ "clock" ]; + modules-right = + [ "network" "memory" "cpu" "temperature" "battery" "tray" ]; "hyprland/workspaces" = { format = "{icon}"; @@ -97,13 +85,7 @@ critical-threshold = 90; interval = 5; format = "{icon} {temperatureC}°"; - format-icons = [ - "" - "" - "" - "" - "" - ]; + format-icons = [ "" "" "" "" "" ]; tooltip = false; }; @@ -121,21 +103,7 @@ format-charging-full = " {capacity}%"; format-full = "{icon} {capacity}%"; format-alt = "{icon} {power}W"; - format-icons = [ - "" - "" - "" - "" - "" - ]; - tooltip = false; - }; - - "hyprland/language" = { - format = " {}"; - format-en = "EN/US"; - format-pt-br = "PT/BR"; - #"on-click" = "hyprctl switchxkblayout www.hfd.cn-monsgeek-keyboard-1 next"; + format-icons = [ "" "" "" "" "" ]; tooltip = false; }; @@ -200,7 +168,7 @@ padding: 0 10px; } - #network, #cpu, #memory, #language, #temperature { + #network, #cpu, #memory, #temperature { margin: 0 8px; } From 669450636ebb7df024affa9880e52ceacf68e9e9 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Mon, 25 Mar 2024 22:35:40 -0300 Subject: [PATCH 19/53] fix: changes to hyprland env for fcitx5 --- programs/hyprland/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/programs/hyprland/default.nix b/programs/hyprland/default.nix index 7247f92..da62b90 100644 --- a/programs/hyprland/default.nix +++ b/programs/hyprland/default.nix @@ -92,10 +92,14 @@ # Some default env vars. env = XCURSOR_SIZE,36 env = QT_QPA_PLATFORM,wayland + env = QT_IM_MODULE,fcitx + env = GTK_IM_MODULE,fcitx + env = SDL_IM_MODULE,fcitx + env = XMODIFIERS,@im=fcitx # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { - kb_layout = us,br + kb_layout = kb_variant = kb_model = kb_options = @@ -196,7 +200,6 @@ # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod CTRL, F, fakefullscreen - bind = $mainMod CTRL, K, exec, hyprctl switchxkblayout www.hfd.cn-monsgeek-keyboard-1 next bind = $mainMod CTRL, L, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy bind = $mainMod CTRL, P, exec, ~/.local/share/scripts/hyprland/screenshot_area.sh bind = $mainMod CTRL, V, pin @@ -255,7 +258,6 @@ bindm = $mainMod, mouse:273, resizewindow # Window rules - windowrulev2 = float,class:(steam) # Make sure all Steam windows float windowrulev2 = opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$ windowrulev2 = noanim,class:^(xwaylandvideobridge)$ windowrulev2 = nofocus,class:^(xwaylandvideobridge)$ From f037f8b05ab10bca3788a58a58738c0fdcfde269 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Wed, 27 Mar 2024 03:19:42 -0300 Subject: [PATCH 20/53] neovim: add svelte to treesitter ensure_installed --- programs/neovim/user/plugins/treesitter.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/programs/neovim/user/plugins/treesitter.lua b/programs/neovim/user/plugins/treesitter.lua index ecc9a37..328c962 100644 --- a/programs/neovim/user/plugins/treesitter.lua +++ b/programs/neovim/user/plugins/treesitter.lua @@ -30,6 +30,7 @@ return { "objc", "proto", "python", + "svelte", "tsx", "typescript", "vue", From e3d51ac529dd9ba729aaa7cb193aab559ea4eeaa Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Wed, 27 Mar 2024 03:19:54 -0300 Subject: [PATCH 21/53] flake: update lockfile --- flake.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index 9ce2f4f..daf62c7 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "astronvim": { "flake": false, "locked": { - "lastModified": 1710405330, - "narHash": "sha256-dgKjLA+Ovq0bjdTBvwf03cyELS1h0Mb2CeHXT4Uu1DM=", + "lastModified": 1710957235, + "narHash": "sha256-69DBcOpjDZBMOQGz8obMBFpEBeoSWuXZ4CNAK2GqI+M=", "owner": "AstroNvim", "repo": "AstroNvim", - "rev": "2fcb9e20c13aaa3653421017236ec076db3a4c00", + "rev": "0da3fa834137597f13e53196c8c6f7e1425601ea", "type": "github" }, "original": { @@ -23,11 +23,11 @@ ] }, "locked": { - "lastModified": 1710532761, - "narHash": "sha256-SUXGZNrXX05YA9G6EmgupxhOr3swI1gcxLUeDMUhrEY=", + "lastModified": 1711133180, + "narHash": "sha256-WJOahf+6115+GMl3wUfURu8fszuNeJLv9qAWFQl3Vmo=", "owner": "nix-community", "repo": "home-manager", - "rev": "206f457fffdb9a73596a4cb2211a471bd305243d", + "rev": "1c2c5e4cabba4c43504ef0f8cc3f3dfa284e2dbb", "type": "github" }, "original": { @@ -49,11 +49,11 @@ ] }, "locked": { - "lastModified": 1710257359, - "narHash": "sha256-43re5pzE/cswFAgw92/ugsB3+d5ufDaCcLtl9ztKfBo=", + "lastModified": 1711035742, + "narHash": "sha256-5vvhCSUGG9TA2G1eIRgokuYizhRnZu0ZbcU1MXfHsUE=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "1761f6cefd77f4fcd2039d930c88d6716ddc4974", + "rev": "6a92473237f430399a417e1c2da9d7fcd4970086", "type": "github" }, "original": { @@ -75,11 +75,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1710547119, - "narHash": "sha256-xLxbGRsKs40j+4tKeHydW1VUpCPOizYcduYQvBUitoY=", + "lastModified": 1711331441, + "narHash": "sha256-Tvgc9hUfNELWl3R2gtCBQ2D7lVIjumzLHs6JiM1RT6g=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "19c90048d65a5660384d2fb865926a366696d6be", + "rev": "356414639fc06ace7045236ec41d673342981057", "type": "github" }, "original": { @@ -148,11 +148,11 @@ ] }, "locked": { - "lastModified": 1709914708, - "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", + "lastModified": 1710960526, + "narHash": "sha256-tt0UgVKWeLQ+tFzvqrm4uAZbzONwdGshpfiLHAQ1P2c=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", + "rev": "a2f39421144d42541c057be235154ce21b76c0f6", "type": "github" }, "original": { @@ -163,11 +163,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1710451336, - "narHash": "sha256-pP86Pcfu3BrAvRO7R64x7hs+GaQrjFes+mEPowCfkxY=", + "lastModified": 1711163522, + "narHash": "sha256-YN/Ciidm+A0fmJPWlHBGvVkcarYWSC+s3NTPk/P+q3c=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d691274a972b3165335d261cc4671335f5c67de9", + "rev": "44d0940ea560dee511026a53f0e2e2cde489b4d4", "type": "github" }, "original": { From d4b53b1c9f2e907d889ab17bbf4ca8999c2c5ac2 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Wed, 27 Mar 2024 03:20:09 -0300 Subject: [PATCH 22/53] chore: formatting --- nixos.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nixos.nix b/nixos.nix index 4dc2056..9b6a3c7 100644 --- a/nixos.nix +++ b/nixos.nix @@ -51,9 +51,7 @@ # TODO: FIX IT BEING BEING OVERWRITTEN boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback - (pkgs.callPackage ./kernel/zenergy.nix { - kernel = pkgs.linux_xanmod_latest; - }) + (pkgs.callPackage ./kernel/zenergy.nix { kernel = pkgs.linux_latest; }) ]; # Bootloader. From a5518cff7471e17bdccaa7389ce4fb398ea0abc2 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 4 Apr 2024 15:23:10 -0300 Subject: [PATCH 23/53] neovim: move astronvim to 4.x --- flake.nix | 6 - programs/neovim/default.nix | 13 +- programs/neovim/init.lua | 19 +++ .../{user/plugins => lua}/community.lua | 11 +- programs/neovim/lua/lazy_setup.lua | 31 +++++ programs/neovim/lua/plugins/astrocore.lua | 79 +++++++++++ programs/neovim/lua/plugins/astrolsp.lua | 126 ++++++++++++++++++ programs/neovim/lua/plugins/astroui.lua | 37 +++++ .../neovim/{user => lua}/plugins/mason.lua | 4 +- .../null-ls.lua => lua/plugins/none-ls.lua} | 11 +- .../{user => lua}/plugins/treesitter.lua | 16 +-- programs/neovim/lua/plugins/user.lua | 81 +++++++++++ programs/neovim/lua/polish.lua | 39 ++++++ programs/neovim/user/.luacheckrc | 18 --- programs/neovim/user/.neoconf.json | 20 --- programs/neovim/user/.stylua.toml | 7 - programs/neovim/user/README.md | 36 ----- programs/neovim/user/highlights/duskfox.lua | 3 - programs/neovim/user/highlights/init.lua | 3 - programs/neovim/user/init.lua | 125 ----------------- programs/neovim/user/mappings.lua | 40 ------ programs/neovim/user/options.lua | 31 ----- programs/neovim/user/plugins/core.lua | 74 ---------- programs/neovim/user/plugins/user.lua | 13 -- 24 files changed, 438 insertions(+), 405 deletions(-) create mode 100644 programs/neovim/init.lua rename programs/neovim/{user/plugins => lua}/community.lua (84%) create mode 100644 programs/neovim/lua/lazy_setup.lua create mode 100644 programs/neovim/lua/plugins/astrocore.lua create mode 100644 programs/neovim/lua/plugins/astrolsp.lua create mode 100644 programs/neovim/lua/plugins/astroui.lua rename programs/neovim/{user => lua}/plugins/mason.lua (94%) rename programs/neovim/{user/plugins/null-ls.lua => lua/plugins/none-ls.lua} (61%) rename programs/neovim/{user => lua}/plugins/treesitter.lua (63%) create mode 100644 programs/neovim/lua/plugins/user.lua create mode 100644 programs/neovim/lua/polish.lua delete mode 100644 programs/neovim/user/.luacheckrc delete mode 100644 programs/neovim/user/.neoconf.json delete mode 100644 programs/neovim/user/.stylua.toml delete mode 100644 programs/neovim/user/README.md delete mode 100644 programs/neovim/user/highlights/duskfox.lua delete mode 100644 programs/neovim/user/highlights/init.lua delete mode 100644 programs/neovim/user/init.lua delete mode 100644 programs/neovim/user/mappings.lua delete mode 100644 programs/neovim/user/options.lua delete mode 100644 programs/neovim/user/plugins/core.lua delete mode 100644 programs/neovim/user/plugins/user.lua diff --git a/flake.nix b/flake.nix index e55e22a..f335df4 100644 --- a/flake.nix +++ b/flake.nix @@ -13,12 +13,6 @@ url = "github:hyprwm/Hyprland"; inputs.nixpkgs.follows = "nixpkgs"; }; - - # Neovim distribution - astronvim = { - url = "github:AstroNvim/AstroNvim"; - flake = false; - }; }; outputs = { self, home-manager, hyprland, nixpkgs, ... }@inputs: diff --git a/programs/neovim/default.nix b/programs/neovim/default.nix index 5006f5d..2ec5339 100644 --- a/programs/neovim/default.nix +++ b/programs/neovim/default.nix @@ -1,4 +1,4 @@ -{ pkgs, astronvim, lib, ... }: +{ pkgs, lib, ... }: { programs.neovim = { @@ -6,7 +6,7 @@ withNodeJs = true; withPython3 = true; - extraLuaConfig = builtins.readFile "${astronvim}/init.lua"; + extraLuaConfig = builtins.readFile ./init.lua; extraPackages = with pkgs; [ # CMAKE @@ -52,10 +52,9 @@ }; xdg.configFile = lib.mkMerge [ - { "nvim/lua/astronvim".source = "${astronvim}/lua/astronvim"; } - { "nvim/lua/plugins".source = "${astronvim}/lua/plugins"; } - { "nvim/lua/resession/extensions".source = "${astronvim}/lua/resession/extensions"; } - { "nvim/lua/lazy_snapshot.lua".source = "${astronvim}/lua/lazy_snapshot.lua"; } - { "nvim/lua/user".source = ./user; } + { "nvim/lua/community.lua".source = ./lua/community.lua; } + { "nvim/lua/lazy_setup.lua".source = ./lua/lazy_setup.lua; } + { "nvim/lua/plugins".source = ./lua/plugins; } + { "nvim/lua/polish.lua".source = ./lua/polish.lua; } ]; } diff --git a/programs/neovim/init.lua b/programs/neovim/init.lua new file mode 100644 index 0000000..2ce1cdd --- /dev/null +++ b/programs/neovim/init.lua @@ -0,0 +1,19 @@ +-- This file simply bootstraps the installation of Lazy.nvim and then calls other files for execution +-- This file doesn't necessarily need to be touched, BE CAUTIOUS editing this file and proceed at your own risk. +local lazypath = vim.env.LAZY or vim.fn.stdpath "data" .. "/lazy/lazy.nvim" +if not (vim.env.LAZY or (vim.uv or vim.loop).fs_stat(lazypath)) then + -- stylua: ignore + vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) +end +vim.opt.rtp:prepend(lazypath) + +-- validate that lazy is available +if not pcall(require, "lazy") then + -- stylua: ignore + vim.api.nvim_echo({ { ("Unable to load lazy from: %s\n"):format(lazypath), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {}) + vim.fn.getchar() + vim.cmd.quit() +end + +require "lazy_setup" +require "polish" diff --git a/programs/neovim/user/plugins/community.lua b/programs/neovim/lua/community.lua similarity index 84% rename from programs/neovim/user/plugins/community.lua rename to programs/neovim/lua/community.lua index 96b388b..949aa0d 100644 --- a/programs/neovim/user/plugins/community.lua +++ b/programs/neovim/lua/community.lua @@ -1,9 +1,10 @@ -return { - -- Add the community repository of plugin specifications - "AstroNvim/astrocommunity", - -- example of importing a plugin, comment out to use it or add your own - -- available plugins can be found at https://github.com/AstroNvim/astrocommunity +-- AstroCommunity: import any community modules here +-- We import this file in `lazy_setup.lua` before the `plugins/` folder. +-- This guarantees that the specs are processed before any user plugins. +---@type LazySpec +return { + "AstroNvim/astrocommunity", { import = "astrocommunity.colorscheme.catppuccin" }, { "catppuccin/nvim", diff --git a/programs/neovim/lua/lazy_setup.lua b/programs/neovim/lua/lazy_setup.lua new file mode 100644 index 0000000..3fb71f7 --- /dev/null +++ b/programs/neovim/lua/lazy_setup.lua @@ -0,0 +1,31 @@ +require("lazy").setup({ + { + "AstroNvim/AstroNvim", + --version = "^4", -- Remove version tracking to elect for nighly AstroNvim + import = "astronvim.plugins", + opts = { -- AstroNvim options must be set here with the `import` key + mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up + maplocalleader = ",", -- This ensures the localleader key must be configured before Lazy is set up + icons_enabled = true, -- Set to false to disable icons (if no Nerd Font is available) + pin_plugins = nil, -- Default will pin plugins when tracking `version` of AstroNvim, set to true/false to override + }, + }, + { import = "community" }, + { import = "plugins" }, +} --[[@as LazySpec]], { + -- Configure any other `lazy.nvim` configuration options here + install = { colorscheme = { "astrodark", "habamax" } }, + ui = { backdrop = 100 }, + performance = { + rtp = { + -- disable some rtp plugins, add more to your liking + disabled_plugins = { + "gzip", + "netrwPlugin", + "tarPlugin", + "tohtml", + "zipPlugin", + }, + }, + }, +} --[[@as LazyConfig]]) diff --git a/programs/neovim/lua/plugins/astrocore.lua b/programs/neovim/lua/plugins/astrocore.lua new file mode 100644 index 0000000..ee4b658 --- /dev/null +++ b/programs/neovim/lua/plugins/astrocore.lua @@ -0,0 +1,79 @@ +-- AstroCore provides a central place to modify mappings, vim options, autocommands, and more! +-- Configuration documentation can be found with `:h astrocore` +-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`) +-- as this provides autocomplete and documentation while editing + +---@type LazySpec +return { + "AstroNvim/astrocore", + ---@type AstroCoreOpts + opts = { + -- Configure core features of AstroNvim + features = { + large_buf = { size = 1024 * 500, lines = 10000 }, -- set global limits for large files for disabling features like treesitter + autopairs = true, -- enable autopairs at start + cmp = true, -- enable completion at start + diagnostics_mode = 3, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on) + highlighturl = true, -- highlight URLs at start + notifications = true, -- enable notifications at start + }, + -- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on + diagnostics = { + virtual_text = true, + underline = true, + }, + -- vim options can be configured here + options = { + opt = { -- vim.opt. + relativenumber = true, -- sets vim.opt.relativenumber + number = true, -- sets vim.opt.number + spell = false, -- sets vim.opt.spell + signcolumn = "auto", -- sets vim.opt.signcolumn to auto + wrap = false, -- sets vim.opt.wrap + grepprg = "rg --vimgrep", -- use ripgrep on grep actions + }, + g = { -- vim.g. + -- configure global vim variables (vim.g) + -- NOTE: `mapleader` and `maplocalleader` must be set in the AstroNvim opts or before `lazy.setup` + -- This can be found in the `lua/lazy_setup.lua` file + }, + }, + -- Mappings can be configured through AstroCore as well. + -- NOTE: keycodes follow the casing in the vimdocs. For example, `` must be capitalized + mappings = { + -- first key is the mode + n = { + -- second key is the lefthand side of the map + + -- navigate buffer tabs with `H` and `L` + -- L = { + -- function() require("astrocore.buffer").nav(vim.v.count > 0 and vim.v.count or 1) end, + -- desc = "Next buffer", + -- }, + -- H = { + -- function() require("astrocore.buffer").nav(-(vim.v.count > 0 and vim.v.count or 1)) end, + -- desc = "Previous buffer", + -- }, + + -- mappings seen under group name "Buffer" + ["bD"] = { + function() + require("astroui.status.heirline").buffer_picker( + function(bufnr) require("astrocore.buffer").close(bufnr) end + ) + end, + desc = "Pick to close", + }, + -- tables with just a `desc` key will be registered with which-key if it's installed + -- this is useful for naming menus + ["b"] = { desc = "Buffers" }, + -- quick save + -- [""] = { ":w!", desc = "Save File" }, -- change description but the same command + }, + t = { + -- setting a mapping to false will disable it + -- [""] = false, + }, + }, + }, +} diff --git a/programs/neovim/lua/plugins/astrolsp.lua b/programs/neovim/lua/plugins/astrolsp.lua new file mode 100644 index 0000000..a9b6680 --- /dev/null +++ b/programs/neovim/lua/plugins/astrolsp.lua @@ -0,0 +1,126 @@ +-- AstroLSP allows you to customize the features in AstroNvim's LSP configuration engine +-- Configuration documentation can be found with `:h astrolsp` +-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`) +-- as this provides autocomplete and documentation while editing + +---@type LazySpec +return { + "AstroNvim/astrolsp", + ---@type AstroLSPOpts + opts = { + -- Configuration table of features provided by AstroLSP + features = { + autoformat = true, -- enable or disable auto formatting on start + codelens = true, -- enable/disable codelens refresh on start + inlay_hints = false, -- enable/disable inlay hints on start + semantic_tokens = true, -- enable/disable semantic token highlighting + }, + -- customize lsp formatting options + formatting = { + -- control auto formatting on save + format_on_save = { + enabled = true, -- enable or disable format on save globally + allow_filetypes = { -- enable format on save for specified filetypes only + -- "go", + "javascript", + "jsx", + "lua", + "nix", + "rust", + "tsx", + "typescript", + }, + ignore_filetypes = { -- disable format on save for specified filetypes + -- "python", + }, + }, + disabled = { -- disable formatting capabilities for the listed language servers + -- disable lua_ls formatting capability if you want to use StyLua to format your lua code + -- "lua_ls", + }, + timeout_ms = 1000, -- default format timeout + -- filter = function(client) -- fully override the default formatting function + -- return true + -- end + }, + -- enable servers that you already have installed without mason + servers = { + -- "pyright" + "clangd", + "cmake", + "cssls", + "html", + "jsonls", + "lua_ls", + "marksman", + "nil_ls", + "rust_analyzer", + "taplo", + "tsserver", + "volar", + "yamlls", + }, + -- customize language server configuration options passed to `lspconfig` + ---@diagnostic disable: missing-fields + config = { + -- clangd = { capabilities = { offsetEncoding = "utf-8" } }, + }, + -- customize how language servers are attached + handlers = { + -- a function without a key is simply the default handler, functions take two parameters, the server name and the configured options table for that server + -- function(server, opts) require("lspconfig")[server].setup(opts) end + + -- the key is the server that is being setup with `lspconfig` + -- rust_analyzer = false, -- setting a handler to false will disable the set up of that language server + -- pyright = function(_, opts) require("lspconfig").pyright.setup(opts) end -- or a custom handler function can be passed + }, + -- Configure buffer local auto commands to add when attaching a language server + autocmds = { + -- first key is the `augroup` to add the auto commands to (:h augroup) + lsp_document_highlight = { + -- Optional condition to create/delete auto command group + -- can either be a string of a client capability or a function of `fun(client, bufnr): boolean` + -- condition will be resolved for each client on each execution and if it ever fails for all clients, + -- the auto commands will be deleted for that buffer + cond = "textDocument/documentHighlight", + -- cond = function(client, bufnr) return client.name == "lua_ls" end, + -- list of auto commands to set + { + -- events to trigger + event = { "CursorHold", "CursorHoldI" }, + -- the rest of the autocmd options (:h nvim_create_autocmd) + desc = "Document Highlighting", + callback = function() vim.lsp.buf.document_highlight() end, + }, + { + event = { "CursorMoved", "CursorMovedI", "BufLeave" }, + desc = "Document Highlighting Clear", + callback = function() vim.lsp.buf.clear_references() end, + }, + }, + }, + -- mappings to be set up on attaching of a language server + mappings = { + n = { + gl = { function() vim.diagnostic.open_float() end, desc = "Hover diagnostics" }, + -- a `cond` key can provided as the string of a server capability to be required to attach, or a function with `client` and `bufnr` parameters from the `on_attach` that returns a boolean + -- gD = { + -- function() vim.lsp.buf.declaration() end, + -- desc = "Declaration of current symbol", + -- cond = "textDocument/declaration", + -- }, + -- ["uY"] = { + -- function() require("astrolsp.toggles").buffer_semantic_tokens() end, + -- desc = "Toggle LSP semantic highlight (buffer)", + -- cond = function(client) return client.server_capabilities.semanticTokensProvider and vim.lsp.semantic_tokens end, + -- }, + }, + }, + -- A custom `on_attach` function to be run after the default `on_attach` function + -- takes two parameters `client` and `bufnr` (`:h lspconfig-setup`) + on_attach = function(client, bufnr) + -- this would disable semanticTokensProvider for all clients + -- client.server_capabilities.semanticTokensProvider = nil + end, + }, +} diff --git a/programs/neovim/lua/plugins/astroui.lua b/programs/neovim/lua/plugins/astroui.lua new file mode 100644 index 0000000..b061470 --- /dev/null +++ b/programs/neovim/lua/plugins/astroui.lua @@ -0,0 +1,37 @@ +-- AstroUI provides the basis for configuring the AstroNvim User Interface +-- Configuration documentation can be found with `:h astroui` +-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`) +-- as this provides autocomplete and documentation while editing + +---@type LazySpec +return { + "AstroNvim/astroui", + ---@type AstroUIOpts + opts = { + -- change colorscheme + colorscheme = "catppuccin", + -- AstroUI allows you to easily modify highlight groups easily for any and all colorschemes + highlights = { + init = { -- this table overrides highlights in all themes + -- Normal = { bg = "#000000" }, + }, + astrotheme = { -- a table of overrides/changes when applying the astrotheme theme + -- Normal = { bg = "#000000" }, + }, + }, + -- Icons can be configured throughout the interface + icons = { + -- configure the loading of the lsp in the status line + LSPLoading1 = "⠋", + LSPLoading2 = "⠙", + LSPLoading3 = "⠹", + LSPLoading4 = "⠸", + LSPLoading5 = "⠼", + LSPLoading6 = "⠴", + LSPLoading7 = "⠦", + LSPLoading8 = "⠧", + LSPLoading9 = "⠇", + LSPLoading10 = "⠏", + }, + }, +} diff --git a/programs/neovim/user/plugins/mason.lua b/programs/neovim/lua/plugins/mason.lua similarity index 94% rename from programs/neovim/user/plugins/mason.lua rename to programs/neovim/lua/plugins/mason.lua index faa9a79..5a91b71 100644 --- a/programs/neovim/user/plugins/mason.lua +++ b/programs/neovim/lua/plugins/mason.lua @@ -1,4 +1,6 @@ --- customize mason plugins +-- Customize Mason plugins + +---@type LazySpec return { -- use mason-lspconfig to configure LSP installations { diff --git a/programs/neovim/user/plugins/null-ls.lua b/programs/neovim/lua/plugins/none-ls.lua similarity index 61% rename from programs/neovim/user/plugins/null-ls.lua rename to programs/neovim/lua/plugins/none-ls.lua index 9e850fd..2f432dd 100644 --- a/programs/neovim/user/plugins/null-ls.lua +++ b/programs/neovim/lua/plugins/none-ls.lua @@ -1,20 +1,23 @@ +-- Customize None-ls sources + +---@type LazySpec return { - "jose-elias-alvarez/null-ls.nvim", + "nvimtools/none-ls.nvim", opts = function(_, config) -- config variable is the default configuration table for the setup function call local null_ls = require "null-ls" -- Check supported formatters and linters - -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting - -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics + -- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/formatting + -- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics config.sources = { -- Set a formatter -- null_ls.builtins.formatting.stylua, -- null_ls.builtins.formatting.prettier, null_ls.builtins.formatting.nixfmt, null_ls.builtins.formatting.prettier, - null_ls.builtins.formatting.rustfmt, null_ls.builtins.formatting.stylua, } + return config -- return final config table end, } diff --git a/programs/neovim/user/plugins/treesitter.lua b/programs/neovim/lua/plugins/treesitter.lua similarity index 63% rename from programs/neovim/user/plugins/treesitter.lua rename to programs/neovim/lua/plugins/treesitter.lua index 328c962..a3af93a 100644 --- a/programs/neovim/user/plugins/treesitter.lua +++ b/programs/neovim/lua/plugins/treesitter.lua @@ -1,19 +1,11 @@ +-- Customize Treesitter + +---@type LazySpec return { "nvim-treesitter/nvim-treesitter", opts = function(_, opts) -- add more things to the ensure_installed table protecting against community packs modifying it - local utils = require "astronvim.utils" - opts.incremental_selection = { - enable = true, - keymaps = { - init_selection = "", -- Ctrl + Space - node_incremental = "", - scope_incremental = "", -- Alt + Space - node_decremental = "", -- Backspace - }, - } - opts.ignore_install = { "gotmpl" } - opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, { + opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { -- Programming "c", "cmake", diff --git a/programs/neovim/lua/plugins/user.lua b/programs/neovim/lua/plugins/user.lua new file mode 100644 index 0000000..460751a --- /dev/null +++ b/programs/neovim/lua/plugins/user.lua @@ -0,0 +1,81 @@ +-- You can also add or configure plugins by creating files in this `plugins/` folder +-- Here are some examples: + +---@type LazySpec +return { + + -- == Examples of Adding Plugins == + + "andweeb/presence.nvim", + { + "ray-x/lsp_signature.nvim", + event = "BufRead", + config = function() require("lsp_signature").setup() end, + }, + + -- == Examples of Overriding Plugins == + + -- customize alpha options + { + "goolord/alpha-nvim", + opts = function(_, opts) + -- customize the dashboard header + opts.section.header.val = { + "⠀⠀⠀⠀⠀⢀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⣰⠿⡇⢸⡟⡇⠀⠘⡷⠶⢶⣆⠘⣶⠶⠶⠶⣦⣤⣤⣤⣤⣄⣀⣀⣀⡀⠀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⠤⠤⣤⡀⠀⠀", + "⠀⠀⠀⣰⣿⠀⠹⡌⣇⢹⣀⣠⣿⣦⠀⠹⣄⠸⣆⠀⣄⠹⡇⠀⠈⠃⠁⢹⢻⠀⣿⠈⢻⡛⢳⣤⣶⣿⣿⣿⣿⡶⠶⣶⣶⣶⣶⣶⣶⣶⣶⣾⡁⠀⢠⠴⠙⢦⡀", + "⠀⠀⣴⣿⡙⠀⠀⢳⣾⣿⣿⣿⣿⣿⣷⣦⣼⣿⣿⣷⡘⣆⠁⠀⠀⠀⢠⣼⣿⣴⠇⠀⠀⠙⢿⣿⣿⠟⢹⠃⠀⠀⣀⠀⠉⠈⢷⠈⢻⣿⠁⡿⢿⣄⡘⣄⠀⠀⠁", + "⠀⢸⠻⣿⠉⠓⣶⣶⣿⣿⣿⡿⠿⠿⢿⠿⣿⡉⠻⠇⠙⢿⣷⣀⠀⠀⢼⡙⠿⠃⠀⠀⠀⠀⠈⠿⠋⠀⢸⠄⠀⠀⠛⠃⠀⠀⢸⠀⠀⣿⢀⠇⢸⡿⠛⠛⢷⡶⠂", + "⠀⣸⡄⠙⣆⠀⣿⡿⠹⣏⡤⢤⣸⣿⠼⠀⠘⠇⠆⠀⠀⠀⠉⠉⢳⠦⣼⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢳⡀⠀⠀⠀⠀⢀⡞⠀⣰⣿⣾⣀⣾⡅⠀⡞⠉⠙⢆", + "⢀⡿⢿⢦⠹⣿⣿⡇⠀⢉⠀⠈⠁⠀⠀⠀⢠⢃⡗⠀⠀⠀⠀⠀⢻⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠲⢤⣙⣲⣤⣤⣶⣫⠤⠖⠹⠋⠉⠉⠉⠻⣶⣽⣦⣀⡼", + "⠼⣧⣬⣿⡿⣭⠈⠿⣤⡬⠷⠴⠒⠒⠒⠲⠿⠛⠀⠂⠀⠂⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⠛⠉⠉⠉⠁⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠴⠶⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + } + return opts + end, + }, + + -- You can disable default plugins as follows: + { "max397574/better-escape.nvim", enabled = false }, + + -- You can also easily customize additional setup of plugins that is outside of the plugin's setup call + { + "L3MON4D3/LuaSnip", + config = function(plugin, opts) + require "astronvim.plugins.configs.luasnip" (plugin, opts) -- include the default astronvim config that calls the setup call + -- add more custom luasnip configuration such as filetype extend or custom snippets + local luasnip = require "luasnip" + luasnip.filetype_extend("javascript", { "javascriptreact" }) + end, + }, + + { + "windwp/nvim-autopairs", + config = function(plugin, opts) + require "astronvim.plugins.configs.nvim-autopairs" (plugin, opts) -- include the default astronvim config that calls the setup call + -- add more custom autopairs configuration such as custom rules + local npairs = require "nvim-autopairs" + local Rule = require "nvim-autopairs.rule" + local cond = require "nvim-autopairs.conds" + npairs.add_rules( + { + Rule("$", "$", { "tex", "latex" }) + -- don't add a pair if the next character is % + :with_pair(cond.not_after_regex "%%") + -- don't add a pair if the previous character is xxx + :with_pair( + cond.not_before_regex("xxx", 3) + ) + -- don't move right when repeat character + :with_move(cond.none()) + -- don't delete if the next character is xx + :with_del(cond.not_after_regex "xx") + -- disable adding a newline when you press + :with_cr(cond.none()), + }, + -- disable for .vim files, but it work for another filetypes + Rule("a", "a", "-vim") + ) + end, + }, +} diff --git a/programs/neovim/lua/polish.lua b/programs/neovim/lua/polish.lua new file mode 100644 index 0000000..b19c743 --- /dev/null +++ b/programs/neovim/lua/polish.lua @@ -0,0 +1,39 @@ +-- This will run last in the setup process and is a good place to configure +-- things like custom filetypes. This just pure lua so anything that doesn't +-- fit in the normal config locations above can go here + +-- Set up custom filetypes +vim.filetype.add { + extension = { + foo = "fooscript", + }, + filename = { + ["Foofile"] = "fooscript", + }, + pattern = { + ["~/%.config/foo/.*"] = "fooscript", + }, +} + + +local dap = require "dap" + +dap.adapters.codelldb = { + port = "${port}", + type = "server", + executable = { + command = "codelldb", + args = { "--port", "${port}" }, + }, +} + +dap.configurations.rust = { + { + name = "Launch file", + type = "codelldb", + request = "launch", + program = function() return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") end, + cwd = "${workspaceFolder}", + stopOnEntry = false, + }, +} diff --git a/programs/neovim/user/.luacheckrc b/programs/neovim/user/.luacheckrc deleted file mode 100644 index d1113eb..0000000 --- a/programs/neovim/user/.luacheckrc +++ /dev/null @@ -1,18 +0,0 @@ --- Global objects -globals = { - "astronvim", - "astronvim_installation", - "vim", - "bit", -} - --- Rerun tests only if their modification time changed -cache = true - --- Don't report unused self arguments of methods -self = false - -ignore = { - "631", -- max_line_length - "212/_.*", -- unused argument, for vars with "_" prefix -} diff --git a/programs/neovim/user/.neoconf.json b/programs/neovim/user/.neoconf.json deleted file mode 100644 index 2d7a81f..0000000 --- a/programs/neovim/user/.neoconf.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "neodev": { - "library": { - "enabled": true, - "plugins": true - } - }, - "neoconf": { - "plugins": { - "lua_ls": { - "enabled": true - } - } - }, - "lspconfig": { - "lua_ls": { - "Lua.format.enable": false - } - } -} diff --git a/programs/neovim/user/.stylua.toml b/programs/neovim/user/.stylua.toml deleted file mode 100644 index bfcffff..0000000 --- a/programs/neovim/user/.stylua.toml +++ /dev/null @@ -1,7 +0,0 @@ -column_width = 120 -line_endings = "Unix" -indent_type = "Spaces" -indent_width = 2 -quote_style = "AutoPreferDouble" -call_parentheses = "None" -collapse_simple_statement = "Always" diff --git a/programs/neovim/user/README.md b/programs/neovim/user/README.md deleted file mode 100644 index e6c589a..0000000 --- a/programs/neovim/user/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# AstroNvim User Configuration Example - -A user configuration template for [AstroNvim](https://github.com/AstroNvim/AstroNvim) - -## 🛠️ Installation - -#### Make a backup of your current nvim and shared folder - -```shell -mv ~/.config/nvim ~/.config/nvim.bak -mv ~/.local/share/nvim ~/.local/share/nvim.bak -``` - -#### Clone AstroNvim - -```shell -git clone https://github.com/AstroNvim/AstroNvim ~/.config/nvim -``` - -#### Create a new user repository from this template - -Press the "Use this template" button above to create a new repository to store your user configuration. - -You can also just clone this repository directly if you do not want to track your user configuration in GitHub. - -#### Clone the repository - -```shell -git clone https://github.com// ~/.config/nvim/lua/user -``` - -#### Start Neovim - -```shell -nvim -``` diff --git a/programs/neovim/user/highlights/duskfox.lua b/programs/neovim/user/highlights/duskfox.lua deleted file mode 100644 index 31318ee..0000000 --- a/programs/neovim/user/highlights/duskfox.lua +++ /dev/null @@ -1,3 +0,0 @@ -return { -- a table of overrides/changes to the duskfox theme - Normal = { bg = "#000000" }, -} diff --git a/programs/neovim/user/highlights/init.lua b/programs/neovim/user/highlights/init.lua deleted file mode 100644 index f7e055b..0000000 --- a/programs/neovim/user/highlights/init.lua +++ /dev/null @@ -1,3 +0,0 @@ -return { -- this table overrides highlights in all themes - -- Normal = { bg = "#000000" }, -} diff --git a/programs/neovim/user/init.lua b/programs/neovim/user/init.lua deleted file mode 100644 index 1c3ec03..0000000 --- a/programs/neovim/user/init.lua +++ /dev/null @@ -1,125 +0,0 @@ -return { - -- Configure AstroNvim updates - updater = { - remote = "origin", -- remote to use - channel = "stable", -- "stable" or "nightly" - version = "latest", -- "latest", tag name, or regex search like "v1.*" to only do updates before v2 (STABLE ONLY) - branch = "nightly", -- branch name (NIGHTLY ONLY) - commit = nil, -- commit hash (NIGHTLY ONLY) - pin_plugins = nil, -- nil, true, false (nil will pin plugins on stable only) - skip_prompts = false, -- skip prompts about breaking changes - show_changelog = true, -- show the changelog after performing an update - auto_quit = false, -- automatically quit the current session after a successful update - remotes = { -- easily add new remotes to track - -- ["remote_name"] = "https://remote_url.come/repo.git", -- full remote url - -- ["remote2"] = "github_user/repo", -- GitHub user/repo shortcut, - -- ["remote3"] = "github_user", -- GitHub user assume AstroNvim fork - }, - }, - - -- Set colorscheme to use - colorscheme = "catppuccin", - - -- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on - diagnostics = { - virtual_text = true, - underline = true, - }, - - lsp = { - -- customize lsp formatting options - formatting = { - -- control auto formatting on save - format_on_save = { - enabled = true, -- enable or disable format on save globally - allow_filetypes = { -- enable format on save for specified filetypes only - -- "go", - "javascript", - "jsx", - "lua", - "nix", - "rust", - "tsx", - "typescript", - }, - ignore_filetypes = { -- disable format on save for specified filetypes - -- "python", - }, - }, - disabled = { -- disable formatting capabilities for the listed language servers - -- disable lua_ls formatting capability if you want to use StyLua to format your lua code - -- "lua_ls", - }, - timeout_ms = 1000, -- default format timeout - -- filter = function(client) -- fully override the default formatting function - -- return true - -- end - }, - -- enable servers that you already have installed without mason - servers = { - "clangd", - "cmake", - "cssls", - "html", - "jsonls", - "lua_ls", - "marksman", - "nil_ls", - "rust_analyzer", - "taplo", - "tsserver", - "volar", - "yamlls", - }, - }, - - -- Configure require("lazy").setup() options - lazy = { - defaults = { lazy = true }, - performance = { - rtp = { - -- customize default disabled vim plugins - disabled_plugins = { "tohtml", "gzip", "matchit", "zipPlugin", "netrwPlugin", "tarPlugin" }, - }, - }, - }, - - -- This function is run last and is a good place to configuring - -- augroups/autocommands and custom filetypes also this just pure lua so - -- anything that doesn't fit in the normal config locations above can go here - polish = function() - -- Set up custom filetypes - -- vim.filetype.add { - -- extension = { - -- foo = "fooscript", - -- }, - -- filename = { - -- ["Foofile"] = "fooscript", - -- }, - -- pattern = { - -- ["~/%.config/foo/.*"] = "fooscript", - -- }, - -- } - local dap = require "dap" - - dap.adapters.codelldb = { - port = "${port}", - type = "server", - executable = { - command = "codelldb", - args = { "--port", "${port}" }, - }, - } - - dap.configurations.rust = { - { - name = "Launch file", - type = "codelldb", - request = "launch", - program = function() return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") end, - cwd = "${workspaceFolder}", - stopOnEntry = false, - }, - } - end, -} diff --git a/programs/neovim/user/mappings.lua b/programs/neovim/user/mappings.lua deleted file mode 100644 index 8ac5c8f..0000000 --- a/programs/neovim/user/mappings.lua +++ /dev/null @@ -1,40 +0,0 @@ --- Mapping data with "desc" stored directly by vim.keymap.set(). --- --- Please use this mappings table to set keyboard mapping since this is the --- lower level configuration and more robust one. (which-key will --- automatically pick-up stored data by this setting.) -return { - -- first key is the mode - n = { - -- second key is the lefthand side of the map - - -- navigate buffer tabs with `H` and `L` - -- L = { - -- function() require("astronvim.utils.buffer").nav(vim.v.count > 0 and vim.v.count or 1) end, - -- desc = "Next buffer", - -- }, - -- H = { - -- function() require("astronvim.utils.buffer").nav(-(vim.v.count > 0 and vim.v.count or 1)) end, - -- desc = "Previous buffer", - -- }, - - -- mappings seen under group name "Buffer" - ["bD"] = { - function() - require("astronvim.utils.status").heirline.buffer_picker( - function(bufnr) require("astronvim.utils.buffer").close(bufnr) end - ) - end, - desc = "Pick to close", - }, - -- tables with the `name` key will be registered with which-key if it's installed - -- this is useful for naming menus - ["b"] = { name = "Buffers" }, - -- quick save - -- [""] = { ":w!", desc = "Save File" }, -- change description but the same command - }, - t = { - -- setting a mapping to false will disable it - -- [""] = false, - }, -} diff --git a/programs/neovim/user/options.lua b/programs/neovim/user/options.lua deleted file mode 100644 index 37b0b40..0000000 --- a/programs/neovim/user/options.lua +++ /dev/null @@ -1,31 +0,0 @@ --- set vim options here (vim.. = value) -return { - opt = { - -- set to true or false etc. - relativenumber = true, -- sets vim.opt.relativenumber - number = true, -- sets vim.opt.number - spell = false, -- sets vim.opt.spell - signcolumn = "auto", -- sets vim.opt.signcolumn to auto - wrap = false, -- sets vim.opt.wrap - grepprg = "rg --vimgrep", -- use ripgrep on grep actions - }, - g = { - mapleader = " ", -- sets vim.g.mapleader - autoformat_enabled = true, -- enable or disable auto formatting at start (lsp.formatting.format_on_save must be enabled) - cmp_enabled = true, -- enable completion at start - autopairs_enabled = true, -- enable autopairs at start - diagnostics_mode = 3, -- set the visibility of diagnostics in the UI (0=off, 1=only show in status line, 2=virtual text off, 3=all on) - icons_enabled = true, -- disable icons in the UI (disable if no nerd font is available, requires :PackerSync after changing) - ui_notifications_enabled = true, -- disable notifications when toggling UI elements - resession_enabled = false, -- enable experimental resession.nvim session management (will be default in AstroNvim v4) - }, -} --- If you need more control, you can use the function()...end notation --- return function(local_vim) --- local_vim.opt.relativenumber = true --- local_vim.g.mapleader = " " --- local_vim.opt.whichwrap = vim.opt.whichwrap - { 'b', 's' } -- removing option from list --- local_vim.opt.shortmess = vim.opt.shortmess + { I = true } -- add to option list --- --- return local_vim --- end diff --git a/programs/neovim/user/plugins/core.lua b/programs/neovim/user/plugins/core.lua deleted file mode 100644 index b32ff09..0000000 --- a/programs/neovim/user/plugins/core.lua +++ /dev/null @@ -1,74 +0,0 @@ -return { - -- customize alpha options - { - "goolord/alpha-nvim", - opts = function(_, opts) - -- customize the dashboard header - opts.section.header.val = { - "⠀⠀⠀⠀⠀⢀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", - "⠀⠀⠀⠀⣰⠿⡇⢸⡟⡇⠀⠘⡷⠶⢶⣆⠘⣶⠶⠶⠶⣦⣤⣤⣤⣤⣄⣀⣀⣀⡀⠀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⠤⠤⣤⡀⠀⠀", - "⠀⠀⠀⣰⣿⠀⠹⡌⣇⢹⣀⣠⣿⣦⠀⠹⣄⠸⣆⠀⣄⠹⡇⠀⠈⠃⠁⢹⢻⠀⣿⠈⢻⡛⢳⣤⣶⣿⣿⣿⣿⡶⠶⣶⣶⣶⣶⣶⣶⣶⣶⣾⡁⠀⢠⠴⠙⢦⡀", - "⠀⠀⣴⣿⡙⠀⠀⢳⣾⣿⣿⣿⣿⣿⣷⣦⣼⣿⣿⣷⡘⣆⠁⠀⠀⠀⢠⣼⣿⣴⠇⠀⠀⠙⢿⣿⣿⠟⢹⠃⠀⠀⣀⠀⠉⠈⢷⠈⢻⣿⠁⡿⢿⣄⡘⣄⠀⠀⠁", - "⠀⢸⠻⣿⠉⠓⣶⣶⣿⣿⣿⡿⠿⠿⢿⠿⣿⡉⠻⠇⠙⢿⣷⣀⠀⠀⢼⡙⠿⠃⠀⠀⠀⠀⠈⠿⠋⠀⢸⠄⠀⠀⠛⠃⠀⠀⢸⠀⠀⣿⢀⠇⢸⡿⠛⠛⢷⡶⠂", - "⠀⣸⡄⠙⣆⠀⣿⡿⠹⣏⡤⢤⣸⣿⠼⠀⠘⠇⠆⠀⠀⠀⠉⠉⢳⠦⣼⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢳⡀⠀⠀⠀⠀⢀⡞⠀⣰⣿⣾⣀⣾⡅⠀⡞⠉⠙⢆", - "⢀⡿⢿⢦⠹⣿⣿⡇⠀⢉⠀⠈⠁⠀⠀⠀⢠⢃⡗⠀⠀⠀⠀⠀⢻⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠲⢤⣙⣲⣤⣤⣶⣫⠤⠖⠹⠋⠉⠉⠉⠻⣶⣽⣦⣀⡼", - "⠼⣧⣬⣿⡿⣭⠈⠿⣤⡬⠷⠴⠒⠒⠒⠲⠿⠛⠀⠂⠀⠂⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⠛⠉⠉⠉⠁⠀", - "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠴⠶⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", - } - end, - }, - -- You can disable default plugins as follows: - -- { "max397574/better-escape.nvim", enabled = false }, - -- - -- You can also easily customize additional setup of plugins that is outside of the plugin's setup call - -- { - -- "L3MON4D3/LuaSnip", - -- config = function(plugin, opts) - -- require "plugins.configs.luasnip"(plugin, opts) -- include the default astronvim config that calls the setup call - -- -- add more custom luasnip configuration such as filetype extend or custom snippets - -- local luasnip = require "luasnip" - -- luasnip.filetype_extend("javascript", { "javascriptreact" }) - -- end, - -- }, - -- { - -- "windwp/nvim-autopairs", - -- config = function(plugin, opts) - -- require "plugins.configs.nvim-autopairs"(plugin, opts) -- include the default astronvim config that calls the setup call - -- -- add more custom autopairs configuration such as custom rules - -- local npairs = require "nvim-autopairs" - -- local Rule = require "nvim-autopairs.rule" - -- local cond = require "nvim-autopairs.conds" - -- npairs.add_rules( - -- { - -- Rule("$", "$", { "tex", "latex" }) - -- -- don't add a pair if the next character is % - -- :with_pair(cond.not_after_regex "%%") - -- -- don't add a pair if the previous character is xxx - -- :with_pair( - -- cond.not_before_regex("xxx", 3) - -- ) - -- -- don't move right when repeat character - -- :with_move(cond.none()) - -- -- don't delete if the next character is xx - -- :with_del(cond.not_after_regex "xx") - -- -- disable adding a newline when you press - -- :with_cr(cond.none()), - -- }, - -- -- disable for .vim files, but it work for another filetypes - -- Rule("a", "a", "-vim") - -- ) - -- end, - -- }, - -- By adding to the which-key config and using our helper function you can add more which-key registered bindings - -- { - -- "folke/which-key.nvim", - -- config = function(plugin, opts) - -- require "plugins.configs.which-key"(plugin, opts) -- include the default astronvim config that calls the setup call - -- -- Add bindings which show up as group name - -- local wk = require "which-key" - -- wk.register({ - -- b = { name = "Buffer" }, - -- }, { mode = "n", prefix = "" }) - -- end, - -- }, -} diff --git a/programs/neovim/user/plugins/user.lua b/programs/neovim/user/plugins/user.lua deleted file mode 100644 index 22e89de..0000000 --- a/programs/neovim/user/plugins/user.lua +++ /dev/null @@ -1,13 +0,0 @@ -return { - -- You can also add new plugins here as well: - -- Add plugins, the lazy syntax - -- "andweeb/presence.nvim", - -- { - -- "ray-x/lsp_signature.nvim", - -- event = "BufRead", - -- config = function() - -- require("lsp_signature").setup() - -- end, - -- }, - { "folke/flash.nvim", vscode = false }, -} From 72415434c94bc96d5ed4789cb1270601e842099b Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 4 Apr 2024 15:23:19 -0300 Subject: [PATCH 24/53] flake: update --- flake.lock | 47 +++++++++++++++-------------------------------- 1 file changed, 15 insertions(+), 32 deletions(-) diff --git a/flake.lock b/flake.lock index daf62c7..f819787 100644 --- a/flake.lock +++ b/flake.lock @@ -1,21 +1,5 @@ { "nodes": { - "astronvim": { - "flake": false, - "locked": { - "lastModified": 1710957235, - "narHash": "sha256-69DBcOpjDZBMOQGz8obMBFpEBeoSWuXZ4CNAK2GqI+M=", - "owner": "AstroNvim", - "repo": "AstroNvim", - "rev": "0da3fa834137597f13e53196c8c6f7e1425601ea", - "type": "github" - }, - "original": { - "owner": "AstroNvim", - "repo": "AstroNvim", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -23,11 +7,11 @@ ] }, "locked": { - "lastModified": 1711133180, - "narHash": "sha256-WJOahf+6115+GMl3wUfURu8fszuNeJLv9qAWFQl3Vmo=", + "lastModified": 1712212014, + "narHash": "sha256-s+lbaf3nLRn1++/X2eXwY9mYCA/m9l8AvyG8beeOaXE=", "owner": "nix-community", "repo": "home-manager", - "rev": "1c2c5e4cabba4c43504ef0f8cc3f3dfa284e2dbb", + "rev": "7e91f2a0ba4b62b88591279d54f741a13e36245b", "type": "github" }, "original": { @@ -49,11 +33,11 @@ ] }, "locked": { - "lastModified": 1711035742, - "narHash": "sha256-5vvhCSUGG9TA2G1eIRgokuYizhRnZu0ZbcU1MXfHsUE=", + "lastModified": 1711466786, + "narHash": "sha256-sArxGyUBiCA1in+q6t0QqT+ZJiZ1PyBp7cNPKLmREM0=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "6a92473237f430399a417e1c2da9d7fcd4970086", + "rev": "d3876f34779cc03ee51e4aafc0d00a4f187c7544", "type": "github" }, "original": { @@ -75,11 +59,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1711331441, - "narHash": "sha256-Tvgc9hUfNELWl3R2gtCBQ2D7lVIjumzLHs6JiM1RT6g=", + "lastModified": 1712248444, + "narHash": "sha256-ayxuwrzpow3cRoKtCYj3v7GGrDHTbKVDDUxb8wd1cL8=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "356414639fc06ace7045236ec41d673342981057", + "rev": "c4b660a33930a0e60e853b6796c1fd76914b1719", "type": "github" }, "original": { @@ -148,11 +132,11 @@ ] }, "locked": { - "lastModified": 1710960526, - "narHash": "sha256-tt0UgVKWeLQ+tFzvqrm4uAZbzONwdGshpfiLHAQ1P2c=", + "lastModified": 1711250455, + "narHash": "sha256-LSq1ZsTpeD7xsqvlsepDEelWRDtAhqwetp6PusHXJRo=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "a2f39421144d42541c057be235154ce21b76c0f6", + "rev": "b3e430f81f3364c5dd1a3cc9995706a4799eb3fa", "type": "github" }, "original": { @@ -163,11 +147,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1711163522, - "narHash": "sha256-YN/Ciidm+A0fmJPWlHBGvVkcarYWSC+s3NTPk/P+q3c=", + "lastModified": 1712163089, + "narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "44d0940ea560dee511026a53f0e2e2cde489b4d4", + "rev": "fd281bd6b7d3e32ddfa399853946f782553163b5", "type": "github" }, "original": { @@ -179,7 +163,6 @@ }, "root": { "inputs": { - "astronvim": "astronvim", "home-manager": "home-manager", "hyprland": "hyprland", "nixpkgs": "nixpkgs" From ff0f6d4a2312a3508f65d9eb996ec4a86d09e413 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 4 Apr 2024 15:24:04 -0300 Subject: [PATCH 25/53] hm: use element-desktop not element; remove yazi files, breaks the software :( --- home-manager.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/home-manager.nix b/home-manager.nix index 2ee5aea..80bede0 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -70,7 +70,7 @@ # Utilities brightnessctl discord - element + element-desktop firefox pavucontrol pulseaudio @@ -231,9 +231,6 @@ # My utility scripts ".local/share/scripts".source = ./scripts; - - # Yazi's configuration - ".config/yazi".source = ./programs/yazi; }; ## Theming From 76a755bcdf3af02061fd51f3d35b7b8aad01057c Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 4 Apr 2024 15:24:35 -0300 Subject: [PATCH 26/53] chore: nixfmt --- hardware-configuration.nix | 56 ++++++++++++++++-------------------- kernel/zenergy.nix | 13 ++++----- programs/fish/default.nix | 8 ++---- programs/git.nix | 16 +++-------- programs/mangohud.nix | 1 - programs/obs-studio.nix | 25 ++++++++-------- services/caddy.nix | 3 +- services/jellyfin.nix | 3 +- theming/catppuccin-qt5ct.nix | 12 ++------ theming/sddm.nix | 3 +- 10 files changed, 55 insertions(+), 85 deletions(-) diff --git a/hardware-configuration.nix b/hardware-configuration.nix index 7ef132d..a4d134b 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -4,45 +4,38 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = + [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { - device = "/dev/disk/by-uuid/65e4c115-aff0-4c0e-8799-7309a25ecab6"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/65e4c115-aff0-4c0e-8799-7309a25ecab6"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { - device = "/dev/disk/by-uuid/2EFE-3A26"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/2EFE-3A26"; + fsType = "vfat"; + }; - fileSystems."/mnt/ssd" = - { - device = "/dev/disk/by-uuid/f27f2224-d351-46fd-89f5-991de36166ad"; - fsType = "ext4"; - }; + fileSystems."/mnt/ssd" = { + device = "/dev/disk/by-uuid/f27f2224-d351-46fd-89f5-991de36166ad"; + fsType = "ext4"; + }; - fileSystems."/mnt/internal" = - { - device = "/dev/disk/by-uuid/b8541c0d-9146-4388-b217-431f196957cc"; - fsType = "ext4"; - }; + fileSystems."/mnt/internal" = { + device = "/dev/disk/by-uuid/b8541c0d-9146-4388-b217-431f196957cc"; + fsType = "ext4"; + }; - fileSystems."/mnt/media" = - { - device = "/dev/disk/by-uuid/52c17b8b-46c1-4870-b86c-c3b9f4bd4434"; - fsType = "ext4"; - }; + fileSystems."/mnt/media" = { + device = "/dev/disk/by-uuid/52c17b8b-46c1-4870-b86c-c3b9f4bd4434"; + fsType = "ext4"; + }; swapDevices = [ ]; @@ -55,5 +48,6 @@ # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/kernel/zenergy.nix b/kernel/zenergy.nix index d489edd..43865ee 100644 --- a/kernel/zenergy.nix +++ b/kernel/zenergy.nix @@ -1,9 +1,7 @@ { lib, stdenv, fetchFromGitHub, kernel, kmod }: -let - kernelDirectory = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; -in -stdenv.mkDerivation { +let kernelDirectory = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; +in stdenv.mkDerivation { pname = "zenergy"; version = "a3e124477ee8197015481156b90100d49fa3cd84"; @@ -16,9 +14,7 @@ stdenv.mkDerivation { hardeningDisable = [ "format" "pic" ]; - makeFlags = kernel.makeFlags ++ [ - "KDIR=${kernelDirectory}" - ]; + makeFlags = kernel.makeFlags ++ [ "KDIR=${kernelDirectory}" ]; preBuild = '' substituteInPlace Makefile --replace-fail "PWD modules_install" "PWD INSTALL_MOD_PATH=$out modules_install" @@ -33,7 +29,8 @@ stdenv.mkDerivation { outputs = [ "out" ]; meta = with lib; { - description = "Based on AMD_ENERGY driver, but with some jiffies added so non-root users can read it safely."; + description = + "Based on AMD_ENERGY driver, but with some jiffies added so non-root users can read it safely."; homepage = "https://github.com/BoukeHaarsma23/zenergy"; license = licenses.gpl2Only; maintainers = with maintainers; [ wizardlink ]; diff --git a/programs/fish/default.nix b/programs/fish/default.nix index 946bf8f..8ca63ad 100644 --- a/programs/fish/default.nix +++ b/programs/fish/default.nix @@ -28,13 +28,9 @@ zoxide init --cmd cd fish | source ''; - shellAbbrs = { - z = "zoxide"; - }; + shellAbbrs = { z = "zoxide"; }; - shellAliases = { - del = "trash_file"; - }; + shellAliases = { del = "trash_file"; }; functions = { fish_prompt.body = '' diff --git a/programs/git.nix b/programs/git.nix index c7d6e42..30f536b 100644 --- a/programs/git.nix +++ b/programs/git.nix @@ -47,13 +47,9 @@ gpgsign = true; }; - tag = { - gpgsign = true; - }; + tag = { gpgsign = true; }; - difftool = { - prompt = true; - }; + difftool = { prompt = true; }; mergetool = { # https://www.git-scm.com/docs/git-mergetool#Documentation/git-mergetool.txt---no-prompt @@ -79,13 +75,9 @@ signingkey = "A1D3A2B4E14BD7C0445BB749A5767B54367CFBDF"; }; - pull = { - ff = "only"; - }; + pull = { ff = "only"; }; - init = { - defaultBranch = "main"; - }; + init = { defaultBranch = "main"; }; credential = { helper = "/usr/libexec/git-core/git-credential-libsecret"; diff --git a/programs/mangohud.nix b/programs/mangohud.nix index ca9c8a1..a98090b 100644 --- a/programs/mangohud.nix +++ b/programs/mangohud.nix @@ -33,7 +33,6 @@ cpu_stats = true; cpu_temp = true; - # IO Statistics io_read = true; io_stats = true; diff --git a/programs/obs-studio.nix b/programs/obs-studio.nix index 4ffc33d..b232ce9 100644 --- a/programs/obs-studio.nix +++ b/programs/obs-studio.nix @@ -1,17 +1,16 @@ { pkgs, ... }: { - programs.obs-studio = - { - enable = true; - plugins = with pkgs.obs-studio-plugins; [ - input-overlay - # Currently broken due to onnxruntime failing to build. - # obs-backgroundremoval - obs-pipewire-audio-capture - obs-vaapi - obs-vkcapture - wlrobs - ]; - }; + programs.obs-studio = { + enable = true; + plugins = with pkgs.obs-studio-plugins; [ + input-overlay + # Currently broken due to onnxruntime failing to build. + # obs-backgroundremoval + obs-pipewire-audio-capture + obs-vaapi + obs-vkcapture + wlrobs + ]; + }; } diff --git a/services/caddy.nix b/services/caddy.nix index ef9a55c..2d6f8cb 100644 --- a/services/caddy.nix +++ b/services/caddy.nix @@ -1,5 +1,4 @@ -{ ... }: -{ +{ ... }: { services.caddy = { enable = true; diff --git a/services/jellyfin.nix b/services/jellyfin.nix index cb7b5d4..2a694a7 100644 --- a/services/jellyfin.nix +++ b/services/jellyfin.nix @@ -10,7 +10,8 @@ jellyfin-web = pkgs.jellyfin-web.overrideAttrs (oldAttrs: { patches = [ (pkgs.fetchpatch { - url = "https://github.com/jellyfin/jellyfin-web/compare/v${oldAttrs.version}...ConfusedPolarBear:jellyfin-web:intros.diff"; + url = + "https://github.com/jellyfin/jellyfin-web/compare/v${oldAttrs.version}...ConfusedPolarBear:jellyfin-web:intros.diff"; hash = "sha256-qm4N4wMUFc4I53oQJUK1Six0cahVYz3J+FgO2vvSvXM="; }) ]; diff --git a/theming/catppuccin-qt5ct.nix b/theming/catppuccin-qt5ct.nix index a207fb2..51dcd1d 100644 --- a/theming/catppuccin-qt5ct.nix +++ b/theming/catppuccin-qt5ct.nix @@ -1,16 +1,10 @@ -{ fetchFromGitHub -, flavor ? "Mocha" -, lib -, stdenvNoCC -}: +{ fetchFromGitHub, flavor ? "Mocha", lib, stdenvNoCC }: let validFlavors = [ "Frappe" "Latte" "Macchiato" "Mocha" ]; pname = "catppucin-qt5ct"; -in -lib.checkListOfEnum "${pname}: flavors" validFlavors [ flavor ] +in lib.checkListOfEnum "${pname}: flavors" validFlavors [ flavor ] - stdenvNoCC.mkDerivation -{ +stdenvNoCC.mkDerivation { inherit pname; version = "unstable-2023-10-24"; diff --git a/theming/sddm.nix b/theming/sddm.nix index ec16288..1c052ed 100644 --- a/theming/sddm.nix +++ b/theming/sddm.nix @@ -7,8 +7,7 @@ let url = imgLink; sha256 = "sha256-lrQv8VAks86zMzRaF9VEZotp78O9M7/dV8jZNTRb6SY="; }; -in -pkgs.stdenv.mkDerivation { +in pkgs.stdenv.mkDerivation { name = "sddm-theme"; src = pkgs.fetchFromGitHub { owner = "MarianArlt"; From adeb58bc27d4bf15097a9afe85ddf4a5917a6b06 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 4 Apr 2024 15:24:53 -0300 Subject: [PATCH 27/53] yazi: remove configuration files --- programs/yazi/theme.toml | 145 --------------------------------------- programs/yazi/yazi.toml | 9 --- 2 files changed, 154 deletions(-) delete mode 100644 programs/yazi/theme.toml delete mode 100644 programs/yazi/yazi.toml diff --git a/programs/yazi/theme.toml b/programs/yazi/theme.toml deleted file mode 100644 index 6c959c5..0000000 --- a/programs/yazi/theme.toml +++ /dev/null @@ -1,145 +0,0 @@ -# vim:fileencoding=utf-8:foldmethod=marker - -# : Manager {{{ - -[manager] -cwd = { fg = "#81c8be" } - -# Hovered -hovered = { fg = "#303446", bg = "#8caaee" } -preview_hovered = { underline = true } - -# Find -find_keyword = { fg = "#e5c890", italic = true } -find_position = { fg = "#f4b8e4", bg = "reset", italic = true } - -# Marker -marker_selected = { fg = "#a6d189", bg = "#a6d189" } -marker_copied = { fg = "#e5c890", bg = "#e5c890" } -marker_cut = { fg = "#e78284", bg = "#e78284" } - -# Tab -tab_active = { fg = "#303446", bg = "#8caaee" } -tab_inactive = { fg = "#c6d0f5", bg = "#51576d" } -tab_width = 1 - -# Border -border_symbol = "│" -border_style = { fg = "#838ba7" } - -# Highlighting -syntect_theme = "~/.config/yazi/Catppuccin-frappe.tmTheme" - -# : }}} - - -# : Status {{{ - -[status] -separator_open = "" -separator_close = "" -separator_style = { fg = "#51576d", bg = "#51576d" } - -# Mode -mode_normal = { fg = "#303446", bg = "#8caaee", bold = true } -mode_select = { fg = "#303446", bg = "#a6d189", bold = true } -mode_unset = { fg = "#303446", bg = "#eebebe", bold = true } - -# Progress -progress_label = { fg = "#ffffff", bold = true } -progress_normal = { fg = "#8caaee", bg = "#51576d" } -progress_error = { fg = "#e78284", bg = "#51576d" } - -# Permissions -permissions_t = { fg = "#8caaee" } -permissions_r = { fg = "#e5c890" } -permissions_w = { fg = "#e78284" } -permissions_x = { fg = "#a6d189" } -permissions_s = { fg = "#838ba7" } - -# : }}} - - -# : Input {{{ - -[input] -border = { fg = "#8caaee" } -title = {} -value = {} -selected = { reversed = true } - -# : }}} - - -# : Select {{{ - -[select] -border = { fg = "#8caaee" } -active = { fg = "#f4b8e4" } -inactive = {} - -# : }}} - - -# : Tasks {{{ - -[tasks] -border = { fg = "#8caaee" } -title = {} -hovered = { underline = true } - -# : }}} - - -# : Which {{{ - -[which] -mask = { bg = "#414559" } -cand = { fg = "#81c8be" } -rest = { fg = "#949cbb" } -desc = { fg = "#f4b8e4" } -separator = "  " -separator_style = { fg = "#626880" } - -# : }}} - - -# : Help {{{ - -[help] -on = { fg = "#f4b8e4" } -exec = { fg = "#81c8be" } -desc = { fg = "#949cbb" } -hovered = { bg = "#626880", bold = true } -footer = { fg = "#51576d", bg = "#c6d0f5" } - -# : }}} - - -# : File-specific styles {{{ - -[filetype] - -rules = [ - # Images - { mime = "image/*", fg = "#81c8be" }, - - # Videos - { mime = "video/*", fg = "#e5c890" }, - { mime = "audio/*", fg = "#e5c890" }, - - # Archives - { mime = "application/zip", fg = "#f4b8e4" }, - { mime = "application/gzip", fg = "#f4b8e4" }, - { mime = "application/x-tar", fg = "#f4b8e4" }, - { mime = "application/x-bzip", fg = "#f4b8e4" }, - { mime = "application/x-bzip2", fg = "#f4b8e4" }, - { mime = "application/x-7z-compressed", fg = "#f4b8e4" }, - { mime = "application/x-rar", fg = "#f4b8e4" }, - - # Fallback - { name = "*", fg = "#c6d0f5" }, - { name = "*/", fg = "#8caaee" } -] - -# : }}} diff --git a/programs/yazi/yazi.toml b/programs/yazi/yazi.toml deleted file mode 100644 index 175a0f6..0000000 --- a/programs/yazi/yazi.toml +++ /dev/null @@ -1,9 +0,0 @@ -[opener] -video = [ - { exec = 'vlc "$1"', desc = "Open in VLC", orphan = true } -] - -[open] -rules = [ - { mime = "video/*", use = "video" } -] From a68540f1d9200e8689092e5f6cace773a9fd000e Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Fri, 5 Apr 2024 16:59:49 -0300 Subject: [PATCH 28/53] neovim: add eslint to lsp servers --- programs/neovim/lua/plugins/astrolsp.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/programs/neovim/lua/plugins/astrolsp.lua b/programs/neovim/lua/plugins/astrolsp.lua index a9b6680..8d46b40 100644 --- a/programs/neovim/lua/plugins/astrolsp.lua +++ b/programs/neovim/lua/plugins/astrolsp.lua @@ -10,16 +10,16 @@ return { opts = { -- Configuration table of features provided by AstroLSP features = { - autoformat = true, -- enable or disable auto formatting on start - codelens = true, -- enable/disable codelens refresh on start - inlay_hints = false, -- enable/disable inlay hints on start + autoformat = true, -- enable or disable auto formatting on start + codelens = true, -- enable/disable codelens refresh on start + inlay_hints = false, -- enable/disable inlay hints on start semantic_tokens = true, -- enable/disable semantic token highlighting }, -- customize lsp formatting options formatting = { -- control auto formatting on save format_on_save = { - enabled = true, -- enable or disable format on save globally + enabled = true, -- enable or disable format on save globally allow_filetypes = { -- enable format on save for specified filetypes only -- "go", "javascript", @@ -49,6 +49,7 @@ return { "clangd", "cmake", "cssls", + "eslint", "html", "jsonls", "lua_ls", From 52df27656557da2a626a41b5d0b44d9d509eb875 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Fri, 5 Apr 2024 17:00:14 -0300 Subject: [PATCH 29/53] hyprland: use swww-daemon instead of swww init --- scripts/hyprland/start_services.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/hyprland/start_services.sh b/scripts/hyprland/start_services.sh index d044e5e..af7e4e5 100755 --- a/scripts/hyprland/start_services.sh +++ b/scripts/hyprland/start_services.sh @@ -40,7 +40,7 @@ function load_wallpapers() { } if ! swww query; then - swww init & + swww-daemon & fi load_wallpapers & From 295602c99e0eb17a9d6f6f3209924ec6f56727ef Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 11 Apr 2024 20:00:24 -0300 Subject: [PATCH 30/53] hyprland: stop using fcitx5 --- programs/hyprland/default.nix | 6 +++--- programs/waybar.nix | 19 +++++++++++++++++-- scripts/hyprland/start_services.sh | 5 ----- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/programs/hyprland/default.nix b/programs/hyprland/default.nix index da62b90..3cd889c 100644 --- a/programs/hyprland/default.nix +++ b/programs/hyprland/default.nix @@ -99,10 +99,10 @@ # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { - kb_layout = - kb_variant = + kb_layout = us,br,jp + kb_variant = ,,kana86 kb_model = - kb_options = + kb_options = grp:alts_toggle kb_rules = follow_mouse = 1 diff --git a/programs/waybar.nix b/programs/waybar.nix index bfae1a2..14cb554 100644 --- a/programs/waybar.nix +++ b/programs/waybar.nix @@ -10,8 +10,15 @@ modules-left = [ "hyprland/workspaces" ]; modules-center = [ "clock" ]; - modules-right = - [ "network" "memory" "cpu" "temperature" "battery" "tray" ]; + modules-right = [ + "network" + "memory" + "cpu" + "temperature" + "battery" + "hyprland/language" + "tray" + ]; "hyprland/workspaces" = { format = "{icon}"; @@ -107,6 +114,14 @@ tooltip = false; }; + "hyprland/language" = { + format = " {}"; + format-en = "EN/US"; + format-pt-br = "PT/BR"; + #"on-click" = "hyprctl switchxkblayout www.hfd.cn-monsgeek-keyboard-1 next"; + tooltip = false; + }; + tray = { icon-size = 18; spacing = 10; diff --git a/scripts/hyprland/start_services.sh b/scripts/hyprland/start_services.sh index af7e4e5..ccf927c 100755 --- a/scripts/hyprland/start_services.sh +++ b/scripts/hyprland/start_services.sh @@ -20,11 +20,6 @@ waybar & # xwaylandvideobridge & -# -# Start fcitx5 -# -fcitx5 & - # ## Start wallpaper daemon and set one. # From 1ed026afd890b4f2ff7aef865c20a40f754cc501 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 11 Apr 2024 20:00:44 -0300 Subject: [PATCH 31/53] adguardhome: init --- nixos.nix | 1 + services/adguardhome.nix | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 services/adguardhome.nix diff --git a/nixos.nix b/nixos.nix index 9b6a3c7..e538616 100644 --- a/nixos.nix +++ b/nixos.nix @@ -13,6 +13,7 @@ # Include the results of the hardware scan. ./hardware-configuration.nix # Include service configuration + ./services/adguardhome.nix ./services/caddy.nix ./services/jellyfin.nix ]; diff --git a/services/adguardhome.nix b/services/adguardhome.nix new file mode 100644 index 0000000..4cf7564 --- /dev/null +++ b/services/adguardhome.nix @@ -0,0 +1,5 @@ +{ ... }: + +{ + services.adguardhome = { enable = true; }; +} From bb7282070eafcc9a8915db9c86cf757b15fea1bb Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 11 Apr 2024 20:01:04 -0300 Subject: [PATCH 32/53] nixos: use xanmod again --- nixos.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos.nix b/nixos.nix index e538616..ebc7770 100644 --- a/nixos.nix +++ b/nixos.nix @@ -44,7 +44,7 @@ ## # Kernel - boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; # Add AMD drivers. boot.initrd.kernelModules = [ "amdgpu" ]; @@ -52,7 +52,7 @@ # TODO: FIX IT BEING BEING OVERWRITTEN boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback - (pkgs.callPackage ./kernel/zenergy.nix { kernel = pkgs.linux_latest; }) + (pkgs.callPackage ./kernel/zenergy.nix { kernel = pkgs.linux_xanmod_latest; }) ]; # Bootloader. From 4c615c9c99902966cede0fbad1cb62c6979fadb2 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 11 Apr 2024 20:01:24 -0300 Subject: [PATCH 33/53] chore: leftover from fcitx5 --- nixos.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/nixos.nix b/nixos.nix index ebc7770..5d997a3 100644 --- a/nixos.nix +++ b/nixos.nix @@ -154,10 +154,6 @@ LC_TIME = "en_GB.UTF-8"; }; - inputMethod = { - enabled = "fcitx5"; - fcitx5.addons = [ pkgs.fcitx5-mozc pkgs.fcitx5-gtk ]; - }; }; # Enable CUPS to print documents. From a3dea1271a968872f9f70e02d4de3bd642d60488 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 11 Apr 2024 20:01:59 -0300 Subject: [PATCH 34/53] vesktop: use screenshare patch --- home-manager.nix | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/home-manager.nix b/home-manager.nix index 80bede0..f3bb534 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -76,7 +76,46 @@ pulseaudio qbittorrent tigervnc - vesktop + (vesktop.overrideAttrs (prev: { + src = pkgs.fetchFromGitHub { + owner = "kaitlynkittyy"; + repo = "Vesktop"; + rev = "006f4e96dea21fee018e446e84a19a92ddabbd1e"; + hash = "sha256-9kCK8Pi97m/W5alEUZPbjOJxSpYyhw8zqhtCh/2ccf8="; + }; + + installPhase = + let + # this is mainly required for venmic + libPath = lib.makeLibraryPath (with pkgs; [ + libpulseaudio + libnotify + pipewire + stdenv.cc.cc.lib + libva + ]); + in + '' + runHook preInstall + + mkdir -p $out/opt/Vesktop/resources + cp dist/linux-*unpacked/resources/app.asar $out/opt/Vesktop/resources + + pushd build + ${pkgs.libicns}/bin/icns2png -x icon.icns + for file in icon_*x32.png; do + file_suffix=''${file//icon_} + install -Dm0644 $file $out/share/icons/hicolor/''${file_suffix//x32.png}/apps/vesktop.png + done + + makeWrapper ${pkgs.electron}/bin/electron $out/bin/vesktop \ + --prefix LD_LIBRARY_PATH : ${libPath} \ + --add-flags $out/opt/Vesktop/resources/app.asar \ + --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" + + runHook postInstall + ''; + })) vlc yt-dlp zathura From 812692731cf712fd2f27d3a57bfc630ceaec8386 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 11 Apr 2024 20:02:20 -0300 Subject: [PATCH 35/53] hyprland: use environment variables from home-manager --- home-manager.nix | 2 ++ programs/hyprland/default.nix | 11 +++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/home-manager.nix b/home-manager.nix index f3bb534..5b7a0ff 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -44,6 +44,8 @@ home.sessionVariables = { EDITOR = "nvim"; NIXOS_OZONE_WL = "1"; + QT_QPA_PLATFORM = "wayland"; + XCURSOR_SIZE = 36; }; ## diff --git a/programs/hyprland/default.nix b/programs/hyprland/default.nix index 3cd889c..6bd1fcb 100644 --- a/programs/hyprland/default.nix +++ b/programs/hyprland/default.nix @@ -83,20 +83,15 @@ # See https://wiki.hyprland.org/Configuring/Keywords/ for more + # Inject home-manager session variables + exec-once = /etc/profiles/per-user/wizardlink/etc/profile.d/hm-session-vars.sh + # Execute your favorite apps at launch exec-once = ~/.local/share/scripts/hyprland/start_services.sh # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf - # Some default env vars. - env = XCURSOR_SIZE,36 - env = QT_QPA_PLATFORM,wayland - env = QT_IM_MODULE,fcitx - env = GTK_IM_MODULE,fcitx - env = SDL_IM_MODULE,fcitx - env = XMODIFIERS,@im=fcitx - # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { kb_layout = us,br,jp From fd48cedcc19897b9be44cbb530a4ad945423e0be Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 11 Apr 2024 20:02:33 -0300 Subject: [PATCH 36/53] neovim: use nixpkgs-fmt instead of nixfmt --- programs/neovim/default.nix | 2 +- programs/neovim/lua/plugins/none-ls.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/programs/neovim/default.nix b/programs/neovim/default.nix index 2ec5339..d07bf62 100644 --- a/programs/neovim/default.nix +++ b/programs/neovim/default.nix @@ -33,7 +33,7 @@ # Nix nil - nixfmt + nixpkgs-fmt # TypeScript nodePackages.typescript-language-server diff --git a/programs/neovim/lua/plugins/none-ls.lua b/programs/neovim/lua/plugins/none-ls.lua index 2f432dd..2bf5082 100644 --- a/programs/neovim/lua/plugins/none-ls.lua +++ b/programs/neovim/lua/plugins/none-ls.lua @@ -5,7 +5,7 @@ return { "nvimtools/none-ls.nvim", opts = function(_, config) -- config variable is the default configuration table for the setup function call - local null_ls = require "null-ls" + local null_ls = require("null-ls") -- Check supported formatters and linters -- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/formatting @@ -14,7 +14,7 @@ return { -- Set a formatter -- null_ls.builtins.formatting.stylua, -- null_ls.builtins.formatting.prettier, - null_ls.builtins.formatting.nixfmt, + null_ls.builtins.formatting.nixpkgs_fmt, null_ls.builtins.formatting.prettier, null_ls.builtins.formatting.stylua, } From 0085967b846dbb9b6e11e32189c9da594f785470 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 11 Apr 2024 20:02:48 -0300 Subject: [PATCH 37/53] neovim: remove presence.nvim and other default configuration --- programs/neovim/lua/plugins/user.lua | 60 +++------------------------- 1 file changed, 6 insertions(+), 54 deletions(-) diff --git a/programs/neovim/lua/plugins/user.lua b/programs/neovim/lua/plugins/user.lua index 460751a..e3df0f5 100644 --- a/programs/neovim/lua/plugins/user.lua +++ b/programs/neovim/lua/plugins/user.lua @@ -4,16 +4,12 @@ ---@type LazySpec return { - -- == Examples of Adding Plugins == - - "andweeb/presence.nvim", - { - "ray-x/lsp_signature.nvim", - event = "BufRead", - config = function() require("lsp_signature").setup() end, - }, - - -- == Examples of Overriding Plugins == + -- "andweeb/presence.nvim", + -- { + -- "ray-x/lsp_signature.nvim", + -- event = "BufRead", + -- config = function() require("lsp_signature").setup() end, + -- }, -- customize alpha options { @@ -34,48 +30,4 @@ return { return opts end, }, - - -- You can disable default plugins as follows: - { "max397574/better-escape.nvim", enabled = false }, - - -- You can also easily customize additional setup of plugins that is outside of the plugin's setup call - { - "L3MON4D3/LuaSnip", - config = function(plugin, opts) - require "astronvim.plugins.configs.luasnip" (plugin, opts) -- include the default astronvim config that calls the setup call - -- add more custom luasnip configuration such as filetype extend or custom snippets - local luasnip = require "luasnip" - luasnip.filetype_extend("javascript", { "javascriptreact" }) - end, - }, - - { - "windwp/nvim-autopairs", - config = function(plugin, opts) - require "astronvim.plugins.configs.nvim-autopairs" (plugin, opts) -- include the default astronvim config that calls the setup call - -- add more custom autopairs configuration such as custom rules - local npairs = require "nvim-autopairs" - local Rule = require "nvim-autopairs.rule" - local cond = require "nvim-autopairs.conds" - npairs.add_rules( - { - Rule("$", "$", { "tex", "latex" }) - -- don't add a pair if the next character is % - :with_pair(cond.not_after_regex "%%") - -- don't add a pair if the previous character is xxx - :with_pair( - cond.not_before_regex("xxx", 3) - ) - -- don't move right when repeat character - :with_move(cond.none()) - -- don't delete if the next character is xx - :with_del(cond.not_after_regex "xx") - -- disable adding a newline when you press - :with_cr(cond.none()), - }, - -- disable for .vim files, but it work for another filetypes - Rule("a", "a", "-vim") - ) - end, - }, } From 66a3e238402a9a06346e97cf136a56ca480c7ec9 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 11 Apr 2024 20:02:59 -0300 Subject: [PATCH 38/53] chore: formatting chore: formatting 2 --- flake.nix | 36 +++++++++++++++++++----------------- theming/catppuccin-qt5ct.nix | 6 ++++-- theming/sddm.nix | 3 ++- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/flake.nix b/flake.nix index f335df4..496fd32 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "NixOS System Flake"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small"; home-manager = { url = "github:nix-community/home-manager"; @@ -18,25 +18,27 @@ outputs = { self, home-manager, hyprland, nixpkgs, ... }@inputs: let system = "x86_64-linux"; in { - nixosConfigurations."nixos" = let - specialArgs = inputs; - modules = [ - ./nixos.nix + nixosConfigurations."nixos" = + let + specialArgs = inputs; + modules = [ + ./nixos.nix - hyprland.nixosModules.default - { programs.hyprland.enable = true; } + hyprland.nixosModules.default + { programs.hyprland.enable = true; } - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = inputs; - home-manager.users.wizardlink = import ./home-manager.nix; - } - ]; - in nixpkgs.lib.nixosSystem { inherit system specialArgs modules; }; + home-manager.extraSpecialArgs = inputs; + home-manager.users.wizardlink = import ./home-manager.nix; + } + ]; + in + nixpkgs.lib.nixosSystem { inherit system specialArgs modules; }; - formatter."${system}" = nixpkgs.legacyPackages.${system}.nixfmt; + formatter."${system}" = nixpkgs.legacyPackages.${system}.nixpkgs-fmt; }; } diff --git a/theming/catppuccin-qt5ct.nix b/theming/catppuccin-qt5ct.nix index 51dcd1d..29932d2 100644 --- a/theming/catppuccin-qt5ct.nix +++ b/theming/catppuccin-qt5ct.nix @@ -2,9 +2,11 @@ let validFlavors = [ "Frappe" "Latte" "Macchiato" "Mocha" ]; pname = "catppucin-qt5ct"; -in lib.checkListOfEnum "${pname}: flavors" validFlavors [ flavor ] +in +lib.checkListOfEnum "${pname}: flavors" validFlavors [ flavor ] -stdenvNoCC.mkDerivation { + stdenvNoCC.mkDerivation +{ inherit pname; version = "unstable-2023-10-24"; diff --git a/theming/sddm.nix b/theming/sddm.nix index 1c052ed..ec16288 100644 --- a/theming/sddm.nix +++ b/theming/sddm.nix @@ -7,7 +7,8 @@ let url = imgLink; sha256 = "sha256-lrQv8VAks86zMzRaF9VEZotp78O9M7/dV8jZNTRb6SY="; }; -in pkgs.stdenv.mkDerivation { +in +pkgs.stdenv.mkDerivation { name = "sddm-theme"; src = pkgs.fetchFromGitHub { owner = "MarianArlt"; From 9412913b2f53dc07f61185f4e709b187b5971a10 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 11 Apr 2024 20:03:47 -0300 Subject: [PATCH 39/53] hm: remove vkbasalt and use wayland wine --- home-manager.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/home-manager.nix b/home-manager.nix index 5b7a0ff..221edbc 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -136,8 +136,7 @@ dolphin-emu path-of-building protontricks - vkbasalt - winePackages.stableFull + winePackages.waylandFull winetricks xonotic From 95e2571160d58b6f2509ba1dd613836c39d2af71 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 11 Apr 2024 20:04:10 -0300 Subject: [PATCH 40/53] hm: general formatting and tiny doc --- home-manager.nix | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/home-manager.nix b/home-manager.nix index 221edbc..a15b4d1 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -167,21 +167,24 @@ qt6Packages.qtwayland # Create an FHS environment using the command `fhs`, enabling the execution of non-NixOS packages in NixOS! - (let base = pkgs.appimageTools.defaultFhsEnvArgs; - in pkgs.buildFHSUserEnv (base // { - name = "fhs"; - targetPkgs = pkgs: - ( - # pkgs.buildFHSUserEnv provides only a minimal FHS environment, - # lacking many basic packages needed by most software. - # Therefore, we need to add them manually. - # - # pkgs.appimageTools provides basic packages required by most software. - (base.targetPkgs pkgs) ++ (with pkgs; [ nodejs ])); - profile = "export FHS=1"; - runScript = "bash"; - extraOutputsToInstall = [ "dev" ]; - })) + ( + let base = pkgs.appimageTools.defaultFhsEnvArgs; + in pkgs.buildFHSUserEnv (base // { + name = "fhs"; + targetPkgs = pkgs: + ( + # pkgs.buildFHSUserEnv provides only a minimal FHS environment, + # lacking many basic packages needed by most software. + # Therefore, we need to add them manually. + # + # pkgs.appimageTools provides basic packages required by most software. + (base.targetPkgs pkgs) ++ (with pkgs; [ nodejs ]) + ); + profile = "export FHS=1"; + runScript = "bash"; + extraOutputsToInstall = [ "dev" ]; + }) + ) ]; # @@ -323,6 +326,7 @@ "x-scheme-handler/unknown" = "firefox"; }; + # Configure custom services systemd.user.services = { palserver = { Unit = { Description = "Palworld Server"; }; From d741b4405f53231d61ad931be49b513a18ec4e3a Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 11 Apr 2024 20:04:41 -0300 Subject: [PATCH 41/53] hm: add veloren (game) --- home-manager.nix | 16 ++++++++++++++++ nixos.nix | 7 ++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/home-manager.nix b/home-manager.nix index a15b4d1..7fb350e 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -133,6 +133,7 @@ spotify # Gaming + airshipper dolphin-emu path-of-building protontricks @@ -356,5 +357,20 @@ Install = { WantedBy = [ "default.target" ]; }; }; + + veloren = { + Unit = { Description = "FoundryVTT server"; }; + + Service = { + ExecStart = + "/etc/profiles/per-user/wizardlink/bin/fhs -c './veloren-server-cli'"; + Restart = "on-failure"; + Type = "simple"; + WorkingDirectory = + "/home/wizardlink/.local/share/airshipper/profiles/default"; + }; + + Install = { WantedBy = [ "default.target" ]; }; + }; }; } diff --git a/nixos.nix b/nixos.nix index 5d997a3..a024120 100644 --- a/nixos.nix +++ b/nixos.nix @@ -79,12 +79,14 @@ networking.firewall = { allowedTCPPorts = [ 11753 # OpenRCT2 + 14004 # Veloren 443 # SSL 80 # HTTP ]; allowedUDPPorts = [ 11753 # OpenRCT2 + 14004 # Veloren 2626 # Dolphin emulator 27015 # Source games 8211 # Palworld @@ -94,12 +96,12 @@ from = 1714; to = 1764; } # KDEConnect - ]; + ]; allowedUDPPortRanges = [{ from = 1714; to = 1764; } # KDEConnect - ]; + ]; }; # Or disable the firewall altogether. # networking.firewall.enable = false; @@ -153,7 +155,6 @@ LC_TELEPHONE = "pt_BR.UTF-8"; LC_TIME = "en_GB.UTF-8"; }; - }; # Enable CUPS to print documents. From 044bfd35a957e5474da59651508f8cf3fdb242b8 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 11 Apr 2024 20:05:01 -0300 Subject: [PATCH 42/53] nixos: enable pipewire as the main audio frontend --- nixos.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/nixos.nix b/nixos.nix index a024120..f8a62ad 100644 --- a/nixos.nix +++ b/nixos.nix @@ -239,15 +239,14 @@ security.rtkit.enable = true; services.pipewire = { enable = true; + audio.enable = true; + alsa.enable = true; alsa.support32Bit = true; - pulse.enable = true; - # If you want to use JACK applications, uncomment this - #jack.enable = true; - # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) - #media-session.enable = true; + pulse.enable = true; + + #jack.enable = true; }; ## From ba84892af3c353e8fbce07b2ad49084fded64d11 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 11 Apr 2024 20:05:26 -0300 Subject: [PATCH 43/53] chore: update --- flake.lock | 79 +++++++++++++++--------------------------------------- 1 file changed, 22 insertions(+), 57 deletions(-) diff --git a/flake.lock b/flake.lock index f819787..7bd0ce9 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1712212014, - "narHash": "sha256-s+lbaf3nLRn1++/X2eXwY9mYCA/m9l8AvyG8beeOaXE=", + "lastModified": 1712759992, + "narHash": "sha256-2APpO3ZW4idlgtlb8hB04u/rmIcKA8O7pYqxF66xbNY=", "owner": "nix-community", "repo": "home-manager", - "rev": "7e91f2a0ba4b62b88591279d54f741a13e36245b", + "rev": "31357486b0ef6f4e161e002b6893eeb4fafc3ca9", "type": "github" }, "original": { @@ -22,7 +22,10 @@ }, "hyprcursor": { "inputs": { - "hyprlang": "hyprlang", + "hyprlang": [ + "hyprland", + "hyprlang" + ], "nixpkgs": [ "hyprland", "nixpkgs" @@ -33,11 +36,11 @@ ] }, "locked": { - "lastModified": 1711466786, - "narHash": "sha256-sArxGyUBiCA1in+q6t0QqT+ZJiZ1PyBp7cNPKLmREM0=", + "lastModified": 1712434681, + "narHash": "sha256-qwmR2p1oc48Bj7gUDvb1oGL19Rjs2PmEmk4ChV01A5o=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "d3876f34779cc03ee51e4aafc0d00a4f187c7544", + "rev": "818d8c4b69e0997483d60b75f701fe14b561a7a3", "type": "github" }, "original": { @@ -50,20 +53,20 @@ "inputs": { "hyprcursor": "hyprcursor", "hyprland-protocols": "hyprland-protocols", - "hyprlang": "hyprlang_2", + "hyprlang": "hyprlang", "nixpkgs": [ "nixpkgs" ], - "systems": "systems_2", + "systems": "systems", "wlroots": "wlroots", "xdph": "xdph" }, "locked": { - "lastModified": 1712248444, - "narHash": "sha256-ayxuwrzpow3cRoKtCYj3v7GGrDHTbKVDDUxb8wd1cL8=", + "lastModified": 1712835979, + "narHash": "sha256-m44SvLfwPc8qPpBQa5ObOtTe6RbVNfQLpn+bCdlHFxQ=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "c4b660a33930a0e60e853b6796c1fd76914b1719", + "rev": "185a3b48814cc4a1afbf32a69792a6161c4038cd", "type": "github" }, "original": { @@ -98,29 +101,6 @@ } }, "hyprlang": { - "inputs": { - "nixpkgs": [ - "hyprland", - "hyprcursor", - "nixpkgs" - ], - "systems": "systems" - }, - "locked": { - "lastModified": 1709914708, - "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, - "hyprlang_2": { "inputs": { "nixpkgs": [ "hyprland", @@ -132,11 +112,11 @@ ] }, "locked": { - "lastModified": 1711250455, - "narHash": "sha256-LSq1ZsTpeD7xsqvlsepDEelWRDtAhqwetp6PusHXJRo=", + "lastModified": 1711671891, + "narHash": "sha256-C/Wwsy/RLxHP1axFFl+AnwJRWfd8gxDKKoa8nt8Qk3c=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "b3e430f81f3364c5dd1a3cc9995706a4799eb3fa", + "rev": "c1402612146ba06606ebf64963a02bc1efe11e74", "type": "github" }, "original": { @@ -147,16 +127,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1712163089, - "narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=", + "lastModified": 1712837137, + "narHash": "sha256-9joaU/GD35J9Utb0ipelQbOcvsw5eoYTmSarLV3MbNk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "fd281bd6b7d3e32ddfa399853946f782553163b5", + "rev": "681d4a87b26b1dcaae7ffe6cf88c9912c575415f", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-unstable", + "ref": "nixos-unstable-small", "repo": "nixpkgs", "type": "github" } @@ -183,21 +163,6 @@ "type": "github" } }, - "systems_2": { - "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" - } - }, "wlroots": { "flake": false, "locked": { From 71648d1b3d0a8b4a4363da80bbb72ddb48d78d93 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Fri, 26 Apr 2024 07:49:28 -0300 Subject: [PATCH 44/53] scripts(steam): remove RADV specification we dont use amdvlk, also disable dither --- scripts/steam/launch.sh | 4 +++- scripts/steam/launch_native.sh | 9 ++++++--- services/archi.nix | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 services/archi.nix diff --git a/scripts/steam/launch.sh b/scripts/steam/launch.sh index 1bfdf23..722fb47 100755 --- a/scripts/steam/launch.sh +++ b/scripts/steam/launch.sh @@ -1,8 +1,10 @@ #!/bin/sh + export MANGOHUD=1 # https://docs.mesa3d.org/envvars.html -export AMD_VULKAN_ICD="RADV" +export MESA_NO_DITHER=1 # Disables dither +export MESA_BACK_BUFFER=pixmap # For X only export DXVK_ASYNC=1 diff --git a/scripts/steam/launch_native.sh b/scripts/steam/launch_native.sh index 639baf4..3ff1fe9 100755 --- a/scripts/steam/launch_native.sh +++ b/scripts/steam/launch_native.sh @@ -1,6 +1,9 @@ #!/bin/sh -# https://docs.mesa3d.org/envvars.html -export AMD_VULKAN_ICD="RADV" +export MANGOHUD=1 -mangohud gamemoderun "$@" +# https://docs.mesa3d.org/envvars.html +export MESA_NO_DITHER=1 # Disables dither +export MESA_BACK_BUFFER=pixmap # For X only + +gamemoderun "$@" diff --git a/services/archi.nix b/services/archi.nix new file mode 100644 index 0000000..e03e5f9 --- /dev/null +++ b/services/archi.nix @@ -0,0 +1,19 @@ +{ ... }: + +{ + services.archisteamfarm = { + enable = true; + web-ui.enable = true; + + # bots.wizardlink = { + # enabled = true; + # passwordFile = /var/lib/asf/bot_info/wizardlink.password; + # username = builtins.readFile /var/lib/asf/bot_info/wizardlink.username; + # + # settings = { + # CustomGamePlayedWhileFarming = "In the fields"; + # CustomGamePlayedWhileIdle = "Out from the fields"; + # }; + # }; + }; +} From 596dd0a7e662d7872c60fe755d9f37a514f96f4b Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Fri, 26 Apr 2024 07:50:03 -0300 Subject: [PATCH 45/53] services(archisteamfarm): enable my user bot --- services/archi.nix | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/services/archi.nix b/services/archi.nix index e03e5f9..f026a2e 100644 --- a/services/archi.nix +++ b/services/archi.nix @@ -5,15 +5,15 @@ enable = true; web-ui.enable = true; - # bots.wizardlink = { - # enabled = true; - # passwordFile = /var/lib/asf/bot_info/wizardlink.password; - # username = builtins.readFile /var/lib/asf/bot_info/wizardlink.username; - # - # settings = { - # CustomGamePlayedWhileFarming = "In the fields"; - # CustomGamePlayedWhileIdle = "Out from the fields"; - # }; - # }; + bots.wizardlink = { + enabled = true; + passwordFile = /var/lib/archisteamfarm/bots/wizardlink.password; + username = "master1891891"; + + settings = { + CustomGamePlayedWhileFarming = "In the fields"; + CustomGamePlayedWhileIdle = "Out from the fields"; + }; + }; }; } From b562dfe76a15b4b5e1e9f1df008f96d9cc795a33 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Fri, 26 Apr 2024 07:50:25 -0300 Subject: [PATCH 46/53] chore: update flake and go back to nixos-unstable --- flake.lock | 86 ++++++++++++++++++++++++++++++++++-------------------- flake.nix | 2 +- 2 files changed, 56 insertions(+), 32 deletions(-) diff --git a/flake.lock b/flake.lock index 7bd0ce9..d5c36b4 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1712759992, - "narHash": "sha256-2APpO3ZW4idlgtlb8hB04u/rmIcKA8O7pYqxF66xbNY=", + "lastModified": 1713818326, + "narHash": "sha256-aw3xbVPJauLk/bbrlakIYxKpeuMWzA2feGrkIpIuXd8=", "owner": "nix-community", "repo": "home-manager", - "rev": "31357486b0ef6f4e161e002b6893eeb4fafc3ca9", + "rev": "67de98ae6eed5ad6f91b1142356d71a87ba97f21", "type": "github" }, "original": { @@ -36,11 +36,11 @@ ] }, "locked": { - "lastModified": 1712434681, - "narHash": "sha256-qwmR2p1oc48Bj7gUDvb1oGL19Rjs2PmEmk4ChV01A5o=", + "lastModified": 1713612213, + "narHash": "sha256-zJboXgWNpNhKyNF8H/3UYzWkx7w00TOCGKi3cwi+tsw=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "818d8c4b69e0997483d60b75f701fe14b561a7a3", + "rev": "cab4746180f210a3c1dd3d53e45c510e309e90e1", "type": "github" }, "original": { @@ -54,6 +54,7 @@ "hyprcursor": "hyprcursor", "hyprland-protocols": "hyprland-protocols", "hyprlang": "hyprlang", + "hyprwayland-scanner": "hyprwayland-scanner", "nixpkgs": [ "nixpkgs" ], @@ -62,11 +63,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1712835979, - "narHash": "sha256-m44SvLfwPc8qPpBQa5ObOtTe6RbVNfQLpn+bCdlHFxQ=", + "lastModified": 1713819507, + "narHash": "sha256-mG0kD8HmkCsHRkTBmqGb/QvM1vAvkAmB5p2H5XQ0zLo=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "185a3b48814cc4a1afbf32a69792a6161c4038cd", + "rev": "da839f20f1b1a57ec78d6b041f8d1369150d253e", "type": "github" }, "original": { @@ -112,11 +113,11 @@ ] }, "locked": { - "lastModified": 1711671891, - "narHash": "sha256-C/Wwsy/RLxHP1axFFl+AnwJRWfd8gxDKKoa8nt8Qk3c=", + "lastModified": 1713121246, + "narHash": "sha256-502X0Q0fhN6tJK7iEUA8CghONKSatW/Mqj4Wappd++0=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "c1402612146ba06606ebf64963a02bc1efe11e74", + "rev": "78fcaa27ae9e1d782faa3ff06c8ea55ddce63706", "type": "github" }, "original": { @@ -125,18 +126,43 @@ "type": "github" } }, + "hyprwayland-scanner": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1713730424, + "narHash": "sha256-MqYjTvQCxwuDIuAaqIEuyqserm5PYr0auiHHPuYFN/k=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "7c9c8adfe7e424faa0c5ce6e8be90157fda53c06", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1712837137, - "narHash": "sha256-9joaU/GD35J9Utb0ipelQbOcvsw5eoYTmSarLV3MbNk=", + "lastModified": 1713714899, + "narHash": "sha256-+z/XjO3QJs5rLE5UOf015gdVauVRQd2vZtsFkaXBq2Y=", "owner": "nixos", "repo": "nixpkgs", - "rev": "681d4a87b26b1dcaae7ffe6cf88c9912c575415f", + "rev": "6143fc5eeb9c4f00163267708e26191d1e918932", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-unstable-small", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -166,20 +192,18 @@ "wlroots": { "flake": false, "locked": { - "host": "gitlab.freedesktop.org", - "lastModified": 1709983277, - "narHash": "sha256-wXWIJLd4F2JZeMaihWVDW/yYXCLEC8OpeNJZg9a9ly8=", - "owner": "wlroots", - "repo": "wlroots", - "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", - "type": "gitlab" + "lastModified": 1713731601, + "narHash": "sha256-bdcKdtLkusvv85DNuJsajZLFeq7bXp+x5AGP1Sd4wD8=", + "owner": "hyprwm", + "repo": "wlroots-hyprland", + "rev": "5c1d51c5a2793480f5b6c4341ad0797052aec2ea", + "type": "github" }, "original": { - "host": "gitlab.freedesktop.org", - "owner": "wlroots", - "repo": "wlroots", - "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", - "type": "gitlab" + "owner": "hyprwm", + "repo": "wlroots-hyprland", + "rev": "5c1d51c5a2793480f5b6c4341ad0797052aec2ea", + "type": "github" } }, "xdph": { @@ -202,11 +226,11 @@ ] }, "locked": { - "lastModified": 1709299639, - "narHash": "sha256-jYqJM5khksLIbqSxCLUUcqEgI+O2LdlSlcMEBs39CAU=", + "lastModified": 1713724432, + "narHash": "sha256-dtU1y4oj/0Y42oauzm93ucFg1AoqETnQ21bmXTIUng0=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "2d2fb547178ec025da643db57d40a971507b82fe", + "rev": "9ace6f969ce495185df34cc6254fb9d297765478", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 496fd32..e1008b1 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "NixOS System Flake"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager = { url = "github:nix-community/home-manager"; From 52fb5a99a26cffc842ec879731e815efa5140897 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Fri, 26 Apr 2024 07:51:15 -0300 Subject: [PATCH 47/53] services(archisteamfarm): actually use the service --- nixos.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos.nix b/nixos.nix index f8a62ad..5c81797 100644 --- a/nixos.nix +++ b/nixos.nix @@ -14,6 +14,7 @@ ./hardware-configuration.nix # Include service configuration ./services/adguardhome.nix + ./services/archi.nix ./services/caddy.nix ./services/jellyfin.nix ]; From 09b590e5ce5bc96bb52dd2606e83696cbcfa7bdc Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Fri, 26 Apr 2024 07:51:36 -0300 Subject: [PATCH 48/53] nixos(kernel): move to zen kernel --- nixos.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos.nix b/nixos.nix index 5c81797..f8a52b3 100644 --- a/nixos.nix +++ b/nixos.nix @@ -45,7 +45,7 @@ ## # Kernel - boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; + boot.kernelPackages = pkgs.linuxPackages_zen; # Add AMD drivers. boot.initrd.kernelModules = [ "amdgpu" ]; @@ -53,7 +53,7 @@ # TODO: FIX IT BEING BEING OVERWRITTEN boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback - (pkgs.callPackage ./kernel/zenergy.nix { kernel = pkgs.linux_xanmod_latest; }) + (pkgs.callPackage ./kernel/zenergy.nix { kernel = pkgs.linux_zen; }) ]; # Bootloader. From 077ce16f56036b420583fee020c5e0b743668002 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Fri, 26 Apr 2024 07:52:25 -0300 Subject: [PATCH 49/53] nixos(sddm): use wayland sddm --- nixos.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/nixos.nix b/nixos.nix index f8a52b3..d27fb0c 100644 --- a/nixos.nix +++ b/nixos.nix @@ -197,12 +197,11 @@ ## ## DESKTOP ## ## - # Enable the X11 windowing system. - services.xserver.enable = true; - # Enable GDM. - services.xserver.displayManager.sddm = { + # Enable SDDM. + services.displayManager.sddm = { enable = true; + wayland.enable = true; theme = "${import ./theming/sddm.nix { inherit pkgs; }}"; }; From 8c72f9ac9b90bd468435a0840f031022caf35a63 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Fri, 26 Apr 2024 07:53:01 -0300 Subject: [PATCH 50/53] neovim: add svelte support --- programs/neovim/default.nix | 3 +++ programs/neovim/lua/plugins/astrolsp.lua | 24 +++++++++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/programs/neovim/default.nix b/programs/neovim/default.nix index d07bf62..914766a 100644 --- a/programs/neovim/default.nix +++ b/programs/neovim/default.nix @@ -46,6 +46,9 @@ # Vue nodePackages.volar + # Svelte + nodePackages.svelte-language-server + # YAML yaml-language-server ]; diff --git a/programs/neovim/lua/plugins/astrolsp.lua b/programs/neovim/lua/plugins/astrolsp.lua index 8d46b40..c44e4fb 100644 --- a/programs/neovim/lua/plugins/astrolsp.lua +++ b/programs/neovim/lua/plugins/astrolsp.lua @@ -10,16 +10,16 @@ return { opts = { -- Configuration table of features provided by AstroLSP features = { - autoformat = true, -- enable or disable auto formatting on start - codelens = true, -- enable/disable codelens refresh on start - inlay_hints = false, -- enable/disable inlay hints on start + autoformat = true, -- enable or disable auto formatting on start + codelens = true, -- enable/disable codelens refresh on start + inlay_hints = false, -- enable/disable inlay hints on start semantic_tokens = true, -- enable/disable semantic token highlighting }, -- customize lsp formatting options formatting = { -- control auto formatting on save format_on_save = { - enabled = true, -- enable or disable format on save globally + enabled = true, -- enable or disable format on save globally allow_filetypes = { -- enable format on save for specified filetypes only -- "go", "javascript", @@ -56,6 +56,7 @@ return { "marksman", "nil_ls", "rust_analyzer", + "svelte", "taplo", "tsserver", "volar", @@ -91,19 +92,28 @@ return { event = { "CursorHold", "CursorHoldI" }, -- the rest of the autocmd options (:h nvim_create_autocmd) desc = "Document Highlighting", - callback = function() vim.lsp.buf.document_highlight() end, + callback = function() + vim.lsp.buf.document_highlight() + end, }, { event = { "CursorMoved", "CursorMovedI", "BufLeave" }, desc = "Document Highlighting Clear", - callback = function() vim.lsp.buf.clear_references() end, + callback = function() + vim.lsp.buf.clear_references() + end, }, }, }, -- mappings to be set up on attaching of a language server mappings = { n = { - gl = { function() vim.diagnostic.open_float() end, desc = "Hover diagnostics" }, + gl = { + function() + vim.diagnostic.open_float() + end, + desc = "Hover diagnostics", + }, -- a `cond` key can provided as the string of a server capability to be required to attach, or a function with `client` and `bufnr` parameters from the `on_attach` that returns a boolean -- gD = { -- function() vim.lsp.buf.declaration() end, From 76203bee8ed939a3ba3a8e7e7c9ca2b7e2edd1a6 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Fri, 26 Apr 2024 07:53:36 -0300 Subject: [PATCH 51/53] hm(vesktop): use my custom branch to use the latest commit without arpc --- home-manager.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/home-manager.nix b/home-manager.nix index 7fb350e..6c896a6 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -80,10 +80,10 @@ tigervnc (vesktop.overrideAttrs (prev: { src = pkgs.fetchFromGitHub { - owner = "kaitlynkittyy"; + owner = "wizardlink"; repo = "Vesktop"; - rev = "006f4e96dea21fee018e446e84a19a92ddabbd1e"; - hash = "sha256-9kCK8Pi97m/W5alEUZPbjOJxSpYyhw8zqhtCh/2ccf8="; + rev = "93c9cc24f88c1dbc50c3ee0569ddbdbaec76d9b3"; + hash = "sha256-tJyiZ/gAh+mA/UoJq5rzjJxit8lZpkJC74lf1Z5eqFc="; }; installPhase = From d53e01014dd77a816183732caf017b1a9e072136 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Fri, 26 Apr 2024 07:54:08 -0300 Subject: [PATCH 52/53] hm: use wine with wow support, remove pob and add r2modman --- home-manager.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home-manager.nix b/home-manager.nix index 6c896a6..58a8a87 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -135,9 +135,9 @@ # Gaming airshipper dolphin-emu - path-of-building protontricks - winePackages.waylandFull + r2modman + wineWowPackages.waylandFull winetricks xonotic From f4e2565099ae4eb1951b9b8cfe28cdbc35d1d4c4 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Fri, 26 Apr 2024 07:54:28 -0300 Subject: [PATCH 53/53] hm: remove services, no way to have services not auto start --- home-manager.nix | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) diff --git a/home-manager.nix b/home-manager.nix index 58a8a87..e14b407 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -326,51 +326,4 @@ "x-scheme-handler/https" = "firefox"; "x-scheme-handler/unknown" = "firefox"; }; - - # Configure custom services - systemd.user.services = { - palserver = { - Unit = { Description = "Palworld Server"; }; - - Service = { - ExecStart = - "/etc/profiles/per-user/wizardlink/bin/fhs -c 'EpicApp=PalServer ./PalServer.sh -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS'"; - Restart = "always"; - #RuntimeMaxSec = "4h"; - Type = "simple"; - WorkingDirectory = "/mnt/ssd/Games/Steam/steamapps/common/PalServer"; - }; - - Install = { WantedBy = [ "default.target" ]; }; - }; - - foundry = { - Unit = { Description = "FoundryVTT server"; }; - - Service = { - ExecStart = - "/etc/profiles/per-user/wizardlink/bin/fhs -c 'node ./resources/app/main.js'"; - Restart = "on-failure"; - Type = "simple"; - WorkingDirectory = "/mnt/ssd/Games/FoundryVTT/FoundryProgram"; - }; - - Install = { WantedBy = [ "default.target" ]; }; - }; - - veloren = { - Unit = { Description = "FoundryVTT server"; }; - - Service = { - ExecStart = - "/etc/profiles/per-user/wizardlink/bin/fhs -c './veloren-server-cli'"; - Restart = "on-failure"; - Type = "simple"; - WorkingDirectory = - "/home/wizardlink/.local/share/airshipper/profiles/default"; - }; - - Install = { WantedBy = [ "default.target" ]; }; - }; - }; }