diff --git a/flake.nix b/flake.nix index fa377064..615cb6d9 100644 --- a/flake.nix +++ b/flake.nix @@ -596,7 +596,7 @@ poetry2nix.inputs.nixpkgs.follows = "unstable"; ; inherit (nixpkgs.nixVersions) - nix_2_20 + nix_2_24 ; }; diff --git a/flake/builders/mkDevenvRubyNix.nix b/flake/builders/mkDevenvRubyNix.nix index f108270a..209e836b 100644 --- a/flake/builders/mkDevenvRubyNix.nix +++ b/flake/builders/mkDevenvRubyNix.nix @@ -28,7 +28,7 @@ pkgs.mkShell { }; shellHook = '' - echo testfile - ${rootPath}/home/misc/britta-filter.sh + chmod +x ${rootPath}/home/misc/britta-filter.rb + ${rootPath}/home/misc/britta-filter.rb ''; } diff --git a/home/base/general.nix b/home/base/general.nix index 0d347d1d..4e4c2521 100644 --- a/home/base/general.nix +++ b/home/base/general.nix @@ -134,11 +134,8 @@ in backblaze-b2 attr - # poc - age - nix-inspect - zellij +# zellij viddy zoxide ; @@ -146,8 +143,7 @@ in inherit (unstable) eza - yazi - cyme +# yazi ; }; # replaces with pkgs; [], i. e. because nixd catches duplicates this way @@ -227,6 +223,11 @@ in strace lineselect git-annex + cyme + + # poc + age + #git-annex-remote-googledrive #haskellPackages.feedback #haskellPackages.pushme # broken diff --git a/home/misc/britta-filter.rb b/home/misc/britta-filter.rb new file mode 100755 index 00000000..db0b237f --- /dev/null +++ b/home/misc/britta-filter.rb @@ -0,0 +1,176 @@ +#!/usr/bin/env -S ruby -W0 + +#require 'bundler/setup' +require 'gmail-britta' + +if File.exist?(File.expand_path("~/.gmail-britta.personal.rb")) + require "~/.gmail-britta.personal.rb" +end + + +puts(GmailBritta.filterset(:me => MY_EMAILS) do + to_me = MY_EMAILS.map{|address| "to:#{address}"} + from_me = MY_EMAILS.map{|address| "from:#{address}"} + + filter { + has [{:or => BFF.map{|e| "from:#{e}"}}, {:or => to_me}] + label BFF_LABEL + never_spam + }.otherwise { + has [{:or => from_me}, {:or => BFF.map{|e| "to:#{e}"}}] + label BFF_LABEL + never_spam + }.archive_unless_directed + + filter { + has [{:or => SPOUSE.map{|e| "from:#{e}"}}, {:or => to_me}] + label SPOUSE_LABEL + mark_important + never_spam + }.otherwise { + has [{:or => from_me}, {:or => SPOUSE.map{|e| "to:#{e}"}}] + label SPOUSE_LABEL + mark_important + never_spam + }.archive_unless_directed + + filter { + has [{:or => NOT_MY.map{|e| "to:#{e}"}}] + label ID_SCAM_LABEL + archive + mark_read + } + + filter { + has AUTHORITIES + label 'authorities' + archive + mark_read + mark_important + } + + # Archive all mailman mail except confirmation ones + filter { + has %w{from:mailman subject:confirm} + label 'bulk' + smart_label 'notifications' + }.otherwise { + has %w{from:mailman} + label 'bulk' + smart_label 'notifications' + archive + } + + filter { + has [{:or => ['from:noreply@humblebundle.com', 'from:support@skillsfaster.com']}] + label PURCHASES_LABEL + archive + }.otherwise { + has [{:and => ['from:contact@humblebundle.com', 'subject:"Your Humble Bundle order is ready"']}] + label PURCHASES_LABEL + archive + } + + # Stuff from the bank: + filter { + has BANK_EMAILS + label 'banking' + mark_important + } + + filter { + has V_EMAILS + label '♥♛' + mark_important + never_spam + } + + filter { + has ['from:no-reply@researchgate.net'] + label 'bulk/researchgate' + smart_label 'social' + }.otherwise { + # Mail from web services I don't care about THAT much: + bacon_senders = %w{sender@mailer.33mail.com store-news@amazon.com thisweek@yelp.com no-reply@vimeo.com + no-reply@mail.goodreads.com *@carsonified.com *@crossmediaweek.org updates@linkedin.com + tordotcom@mail.macmillan.com noreply@myopenid.com tor-forge@mail.macmillan.com announce@mailer.evernote.com + info@getsatisfaction.com Transport_for_London@info.tfl.gov.uk legendsofzork@joltonline.com news@xing.com + noreply@couchsurfing.com noreply@couchsurfing.org newsletter@getsatisfaction.com store-offers@amazon.com + gameware@letter.eyepin.com info@busymac.com engage@mail.communications.sun.com *@dotnetsolutions.co.uk + office@runtasia.at noreply@cellulare.net support@heroku.com team@mixcloud.com automailer@wikidot.com + no-reply@hi.im linkedin@em.linkedin.com chromium@googlecode.com + noreply@comixology.com support@plancast.com *@*.boinx.com news@plug.at newsletter@gog.com service@youtube.com + email@online.cvs.com info@mail.shoprunner.com yammer@yammer.com info@meetup.com support@boostblogtraffic.com + info@mailer.netflix.com help@otherinbox.com lush.vida@gmail.com udemy@email.udemy.com + mail@enews.uniqlo-usa.com news@emailnews.meinfernbus.de topangebote@newsletter.voyages-sncf.de + inquire@mrquikhomeservices.co apress@news.springer.com newsletter@news.fressnapf.de mail@family-newsletter.de + ticketnews@service.eventim.de noreply@ladyvlondon.com email.campaign@sg.booking.com info@twitter.com + info@fonografie.de newsletter@hearthis.at mailer@experteer.de newsletter@newsletter.srv2.de + kundenservice@oyakankerbank.de inquire@mrquikhomeservices.com noreply@finanzcheck.de service@santander.de + verizon-info@verizon.com medimops@info.medimops.de *@hoerspielsommer.de mailstrom@410labs.com + noreply@bandcamp.com noreply@congstarnews.de no-reply@info.twitter.com website@remobjects.com + newsletter@sounds-exclusive.com no-reply@portal.appdynamics.com info@neues.ebay-kleinanzeigen.de + ticketalarm@service.eventim.de do-not-reply@amazon.com bestellbestaetigung@amazon.de + notifications-noreply@linkedin.com noreply@medium.com bestellung@deichmann.com contact@packtpub.com + karten-online@cinestar.de no-reply@mendeley.com service@glyde.com noreply@jpberlin.de schuenemann-verlag.de + appintelligence@appdynamics.com mricci@allaboutjazz.com contact@humblebundle.com lieferservice@newsletter.rewe.de + newsletter@teilauto.net cmail20.com support@smartblogger.com mailer@infusionmail.com noreply@zenva.com + mail249.suw12.mcsv.net} + + has [{:or => "from:(#{bacon_senders.join("|")})"}] + archive + label 'bulk' + smart_label 'notifications' + }.otherwise { + to_me = me.map {|address| "to:#{address}"} + has [{:or => to_me}] + label '⚓' + } + + filter { + has [{:or => ['from:ship-confirm@amazon.com', 'from:auto-confirm@amazon.com']}, {:or => ['subject:"shipped"', 'subject:"tracking number"']}] + label 'bulk/packages' + smart_label 'notifications' + forward_to AMAZON_PACKAGE_TRACKING_EMAIL + } + + filter { + has %w{from:support@dnsimple.com} + archive + label 'bulk/admin' + smart_label 'notifications' + } + + filter { + has %w{from:notifications@github.com} + archive + label 'github' + smart_label 'notifications' + } + + filter { + has %w{from:stadtbib@leipzig.de} + label 'bulk' + smart_label 'notifications' + } + + filter { + has %w{from:dsl-kundenservice@cc.o2online.de} + label 'bulk' + smart_label 'notifications' + } + + filter { + has ['from:do-not-reply@stackexchange.com', {:or => ['subject:"French Language Weekly Newsletter"', 'subject:"English Language Learners Weekly Newsletter"']}] + label 'bulk/languages' + smart_label 'forums' + } + + filter { + has CALENDAR_EMAILS + label 'calendar timer' + mark_important + never_spam + } + + end.generate) diff --git a/home/misc/britta-filter.sh b/home/misc/britta-filter.sh deleted file mode 100644 index f05d7d55..00000000 --- a/home/misc/britta-filter.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env irb -rgmail-britta - -puts Hello from irb diff --git a/home/programs/emacs-novelist.nix b/home/programs/emacs-novelist.nix index f1e433da..4fdb9e83 100644 --- a/home/programs/emacs-novelist.nix +++ b/home/programs/emacs-novelist.nix @@ -90,6 +90,7 @@ let pname = "default.el"; version = "0"; src = pkgs.writeText "default.el" '' +;; FIXME https://github.com/Gavinok/emacs.d/blob/main/init.el#L725 (use-package gcmh :ensure t :diminish diff --git a/home/programs/neovim.nix b/home/programs/neovim.nix index 4034e4b2..adfa2955 100644 --- a/home/programs/neovim.nix +++ b/home/programs/neovim.nix @@ -122,6 +122,10 @@ let # (pluggo "deadcolumn-nvim") ]; extraConfigLua = '' + + -- triggers dictionary completion, https://www.reddit.com/r/neovim/comments/16o22w0/how_to_use_nvimcmp_to_autocomplete_for_plain/ +-- only for cmp-dictionary not for cmp-look +--vim.api.nvim_set_option_value('dictionary', "\"${pkgs.scowl}/share/dict/words.txt\"", { buf = buf }) require('dd').setup() require("trouble").setup({ -- settings without a patched font or icons @@ -150,6 +154,7 @@ let servers = { # FIXME still uses i. e. v1.2.3 (https://github.com/nix-community/nixvim/blob/83a7ce9846b1b01a34b3e6b25077c1a5044ad7b3/plugins/lsp/language-servers/default.nix#L455) as of nixos-unstable, see https://github.com/NixOS/nixpkgs/pull/305285# nixd.enable = true; + ruby_lsp.enable = true; ltex.enable = true; texlab.enable = true; lua-ls.enable = true; @@ -180,6 +185,9 @@ let ensureInstalled = [ "nix" "bash" + "markdown" + "markdown_inline" + "ruby" "yaml" "json" "lua" @@ -203,6 +211,10 @@ let cmp_luasnip = { enable = true; }; + # FIXME still getting pattern not found + #cmp-dictionary = { enable = true; }; + + cmp-look = { enable = true; }; # FIXME Use `plugins.cmp.settings.sources` option cmp = { @@ -214,23 +226,36 @@ let { name = "buffer"; } { name = "nvim_lua"; } { name = "path"; } + { + name = "look"; + keyword_length = 2; + option.__raw = '' { + convert_case = true, + loud = true, + dict = '${pkgs.scowl}/share/dict/words.txt' + } + ''; + } ]; - /*sources = { - __raw = '' - cmp.config.sources({ - { name = 'nvim_lsp' }, - -- { name = 'vsnip' }, - { name = 'luasnip' }, - { name = 'nvim_lua' }, - -- { name = 'ultisnips' }, - -- { name = 'snippy' }, - }, { - { name = 'buffer' }, - { name = 'path' }, - }) - ''; - }; */ + /* + { + name = "dictionary"; + # FIXME exactly as here https://github.com/uga-rosa/cmp-dictionary/blob/edbd263/doc/cmp-dictionary.txt#L29 and could even use aspell https://github.com/uga-rosa/cmp-dictionary/blob/edbd263/doc/cmp-dictionary.txt#L190 + paths.__raw = "{ \"${pkgs.scowl}/share/dict/words.txt\" }"; + exact_length.__raw = "2"; + } + { + name = "look"; + keyword_length = 2; + option.__raw = '' { + convert_case = true, + loud = true, + dict = '${pkgs.scowl}/share/dict/words.txt' + } + ''; + } + */ formatting = { fields = [ "abbr" "kind" "menu" ]; format = @@ -394,14 +419,18 @@ in neoterm grapple-nvim nvim-web-devicons + vim-abolish ; } ++ [ - (pkgs.vimPlugins.nvim-treesitter.withPlugins (parsers: with parsers;[ nix markdown markdown_inline ])) + #(pkgs.vimPlugins.nvim-treesitter.withPlugins (parsers: with parsers;[ nix markdown markdown_inline ])) (pluggo "faster-nvim") (pluggo "action-hints.nvim") # (pluggo "deadcolumn-nvim") ]; extraConfigLua = '' + -- triggers dictionary completion, https://www.reddit.com/r/neovim/comments/16o22w0/how_to_use_nvimcmp_to_autocomplete_for_plain/ +-- only for cmp-dictionary not for cmp-look +--vim.api.nvim_set_option_value('dictionary', "\"${pkgs.scowl}/share/dict/words.txt\"", { buf = buf }) vim.g.clipboard = { name = 'OSC 52', copy = { ['+'] = require('vim.ui.clipboard.osc52').copy('+'), ['*'] = require('vim.ui.clipboard.osc52').copy('*'), @@ -548,6 +577,23 @@ in } ]; plugins = { + treesitter = { + enable = true; + nixGrammars = true; + indent = true; + ensureInstalled = [ + "nix" + "bash" + "yaml" + "json" + "lua" + "latex" + "ruby" + "comment" + "markdown" + "markdown_inline" + ]; + }; fzf-lua = { enable = true; profile = "telescope"; @@ -673,6 +719,7 @@ profile = "telescope"; lsp = { enable = true; servers = { + ruby_lsp.enable = true; nixd = { enable = true; settings = { @@ -721,6 +768,9 @@ profile = "telescope"; cmp-nvim-lsp = { enable = true; }; cmp-path = { enable = true; }; cmp_luasnip = { enable = true; }; + cmp-look = { enable = true; }; + # FIXME still getting pattern not found + #cmp-dictionary = { enable = true; }; cmp = { enable = true; settings = { @@ -730,7 +780,38 @@ profile = "telescope"; { name = "buffer"; } { name = "nvim_lua"; } { name = "path"; } + { + name = "look"; + keyword_length = 2; + option.__raw = '' + { + convert_case = true, + loud = true, + dict = '${pkgs.scowl}/share/dict/words.txt' + } + ''; + } ]; + /* + { + name = "dictionary"; + # FIXME exactly as here https://github.com/uga-rosa/cmp-dictionary/blob/edbd263/doc/cmp-dictionary.txt#L29 and could even use aspell https://github.com/uga-rosa/cmp-dictionary/blob/edbd263/doc/cmp-dictionary.txt#L190 + paths.__raw = "{ \"${pkgs.scowl}/share/dict/words.txt\" }"; + exact_length.__raw = "2"; + } + { + name = "look"; + keyword_length = 2; + option.__raw = '' + { + convert_case = true, + loud = true, + dict = '${pkgs.scowl}/share/dict/words.txt' + } + ''; + } + */ + formatting = { fields = [ "abbr" "kind" "menu" ]; format = diff --git a/installing.log b/installing.log new file mode 100644 index 00000000..e69de29b diff --git a/lib/common-config.nix b/lib/common-config.nix index 55dde721..a1fe8f4b 100644 --- a/lib/common-config.nix +++ b/lib/common-config.nix @@ -3,7 +3,7 @@ _: { lib, pkgs, homeModules ? [ ], inputs, rootPath, ... }: let inherit (pkgs.stdenv) isLinux isAarch64; - inherit (inputs.unstable.legacyPackages.${pkgs.system}.pkgs.nixVersions) nix_2_20 + inherit (inputs.unstable.legacyPackages.${pkgs.system}.pkgs.nixVersions) nix_2_24 ; in { /** @@ -85,7 +85,7 @@ see also ./../flake/builders/mkHome.nix `homeManagerConfiguration.extraSpecialAr }; - package = nix_2_20; + package = nix_2_24; # until fixed: https://discourse.nixos.org/t/need-help-with-this-git-related-flake-update-error/50538/7 # https://discourse.nixos.org/t/flake-registry-set-to-a-store-path-keeps-copying/44613