diff --git a/flake.lock b/flake.lock index 4db0abc..6ecc379 100644 --- a/flake.lock +++ b/flake.lock @@ -55,34 +55,6 @@ "type": "github" } }, - "attic": { - "inputs": { - "crane": "crane", - "flake-compat": "flake-compat", - "flake-utils": [ - "flake-utils" - ], - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-stable": [ - "stable" - ] - }, - "locked": { - "lastModified": 1685309025, - "narHash": "sha256-pZxMM3AMP/ojwhrFD0A2ML4NOgehlBLGHseInnO5evc=", - "owner": "zhaofengli", - "repo": "attic", - "rev": "b1fb790b5f2afaaa1b2f7f18979b8318abe604bb", - "type": "github" - }, - "original": { - "owner": "zhaofengli", - "repo": "attic", - "type": "github" - } - }, "cmp-async-path": { "flake": false, "locked": { @@ -115,36 +87,6 @@ "type": "github" } }, - "crane": { - "inputs": { - "flake-compat": [ - "attic", - "flake-compat" - ], - "flake-utils": [ - "attic", - "flake-utils" - ], - "nixpkgs": [ - "attic", - "nixpkgs" - ], - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1677892403, - "narHash": "sha256-/Wi0L1spSWLFj+UQxN3j0mPYMoc7ZoAujpUF/juFVII=", - "owner": "ipetkov", - "repo": "crane", - "rev": "105e27adb70a9890986b6d543a67761cbc1964a2", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, "darwin": { "inputs": { "nixpkgs": [ @@ -231,22 +173,6 @@ "type": "github" } }, - "flake-compat_5": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -668,7 +594,7 @@ }, "neovim-nightly-overlay": { "inputs": { - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat", "flake-parts": "flake-parts", "hercules-ci-effects": "hercules-ci-effects", "neovim-flake": "neovim-flake", @@ -696,7 +622,7 @@ "nixpkgs": [ "nixpkgs" ], - "rust-overlay": "rust-overlay_2" + "rust-overlay": "rust-overlay" }, "locked": { "lastModified": 1685532165, @@ -737,25 +663,24 @@ }, "nix-super": { "inputs": { - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_3", "lowdown-src": "lowdown-src", "nixpkgs": [ - "nixpkgs" + "stable" ], "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1683240066, - "narHash": "sha256-XXTB64SAMukIt2suhoPP87QDKX9vB2ByXXuE7l2Vyxw=", + "lastModified": 1687621557, + "narHash": "sha256-FWtdWRmtzmqjjAsvYXefdZ2uVv5p5UfB7eftqsctSck=", "owner": "privatevoid-net", "repo": "nix-super", - "rev": "aaba1f91e7eba8ce029fa6bfa81ad9e14a13708d", + "rev": "c39cdf9ad2365509a602f8e2c6faa35aec1097a3", "type": "github" }, "original": { "owner": "privatevoid-net", "repo": "nix-super", - "rev": "aaba1f91e7eba8ce029fa6bfa81ad9e14a13708d", "type": "github" } }, @@ -955,7 +880,7 @@ }, "pre-commit-hooks": { "inputs": { - "flake-compat": "flake-compat_5", + "flake-compat": "flake-compat_4", "flake-utils": "flake-utils_4", "gitignore": "gitignore_2", "nixpkgs": "nixpkgs_7", @@ -977,7 +902,7 @@ }, "pre-commit-hooks-nix": { "inputs": { - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_2", "flake-utils": "flake-utils_2", "gitignore": "gitignore", "nixpkgs": [ @@ -1024,7 +949,6 @@ "agenix": "agenix", "arkenfox-userjs": "arkenfox-userjs", "asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver", - "attic": "attic", "cmp-async-path": "cmp-async-path", "copilot-lua": "copilot-lua", "flake-utils": "flake-utils", @@ -1046,33 +970,6 @@ } }, "rust-overlay": { - "inputs": { - "flake-utils": [ - "attic", - "crane", - "flake-utils" - ], - "nixpkgs": [ - "attic", - "crane", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1675391458, - "narHash": "sha256-ukDKZw922BnK5ohL9LhwtaDAdCsJL7L6ScNEyF1lO9w=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "383a4acfd11d778d5c2efcf28376cbd845eeaedf", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_2": { "inputs": { "flake-utils": [ "nil", diff --git a/flake.nix b/flake.nix index 4fac534..9eae8fc 100644 --- a/flake.nix +++ b/flake.nix @@ -17,11 +17,6 @@ agenix.inputs.nixpkgs.follows = "nixpkgs"; agenix.url = "github:ryantm/agenix"; - attic.inputs.flake-utils.follows = "flake-utils"; - attic.inputs.nixpkgs-stable.follows = "stable"; - attic.inputs.nixpkgs.follows = "nixpkgs"; - attic.url = "github:zhaofengli/attic"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.url = "github:nix-community/home-manager"; @@ -31,8 +26,8 @@ pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; - nix-super.url = "github:privatevoid-net/nix-super/aaba1f91e7eba8ce029fa6bfa81ad9e14a13708d"; - nix-super.inputs.nixpkgs.follows = "nixpkgs"; + nix-super.url = "github:privatevoid-net/nix-super"; + nix-super.inputs.nixpkgs.follows = "stable"; rofi-wayland.url = "github:lbonn/rofi/wayland"; rofi-wayland.flake = false; diff --git a/hosts/nixos-desktop/default.nix b/hosts/nixos-desktop/default.nix index 3b72865..43f39fa 100644 --- a/hosts/nixos-desktop/default.nix +++ b/hosts/nixos-desktop/default.nix @@ -18,6 +18,7 @@ personal.enable = true; }; programs.hyprland.nvidiaSupport = true; + programs.hyprland.keyboardLayouts = [ "us" "de" ]; services.mullvad.enable = true; programs.ledger.enable = true; }; diff --git a/modules/profiles/base.nix b/modules/profiles/base.nix index a623af5..86a70be 100644 --- a/modules/profiles/base.nix +++ b/modules/profiles/base.nix @@ -100,7 +100,6 @@ in statix manix nix-output-monitor - attic # other bat diff --git a/modules/programs/hyprland/_config.nix b/modules/programs/hyprland/_config.nix index c508c8a..67cd433 100644 --- a/modules/programs/hyprland/_config.nix +++ b/modules/programs/hyprland/_config.nix @@ -25,7 +25,7 @@ in # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { - kb_layout = de,us + kb_layout = ${concatStringsSep "," cfg.keyboardLayouts} kb_variant = kb_model = kb_options = grp:win_space_toggle,caps:escape diff --git a/modules/programs/hyprland/default.nix b/modules/programs/hyprland/default.nix index aec526e..2805a2e 100644 --- a/modules/programs/hyprland/default.nix +++ b/modules/programs/hyprland/default.nix @@ -25,6 +25,11 @@ in description = "enable window shadows"; default = true; }; + keyboardLayouts = mkOption { + type = types.listOf types.str; + description = "list of keyboard layouts"; + default = [ "de" "us" ]; + }; }; config = mkIf cfg.enable { diff --git a/modules/programs/nvim/default.nix b/modules/programs/nvim/default.nix index 47411b9..7e88008 100644 --- a/modules/programs/nvim/default.nix +++ b/modules/programs/nvim/default.nix @@ -239,11 +239,12 @@ in stylua sumneko-lua-language-server taplo + typst + typst-lsp yamlfmt ]; - plugins = with pkgs.vimPlugins; [ - lazy-nvim - nvim-treesitter.withAllGrammars + plugins = [ + pkgs.vimPlugins.lazy-nvim ]; }; }; diff --git a/modules/programs/nvim/plugins/default.nix b/modules/programs/nvim/plugins/default.nix index b28b845..89dc6af 100644 --- a/modules/programs/nvim/plugins/default.nix +++ b/modules/programs/nvim/plugins/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ lib, pkgs, ... }: with builtins; { @@ -115,9 +115,22 @@ with builtins; lazy = false; } { - plugin = nvim-treesitter.withAllGrammars; + plugin = nvim-treesitter; event = [ "BufReadPost" "BufNewFile" ]; - conf = readFile ./nvim-treesitter.lua; + conf = + let + parserDir = pkgs.symlinkJoin { + name = "tresitter-grammars-all"; + paths = lib.attrValues (lib.filterAttrs (_: builtins.isAttrs) nvim-treesitter-parsers); + }; + in + readFile ./nvim-treesitter.lua + '' + vim.opt.runtimepath:append("${parserDir}") + + require'nvim-treesitter.configs'.setup { + parser_install_dir = "${parserDir}", + } + ''; dependencies = [ { plugin = nvim-ts-context-commentstring; } { @@ -189,6 +202,7 @@ with builtins; { plugin = telescope-fzf-native-nvim; conf = readFile ./telescope-fzf-native-nvim.lua; + cmd = [ "Telescope" ]; keys = [ { key = "ff"; cmd = "Telescope find_files"; desc = "Find files"; } { key = "fb"; cmd = "Telescope buffers"; desc = "Find buffers"; } @@ -220,5 +234,14 @@ with builtins; cmd = [ "StartupTime" ]; conf = readFile ./vim-startuptime.lua; } + { + plugin = typst-vim; + ft = [ "typst" "typ" ]; + } + { + plugin = comment-nvim; + event = [ "BufReadPost" "BufNewFile" ]; + conf = "require('Comment').setup()"; + } ]; } diff --git a/modules/programs/nvim/plugins/mini-nvim.lua b/modules/programs/nvim/plugins/mini-nvim.lua index e2824f6..6ce1ecc 100644 --- a/modules/programs/nvim/plugins/mini-nvim.lua +++ b/modules/programs/nvim/plugins/mini-nvim.lua @@ -1,11 +1,4 @@ require("mini.align").setup() -require("mini.comment").setup({ - options = { - custom_commentstring = function() - return require("ts_context_commentstring.internal").calculate_commentstring() or vim.bo.commentstring - end, - }, -}) require("mini.surround").setup() require("mini.move").setup() require("mini.pairs").setup() diff --git a/modules/programs/nvim/plugins/nvim-lspconfig.lua b/modules/programs/nvim/plugins/nvim-lspconfig.lua index 75c3e5d..d844ca5 100644 --- a/modules/programs/nvim/plugins/nvim-lspconfig.lua +++ b/modules/programs/nvim/plugins/nvim-lspconfig.lua @@ -127,6 +127,7 @@ local servers = { "pylsp", "ruff_lsp", "rust_analyzer", + "typst_lsp", } for _, lsp in ipairs(servers) do lspconfig_setup(lsp, {}) diff --git a/overlays/packages.nix b/overlays/packages.nix index f541331..bb884a9 100644 --- a/overlays/packages.nix +++ b/overlays/packages.nix @@ -3,7 +3,6 @@ _: prev: { agenix = inputs.agenix.packages.${prev.system}.default; - attic = inputs.attic.packages.${prev.system}.default; hyprpaper = inputs.hyprpaper.packages.${prev.system}.default; nil = inputs.nil.packages.${prev.system}.default; nix-super = inputs.nix-super.packages.${prev.system}.default;