diff --git a/flake.lock b/flake.lock index d2b22c3..13af4bb 100644 --- a/flake.lock +++ b/flake.lock @@ -70,7 +70,9 @@ "awww": { "inputs": { "flake-compat": "flake-compat", - "nixpkgs": "nixpkgs", + "nixpkgs": [ + "nixpkgs-unstable" + ], "rust-overlay": "rust-overlay" }, "locked": { @@ -93,7 +95,7 @@ "cachyos-kernel-patches": "cachyos-kernel-patches", "flake-compat": "flake-compat_2", "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" }, "locked": { "lastModified": 1771353108, @@ -224,12 +226,33 @@ } }, "fenix": { + "inputs": { + "nixpkgs": [ + "nixpkgs-unstable" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1772176312, + "narHash": "sha256-Yjo/QCJvY9GUhAzwac/m6Rx3oxvRyEaiT5DQ5o+T6g4=", + "owner": "nix-community", + "repo": "fenix", + "rev": "92d91250c1acd59beabc51208192adc92f31aeb5", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "fenix_2": { "inputs": { "nixpkgs": [ "iamb", "nixpkgs" ], - "rust-analyzer-src": "rust-analyzer-src" + "rust-analyzer-src": "rust-analyzer-src_2" }, "locked": { "lastModified": 1760510549, @@ -310,21 +333,6 @@ } }, "flake-compat_5": { - "locked": { - "lastModified": 1767039857, - "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_6": { "locked": { "lastModified": 1733328505, "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", @@ -383,6 +391,24 @@ "inputs": { "nixpkgs-lib": "nixpkgs-lib_2" }, + "locked": { + "lastModified": 1749398372, + "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_4": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_3" + }, "locked": { "lastModified": 1769996383, "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", @@ -476,18 +502,18 @@ "type": "github" } }, - "home-manager_2": { + "home-manager-unstable": { "inputs": { "nixpkgs": [ "nixpkgs-unstable" ] }, "locked": { - "lastModified": 1771269455, - "narHash": "sha256-BZ31eN5F99YH6vkc4AhzKGE+tJgJ52kl8f01K7wCs8w=", + "lastModified": 1772164835, + "narHash": "sha256-zRcwrZDeBfYipqv/7K7TqsfPb87LFU6b7JhoNUGSnvQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "5f1d42a97b19803041434f66681d5c44c9ae62e3", + "rev": "2a39b0828bbffce0d73769a61e46e780488d098b", "type": "github" }, "original": { @@ -497,6 +523,27 @@ "type": "github" } }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1772020340, + "narHash": "sha256-aqBl3GNpCadMoJ/hVkWTijM1Aeilc278MjM+LA3jK6g=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "36e38ca0d9afe4c55405fdf22179a5212243eecc", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-25.11", + "repo": "home-manager", + "type": "github" + } + }, "home-manager_3": { "inputs": { "nixpkgs": [ @@ -587,7 +634,9 @@ "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", "hyprwire": "hyprwire", - "nixpkgs": "nixpkgs_4", + "nixpkgs": [ + "nixpkgs-unstable" + ], "pre-commit-hooks": "pre-commit-hooks", "systems": "systems_3", "xdph": "xdph" @@ -871,9 +920,11 @@ "iamb": { "inputs": { "crane": "crane", - "fenix": "fenix", + "fenix": "fenix_2", "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_5" + "nixpkgs": [ + "nixpkgs-unstable" + ] }, "locked": { "lastModified": 1768868561, @@ -974,6 +1025,28 @@ "type": "github" } }, + "mango": { + "inputs": { + "flake-parts": "flake-parts_3", + "nixpkgs": [ + "nixpkgs-unstable" + ], + "scenefx": "scenefx" + }, + "locked": { + "lastModified": 1771732288, + "narHash": "sha256-N1H7LMWXYNn7zN9ghp4vHlBs4O/Rw/+ZEoPUpm9ozw4=", + "owner": "DreamMaoMao", + "repo": "mangowc", + "rev": "6b2d694b234cae9876eb81e27991439eb51860f1", + "type": "github" + }, + "original": { + "owner": "DreamMaoMao", + "repo": "mangowc", + "type": "github" + } + }, "microvm": { "inputs": { "nixpkgs": [ @@ -999,7 +1072,7 @@ "microvm_2": { "inputs": { "nixpkgs": [ - "nixpkgs" + "nixpkgs-unstable" ], "spectrum": "spectrum_2" }, @@ -1032,7 +1105,9 @@ "minhook-src": "minhook-src", "mini-src": "mini-src", "minizip-src": "minizip-src", - "nixpkgs": "nixpkgs_6", + "nixpkgs": [ + "nixpkgs-unstable" + ], "re2-src": "re2-src", "websocketpp-src": "websocketpp-src", "zlib-src": "zlib-src" @@ -1121,26 +1196,6 @@ "type": "github" } }, - "nix-alien": { - "inputs": { - "flake-compat": "flake-compat_5", - "nix-index-database": "nix-index-database", - "nixpkgs": "nixpkgs_7" - }, - "locked": { - "lastModified": 1771150922, - "narHash": "sha256-+oQJun4CFDlOQRocbZpqQDj7agoy56/4ZjT1oUR7NOs=", - "owner": "thiagokokada", - "repo": "nix-alien", - "rev": "96045e886ba0dd45b27590e7c0c6e77bbb54033d", - "type": "github" - }, - "original": { - "owner": "thiagokokada", - "repo": "nix-alien", - "type": "github" - } - }, "nix-github-actions": { "inputs": { "nixpkgs": [ @@ -1164,27 +1219,6 @@ "type": "github" } }, - "nix-index-database": { - "inputs": { - "nixpkgs": [ - "nix-alien", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1771130777, - "narHash": "sha256-UIKOwG0D9XVIJfNWg6+gENAvQP+7LO46eO0Jpe+ItJ0=", - "owner": "nix-community", - "repo": "nix-index-database", - "rev": "efec7aaad8d43f8e5194df46a007456093c40f88", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nix-index-database", - "type": "github" - } - }, "nix-unit": { "inputs": { "flake-parts": "flake-parts_2", @@ -1227,9 +1261,11 @@ }, "nixcord": { "inputs": { - "flake-compat": "flake-compat_6", - "flake-parts": "flake-parts_3", - "nixpkgs": "nixpkgs_8" + "flake-compat": "flake-compat_5", + "flake-parts": "flake-parts_4", + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { "lastModified": 1771375681, @@ -1247,16 +1283,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1763934636, - "narHash": "sha256-9glbI7f1uU+yzQCq5LwLgdZqx6svOhZWkd4JRY265fc=", - "owner": "nixos", + "lastModified": 1771309086, + "narHash": "sha256-25aY7PIHMmoVW5w/x8Bs4vsfSV94A5htwiLINJ4KMuY=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "ee09932cedcef15aaf476f9343d1dea2cb77e261", + "rev": "5e17f00eb60368a4b4b110a89f1c250f9a12c053", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", + "owner": "NixOS", + "ref": "nixos-unstable-small", "repo": "nixpkgs", "type": "github" } @@ -1277,6 +1313,21 @@ } }, "nixpkgs-lib_2": { + "locked": { + "lastModified": 1748740939, + "narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "656a64127e9d791a334452c6b6606d17539476e2", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs-lib_3": { "locked": { "lastModified": 1769909678, "narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=", @@ -1339,39 +1390,7 @@ "type": "github" } }, - "nixpkgs_10": { - "locked": { - "lastModified": 1771008912, - "narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "a82ccc39b39b621151d6732718e3e250109076fa", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_2": { - "locked": { - "lastModified": 1771309086, - "narHash": "sha256-25aY7PIHMmoVW5w/x8Bs4vsfSV94A5htwiLINJ4KMuY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5e17f00eb60368a4b4b110a89f1c250f9a12c053", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable-small", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1767313136, "narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=", @@ -1387,87 +1406,7 @@ "type": "github" } }, - "nixpkgs_4": { - "locked": { - "lastModified": 1766070988, - "narHash": "sha256-G/WVghka6c4bAzMhTwT2vjLccg/awmHkdKSd2JrycLc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c6245e83d836d0433170a16eb185cefe0572f8b8", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_5": { - "locked": { - "lastModified": 1760284886, - "narHash": "sha256-TK9Kr0BYBQ/1P5kAsnNQhmWWKgmZXwUQr4ZMjCzWf2c=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "cf3f5c4def3c7b5f1fc012b3d839575dbe552d43", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_6": { - "locked": { - "lastModified": 1770115704, - "narHash": "sha256-KHFT9UWOF2yRPlAnSXQJh6uVcgNcWlFqqiAZ7OVlHNc=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "e6eae2ee2110f3d31110d5c222cd395303343b08", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_7": { - "locked": { - "lastModified": 1771008912, - "narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a82ccc39b39b621151d6732718e3e250109076fa", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_8": { - "locked": { - "lastModified": 1770617025, - "narHash": "sha256-1jZvgZoAagZZB6NwGRv2T2ezPy+X6EFDsJm+YSlsvEs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "2db38e08fdadcc0ce3232f7279bab59a15b94482", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_9": { + "nixpkgs_3": { "locked": { "lastModified": 1771208521, "narHash": "sha256-X01Q3DgSpjeBpapoGA4rzKOn25qdKxbPnxHeMLNoHTU=", @@ -1486,7 +1425,7 @@ "nt": { "inputs": { "nix-unit": "nix-unit", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "systems": "systems_2" }, "locked": { @@ -1548,16 +1487,18 @@ "awww": "awww", "cachyos": "cachyos", "cerulean": "cerulean", + "fenix": "fenix", "home-manager": "home-manager_2", + "home-manager-unstable": "home-manager-unstable", "hyprland-git": "hyprland-git", "hyprland-plugins": "hyprland-plugins", "iamb": "iamb", + "mango": "mango", "microvm": "microvm_2", "millennium": "millennium", - "nix-alien": "nix-alien", "nixcats": "nixcats", "nixcord": "nixcord", - "nixpkgs": "nixpkgs_9", + "nixpkgs": "nixpkgs_3", "nixpkgs-master": "nixpkgs-master", "nixpkgs-staging": "nixpkgs-staging", "nixpkgs-unstable": "nixpkgs-unstable", @@ -1568,6 +1509,23 @@ } }, "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1772094427, + "narHash": "sha256-TiVs6OUBJEvajHdJZ5nIq0KognNJooUWuLGPFfQacSw=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "56b59a832858329c2f947f9b7bdf1a49da39c981", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, + "rust-analyzer-src_2": { "flake": false, "locked": { "lastModified": 1760457219, @@ -1605,6 +1563,27 @@ "type": "github" } }, + "scenefx": { + "inputs": { + "nixpkgs": [ + "mango", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1750785057, + "narHash": "sha256-tGX6j4W91rcb+glXJo43sjPI9zQvPotonknG1BdihR4=", + "owner": "wlrfx", + "repo": "scenefx", + "rev": "3a6cfb12e4ba97b43326357d14f7b3e40897adfc", + "type": "github" + }, + "original": { + "owner": "wlrfx", + "repo": "scenefx", + "type": "github" + } + }, "sddm-silent": { "inputs": { "nixpkgs": [ @@ -1857,7 +1836,9 @@ "zen": { "inputs": { "home-manager": "home-manager_3", - "nixpkgs": "nixpkgs_10" + "nixpkgs": [ + "nixpkgs-unstable" + ] }, "locked": { "lastModified": 1771381854, diff --git a/flake.nix b/flake.nix index 2cbefbf..5ddee7e 100644 --- a/flake.nix +++ b/flake.nix @@ -10,6 +10,10 @@ nixpkgs-master.url = "github:NixOS/nixpkgs/master"; home-manager = { + url = "github:nix-community/home-manager/release-25.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager-unstable = { url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs-unstable"; }; @@ -24,41 +28,63 @@ microvm = { url = "github:microvm-nix/microvm.nix"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; }; cachyos.url = "github:xddxdd/nix-cachyos-kernel"; - nix-alien = { - # silly alien :3 - url = "github:thiagokokada/nix-alien"; - # inputs.nixpkgs.follows = "nixpkgs"; - }; - # wm/de/apps/theming flakes hyprland-git = { + # pinned rev because color management is broken on hyprland url = "github:hyprwm/Hyprland/25250527793eb04bb60f103abe7f06370b9f6e1c"; #url = "github:hyprwm/Hyprland"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; }; hyprland-plugins = { url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland-git"; }; + mango = { + url = "github:DreamMaoMao/mangowc"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; + nixcats.url = "github:BirdeeHub/nixCats-nvim"; - awww.url = "git+https://codeberg.org/LGFae/awww"; - zen.url = "github:0xc000022070/zen-browser-flake"; - iamb.url = "github:ulyssa/iamb"; - nixcord.url = "github:FlameFlag/nixcord"; - millennium.url = "github:trivaris/millennium?dir=packages/nix"; + + awww = { + url = "git+https://codeberg.org/LGFae/awww"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; + zen = { + url = "github:0xc000022070/zen-browser-flake"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; + iamb = { + url = "github:ulyssa/iamb"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; + nixcord = { + url = "github:FlameFlag/nixcord"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + millennium = { + url = "github:trivaris/millennium?dir=packages/nix"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; spicetify-nix = { url = "github:Gerg-L/spicetify-nix"; inputs = { - systems.follows = "systems"; nixpkgs.follows = "nixpkgs-unstable"; + systems.follows = "systems"; }; }; + fenix = { + url = "github:nix-community/fenix"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; + # temp theme until i bother creating my own ', function() vim.cmd('wincmd h') end) +vim.keymap.set('n', '', function() vim.cmd('wincmd j') end) +vim.keymap.set('n', '', function() vim.cmd('wincmd k') end) +vim.keymap.set('n', '', function() vim.cmd('wincmd l') end) + -- function to load colors local function load_colors() local new_colors = {} diff --git a/homes/modules/programs/neovim/lua/lsp/completion.lua b/homes/modules/programs/neovim/lua/lsp/completion.lua index 2e485d9..b408f23 100644 --- a/homes/modules/programs/neovim/lua/lsp/completion.lua +++ b/homes/modules/programs/neovim/lua/lsp/completion.lua @@ -15,7 +15,22 @@ return { blink.setup({ keymap = { - preset = "default", + [""] = { "show", "show_documentation", "hide_documentation" }, + [""] = { "hide", "fallback" }, + [""] = { "select_and_accept", "fallback" }, + + [""] = { "select_prev", "fallback_to_mappings" }, + [""] = { "select_next", "fallback_to_mappings" }, + [""] = { "select_prev", "fallback" }, + [""] = { "select_next", "fallback" }, + + [""] = { "scroll_documentation_up", "fallback" }, + [""] = { "scroll_documentation_down", "fallback" }, + + [""] = { "snippet_forward", "fallback" }, + [""] = { "snippet_backward", "fallback" }, + + [""] = { "show_signature", "hide_signature", "fallback" }, }, appearance = { diff --git a/homes/modules/programs/neovim/lua/lsp/indentation.lua b/homes/modules/programs/neovim/lua/lsp/indentation.lua index b7b65ac..5deae31 100644 --- a/homes/modules/programs/neovim/lua/lsp/indentation.lua +++ b/homes/modules/programs/neovim/lua/lsp/indentation.lua @@ -1,5 +1,5 @@ vim.api.nvim_create_autocmd("FileType", { - pattern = "lua", + pattern = { "lua", "nix", "gleam" }, callback = function() vim.opt_local.shiftwidth = 2 vim.opt_local.tabstop = 2 @@ -7,11 +7,14 @@ vim.api.nvim_create_autocmd("FileType", { end, }) -vim.api.nvim_create_autocmd("FileType", { - pattern = "nix", - callback = function() - vim.opt_local.shiftwidth = 2 - vim.opt_local.tabstop = 2 - vim.opt_local.expandtab = true +vim.api.nvim_create_autocmd("User", { + pattern = "TelescopePreviewerLoaded", + callback = function(args) + local ft = args.data.filetype + if vim.tbl_contains({ "lua", "nix", "gleam", "rust" }, ft) then + vim.bo.shiftwidth = 2 + vim.bo.tabstop = 2 + vim.bo.expandtab = true + end end, }) diff --git a/homes/modules/programs/neovim/lua/lsp/lsp.lua b/homes/modules/programs/neovim/lua/lsp/lsp.lua index fd8bd1b..d115a00 100644 --- a/homes/modules/programs/neovim/lua/lsp/lsp.lua +++ b/homes/modules/programs/neovim/lua/lsp/lsp.lua @@ -84,6 +84,10 @@ servers.jdtls = { }, } +servers.protols = { + settings = {}, +} + -- Taken from nixCats example: -- If you were to comment out this autocommand -- and instead pass the on attach function directly to diff --git a/homes/modules/programs/neovim/lua/plugins/comment.lua b/homes/modules/programs/neovim/lua/plugins/comment.lua index cf45027..caae704 100644 --- a/homes/modules/programs/neovim/lua/plugins/comment.lua +++ b/homes/modules/programs/neovim/lua/plugins/comment.lua @@ -8,13 +8,13 @@ return { line = "cc", block = "bc", }, - opLeader = { + opleader = { line = "c", block = "b", }, extra = { - above = "c0", - below = "bo", + above = "c", + below = "co", eol = "cA", }, }) diff --git a/homes/modules/programs/neovim/lua/plugins/format.lua b/homes/modules/programs/neovim/lua/plugins/format.lua index 2097d75..2cd28a4 100644 --- a/homes/modules/programs/neovim/lua/plugins/format.lua +++ b/homes/modules/programs/neovim/lua/plugins/format.lua @@ -11,10 +11,11 @@ return { conform.setup({ formatters_by_ft = { - lua = nixCats("lang.lua.format") and { "stylua" } or nil, - nix = nixCats("lang.nix.format") and { "nixfmt" } or nil, - rust = nixCats("lang.rust.format") and { "rustfmt", lsp_format = "fallback" } or nil, - haskell = nixCats("lang.haskell.format") and { "ormolu" } or nil, + lua = nixCats("lang.lua") and { "stylua" } or nil, + nix = nixCats("lang.nix") and { "nixfmt" } or nil, + rust = nixCats("lang.rust") and { "rustfmt", lsp_format = "fallback" } or nil, + haskell = nixCats("lang.haskell") and { "ormolu" } or nil, + proto = nixCats("lang.protobuf") and { "buf" } or nil, }, format_on_save = { timeout_ms = 500, diff --git a/homes/modules/programs/neovim/nixcats.nix b/homes/modules/programs/neovim/nixcats.nix index a90113f..2527c0d 100644 --- a/homes/modules/programs/neovim/nixcats.nix +++ b/homes/modules/programs/neovim/nixcats.nix @@ -59,24 +59,21 @@ in tree-sitter ]; lang = { - lua = { - lsp = [ lua-language-server ]; - format = [ stylua ]; - }; - nix = { - lsp = [ - nil - nix-doc # TODO: i forgot what this is for - ]; - format = [ nixfmt ]; - }; - rust = { - lsp = [ - cargo - mpkgs.rust-analyzer - ]; - format = [ rustfmt ]; - }; + lua = [ + lua-language-server + stylua + ]; + nix = [ + nil + nix-doc # TODO: i forgot what this is for + nixfmt + ]; + rust = [ + cargo + mpkgs.rust-analyzer + # nightly rustfmt has nicer features :3 + inputs.fenix.packages.${system}.complete.rustfmt + ]; zig = [ spkgs.zls # FIX: using spkgs version as zls is broken rn ;-; ]; @@ -86,15 +83,19 @@ in gleam = [ gleam ]; - haskell = { - lsp = [ haskell-language-server ]; - format = [ ormolu ]; - }; + haskell = [ + haskell-language-server + ormolu + ]; java = [ jdt-language-server javaPackages.compiler.openjdk17 javaPackages.compiler.openjdk21 ]; + protobuf = [ + protols + buf + ]; }; }; @@ -188,11 +189,7 @@ in }; }; - extraWrapperArgs = { - test = [ - ''--set CATTESTVAR2 "It worked again!"'' - ]; - }; + extraWrapperArgs = { }; # lists of the functions you would have passed to # python.withPackages or lua.withPackages @@ -200,13 +197,9 @@ in # in your lua config via # vim.g.python3_host_prog # or run from nvim terminal via :!-python3 - extraPython3Packages = { - test = _: [ ]; - }; + extraPython3Packages = { }; # populates $LUA_PATH and $LUA_CPATH - extraLuaPackages = { - test = [ (_: [ ]) ]; - }; + extraLuaPackages = { }; }; # see :help nixCats.flake.outputs.packageDefinitions @@ -223,12 +216,10 @@ in # IMPORTANT: # your alias may not conflict with your other packages. aliases = [ - "auroravim" "auravim" "foxyvim" "avix" "fvix" - "auim" ]; }; # and a set of categories that you want @@ -247,26 +238,15 @@ in comment = true; lang = { - lua = { - lsp = true; - format = true; - }; - nix = { - lsp = true; - format = true; - }; - rust = { - lsp = true; - format = true; - }; + lua = true; + nix = true; + rust = true; zig = true; elixir = true; gleam = true; - haskell = { - lsp = true; - format = true; - }; + haskell = true; java = true; + protobuf = true; }; }; }; diff --git a/homes/modules/programs/nixcord.nix b/homes/modules/programs/nixcord.nix index e5f1fa5..6ce4c88 100644 --- a/homes/modules/programs/nixcord.nix +++ b/homes/modules/programs/nixcord.nix @@ -1,4 +1,5 @@ -{inputs, ...}: { +{ inputs, ... }: +{ imports = [ inputs.nixcord.homeModules.nixcord ]; @@ -157,7 +158,6 @@ "1436964273162289185" "1436988320474206311" "1449837047383855119" - "1436965652861685891" "1436968495190642722" "1465424321919975454" "1468324280445046824" @@ -202,6 +202,7 @@ "1419557866502754334" "1436985041203892315" "1438071327515742229" + "1436965652861685891" ]; } { @@ -247,4 +248,8 @@ ]; }; }; + + programs.nixcord.config.plugins.bypassStatus = { + enable = true; + }; } diff --git a/homes/modules/programs/yazi/yazi.nix b/homes/modules/programs/yazi/yazi.nix index 9943358..f9b1bfe 100644 --- a/homes/modules/programs/yazi/yazi.nix +++ b/homes/modules/programs/yazi/yazi.nix @@ -1,4 +1,5 @@ -{upkgs, ...}: { +{ upkgs, ... }: +{ # optional dependencies can be found here: # https://yazi-rs.github.io/docs/installation/ home.packages = with upkgs; [ @@ -23,12 +24,12 @@ mgr.prepend_keymap = [ # drag and drop!! { - on = [""]; + on = [ "" ]; run = ''shell "ripdrag -x -a \"$@\"" --confirm''; } # copy hovered file to clipboard { - on = [""]; + on = [ "" ]; run = ''shell -- path=%h; echo "file://$path" | wl-copy -t text/uri-list''; } ]; @@ -170,7 +171,7 @@ [filechooser] cmd=${upkgs.xdg-desktop-portal-termfilechooser}/share/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh default_dir=$HOME - env=TERMCMD='kitty --title filechooser' + env=TERMCMD='alacritty --title filechooser -e ' open_mode=suggested save_mode=last ''; diff --git a/homes/modules/scripts/task-manager.sh b/homes/modules/scripts/task-manager.sh index 068eb79..1242fa4 100755 --- a/homes/modules/scripts/task-manager.sh +++ b/homes/modules/scripts/task-manager.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -pkill -f "kitty --title btop -e btop" || { kitty --title btop -e btop & disown; } +pkill -f "alacritty --title btop -e btop" || { alacritty --title btop -e btop & disown; } diff --git a/homes/modules/shell/zsh.nix b/homes/modules/shell/zsh.nix index d1c9849..a004edb 100644 --- a/homes/modules/shell/zsh.nix +++ b/homes/modules/shell/zsh.nix @@ -65,9 +65,6 @@ # upgrades the system upgrade = "cdns && nix flake update && nh os switch ./ --accept-flake-config"; - # kitty's ssh command (to fix xterm and other stuff qwq) - kssh = "kitty +kitten ssh"; - # pipes are prettyyyy!!!! :3333 pipes1 = "pipes.sh -r 1024 -p 8 -f 30"; pipes2 = "pipes.sh -r 4096 -p 16 -f 100"; diff --git a/homes/modules/themeing/wallust/templates/alacritty-template.toml b/homes/modules/themeing/wallust/templates/alacritty-template.toml new file mode 100644 index 0000000..c1a06de --- /dev/null +++ b/homes/modules/themeing/wallust/templates/alacritty-template.toml @@ -0,0 +1,27 @@ +[colors.primary] +background = '{{ background }}' +foreground = '{{ foreground }}' + +[colors.cursor] +cursor = '{{ cursor }}' +text = '{{ cursor }}' + +[colors.normal] +black = '{{ color0 }}' +red = '{{ color1 }}' +green = '{{ color2 }}' +yellow = '{{ color3 }}' +blue = '{{ color4 }}' +magenta = '{{ color5 }}' +cyan = '{{ color6 }}' +white = '{{ color7 }}' + +[colors.bright] +black = '{{ color8 }}' +red = '{{ color9 }}' +green = '{{ color10 }}' +yellow = '{{ color11 }}' +blue = '{{ color12 }}' +magenta = '{{ color13 }}' +cyan = '{{ color14 }}' +white = '{{ color15 }}' diff --git a/homes/modules/themeing/wallust/templates/foot-template.ini b/homes/modules/themeing/wallust/templates/foot-template.ini new file mode 100644 index 0000000..a8093e2 --- /dev/null +++ b/homes/modules/themeing/wallust/templates/foot-template.ini @@ -0,0 +1,24 @@ +[colors] +alpha=1.000000 +alpha-mode=default +background={{ background | strip }} +foreground={{ foreground | strip }} +selection-background={{ foreground | strip }} +selection-foreground={{ background | strip }} +regular0={{ color0 | strip }} +regular1={{ color1 | strip }} +regular2={{ color2 | strip }} +regular3={{ color3 | strip }} +regular4={{ color4 | strip }} +regular5={{ color5 | strip }} +regular6={{ color6 | strip }} +regular7={{ color7 | strip }} +bright0={{ color8 | strip }} +bright1={{ color9 | strip }} +bright2={{ color10 | strip }} +bright3={{ color11 | strip }} +bright4={{ color12 | strip }} +bright5={{ color13 | strip }} +bright6={{ color14 | strip }} +bright7={{ color15 | strip }} +urls={{ color13 | strip }} diff --git a/homes/modules/themeing/wallust/templates/mango-template.conf b/homes/modules/themeing/wallust/templates/mango-template.conf new file mode 100644 index 0000000..0ff2dea --- /dev/null +++ b/homes/modules/themeing/wallust/templates/mango-template.conf @@ -0,0 +1,11 @@ +# background color of the root window +rootcolor=0x{{ color12 | strip }}ff + +# inactive window border +bordercolor=0x{{ color0 | strip }}ff + +# active window border +focuscolor=0x{{ color14 | strip }}ff + +# urgent / alerted window border +urgentcolor=0x{{ color10 | strip }}ff diff --git a/homes/modules/themeing/wallust/wallust.toml b/homes/modules/themeing/wallust/wallust.toml index ff82190..cccd8d5 100644 --- a/homes/modules/themeing/wallust/wallust.toml +++ b/homes/modules/themeing/wallust/wallust.toml @@ -13,12 +13,18 @@ equibop.target = "~/.config/equibop/themes/base16-colors.css" equicord.template = "discord-template.css" equicord.target = "~/.config/Equicord/themes/base16-colors.css" -kitty.template = "kitty-template.conf" -kitty.target = "~/.config/kitty/theme.conf" - hyprland.template = "hyprland-template.conf" hyprland.target = "~/.config/hypr/colors.conf" +mango.template = "mango-template.conf" +mango.target = "~/.config/mango/colors.conf" + +foot.template = "foot-template.ini" +foot.target = "~/.config/foot/theme.ini" + +alacritty.template = "alacritty-template.toml" +alacritty.target = "~/.config/alacritty/theme.toml" + waybar.template = "waybar-template.css" waybar.target = "~/.config/waybar/colors.css" diff --git a/homes/modules/wm/hyprland/hypr/windowrules.conf b/homes/modules/wm/hyprland/hypr/windowrules.conf index 1d2c078..cbda8e0 100644 --- a/homes/modules/wm/hyprland/hypr/windowrules.conf +++ b/homes/modules/wm/hyprland/hypr/windowrules.conf @@ -1,10 +1,19 @@ # window rules +# ---------------------------------------------------------------------------- # +# terminal - blur +windowrule { + name = terminal-blur + match:class = ^(foot|Alacritty)$ + match:fullscreen = false + opacity = 0.95 +} + # ---------------------------------------------------------------------------- # # task manager windowrule { - name = task-manager - match:class = ^(kitty)$ + name = terminal-manager + match:class = ^(foot|Alacritty)$ match:title = ^(btop)$ float = true center = true @@ -15,33 +24,13 @@ windowrule { # terminal filechooser windowrule { name = terminal-filechooser - match:class = ^(kitty)$ + match:class = ^(foot|Alacritty)$ match:title = ^(filechooser)$ float = true center = true size = (monitor_w*0.85) (monitor_h*0.85) } -# ---------------------------------------------------------------------------- # -# yazi explorer -#windowrule { - #name = yazi - #match:class = ^(kitty)$ - #match:title = ^(yazi)$ - #float = true - #center = true - #size = (monitor_w*0.85) (monitor_h*0.85) -#} - -# ---------------------------------------------------------------------------- # -# kitty - blur -windowrule { - name = kitty-blur - match:class = ^(kitty)$ - match:fullscreen = false - opacity = 0.95 -} - # ---------------------------------------------------------------------------- # # imhex - blur windowrule { diff --git a/homes/modules/wm/hyprland/hyprland.nix b/homes/modules/wm/hyprland/hyprland.nix index 49570e5..cc22886 100644 --- a/homes/modules/wm/hyprland/hyprland.nix +++ b/homes/modules/wm/hyprland/hyprland.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ wayland.windowManager.hyprland = { enable = true; package = null; @@ -23,8 +24,8 @@ "$mod" = "SUPER"; # applications - "$terminal" = "kitty"; - "$explorer" = "kitty -e yazi"; + "$terminal" = "alacritty"; + "$explorer" = "alacritty -e yazi"; "$browser" = "zen-twilight"; # menu @@ -130,6 +131,13 @@ "alt, tab, exec, pkill -x rofi || rofi -modi window -show window -show-icons" "$mod, v, exec, pkill -x rofi || cliphist list | rofi -dmenu | cliphist decode | wl-copy" + # manage windows / session + "$mod+alt, c, killactive" + "$mod, f, fullscreen" + "$mod, x, togglefloating" + "$mod, i, togglesplit" + "$mod+Alt, Delete, exit" # exit hyprland + # screenshots # todo: add active monitor "$mod, s, exec, grim -g \"\$(slurp -d)\" - | wl-copy" # region @@ -152,13 +160,6 @@ "Shift_R, XF86AudioPlay, exec, playerctl shuffle toggle" "Shift_R, XF86AudioNext, exec, playerctl loop track" - # manage windows / session - "$mod+alt, c, killactive" - "$mod, f, fullscreen" - "$mod, x, togglefloating" - "$mod, i, togglesplit" - "$mod+Alt, Delete, exit" # exit hyprland - # move focus "$mod, h, movefocus, l" "$mod, j, movefocus, d" @@ -278,26 +279,29 @@ ]; layerrule = [ - #"blur, aurorashell" - #"ignorealpha 0.7, aurorashell" + #"blur, aurorashell" + #"ignorealpha 0.7, aurorashell" - "blur on, match:namespace waybar" - "ignore_alpha 0, match:namespace waybar" + "blur on, match:namespace waybar" + "ignore_alpha 0, match:namespace waybar" - "blur on, match:namespace rofi" - "xray on, match:namespace rofi" - "ignore_alpha 0, match:namespace rofi" + "blur on, match:namespace rofi" + "xray on, match:namespace rofi" + "ignore_alpha 0, match:namespace rofi" ]; env = [ - "EDITOR,auravim" - "XCURSOR_THEME,Bunny (Icy) and Strawberries" "XCURSOR_SIZE,24" "HYPRCURSOR_THEME,Bunny (Icy) and Strawberries" "HYPRCURSOR_SIZE,24" "QT_QPA_PLATFORM,wayland" + + # makes portals work correctly + "QT_QPA_PLATFORMTHEME,xdgdesktopportal" + # the other option that might work :3 + #"QT_QPA_PLATFORMTHEME,flatpak" ]; }; }; diff --git a/homes/modules/wm/mango/default.nix b/homes/modules/wm/mango/default.nix new file mode 100644 index 0000000..6f55063 --- /dev/null +++ b/homes/modules/wm/mango/default.nix @@ -0,0 +1,15 @@ +{ inputs, ... }: +{ + imports = [ + inputs.mango.hmModules.mango + ]; + + wayland.windowManager.mango = { + enable = true; + }; + + xdg.configFile."mango" = { + recursive = true; + source = ./mango; + }; +} diff --git a/homes/modules/wm/mango/mango/config.conf b/homes/modules/wm/mango/mango/config.conf new file mode 100644 index 0000000..ef80edb --- /dev/null +++ b/homes/modules/wm/mango/mango/config.conf @@ -0,0 +1,245 @@ +################################################################################ +##### Monitors ///////////////////////////////////////////////////////////////// +################################################################################ + +# note: display stream compression pending for open source +# amd gpu driver and my monitor (VG279QM) only supports DP 1.2 +# so no >240hz atm + +# main monitor +monitorrule = name:DP-2,width:1920,height:1080,refresh:240,x:0,y:0 +# second monitor +monitorrule = name:DP-3,width:1920,height:1080,refresh:144,x:1920,y:0 +# third monitor (drawing tablet) +monitorrule = name:HDMI-A-2,width:2560,height:1440,refresh:60,x:3840,y:0 +# tv +monitorrule = name:HDMI-A-1,width:1920,height:1080,refresh:60,x:-1920,y:0 + +################################################################################ +##### Startup ////////////////////////////////////////////////////////////////// +################################################################################ + +exec-once = waybar +exec-once = waybar --config ~/.config/mango/waybar.jsonc +exec-once = awww-daemon + +exec-once = wl-paste --type text --watch cliphist store +exec-once = wl-paste --type image --watch cliphist store +exec-once = wl-clip-persist --clipboard regular + +exec-once = playerctld daemon + +exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=wlroots PATH + +################################################################################ +##### Themeing ///////////////////////////////////////////////////////////////// +################################################################################ + +borderpx = 2 + +gappih = 5 # inner gap horizontal +gappiv = 5 # inner gap vertical +gappoh = 10 # outer gap horizontal +# we set the bottom vertical gap by using an empty layer that defines an exclusive zone +gappov = 0 # outer gap vertical + +border_radius = 8 + +focused_opacity = 1.0 +unfocused_opacity = 1.0 + +blur = 1 +blur_layer = 1 +blur_optimized = 1 +blur_params_radius = 6 +blur_params_num_passes = 2 +blur_params_noise = 0.02 +blur_params_brightness = 0.9 +blur_params_contrast = 0.9 +blur_params_saturation = 1.2 + +cursor_size=24 +cursor_theme=Bunny (Icy) and Strawberries + +################################################################################ +##### Animations /////////////////////////////////////////////////////////////// +################################################################################ + +animations=1 +layer_animations=1 + +################################################################################ +##### Input //////////////////////////////////////////////////////////////////// +################################################################################ + +# keyboard stuff +repeat_rate = 50 +repeat_delay = 300 + +# mouse stuff +accel_profile = 0 + +################################################################################ +##### Keybinds ///////////////////////////////////////////////////////////////// +################################################################################ + +# applications +bind = SUPER, t, spawn, alacritty +bind = SUPER, e, spawn, alacritty -e yazi +bind = SUPER, r, spawn, zen-twilight + +# rofi +bind = SUPER, d, spawn_shell, pkill -x rofi || rofi -show drun -show-icons +bind = SUPER, v, spawn_shell, pkill -x rofi || cliphist list | rofi -dmenu | cliphist decode | wl-copy +bind = ALT, TAB, spawn_shell, pkill -x rofi || rofi -modi window -show window -show-icons + +# manage session +bind = SUPER+ALT, c, killclient +bind = SUPER+SHIFT, r, reload_config +bind = SUPER+ALT, delete, quit + +# screenshots +# grim - | wl-copy +bind = SUPER, s, spawn_shell, grim -g $(slurp -d) - | wl-copy +bind = SUPER+ALT, s, spawn_shell, grim -g $(slurp -o) - | wl-copy +bind = SUPER+CTRL, s, spawn_shell, grim - | wl-copy + +# task manager +bind = SUPER+CTRL, escape, spawn, task-manager.sh +bind = SUPER+CTRL, grave, spawn, task-manager.sh + +# color picker +bind = SUPER, n, spawn, hyprpicker -v +# lock screen +bind = SUPER+ALT, y, spawn, hyprlock + +# media keybinds +bind = NONE, XF86AudioMute, spawn, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle +bind = NONE, XF86AudioPlay, spawn, playerctl play-pause +bind = NONE, XF86AudioNext, spawn, playerctl next +bind = NONE, XF86AudioPrev, spawn, playerctl previous + +# needs to be `bind` for some reason, doesn't work otherwise +# if all of them are `bind` and not `binds`, it also doesn't work +# weird bug!! qwq +binds = Shift_R, XF86AudioPlay, spawn_shell, playerctl shuffle toggle +binds = Shift_R, XF86AudioNext, spawn, playerctl loop track + +bind = NONE, XF86AudioRaiseVolume, spawn, wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+ +bind = NONE, XF86AudioLowerVolume, spawn, wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%- + +binds = Shift_R, XF86AudioRaiseVolume, spawn, playerctl volume 0.05+ +binds = Shift_R, XF86AudioLowerVolume, spawn, playerctl volume 0.05- + +# window states +bind = SUPER, f, togglefullscreen +bind = SUPER+ALT, f, togglefakefullscreen +bind = SUPER, x, togglefloating + +# layouts +bind = SUPER, u, switch_layout + +# move focus - l/d/u/r +bind = SUPER, h, focusdir, left +bind = SUPER, j, focusdir, down +bind = SUPER, k, focusdir, up +bind = SUPER, l, focusdir, right + +# move focus - stack +bind = SUPER+SHIFT, j, focusstack, next +bind = SUPER+SHIFT, k, focusstack, prev + +# swap window - l/d/u/r +bind = SUPER+ALT, h, exchange_client, left +bind = SUPER+ALT, j, exchange_client, down +bind = SUPER+ALT, k, exchange_client, up +bind = SUPER+ALT, l, exchange_client, right + +# swap window - stack +bind = SUPER+SHIFT, h, exchange_stack_client, next +bind = SUPER+SHIFT, l, exchange_stack_client, prev + +# swap focused window with master +bind = SUPER, g, zoom + +# view tag +BIND = SUPER, 1, view, 1, 0 +BIND = SUPER, 2, view, 2, 0 +BIND = SUPER, 3, view, 3, 0 +BIND = SUPER, 4, view, 4, 0 +BIND = SUPER, 5, view, 5, 0 +BIND = SUPER, 6, view, 6, 0 +BIND = SUPER, 7, view, 7, 0 +BIND = SUPER, 8, view, 8, 0 +BIND = SUPER, 9, view, 9, 0 +BIND = SUPER, 0, view, 10, 0 +BIND = SUPER, minus, view, 11, 0 +BIND = SUPER, equal, view, 12, 0 + +# toggle tag on monitor +BIND = SUPER+ALT, 1, toggletag, 1, 0 +BIND = SUPER+ALT, 2, toggletag, 2, 0 +BIND = SUPER+ALT, 3, toggletag, 3, 0 +BIND = SUPER+ALT, 4, toggletag, 4, 0 +BIND = SUPER+ALT, 5, toggletag, 5, 0 +BIND = SUPER+ALT, 6, toggletag, 6, 0 +BIND = SUPER+ALT, 7, toggletag, 7, 0 +BIND = SUPER+ALT, 8, toggletag, 8, 0 +BIND = SUPER+ALT, 9, toggletag, 9, 0 +BIND = SUPER+ALT, 0, toggletag, 10, 0 +BIND = SUPER+ALT, minus, toggletag, 11, 0 +BIND = SUPER+ALT, equal, toggletag, 12, 0 + +# move window to tag +BIND = SUPER+SHIFT, 1, tag, 1, 0 +BIND = SUPER+SHIFT, 2, tag, 2, 0 +BIND = SUPER+SHIFT, 3, tag, 3, 0 +BIND = SUPER+SHIFT, 4, tag, 4, 0 +BIND = SUPER+SHIFT, 5, tag, 5, 0 +BIND = SUPER+SHIFT, 6, tag, 6, 0 +BIND = SUPER+SHIFT, 7, tag, 7, 0 +BIND = SUPER+SHIFT, 8, tag, 8, 0 +BIND = SUPER+SHIFT, 9, tag, 9, 0 +BIND = SUPER+SHIFT, 0, tag, 10, 0 +BIND = SUPER+SHIFT, minus, tag, 11, 0 +BIND = SUPER+SHIFT, equal, tag, 12, 0 + +# mouse binds :3 +mousebind = SUPER, btn_left, moveresize, curmove +mousebind = SUPER, btn_right, moveresize, curresize + +################################################################################ +##### Miscellaneous //////////////////////////////////////////////////////////// +################################################################################ + +# focus follows mouse cursor +sloppyfocus = 1 + +# automatically focus windows when they request activiation +focus_on_activate = 1 + +# scroll speed +axis_scroll_factor = 1.0 + +# disables hotarea for overview mode +enable_hotarea = 0 + +################################################################################ +##### Environment Variables //////////////////////////////////////////////////// +################################################################################ + +env = XCURSOR_THEME,Bunny (Icy) and Strawberries +env = XCURSOR_SIZE,24 + +################################################################################ +##### Imports ////////////////////////////////////////////////////////////////// +################################################################################ + +# windowrules!!! <3 +source = ./windowrules.conf + +# layerrules :3 +source = ./layerrules.conf + +# colors generated from palette generator +source = ./colors.conf diff --git a/homes/modules/wm/mango/mango/layerrules.conf b/homes/modules/wm/mango/mango/layerrules.conf new file mode 100644 index 0000000..5ae4f70 --- /dev/null +++ b/homes/modules/wm/mango/mango/layerrules.conf @@ -0,0 +1,3 @@ +# ---------------------------------------------------------------------------- # +# slurp no blur +layerrule=noblur:1,layer_name:selection diff --git a/homes/modules/wm/mango/mango/waybar.jsonc b/homes/modules/wm/mango/mango/waybar.jsonc new file mode 100644 index 0000000..9ba22ad --- /dev/null +++ b/homes/modules/wm/mango/mango/waybar.jsonc @@ -0,0 +1,5 @@ +{ + "layer": "bottom", + "position": "bottom", + "height": 10, +} diff --git a/homes/modules/wm/mango/mango/windowrules.conf b/homes/modules/wm/mango/mango/windowrules.conf new file mode 100644 index 0000000..2a8afd7 --- /dev/null +++ b/homes/modules/wm/mango/mango/windowrules.conf @@ -0,0 +1,7 @@ +# ---------------------------------------------------------------------------- # +# i don't wanna minimise windows +windowrule = ignore_minimise + +# ---------------------------------------------------------------------------- # +# terminal - blur +windowrule = appid:^(foot|Alacritty)$, focused_opacity:0.95, unfocused_opacity:0.95 diff --git a/homes/modules/wm/river.nix b/homes/modules/wm/river.nix index 3fac1a0..33daf83 100644 --- a/homes/modules/wm/river.nix +++ b/homes/modules/wm/river.nix @@ -1,79 +1,84 @@ -{spkgs, ...}: { - wayland.windowManager.river = let - layout = "rivertile"; - in { - enable = true; - xwayland.enable = true; - package = spkgs.river-classic; # FIX: using spkgs version as zls is broken rn ;-; +{ spkgs, ... }: +{ + wayland.windowManager.river = + let + layout = "rivertile"; + in + { + enable = true; + xwayland.enable = true; + package = spkgs.river-classic; # FIX: using spkgs version as zls is broken rn ;-; - settings = let - main = "Super"; + settings = + let + main = "Super"; - # applications - terminal = "kitty"; - browser = "firefox"; - in { - default-layout = "${layout}"; - output-layout = "${layout}"; - border-width = 1; + # applications + terminal = "alacritty"; + browser = "firefox"; + in + { + default-layout = "${layout}"; + output-layout = "${layout}"; + border-width = 1; - spawn = [ - ''${layout}'' + spawn = [ + "${layout}" - "awww-daemon" - "waybar" - ]; + "awww-daemon" + "waybar" + ]; - map.normal = { - "${main} C" = "close"; # close focused window - "${main}+Alt Delete" = "exit"; # exit river + map.normal = { + "${main} C" = "close"; # close focused window + "${main}+Alt Delete" = "exit"; # exit river - # app launcher - "${main} D" = ''spawn "pkill -x rofi || rofi -show drun -show-icons"''; - "Alt Tab" = ''spawn "pkill -x rofi || rofi -modi window -show window -show-icons"''; + # app launcher + "${main} D" = ''spawn "pkill -x rofi || rofi -show drun -show-icons"''; + "Alt Tab" = ''spawn "pkill -x rofi || rofi -modi window -show window -show-icons"''; - # spawn applications - "${main} T" = ''spawn "${terminal}"''; - "${main} R" = ''spawn "${browser}"''; + # spawn applications + "${main} T" = ''spawn "${terminal}"''; + "${main} R" = ''spawn "${browser}"''; - # move focused view to top of layout stack - "${main} N" = ''zoom''; + # move focused view to top of layout stack + "${main} N" = "zoom"; - # focus next/previous view - "${main} J" = "focus-view previous"; - "${main} K" = "focus-view next"; - # move to next/previous output - "${main} H" = "focus-output previous"; - "${main} L" = "focus-output next"; + # focus next/previous view + "${main} J" = "focus-view previous"; + "${main} K" = "focus-view next"; + # move to next/previous output + "${main} H" = "focus-output previous"; + "${main} L" = "focus-output next"; - # swap next/previous view - "${main}+Alt J" = "swap previous"; - "${main}+Alt K" = "swap next"; - # send view to next/previous output - # and switch to that output (wip) - "${main}+Alt H" = "send-to-output previous"; - #"${main}+Alt H" = "focus-output previous"; - "${main}+Alt L" = "send-to-output next"; - #"${main}+Alt L" = "focus-output next"; + # swap next/previous view + "${main}+Alt J" = "swap previous"; + "${main}+Alt K" = "swap next"; + # send view to next/previous output + # and switch to that output (wip) + "${main}+Alt H" = "send-to-output previous"; + #"${main}+Alt H" = "focus-output previous"; + "${main}+Alt L" = "send-to-output next"; + #"${main}+Alt L" = "focus-output next"; - # move views - #"${main}+Alt H" = "move left 100"; - #"${main}+Alt J" = "move down 100"; - #"${main}+Alt K" = "move up 100"; - #"${main}+Alt L" = "move right 100"; + # move views + #"${main}+Alt H" = "move left 100"; + #"${main}+Alt J" = "move down 100"; + #"${main}+Alt K" = "move up 100"; + #"${main}+Alt L" = "move right 100"; - # snap views - #"${main}+Control H" = "snap left"; - #"${main}+Control J" = "snap down"; - #"${main}+Control K" = "snap up"; - #"${main}+Control L" = "snap right"; + # snap views + #"${main}+Control H" = "snap left"; + #"${main}+Control J" = "snap down"; + #"${main}+Control K" = "snap up"; + #"${main}+Control L" = "snap right"; - # resize views - #"${main}+Shift H" = "resize horizontal -100"; - #"${main}+Shift J" = "resize vertical -100"; - #"${main}+Shift K" = "resize vertical 100"; - #"${main}+Shift L" = "resize horizontal 100"; - }; + # resize views + #"${main}+Shift H" = "resize horizontal -100"; + #"${main}+Shift J" = "resize vertical -100"; + #"${main}+Shift K" = "resize vertical 100"; + #"${main}+Shift L" = "resize horizontal 100"; + }; + }; }; - }; } diff --git a/homes/modules/wm/sway.nix b/homes/modules/wm/sway.nix index 36db54e..a5c2f58 100644 --- a/homes/modules/wm/sway.nix +++ b/homes/modules/wm/sway.nix @@ -1,49 +1,52 @@ -{config, ...}: { +{ config, ... }: +{ wayland.windowManager.sway = { enable = true; config = rec { modifier = "Mod4"; # Mod4 = Super/Meta - terminal = "kitty"; + terminal = "alacritty"; # disable sway bar - bars = []; + bars = [ ]; # set border colors #colors = { #focused = startup = [ - {command = "awww-daemon";} - {command = "waybar";} + { command = "awww-daemon"; } + { command = "waybar"; } ]; - keybindings = let - main = config.wayland.windowManager.sway.config.modifier; - terminal = config.wayland.windowManager.sway.config.terminal; - browser = "firefox"; - in { - "${main}+c" = "kill"; # close focused window - "${main}+Alt+Delete" = "exit"; # exit sway + keybindings = + let + main = config.wayland.windowManager.sway.config.modifier; + terminal = config.wayland.windowManager.sway.config.terminal; + browser = "firefox"; + in + { + "${main}+c" = "kill"; # close focused window + "${main}+Alt+Delete" = "exit"; # exit sway - # open launcher - "${main}+d" = "exec pkill -x rofi || rofi -show drun -show-icons"; - "Alt+Tab" = "exec pkill -x rofi || rofi -modi window -show window -show-icons"; + # open launcher + "${main}+d" = "exec pkill -x rofi || rofi -show drun -show-icons"; + "Alt+Tab" = "exec pkill -x rofi || rofi -modi window -show window -show-icons"; - "${main}+t" = "exec ${terminal}"; # open terminal - "${main}+r" = "exec ${browser}"; # open browser + "${main}+t" = "exec ${terminal}"; # open terminal + "${main}+r" = "exec ${browser}"; # open browser - # move focus - "${main}+h" = "focus left"; - "${main}+j" = "focus down"; - "${main}+k" = "focus up"; - "${main}+l" = "focus right"; + # move focus + "${main}+h" = "focus left"; + "${main}+j" = "focus down"; + "${main}+k" = "focus up"; + "${main}+l" = "focus right"; - # move focused window - "${main}+Alt+h" = "move left"; - "${main}+Alt+j" = "move down"; - "${main}+Alt+k" = "move up"; - "${main}+Alt+l" = "move right"; - }; + # move focused window + "${main}+Alt+h" = "move left"; + "${main}+Alt+j" = "move down"; + "${main}+Alt+k" = "move up"; + "${main}+Alt+l" = "move right"; + }; }; }; } diff --git a/hosts/nixarawrui/default.nix b/hosts/nixarawrui/default.nix index b07dbb5..fda310c 100644 --- a/hosts/nixarawrui/default.nix +++ b/hosts/nixarawrui/default.nix @@ -84,10 +84,6 @@ environment.sessionVariables = { NIXOS_OZONE_WL = "1"; - - # makes portals work correctly - QT_QPA_PLATFORMTHEME = "xdgdesktopportal"; - #QT_QPA_PLATFORMTHEME = "flatpak"; # sometimes might need this }; xdg.portal = { @@ -236,6 +232,10 @@ portalPackage = upkgs.hyprland-git.xdg-desktop-portal-hyprland; }; + mango = { + enable = true; + }; + river-classic = { package = spkgs.river-classic; # FIX: using spkgs version as zls is broken rn ;-; enable = true; @@ -274,7 +274,7 @@ fish.enable = true; silentSDDM = { - enable = false; + enable = true; theme = "rei"; }; }; @@ -322,8 +322,6 @@ libxscrnsaver ]; }).run - - inputs.nix-alien.packages.${stdenv.hostPlatform.system}.nix-alien ]; system.stateVersion = "24.11"; diff --git a/snow.nix b/snow.nix index c927050..b29ba1a 100644 --- a/snow.nix +++ b/snow.nix @@ -1,125 +1,136 @@ -{cerulean, ...} @ inputs: +{ cerulean, ... }@inputs: cerulean.mkNexus ./. (self: { nexus = { - args = {inherit inputs;}; + args = { inherit inputs; }; - modules = with inputs; []; + modules = with inputs; [ ]; base = inputs.nixpkgs; + homeManager = inputs.home-manager; groups = { - servers = {}; + servers = { }; }; - nodes = let - inherit - (self.nexus) - groups - ; - in { - nixarawrui = { - system = "x86_64-linux"; + nodes = + let + inherit (self.nexus) + groups + ; + in + { + nixarawrui = { + system = "x86_64-linux"; - base = inputs.nixpkgs-unstable; + base = inputs.nixpkgs-unstable; + homeManager = inputs.home-manager-unstable; - modules = with inputs; [ - sddm-silent.nixosModules.default - ]; - }; + modules = with inputs; [ + sddm-silent.nixosModules.default + inputs.mango.nixosModules.mango + ]; + }; - arcturus = { - system = "x86_64-linux"; + arcturus = { + system = "x86_64-linux"; - groups = [ - groups.servers - ]; + groups = [ + groups.servers + ]; - modules = with inputs; [ - microvm.nixosModules.host + modules = with inputs; [ + microvm.nixosModules.host - { - microvm.vms = { - home-assistant = { - autostart = true; + { + microvm.vms = { + home-assistant = { + autostart = true; - config = { - imports = [./vms/home-assistant/default.nix]; + config = { + imports = [ ./vms/home-assistant/default.nix ]; - networking.hostName = "home-assistant"; + networking.hostName = "home-assistant"; - boot.kernelParams = ["console=ttyS0" "console=ttyS1" "8250.nr_uarts=2"]; - systemd.services."serial-getty@ttyS1".enable = true; - - microvm = { - hypervisor = "qemu"; - - # needed to get interface working - qemu.extraArgs = [ - "-monitor" "unix:/var/lib/microvms/home-assistant/monitor.sock,server,nowait" - "-chardev" "socket,id=serial1,path=/var/lib/microvms/home-assistant/serial.sock,server=on,wait=off" - "-serial" "chardev:serial1" + boot.kernelParams = [ + "console=ttyS0" + "console=ttyS1" + "8250.nr_uarts=2" ]; + systemd.services."serial-getty@ttyS1".enable = true; - # memory cannot be 2GB so i doubled it and used 4GB: - # https://github.com/microvm-nix/microvm.nix/issues/171 - # TODO: can be fixed by turning off acpi in qemu - mem = 4096; # 4GB - vcpu = 2; + microvm = { + hypervisor = "qemu"; - interfaces = [ - { - type = "tap"; - id = "vm-hass"; - mac = "0a:00:a0:70:01:01"; - } - ]; + # needed to get interface working + qemu.extraArgs = [ + "-monitor" + "unix:/var/lib/microvms/home-assistant/monitor.sock,server,nowait" + "-chardev" + "socket,id=serial1,path=/var/lib/microvms/home-assistant/serial.sock,server=on,wait=off" + "-serial" + "chardev:serial1" + ]; - volumes = [ - #{ - #image = "/var/lib/microvms/home-assistant/data.img"; - #mountPoint = "/var/lib/hass"; - #autoCreate = false; - #} - ]; - }; + # memory cannot be 2GB so i doubled it and used 4GB: + # https://github.com/microvm-nix/microvm.nix/issues/171 + # TODO: can be fixed by turning off acpi in qemu + mem = 4096; # 4GB + vcpu = 2; - systemd.network.enable = true; - systemd.network.networks."20-lan" = { - matchConfig.Type = "ether"; - networkConfig = { - Address = ["10.16.1.127/24"]; - Gateway = "10.16.1.1"; - DNS = ["10.16.1.1"]; - IPv6AcceptRA = true; - DHCP = "yes"; + interfaces = [ + { + type = "tap"; + id = "vm-hass"; + mac = "0a:00:a0:70:01:01"; + } + ]; + + volumes = [ + #{ + #image = "/var/lib/microvms/home-assistant/data.img"; + #mountPoint = "/var/lib/hass"; + #autoCreate = false; + #} + ]; + }; + + systemd.network.enable = true; + systemd.network.networks."20-lan" = { + matchConfig.Type = "ether"; + networkConfig = { + Address = [ "10.16.1.127/24" ]; + Gateway = "10.16.1.1"; + DNS = [ "10.16.1.1" ]; + IPv6AcceptRA = true; + DHCP = "yes"; + }; }; }; }; }; - }; - } - ]; + } + ]; - deploy.ssh = { - host = "10.16.1.163"; - port = 2222; - user = "foxora"; + deploy.ssh = { + host = "10.16.1.163"; + port = 2222; + user = "foxora"; + }; + }; + + lyra = { + system = "x86_64-linux"; + + groups = [ + groups.servers + ]; + + deploy.ssh = { + host = "10.16.1.58"; + port = 2222; + user = "foxora"; + }; }; }; - - lyra = { - system = "x86_64-linux"; - - groups = [ - groups.servers - ]; - - deploy.ssh = { - host = "10.16.1.58"; - port = 2222; - user = "foxora"; - }; - }; - }; }; }) diff --git a/vms/home-assistant/default.nix b/vms/home-assistant/default.nix index 70bcd07..94f7c73 100644 --- a/vms/home-assistant/default.nix +++ b/vms/home-assistant/default.nix @@ -12,6 +12,13 @@ "esphome" "met" "radio_browser" + "hassio" + "stream" + "cast" + "plex" + "dhcp" + "go2rtc" + "mobile_app" ]; extraPackages = python3Packages: with python3Packages; [