From 8b19689060217c4645464a90a6400416f4495b29 Mon Sep 17 00:00:00 2001 From: kat witch Date: Sun, 12 Sep 2021 04:52:31 +0100 Subject: [PATCH] dev environment work, moved to alacritty, matrix logging change --- config/hosts/goliath.nix | 1 + config/modules/home/theme.nix | 4 +-- config/profiles/gui/fonts.nix | 2 +- config/services/matrix/default.nix | 38 +++++++++++++--------------- config/users/kat/dev/emacs.nix | 12 +++++---- config/users/kat/dev/settings.nix | 1 - config/users/kat/dev/vim/default.nix | 8 +++++- config/users/kat/dev/vim/init.vim | 27 +++++++++++++++++--- config/users/kat/gui/kitty.nix | 3 +++ 9 files changed, 63 insertions(+), 33 deletions(-) diff --git a/config/hosts/goliath.nix b/config/hosts/goliath.nix index 2fbdb824..d9606e1a 100644 --- a/config/hosts/goliath.nix +++ b/config/hosts/goliath.nix @@ -114,6 +114,7 @@ ".config/hedgedoc" ".gnupg" ".mozilla" + "neorg" "docs" "media" "mail" diff --git a/config/modules/home/theme.nix b/config/modules/home/theme.nix index 4d2d9bc4..adfed078 100644 --- a/config/modules/home/theme.nix +++ b/config/modules/home/theme.nix @@ -38,11 +38,11 @@ let cfg = config.kw.theme; in font = { name = mkOption { type = types.str; - default = "Fira Code"; + default = "Iosevka"; }; termName = mkOption { type = types.str; - default = cfg.font.name; + default = "Iosevka Term"; }; size = mkOption { type = types.float; diff --git a/config/profiles/gui/fonts.nix b/config/profiles/gui/fonts.nix index 93084066..d8b6abd8 100644 --- a/config/profiles/gui/fonts.nix +++ b/config/profiles/gui/fonts.nix @@ -16,7 +16,7 @@ }; fonts.fonts = with pkgs; [ - fira-code + iosevka font-awesome cozette twitter-color-emoji diff --git a/config/services/matrix/default.nix b/config/services/matrix/default.nix index 2377fbf4..f9ee8c85 100644 --- a/config/services/matrix/default.nix +++ b/config/services/matrix/default.nix @@ -53,30 +53,28 @@ with lib; max_upload_size = "512M"; logConfig = '' version: 1 - - # In systemd's journal, loglevel is implicitly stored, so let's omit it - # from the message text. formatters: - journal_fmt: - format: '%(name)s: [%(request)s] %(message)s' - + precise: + format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s' filters: - context: - (): synapse.util.logcontext.LoggingContextFilter - request: "" - + context: + (): synapse.util.logcontext.LoggingContextFilter + request: "" handlers: - journal: - class: systemd.journal.JournalHandler - formatter: journal_fmt - filters: [context] - SYSLOG_IDENTIFIER: synapse - - root: + console: + class: logging.StreamHandler + formatter: precise + filters: [context] + loggers: + synapse: level: WARNING - handlers: [journal] - - disable_existing_loggers: False + synapse.storage.SQL: + # beware: increasing this to DEBUG will make synapse log sensitive + # information such as access tokens. + level: WARNING + root: + level: WARNING + handlers: [console] ''; server_name = config.network.dns.domain; app_service_config_files = [ diff --git a/config/users/kat/dev/emacs.nix b/config/users/kat/dev/emacs.nix index da02cf65..d1b963bb 100644 --- a/config/users/kat/dev/emacs.nix +++ b/config/users/kat/dev/emacs.nix @@ -16,10 +16,12 @@ let }; in { - home.packages = [ doom-emacs pkgs.sqlite ]; + config = mkIf ((builtins.getEnv "CI_ENV") != "") { + home.packages = [ doom-emacs pkgs.sqlite ]; - home.file.".emacs.d/init.el".text = '' - (load "default.el") - (load-theme 'base16-${lib.elemAt (lib.splitString "." config.base16.alias.default) 1} t) - ''; + home.file.".emacs.d/init.el".text = '' + (load "default.el") + (load-theme 'base16-${lib.elemAt (lib.splitString "." config.base16.alias.default) 1} t) + ''; + }; } diff --git a/config/users/kat/dev/settings.nix b/config/users/kat/dev/settings.nix index cf0de060..47216f13 100644 --- a/config/users/kat/dev/settings.nix +++ b/config/users/kat/dev/settings.nix @@ -1,5 +1,4 @@ { ... }: { excludes = [ - "emacs" ]; } diff --git a/config/users/kat/dev/vim/default.nix b/config/users/kat/dev/vim/default.nix index d05c634c..a3889646 100644 --- a/config/users/kat/dev/vim/default.nix +++ b/config/users/kat/dev/vim/default.nix @@ -39,8 +39,14 @@ in ''; plugins = with pkgs.vimPlugins; [ neorg + nvim-cmp + plenary-nvim nvim-base16 - nvim-treesitter + nvim-web-devicons + telescope-nvim + (nvim-treesitter.withPlugins ( + plugins: with plugins; pkgs.tree-sitter.allGrammars + )) nvim-ts-rainbow coc-yaml coc-git diff --git a/config/users/kat/dev/vim/init.vim b/config/users/kat/dev/vim/init.vim index 80cf058d..2e7af11f 100644 --- a/config/users/kat/dev/vim/init.vim +++ b/config/users/kat/dev/vim/init.vim @@ -1,6 +1,21 @@ lua << EOF -require'nvim-treesitter.configs'.setup { - ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list of languages + local cmp = require'cmp' + cmp.setup({ + snippet = { + expand = function(args) + vim.fn["vsnip#anonymous"](args.body) + end, + }, + mapping = { + [''] = cmp.mapping.confirm({ select = true }), + }, + sources = { + { name = 'neorg' }, + } + }) + +require('nvim-treesitter.configs').setup { +ensure_installed = "all", -- one of "all", "maintained" (parsers with maintainers), or a list of languages ignore_install = { }, -- List of parsers to ignore installing highlight = { enable = true, @@ -22,11 +37,17 @@ require'nvim-treesitter.configs'.setup { ["core.norg.concealer"] = {}, -- Allows for use of icons ["core.norg.dirman"] = { -- Manage your directories with Neorg config = { + engine = "nvim-cmp", workspaces = { - my_workspace = "~/neorg" + home = "~/neorg" } } } }, } EOF + +nnoremap ff Telescope find_files +nnoremap fg Telescope live_grep +nnoremap fb Telescope buffers +nnoremap fh Telescope help_tags diff --git a/config/users/kat/gui/kitty.nix b/config/users/kat/gui/kitty.nix index 51edb8a4..28c6bb9f 100644 --- a/config/users/kat/gui/kitty.nix +++ b/config/users/kat/gui/kitty.nix @@ -9,6 +9,9 @@ font.name = config.kw.theme.font.termName; settings = { font_size = toString config.kw.theme.font.size; + bold_font = "auto"; + italic_font = "auto"; + bold_italic_font = "auto"; background_opacity = "0.9"; disable_ligatures = "cursor"; };