From d89b9dfa36ed41c2b3522b3b7f40f5cbf61e0d1a Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sun, 1 Sep 2024 17:35:17 -0300 Subject: [PATCH 1/7] xdg: drop xdph and use xdg-desktop-portal-wlr --- flake.nix | 1 - nixos.nix | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 44f9e8d..cd5b946 100644 --- a/flake.nix +++ b/flake.nix @@ -15,7 +15,6 @@ }; hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; - xdg-desktop-portal-hyprland.url = "github:hyprwm/xdg-desktop-portal-hyprland"; nix-minecraft.url = "github:Infinidoge/nix-minecraft"; }; diff --git a/nixos.nix b/nixos.nix index 3626cd0..dd83ec9 100644 --- a/nixos.nix +++ b/nixos.nix @@ -6,7 +6,6 @@ config, pkgs, hyprland, - xdg-desktop-portal-hyprland, ... }: @@ -276,7 +275,7 @@ in enable = true; package = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; - portalPackage = xdg-desktop-portal-hyprland.packages.${pkgs.stdenv.hostPlatform.system}.default; + portalPackage = pkgs.xdg-desktop-portal-wlr; }; # Enable XDG Desktop Portals. @@ -285,7 +284,7 @@ in config = { common = { - default = [ "hyprland" ]; + default = [ "wlr" ]; }; }; }; From 001b7bfc4c876458f90347f665c2b610f603c054 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sun, 1 Sep 2024 17:35:29 -0300 Subject: [PATCH 2/7] system: enable zram --- nixos.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos.nix b/nixos.nix index dd83ec9..07074bc 100644 --- a/nixos.nix +++ b/nixos.nix @@ -111,6 +111,9 @@ in fileSystems = [ "/" ]; }; + # Enables zram. + zramSwap.enable = true; + networking.hostName = "wizdesk"; # Define your hostname. # Enable networking From 4a8b5a1bffbc64c9a6f5cb452ca7abf1bc264fe4 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sun, 1 Sep 2024 17:35:39 -0300 Subject: [PATCH 3/7] chore: add .editorconfig --- .editorconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..fc94ede --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +max_line_length = 120 +trim_trailing_whitespace = true From 79d396ddfd272dcca55aec9fffa68bae6ee22ba3 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sun, 1 Sep 2024 17:35:50 -0300 Subject: [PATCH 4/7] minecraft: lower server's RAM to 4GB --- services/minecraft/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/minecraft/default.nix b/services/minecraft/default.nix index eccb905..b404e2c 100644 --- a/services/minecraft/default.nix +++ b/services/minecraft/default.nix @@ -24,7 +24,7 @@ in package = pkgs.fabricServers.fabric-1_20_1.override { loaderVersion = "0.15.11"; }; autoStart = true; - jvmOpts = "-Xms512M -Xmx6016M -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=4M -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=50"; + jvmOpts = "-Xms512M -Xmx4096M -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=4M -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=50"; serverProperties = { allow-flight = true; From 9ad02124d73db4980b728a03991db016c9ad98f6 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sun, 1 Sep 2024 17:36:15 -0300 Subject: [PATCH 5/7] neovim: add clang_format and enable auto format --- programs/neovim/lua/plugins/astrolsp.lua | 5 ++++- programs/neovim/lua/plugins/none-ls.lua | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/programs/neovim/lua/plugins/astrolsp.lua b/programs/neovim/lua/plugins/astrolsp.lua index 91af45e..afd011e 100644 --- a/programs/neovim/lua/plugins/astrolsp.lua +++ b/programs/neovim/lua/plugins/astrolsp.lua @@ -22,14 +22,17 @@ return { enabled = true, -- enable or disable format on save globally allow_filetypes = { -- enable format on save for specified filetypes only -- "go", + "c", + "cpp", + "h", "javascript", "jsx", "lua", "nix", "rust", + "svelte", "tsx", "typescript", - "svelte", }, ignore_filetypes = { -- disable format on save for specified filetypes -- "python", diff --git a/programs/neovim/lua/plugins/none-ls.lua b/programs/neovim/lua/plugins/none-ls.lua index 6132628..5601ff7 100644 --- a/programs/neovim/lua/plugins/none-ls.lua +++ b/programs/neovim/lua/plugins/none-ls.lua @@ -12,6 +12,7 @@ return { -- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics config.sources = { -- Set a formatter + null_ls.builtins.formatting.clang_format, null_ls.builtins.formatting.nixfmt, null_ls.builtins.formatting.prettier, null_ls.builtins.formatting.stylua, From 5a0643038aea78743b53c0f6212a2313244310c0 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sun, 1 Sep 2024 17:36:20 -0300 Subject: [PATCH 6/7] flake: update --- flake.lock | 189 +++++++---------------------------------------------- 1 file changed, 23 insertions(+), 166 deletions(-) diff --git a/flake.lock b/flake.lock index 31a0752..16cb005 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1724273991, - "narHash": "sha256-+aUSOXKGpS5CRm1oTitgNAr05ThQNbKIXalZHl3nC6Y=", + "lastModified": 1724850097, + "narHash": "sha256-3BHxvFb3NJzch1X8puRMkVZujOoarQ1llu3ZcwuvsKU=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "9a3161ad4c78dc420d1cbb3aae638222608c7de4", + "rev": "23c7925dd31e79e8c06086ace3edb129a070ac01", "type": "github" }, "original": { @@ -144,11 +144,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1724701003, - "narHash": "sha256-kTceEi5B4t2u5oG3bKnGgZkHxFTsvYAUiAmyYA/6Y3o=", + "lastModified": 1724967012, + "narHash": "sha256-Zn5Eq6Elq0SRInPrEYGGoo972JzVxd5zExF7FSuTKlo=", "ref": "refs/heads/main", - "rev": "eb42adc4c090918ad6be9fcb24066da8cdfd9bd0", - "revCount": 5145, + "rev": "604eb21a7e55d85ec7f6cb8cba39fc4c20a07a9d", + "revCount": 5157, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -186,31 +186,6 @@ "type": "github" } }, - "hyprland-protocols_2": { - "inputs": { - "nixpkgs": [ - "xdg-desktop-portal-hyprland", - "nixpkgs" - ], - "systems": [ - "xdg-desktop-portal-hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1721326555, - "narHash": "sha256-zCu4R0CSHEactW9JqYki26gy8h9f6rHmSwj4XJmlHgg=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "5a11232266bf1a1f5952d5b179c3f4b2facaaa84", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-protocols", - "type": "github" - } - }, "hyprlang": { "inputs": { "hyprutils": [ @@ -240,29 +215,6 @@ "type": "github" } }, - "hyprlang_2": { - "inputs": { - "hyprutils": "hyprutils_2", - "nixpkgs": [ - "xdg-desktop-portal-hyprland", - "nixpkgs" - ], - "systems": "systems_3" - }, - "locked": { - "lastModified": 1721324361, - "narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, "hyprutils": { "inputs": { "nixpkgs": [ @@ -275,38 +227,11 @@ ] }, "locked": { - "lastModified": 1722869141, - "narHash": "sha256-0KU4qhyMp441qfwbirNg3+wbm489KnEjXOz2I/RbeFs=", + "lastModified": 1724863980, + "narHash": "sha256-7Ke9wFRYPUIXwm5ZndGHkWBKj6BsFTkSEXUNXQRHE54=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "0252fd13e78e60fb0da512a212e56007515a49f7", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprutils", - "type": "github" - } - }, - "hyprutils_2": { - "inputs": { - "nixpkgs": [ - "xdg-desktop-portal-hyprland", - "hyprlang", - "nixpkgs" - ], - "systems": [ - "xdg-desktop-portal-hyprland", - "hyprlang", - "systems" - ] - }, - "locked": { - "lastModified": 1721324102, - "narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=", - "owner": "hyprwm", - "repo": "hyprutils", - "rev": "962582a090bc233c4de9d9897f46794280288989", + "rev": "aadf9a27dddd2272ca354ba5a22a0c2d1f919039", "type": "github" }, "original": { @@ -347,11 +272,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1724636274, - "narHash": "sha256-Q04D7AQRjNCUJIEo5YJeRdps0HcCgvEOvk5pAUHZlF0=", + "lastModified": 1724982042, + "narHash": "sha256-IwHIZYo1fyloQxvBy15QVzMALNEa7Jo6tzXVJj7U9Ws=", "owner": "Infinidoge", "repo": "nix-minecraft", - "rev": "0baaf5d5781b171bb2e936b3013f963a233bc477", + "rev": "32b632e29b141cc4c441b6e5504d33a9564dc3e6", "type": "github" }, "original": { @@ -362,11 +287,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1724224976, - "narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=", + "lastModified": 1724819573, + "narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c374d94f1536013ca8e92341b540eba4c22f9c62", + "rev": "71e91c409d1e654808b2621f28a327acfdad8dc2", "type": "github" }, "original": { @@ -394,11 +319,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1724479785, - "narHash": "sha256-pP3Azj5d6M5nmG68Fu4JqZmdGt4S4vqI5f8te+E/FTw=", + "lastModified": 1724819573, + "narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d0e1602ddde669d5beb01aec49d71a51937ed7be", + "rev": "71e91c409d1e654808b2621f28a327acfdad8dc2", "type": "github" }, "original": { @@ -408,30 +333,13 @@ "type": "github" } }, - "nixpkgs_4": { - "locked": { - "lastModified": 1722062969, - "narHash": "sha256-QOS0ykELUmPbrrUGmegAUlpmUFznDQeR4q7rFhl8eQg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "b73c2221a46c13557b1b3be9c2070cc42cf01eb3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "root": { "inputs": { "home-manager": "home-manager", "hyprland": "hyprland", "nix-minecraft": "nix-minecraft", "nixpkgs": "nixpkgs_3", - "spicetify-nix": "spicetify-nix", - "xdg-desktop-portal-hyprland": "xdg-desktop-portal-hyprland" + "spicetify-nix": "spicetify-nix" } }, "spicetify-nix": { @@ -442,11 +350,11 @@ ] }, "locked": { - "lastModified": 1724645793, - "narHash": "sha256-z0QdJ8N24msqy6uakRNHpCsrNsswTA9/Evsd3+DOAZc=", + "lastModified": 1724904972, + "narHash": "sha256-UuMf0oHOZqiU81WNSnk30XJ5sKYvvSiChvotptI1Zm0=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "2e3b9ea2f89113d71ab57127ca7226253afd2660", + "rev": "6c7bd8132eb69880b7ec8935b6f55dbca1e69424", "type": "github" }, "original": { @@ -485,57 +393,6 @@ "type": "github" } }, - "systems_3": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_4": { - "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" - } - }, - "xdg-desktop-portal-hyprland": { - "inputs": { - "hyprland-protocols": "hyprland-protocols_2", - "hyprlang": "hyprlang_2", - "nixpkgs": "nixpkgs_4", - "systems": "systems_4" - }, - "locked": { - "lastModified": 1724073926, - "narHash": "sha256-nWlUL43jOFHf+KW6Hqrx+W/r1XdXuDyb0wC/SrHsOu4=", - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "rev": "a08ecbbf33598924e93542f737fc6169a26b481e", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "type": "github" - } - }, "xdph": { "inputs": { "hyprland-protocols": "hyprland-protocols", From f87d7581a096f6e5dde99b53a35c6eaf95a57ef6 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sun, 1 Sep 2024 17:36:44 -0300 Subject: [PATCH 7/7] hm: add beekeeper-studio (SQL Client) --- home-manager.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/home-manager.nix b/home-manager.nix index 0baaafc..912c88c 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -122,6 +122,7 @@ xwaylandvideobridge ## Development + beekeeper-studio lazygit ## Desktop environment