From 5e83ab962631676e8f73466d325f50dc047d90d4 Mon Sep 17 00:00:00 2001 From: tomoron Date: Tue, 14 Apr 2026 16:28:39 +0200 Subject: [PATCH] update vim config, update flake and other things --- Makefile | 7 ++- flake.lock | 42 ++++++++--------- homeConfigs/hosts/laptop.nix | 1 + homeConfigs/modules/vim.nix | 90 ++++++++++++++++++++++++++++++++++++ osConfigs/global/other.nix | 2 +- osConfigs/hosts/laptop.nix | 36 ++++++++++----- 6 files changed, 144 insertions(+), 34 deletions(-) diff --git a/Makefile b/Makefile index 060d42d..7f0d602 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,15 @@ HOST ?= $(file < /etc/nixosFlakeName) THREADS ?= $(shell nproc) FLAKE ?= . -MODE ?= boot +MODE ?= switch + FLAGS = --impure --cores $(THREADS) -j $(THREADS) +ifdef OFFLINE + FLAGS += --option binary-caches '' +endif + all: os home update: diff --git a/flake.lock b/flake.lock index c75ee4a..baabc2e 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1774098279, - "narHash": "sha256-OoQRoQmwCuBBXObi82F6C+eYV1lYCt5Va5k/VckJ6vo=", + "lastModified": 1775994227, + "narHash": "sha256-4VKeWtl9dEubrgpy9fSXkXbjBZlNXPNlQQM5l1ppHv4=", "owner": "catppuccin", "repo": "nix", - "rev": "cb374516af3ccc3aa0c6ef518292bf4ae417a60e", + "rev": "d0a9a21ed8e235956a768fc624242ec9a3e15575", "type": "github" }, "original": { @@ -26,11 +26,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1774584175, - "narHash": "sha256-3g85c0I2xSgcAayR6tRYPovsF9eBosN6AwBcoFiL+GY=", + "lastModified": 1776139376, + "narHash": "sha256-rBykvCL5GRT6VmiY39XnxAR10cohBsLeAENP0+3JM/0=", "owner": "rycee", "repo": "nur-expressions", - "rev": "9e84571429d01fc3971f05ee3daa3316516b460f", + "rev": "ccfaa2303117e22752bda4e1a1bb07d17f38ea2d", "type": "gitlab" }, "original": { @@ -47,11 +47,11 @@ ] }, "locked": { - "lastModified": 1774584114, - "narHash": "sha256-uWR9fC+4NykFJVn4GN4Ini9LX+w8Llj7BnWKKp0N6bw=", + "lastModified": 1776136611, + "narHash": "sha256-b2pu3Pb28W0bJzQVP3OJHZC5+dgOOeqjlli2WVakKEU=", "owner": "nix-community", "repo": "home-manager", - "rev": "4b1be5c38be350ee9452a4847945ce71d950dc31", + "rev": "8a423e444b17dde406097328604a64fc7429e34e", "type": "github" }, "original": { @@ -62,11 +62,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1774567711, - "narHash": "sha256-uVlOHBvt6Vc/iYNJXLPa4c3cLXwMllOCVfAaLAcphIo=", + "lastModified": 1775490113, + "narHash": "sha256-2ZBhDNZZwYkRmefK5XLOusCJHnoeKkoN95hoSGgMxWM=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "3f6f874dfc34d386d10e434c48ad966c4832243e", + "rev": "c775c2772ba56e906cbeb4e0b2db19079ef11ff7", "type": "github" }, "original": { @@ -78,11 +78,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1773821835, - "narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=", + "lastModified": 1775423009, + "narHash": "sha256-vPKLpjhIVWdDrfiUM8atW6YkIggCEKdSAlJPzzhkQlw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0", + "rev": "68d8aa3d661f0e6bd5862291b5bb263b2a6595c9", "type": "github" }, "original": { @@ -94,11 +94,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1774386573, - "narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=", + "lastModified": 1775710090, + "narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=", "owner": "nixos", "repo": "nixpkgs", - "rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9", + "rev": "4c1018dae018162ec878d42fec712642d214fdfa", "type": "github" }, "original": { @@ -125,11 +125,11 @@ ] }, "locked": { - "lastModified": 1774303811, - "narHash": "sha256-fhG4JAcLgjKwt+XHbjs8brpWnyKUfU4LikLm3s0Q/ic=", + "lastModified": 1776119890, + "narHash": "sha256-Zm6bxLNnEOYuS/SzrAGsYuXSwk3cbkRQZY0fJnk8a5M=", "owner": "Mic92", "repo": "sops-nix", - "rev": "614e256310e0a4f8a9ccae3fa80c11844fba7042", + "rev": "d4971dd58c6627bfee52a1ad4237637c0a2fb0cd", "type": "github" }, "original": { diff --git a/homeConfigs/hosts/laptop.nix b/homeConfigs/hosts/laptop.nix index 675297e..3f7e6a2 100644 --- a/homeConfigs/hosts/laptop.nix +++ b/homeConfigs/hosts/laptop.nix @@ -47,4 +47,5 @@ impala ]; + services.mpris-proxy.enable = true; } diff --git a/homeConfigs/modules/vim.nix b/homeConfigs/modules/vim.nix index fe632c3..c4a6fb7 100644 --- a/homeConfigs/modules/vim.nix +++ b/homeConfigs/modules/vim.nix @@ -18,6 +18,7 @@ home.packages = with pkgs; [ clang-tools nixd + rust-analyzer nodejs_24 glsl_analyzer (pkgs.python3.withPackages (ps: with ps; [ @@ -33,14 +34,97 @@ # ''; programs.neovim.initLua= '' + local cmp = require'cmp' + cmp.setup({ + snippet = { + expand = function(args) + vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. + end, + }, + + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.abort(), + [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + }), + + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'vsnip' }, + }, { + { name = 'buffer' }, + }) + }) + + -- To use git you need to install the plugin petertriho/cmp-git and uncomment lines below + -- Set configuration for specific filetype. + --[[ cmp.setup.filetype('gitcommit', { + sources = cmp.config.sources({ + { name = 'git' }, + }, { + { name = 'buffer' }, + }) + }) + require("cmp_git").setup() ]]-- + + -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline({ '/', '?' }, { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = 'buffer' } + } + }) + + cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'path' } + }, { + { name = 'cmdline' } + }), + matching = { disallow_symbol_nonprefix_matching = false } + }) + + local capabilities = require('cmp_nvim_lsp').default_capabilities() vim.lsp.enable('clangd') + vim.lsp.config('clangd', { + capabilities = capabilities + }) vim.lsp.enable('nixd') + vim.lsp.config('nixd', { + capabilities = capabilities + }) vim.lsp.enable('glsl_analyzer') + vim.lsp.config('glsl_analyzer', { + capabilities = capabilities + }) vim.lsp.enable('pylsp') + vim.lsp.config('pylsp', { + capabilities = capabilities + }) + + vim.lsp.enable('rust_analyzer') + vim.lsp.config('rust_analyzer', { + capabilities = capabilities, + settings = { + ["rust-analyzer"] = { + cargo = { + features = "all" + }, + }, + }, + }) vim.diagnostic.config({ virtual_lines = { @@ -48,6 +132,12 @@ } }) + + + + + + ''; programs.neovim.extraConfig = '' diff --git a/osConfigs/global/other.nix b/osConfigs/global/other.nix index 2cab361..c9013ac 100644 --- a/osConfigs/global/other.nix +++ b/osConfigs/global/other.nix @@ -6,7 +6,7 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2025/02/09 01:43:46 by tomoron #+# #+# # -# Updated: 2026/03/31 17:00:29 by tomoron ### ########.fr # +# Updated: 2026/04/03 22:08:01 by tomoron ### ########.fr # # # # **************************************************************************** # diff --git a/osConfigs/hosts/laptop.nix b/osConfigs/hosts/laptop.nix index 337047c..20da192 100644 --- a/osConfigs/hosts/laptop.nix +++ b/osConfigs/hosts/laptop.nix @@ -6,7 +6,7 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2025/09/06 00:56:57 by tomoron #+# #+# # -# Updated: 2026/04/03 12:22:28 by tomoron ### ########.fr # +# Updated: 2026/04/10 20:07:49 by tomoron ### ########.fr # # # # **************************************************************************** # @@ -80,6 +80,8 @@ programs.noisetorch.enable = true; + services.postgresql.enable = true; + hardware.bluetooth.enable = true; environment.systemPackages = with pkgs; [ @@ -131,16 +133,28 @@ services.usbmuxd.enable = true; #sometimes hangs when shutting down -# boot.plymouth = { -# enable = true; -# theme = "ycontre-glow"; -# themePackages = [ -# inputs.plymouth-theme-ycontre-glow.defaultPackage.x86_64-linux -# ]; -# }; - services.flatpak.enable = true; + services.avahi.enable = true; + services.pipewire = { + raopOpenFirewall = true; + + extraConfig.pipewire = { + "10-airplay"."context.modules" = [ + { name = "libpipewire-module-raop-discover"; } + ]; + }; + }; - -# services.k3s.enable = true; + services.pipewire.wireplumber.extraConfig."10-bluez" = { + "monitor.bluez.properties" = { + "bluez5.enable-sbc-xq" = true; + "bluez5.enable-msbc" = true; + "bluez5.enable-hw-volume" = true; + }; + }; + hardware.bluetooth.settings = { + General = { + Enable = "Source,Sink,Media,Socket"; + }; + }; }