wip
This commit is contained in:
parent
b352442ce2
commit
6de79b3c5c
12 changed files with 291 additions and 219 deletions
|
@ -91,99 +91,99 @@ in
|
|||
|
||||
# Matrix
|
||||
|
||||
synapse = {
|
||||
service = {
|
||||
image = "matrixdotorg/synapse:latest";
|
||||
container_name = "synapse";
|
||||
restart = "unless-stopped";
|
||||
depends_on = [ "ipv6nat" ];
|
||||
networks = [ "webserver" ];
|
||||
volumes = [
|
||||
"/etc/container-matrix/synapse:/data"
|
||||
"/etc/container-matrix/telegram:/bridge-data/telegram:ro"
|
||||
"/etc/container-matrix/signal:/bridge-data/signal:ro"
|
||||
"/etc/container-matrix/whatsapp:/bridge-data/whatsapp:ro"
|
||||
];
|
||||
labels = {
|
||||
"com.centurylinklabs.watchtower.enable" = "true";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
matrix-telegram = {
|
||||
service = {
|
||||
image = "dock.mau.dev/mautrix/telegram:latest";
|
||||
container_name = "mautrix-telegram";
|
||||
restart = "unless-stopped";
|
||||
depends_on = [
|
||||
"ipv6nat"
|
||||
"synapse"
|
||||
];
|
||||
networks = [ "webserver" ];
|
||||
volumes = [
|
||||
"/etc/container-matrix/telegram:/data"
|
||||
];
|
||||
labels = {
|
||||
"com.centurylinklabs.watchtower.enable" = "true";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
signald = {
|
||||
service = {
|
||||
image = "signald/signald:latest";
|
||||
container_name = "signald";
|
||||
restart = "unless-stopped";
|
||||
depends_on = [ "ipv6nat" ];
|
||||
networks = [ "webserver" ];
|
||||
volumes = [
|
||||
"/etc/container-matrix/signald:/signald"
|
||||
];
|
||||
labels = {
|
||||
"com.centurylinklabs.watchtower.enable" = "true";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
matrix-signal = {
|
||||
service = {
|
||||
image = "dock.mau.dev/mautrix/signal:latest";
|
||||
container_name = "mautrix-signal";
|
||||
restart = "unless-stopped";
|
||||
depends_on = [
|
||||
"ipv6nat"
|
||||
"synapse"
|
||||
"signald"
|
||||
];
|
||||
networks = [ "webserver" ];
|
||||
volumes = [
|
||||
"/etc/container-matrix/signal:/data"
|
||||
"/etc/container-matrix/signald:/signald"
|
||||
];
|
||||
labels = {
|
||||
"com.centurylinklabs.watchtower.enable" = "true";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
matrix-whatsapp = {
|
||||
service = {
|
||||
image = "dock.mau.dev/mautrix/whatsapp:latest";
|
||||
container_name = "mautrix-whatsapp";
|
||||
restart = "unless-stopped";
|
||||
depends_on = [
|
||||
"ipv6nat"
|
||||
"synapse"
|
||||
];
|
||||
networks = [ "webserver" ];
|
||||
volumes = [
|
||||
"/etc/container-matrix/whatsapp:/data"
|
||||
];
|
||||
labels = {
|
||||
"com.centurylinklabs.watchtower.enable" = "true";
|
||||
};
|
||||
};
|
||||
};
|
||||
# synapse = {
|
||||
# service = {
|
||||
# image = "matrixdotorg/synapse:latest";
|
||||
# container_name = "synapse";
|
||||
# restart = "unless-stopped";
|
||||
# depends_on = [ "ipv6nat" ];
|
||||
# networks = [ "webserver" ];
|
||||
# volumes = [
|
||||
# "/etc/container-matrix/synapse:/data"
|
||||
# "/etc/container-matrix/telegram:/bridge-data/telegram:ro"
|
||||
# "/etc/container-matrix/signal:/bridge-data/signal:ro"
|
||||
# "/etc/container-matrix/whatsapp:/bridge-data/whatsapp:ro"
|
||||
# ];
|
||||
# labels = {
|
||||
# "com.centurylinklabs.watchtower.enable" = "true";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
#
|
||||
# matrix-telegram = {
|
||||
# service = {
|
||||
# image = "dock.mau.dev/mautrix/telegram:latest";
|
||||
# container_name = "mautrix-telegram";
|
||||
# restart = "unless-stopped";
|
||||
# depends_on = [
|
||||
# "ipv6nat"
|
||||
# "synapse"
|
||||
# ];
|
||||
# networks = [ "webserver" ];
|
||||
# volumes = [
|
||||
# "/etc/container-matrix/telegram:/data"
|
||||
# ];
|
||||
# labels = {
|
||||
# "com.centurylinklabs.watchtower.enable" = "true";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
#
|
||||
# signald = {
|
||||
# service = {
|
||||
# image = "signald/signald:latest";
|
||||
# container_name = "signald";
|
||||
# restart = "unless-stopped";
|
||||
# depends_on = [ "ipv6nat" ];
|
||||
# networks = [ "webserver" ];
|
||||
# volumes = [
|
||||
# "/etc/container-matrix/signald:/signald"
|
||||
# ];
|
||||
# labels = {
|
||||
# "com.centurylinklabs.watchtower.enable" = "true";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
#
|
||||
# matrix-signal = {
|
||||
# service = {
|
||||
# image = "dock.mau.dev/mautrix/signal:latest";
|
||||
# container_name = "mautrix-signal";
|
||||
# restart = "unless-stopped";
|
||||
# depends_on = [
|
||||
# "ipv6nat"
|
||||
# "synapse"
|
||||
# "signald"
|
||||
# ];
|
||||
# networks = [ "webserver" ];
|
||||
# volumes = [
|
||||
# "/etc/container-matrix/signal:/data"
|
||||
# "/etc/container-matrix/signald:/signald"
|
||||
# ];
|
||||
# labels = {
|
||||
# "com.centurylinklabs.watchtower.enable" = "true";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
#
|
||||
# matrix-whatsapp = {
|
||||
# service = {
|
||||
# image = "dock.mau.dev/mautrix/whatsapp:latest";
|
||||
# container_name = "mautrix-whatsapp";
|
||||
# restart = "unless-stopped";
|
||||
# depends_on = [
|
||||
# "ipv6nat"
|
||||
# "synapse"
|
||||
# ];
|
||||
# networks = [ "webserver" ];
|
||||
# volumes = [
|
||||
# "/etc/container-matrix/whatsapp:/data"
|
||||
# ];
|
||||
# labels = {
|
||||
# "com.centurylinklabs.watchtower.enable" = "true";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
|
||||
networks.webserver = {
|
||||
|
|
36
flake.lock
36
flake.lock
|
@ -58,11 +58,11 @@
|
|||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -79,11 +79,11 @@
|
|||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1668900402,
|
||||
"narHash": "sha256-IhVlueHoQNoN0SOHZIceKU3LyEL00g2ei0aUlaNypbQ=",
|
||||
"lastModified": 1669328018,
|
||||
"narHash": "sha256-aJRMobnNDEXKwoSZFS4hGjGU1WDNxkQ82BVKAEohOfY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "c0f9cbcf93ca22e4f0ca66843be61a4bdf6f0a44",
|
||||
"rev": "62cb5bcf93896e4dd6b4507dac7ba2e2e3abc9d7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -102,11 +102,11 @@
|
|||
},
|
||||
"locked": {
|
||||
"dir": "contrib",
|
||||
"lastModified": 1668865307,
|
||||
"narHash": "sha256-Fwoalxq8UzocDeK5LIlAOT/JglG8SeGtH6yvvzHh/uU=",
|
||||
"lastModified": 1669432527,
|
||||
"narHash": "sha256-lfjjzg/NFFfP8cFCCKRr36EkQVlcNyMZBCNne6lY1Cs=",
|
||||
"owner": "neovim",
|
||||
"repo": "neovim",
|
||||
"rev": "6e8ed5abaa9c33d1d78ab7ff5b07dd5bac623a1d",
|
||||
"rev": "84465a8c1583f444d4365b2a70e03cd38ebe7f81",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -125,11 +125,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1668932129,
|
||||
"narHash": "sha256-DcGSEgs+q+JRQwrxdasedbMkYZ9g5jxkekd+td+dXxs=",
|
||||
"lastModified": 1669450483,
|
||||
"narHash": "sha256-CP7I2vV8/fnpBjwDVhJluze/9mrmy87U93qAkVDOnQQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "neovim-nightly-overlay",
|
||||
"rev": "543d1ddb6231aef08e4ce063d72d0822b9b60598",
|
||||
"rev": "7904a5497404a613d2e8658067fb212ed2401fd9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -145,11 +145,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1668932791,
|
||||
"narHash": "sha256-gYCbSJk4WwOIOiKiuhV1LsHz1KPdMZ/8het/l7EnDr8=",
|
||||
"lastModified": 1669451122,
|
||||
"narHash": "sha256-RW8DYU6nvqsawjnSwJLZZGsLn/3LaSn+G/GLd4dTZew=",
|
||||
"owner": "nifoc",
|
||||
"repo": "nix-overlay",
|
||||
"rev": "de4c5221b5cc56a7508a75ee22a6e838aaf7b01e",
|
||||
"rev": "bf8ce1d598334cde1a31f22b635b9b3467726596",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -160,11 +160,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1668912770,
|
||||
"narHash": "sha256-Nzt7ALUl5PrUAYIH8aRbj+njkJZVQ4VQBkWx+qQvqyM=",
|
||||
"lastModified": 1669443273,
|
||||
"narHash": "sha256-/Ow9P6dWfkQF/9NKD7+OnMnz5DJr2pVCAUMjU9SwFoo=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "862277ac9d34273cd953f42061e23d488d6b7e8b",
|
||||
"rev": "6b86759692b80e2b563e7f6c608f753de4aad3a7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
14
home/config/nvim/ftplugin/java.fnl
Normal file
14
home/config/nvim/ftplugin/java.fnl
Normal file
|
@ -0,0 +1,14 @@
|
|||
(let [jdtls (require :jdtls)
|
||||
project-name (vim.fn.fnamemodify (vim.fn.getcwd) ":p:h:t")
|
||||
cache-dir (.. (vim.loop.os_homedir) :/.cache/jdtls)
|
||||
jars-dir (.. cache-dir :/jars)
|
||||
workspace-dir (.. cache-dir :/workspace/ project-name)
|
||||
config {:cmd [:jdt-language-server :-data workspace-dir]
|
||||
:root_dir (vim.fs.dirname (. (vim.fs.find [:.gradlew
|
||||
:.git
|
||||
:.mvnw]
|
||||
{:upward true})
|
||||
1))}]
|
||||
(set vim.env.JAVA_OPTS (.. "-javaagent:" jars-dir :/lombok.jar))
|
||||
(jdtls.start_or_attach config))
|
||||
|
|
@ -2,32 +2,31 @@
|
|||
cmp (require :cmp_nvim_lsp)
|
||||
navic (require :nvim-navic)
|
||||
diagnostic (require :nifoc.diagnostic)
|
||||
formatting (require :nifoc.formatting)]
|
||||
(fn custom-attach [client bufnr]
|
||||
(when (client.supports_method :textDocument/documentSymbol)
|
||||
(navic.attach client bufnr))
|
||||
(diagnostic.maybe-enable-lsp client bufnr)
|
||||
(formatting.maybe-enable-lsp client bufnr))
|
||||
|
||||
(fn custom-attach-no-format [client bufnr]
|
||||
(set client.server_capabilities.documentFormattingProvider false)
|
||||
(set client.server_capabilities.documentRangeFormattingProvider false)
|
||||
(custom-attach client bufnr))
|
||||
|
||||
formatting (require :nifoc.formatting)
|
||||
augroup (vim.api.nvim_create_augroup :NifocLsp {:clear true})
|
||||
aucmd vim.api.nvim_create_autocmd]
|
||||
;; Attach
|
||||
(aucmd :LspAttach {:callback (fn [args]
|
||||
(let [client (vim.lsp.get_client_by_id args.data.client_id)
|
||||
bufnr args.buf]
|
||||
(when (client.supports_method :textDocument/documentSymbol)
|
||||
(navic.attach client bufnr))
|
||||
(diagnostic.maybe-enable-lsp client bufnr)
|
||||
(formatting.maybe-enable-lsp client bufnr)))
|
||||
:group augroup
|
||||
:desc "Automatic LSP setup"})
|
||||
;; Servers
|
||||
(let [capabilities (cmp.default_capabilities)
|
||||
flags {:allow_incremental_sync true :debounce_text_changes 700}
|
||||
default-config {:on_attach custom-attach : capabilities : flags}
|
||||
default-config-no-format {:on_attach custom-attach-no-format
|
||||
: capabilities
|
||||
: flags}
|
||||
default-config {: capabilities : flags}
|
||||
default-servers [:bashls
|
||||
:cssls
|
||||
:dockerls
|
||||
:erlangls
|
||||
:eslint
|
||||
:fennel-ls
|
||||
:html
|
||||
:jdtls
|
||||
:jsonls
|
||||
:nil_ls
|
||||
:rnix
|
||||
:sqls
|
||||
|
@ -44,9 +43,7 @@
|
|||
:--stdio
|
||||
:--tsserver-path
|
||||
:tsserver]}
|
||||
(vim.tbl_extend :force default-config-no-format)))
|
||||
(lsp.jsonls.setup (->> {:cmd [:vscode-json-language-server :--stdio]}
|
||||
(vim.tbl_extend :force default-config)))
|
||||
(vim.tbl_extend :force default-config)))
|
||||
(lsp.solargraph.setup (->> {:settings {:solargraph {:diagnostics true}}}
|
||||
(vim.tbl_extend :force default-config)))
|
||||
(lsp.sumneko_lua.setup (->> {:cmd [:lua-language-server]
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
(let [lint (require :lint)
|
||||
diagnostic (require :nifoc.diagnostic)
|
||||
augroup (vim.api.nvim_create_augroup :NifocLint {:clear true})
|
||||
aucmd vim.api.nvim_create_autocmd]
|
||||
aucmd vim.api.nvim_create_autocmd
|
||||
project-root (vim.fs.dirname (. (vim.fs.find [:.git] {:upward true}) 1))]
|
||||
;; Custom Linters
|
||||
(set lint.linters.deadnix
|
||||
{:cmd :deadnix
|
||||
|
@ -22,13 +23,18 @@
|
|||
:message result.message})
|
||||
findings.results))))})
|
||||
;; Linter Options
|
||||
(let [fennel (require :lint.linters.fennel)]
|
||||
(let [checkstyle (require :lint.linters.checkstyle)
|
||||
fennel (require :lint.linters.fennel)]
|
||||
(when (not= project-root nil)
|
||||
(set checkstyle.config_file
|
||||
(.. project-root :/config/checkstyle/checkstyle.xml)))
|
||||
(set fennel.globals [:vim]))
|
||||
;; Configure Linters per FT
|
||||
(set lint.linters_by_ft {:dockerfile [:hadolint]
|
||||
:elixir [:credo]
|
||||
;:fennel [:fennel]
|
||||
:fish [:fish]
|
||||
:java [:checkstyle]
|
||||
:nix [:deadnix :nix :statix]
|
||||
:sh [:shellcheck]
|
||||
:yaml [:yamllint]})
|
||||
|
|
|
@ -24,6 +24,7 @@ in
|
|||
ripgrep
|
||||
|
||||
# LSP
|
||||
fennel-ls
|
||||
nil
|
||||
nodePackages.bash-language-server
|
||||
nodePackages.dockerfile-language-server-nodejs
|
||||
|
@ -37,6 +38,7 @@ in
|
|||
taplo-lsp
|
||||
|
||||
# Diagnostic Tools
|
||||
checkstyle
|
||||
deadnix
|
||||
hadolint
|
||||
lua51Packages.fennel
|
||||
|
@ -176,6 +178,8 @@ in
|
|||
type = "fennel";
|
||||
}
|
||||
|
||||
nvim-jdtls
|
||||
|
||||
{
|
||||
plugin = lsp_lines-nvim;
|
||||
config = ''
|
||||
|
@ -341,6 +345,7 @@ in
|
|||
} ''
|
||||
mkdir -p $out/lua/configuration
|
||||
mkdir -p $out/lua/nifoc/utils
|
||||
mkdir -p $out/ftplugin
|
||||
mkdir -p $out/after/ftplugin
|
||||
|
||||
config_store_path="${../../config/nvim}"
|
||||
|
@ -366,6 +371,17 @@ in
|
|||
$fennel "$fnlfile" > "$out/lua/nifoc/$file_out_path"
|
||||
done
|
||||
|
||||
# ftplugin
|
||||
ftplugin_store_path="$config_store_path/ftplugin"
|
||||
ftplugin_store_fnl="$(find "$ftplugin_store_path" -type f -name '*.fnl')"
|
||||
|
||||
for fnlfile in $ftplugin_store_fnl; do
|
||||
file_out_path="$(echo "$fnlfile" | sed "s|$ftplugin_store_path/||" | sed "s/.fnl$/.lua/")"
|
||||
|
||||
echo "Compiling $fnlfile ..."
|
||||
$fennel "$fnlfile" > "$out/ftplugin/$file_out_path"
|
||||
done
|
||||
|
||||
# After
|
||||
after_store_path="$config_store_path/after"
|
||||
after_store_fnl="$(find "$after_store_path" -type f -name '*.fnl')"
|
||||
|
|
|
@ -36,23 +36,23 @@ rec {
|
|||
};
|
||||
nvim-web-devicons = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nvim-web-devicons";
|
||||
version = "2022-11-14";
|
||||
version = "2022-11-26";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "kyazdani42";
|
||||
repo = "nvim-web-devicons";
|
||||
rev = "3b1b794bc17b7ac3df3ae471f1c18f18d1a0f958";
|
||||
sha256 = "1yxrv5kc5prfllgfcj2h8c8b74rydwdc8hm2fwbk1d0d9jcs66w7";
|
||||
rev = "189ad3790d57c548896a78522fd8b0d0fc11be31";
|
||||
sha256 = "1k45pgz1jldkrczxyhhv6abj1klbkl07g2lxw7hhlsbyflg7h9sv";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
nvim-osc52 = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nvim-osc52";
|
||||
version = "2022-11-10";
|
||||
version = "2022-11-22";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "ojroques";
|
||||
repo = "nvim-osc52";
|
||||
rev = "27b922a88aba9b2533c4a0e0bc5bca65e3405739";
|
||||
sha256 = "13xf92xjrh8kky1n474vwhg433ckz7czc80cnj7c45hq763s4ahi";
|
||||
rev = "5e7efbc047be9eca1307899137a89cd2b6b8125a";
|
||||
sha256 = "0ibyffddw3j4r04xx4qpvhynxa695wphfs4p4vfxjzspwxw0rgdn";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
|
@ -80,23 +80,23 @@ rec {
|
|||
};
|
||||
substitute-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "substitute.nvim";
|
||||
version = "2022-11-10";
|
||||
version = "2022-11-21";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "gbprod";
|
||||
repo = "substitute.nvim";
|
||||
rev = "996d13312d080a01c2bff903d30f4c5db55b3941";
|
||||
sha256 = "0j8vfaiklywkj5q9n2g4i5xxxr0r1nsjkr9z523xrcslsg7la672";
|
||||
rev = "1491b84348de39a54865f321b66bd2c03700ef04";
|
||||
sha256 = "1dv7bk3hzf4gs4ljbfflgy60q5lh2zvh120f9rmhsm4m0npj7z76";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
leap-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "leap.nvim";
|
||||
version = "2022-11-19";
|
||||
version = "2022-11-22";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "ggandor";
|
||||
repo = "leap.nvim";
|
||||
rev = "cd90202232806ec2dab9c76c7287bd2190a17459";
|
||||
sha256 = "0fk686d4hs7ld4a85gfhqmd4nk9f951bjjhkknbkkq0rijdrpysa";
|
||||
rev = "c5ddd07ff5f436cd8b655154d2a8e8d4c2f29466";
|
||||
sha256 = "1j72hsjsip1qa94zx8yx1jz62ikqa2dlqz27qv7mz6801ndh2sz0";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
|
@ -111,28 +111,16 @@ rec {
|
|||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
nvim-treesitter = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nvim-treesitter";
|
||||
version = "2022-11-20";
|
||||
nvim-treesitter = pkgs.vimPlugins.nvim-treesitter.overrideAttrs (_: {
|
||||
version = "2022-11-26";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nvim-treesitter";
|
||||
repo = "nvim-treesitter";
|
||||
rev = "b6e4f544860651b5ee4f2c43e909674c57355b52";
|
||||
sha256 = "1qvkmv58f75c2zrlpywjbjki4w8m6k1jxmxmfdhzn04f9v7qmq0c";
|
||||
rev = "5aacb06135a952190933f9bfff923957db8965db";
|
||||
sha256 = "1vxjpzg96n15d35lc0wvid3mwy94a48vpjn06b1n8sra384xa338";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
passthru.withPlugins =
|
||||
grammarFn: nvim-treesitter.overrideAttrs (_: {
|
||||
postPatch =
|
||||
let
|
||||
grammars = pkgs.tree-sitter.withPlugins grammarFn;
|
||||
in
|
||||
''
|
||||
rm -r parser
|
||||
ln -s ${grammars} parser
|
||||
'';
|
||||
});
|
||||
};
|
||||
});
|
||||
nvim-ts-rainbow = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nvim-ts-rainbow";
|
||||
version = "2022-11-04";
|
||||
|
@ -157,12 +145,12 @@ rec {
|
|||
};
|
||||
telescope-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "telescope.nvim";
|
||||
version = "2022-11-11";
|
||||
version = "2022-11-23";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nvim-telescope";
|
||||
repo = "telescope.nvim";
|
||||
rev = "7a4ffef931769c3fe7544214ed7ffde5852653f6";
|
||||
sha256 = "0n2cz7pgnn5wbklw0wax0k0gvhbf5gc1rs7i9d1bmwrljipgi4ak";
|
||||
rev = "cea9c75c19d172d2c6f089f21656019734a615cf";
|
||||
sha256 = "18ivpbfnxx5hilapcb7n1qq0a5am5sq6zixhb3slsfqqg0a2v8rn";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
|
@ -226,12 +214,23 @@ rec {
|
|||
};
|
||||
nvim-lspconfig = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nvim-lspconfig";
|
||||
version = "2022-11-20";
|
||||
version = "2022-11-26";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "neovim";
|
||||
repo = "nvim-lspconfig";
|
||||
rev = "04b672b68d80fd81d41079de101d2be31f761e15";
|
||||
sha256 = "1i3xzgb1468bmgnq9lab4v92zafd27z5qhvkxa0yda2q0g9gh60v";
|
||||
rev = "abe6c99c7489de2c317869cf5dea57a9595a0cca";
|
||||
sha256 = "18b2vi0gl48257rwdnaq2xcrhhfmpahmjzcpm3c8k7z43igf8jla";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
nvim-jdtls = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nvim-jdtls";
|
||||
version = "2022-11-01";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "mfussenegger";
|
||||
repo = "nvim-jdtls";
|
||||
rev = "7bc572fc357d7dec8d3ca620b53e763776472582";
|
||||
sha256 = "10rm01cxc1xnw7m886ssnmb5ihlsfjhp6sqm9dhmrkg4ywkbhj9m";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
|
@ -281,12 +280,12 @@ rec {
|
|||
};
|
||||
nvim-lint = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nvim-lint";
|
||||
version = "2022-11-19";
|
||||
version = "2022-11-22";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "mfussenegger";
|
||||
repo = "nvim-lint";
|
||||
rev = "666ed80fcb78cf6355f3d5b7ebdbacef6465578c";
|
||||
sha256 = "1zncna7k5k3ifr24wfjzbsby1g79cyr718lkq1vfyz798f9pkk03";
|
||||
rev = "ea8cae4a97b2127702d4b891c40c48d8230670e5";
|
||||
sha256 = "05qm8zgmh5q98hwmp0zc27wwmxnyady6v04kqd4b72cx00xnx0dw";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
|
@ -303,12 +302,12 @@ rec {
|
|||
};
|
||||
LuaSnip = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "LuaSnip";
|
||||
version = "2022-11-20";
|
||||
version = "2022-11-22";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "L3MON4D3";
|
||||
repo = "LuaSnip";
|
||||
rev = "2373292156322c17b91b9454c6c183a5ef233fd1";
|
||||
sha256 = "0yljys32y0wq25747n4rzasi7fyxwqqqb6bp071jkzwrdrh6wais";
|
||||
rev = "79f647218847b1cd204fede7dd89025e43fd00c3";
|
||||
sha256 = "1n99rq71fgasagglzq0sxlvxnprmbqi3jd47q5n59zs0h1q63hyk";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
|
@ -325,12 +324,12 @@ rec {
|
|||
};
|
||||
nvim-cmp = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nvim-cmp";
|
||||
version = "2022-11-18";
|
||||
version = "2022-11-24";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "hrsh7th";
|
||||
repo = "nvim-cmp";
|
||||
rev = "8a9e8a89eec87f86b6245d77f313a040a94081c1";
|
||||
sha256 = "1gkm3pl06xvzxl5phk2g2hg8zqdpznn3jd5hjjspjfycgwscxbsx";
|
||||
rev = "4c05626ccd70b1cab777c507b34f36ef27d41cbf";
|
||||
sha256 = "185mxjj3r9jhgylr3ai08i5br6xh7jifyqyxgsw9a0plq8qywcvl";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
|
@ -435,23 +434,23 @@ rec {
|
|||
};
|
||||
neoformat = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "neoformat";
|
||||
version = "2022-11-12";
|
||||
version = "2022-11-24";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "sbdchd";
|
||||
repo = "neoformat";
|
||||
rev = "1f79f6e6b2a1e2b3ace87d4760769feb4146ff35";
|
||||
sha256 = "02vik8gfqncxjhr065sr9bw7fd9lhbwkjjkzn2j9p7y2gw0yjcis";
|
||||
rev = "a09d6ed9eacd0b81c0f8641757e60f7bb0e27f6e";
|
||||
sha256 = "1pqz1bz5nwdrm4x0p38xhabyb089spvp5khhl154k5mi6fsws219";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
nvim-autopairs = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nvim-autopairs";
|
||||
version = "2022-10-27";
|
||||
version = "2022-11-24";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "windwp";
|
||||
repo = "nvim-autopairs";
|
||||
rev = "6b6e35fc9aca1030a74cc022220bc22ea6c5daf4";
|
||||
sha256 = "1laskay0f6rf9283cgiv1db3ph4imzyfk10j0wn6f8zsm8n13m1v";
|
||||
rev = "5d75276fce887c0cf433bb1b9867717907211063";
|
||||
sha256 = "11ivy3iaw672yfgbq92q0xd9s6qijs5rd5464fgdwimqrsac0300";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
|
@ -479,23 +478,23 @@ rec {
|
|||
};
|
||||
nvim-treesitter-textobjects = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nvim-treesitter-textobjects";
|
||||
version = "2022-11-19";
|
||||
version = "2022-11-26";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nvim-treesitter";
|
||||
repo = "nvim-treesitter-textobjects";
|
||||
rev = "1435ea532a3c9e6ea48ed3438fdf48bb37277578";
|
||||
sha256 = "1m3hfidjim2cy4x3np4rqcg67cq1kqz64yaqkcj7qlwlxd29gi6p";
|
||||
rev = "04c61332a3cb78e56f7455d17d7878b0b7e66270";
|
||||
sha256 = "0db6s53540f1z11ffnmbfqbx504qpwzsrs8xxp9b61pgy66lsf3l";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
nvim-surround = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nvim-surround";
|
||||
version = "2022-11-19";
|
||||
version = "2022-11-24";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "kylechui";
|
||||
repo = "nvim-surround";
|
||||
rev = "93380716d94e451c340e653ce09d73e9cabe54c6";
|
||||
sha256 = "0xzx9iwdyz95l9bxsbb74bc35bvp5va5855c56qvimc4bcflgp5a";
|
||||
rev = "6b45fbffdabb2d8cd80d310006c92e59cec8fd74";
|
||||
sha256 = "1qdhyclzsw1inwwzw3kr1jxq3cz0qr358whj93y16x7id3ylsx52";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
|
@ -578,23 +577,23 @@ rec {
|
|||
};
|
||||
nvim-notify = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nvim-notify";
|
||||
version = "2022-11-10";
|
||||
version = "2022-11-24";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "rcarriga";
|
||||
repo = "nvim-notify";
|
||||
rev = "43c54aec682854b39a7e0e89b4c3ba00426d74a8";
|
||||
sha256 = "0ga67fj7wf54mvrbsq423ccw3rvsgrd66dg0pq7cz7x9i7v5dz4d";
|
||||
rev = "e7cffd0e8c3beaa0df7d06567620afa964bc2963";
|
||||
sha256 = "0j2q6wd5izv6y5cj50xildd117zx8ncd93074fp97gdyb2xmp45g";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
noice-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "noice.nvim";
|
||||
version = "2022-11-20";
|
||||
version = "2022-11-24";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "folke";
|
||||
repo = "noice.nvim";
|
||||
rev = "c0d4e174e407bd6824bf14c8ea3d2e24439defbf";
|
||||
sha256 = "0z8ja7b43sic4pkhcrn70yb9lcg4r3jwsj557p197s6ixnm16lcq";
|
||||
rev = "fa21685e23cbb72bb573eecf48dd3644bc1513ba";
|
||||
sha256 = "1vbm54fykn6xzndrrrb1bcymbwbmanifnsr693v5647k5hmsjc64";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
# LSP
|
||||
- src: neovim/nvim-lspconfig
|
||||
- src: mfussenegger/nvim-jdtls
|
||||
- src: "https://git.sr.ht/~whynothugo/lsp_lines.nvim"
|
||||
- src: onsails/lspkind.nvim
|
||||
- src: SmiteshP/nvim-navic
|
||||
|
|
|
@ -76,9 +76,21 @@ for plugin in "${plugin_array[@]}"; do
|
|||
;;
|
||||
esac
|
||||
|
||||
case "$name" in
|
||||
nvim-treesitter)
|
||||
echo "${name} = pkgs.vimPlugins.nvim-treesitter.overrideAttrs (_: {" >>"$nix_new_file"
|
||||
close_block="});"
|
||||
;;
|
||||
*)
|
||||
{
|
||||
echo "${name} = pkgs.vimUtils.buildVimPluginFrom2Nix {"
|
||||
echo "pname = \"${repo}\";"
|
||||
} >>"$nix_new_file"
|
||||
close_block="};"
|
||||
;;
|
||||
esac
|
||||
|
||||
{
|
||||
echo "${name} = pkgs.vimUtils.buildVimPluginFrom2Nix {"
|
||||
echo "pname = \"${repo}\";"
|
||||
echo "version = \"${version}\";"
|
||||
echo "src = ${fetcher} ${src};"
|
||||
} >>"$nix_new_file"
|
||||
|
@ -97,28 +109,7 @@ for plugin in "${plugin_array[@]}"; do
|
|||
printf "buildPhase = ''\n%s\n'';\n" "$build_phase" >>"$nix_new_file"
|
||||
fi
|
||||
|
||||
case "$name" in
|
||||
nvim-treesitter)
|
||||
passthru="passthru.withPlugins =
|
||||
grammarFn: nvim-treesitter.overrideAttrs (_: {
|
||||
postPatch =
|
||||
let
|
||||
grammars = pkgs.tree-sitter.withPlugins grammarFn;
|
||||
in
|
||||
''
|
||||
rm -r parser
|
||||
ln -s \${grammars} parser
|
||||
'';
|
||||
});"
|
||||
;;
|
||||
*)
|
||||
passthru=""
|
||||
;;
|
||||
esac
|
||||
|
||||
echo -n "$passthru" >>"$nix_new_file"
|
||||
|
||||
echo '};' >>"$nix_new_file"
|
||||
echo "$close_block" >>"$nix_new_file"
|
||||
done
|
||||
echo "}" >>"$nix_new_file"
|
||||
|
||||
|
|
Binary file not shown.
|
@ -11,6 +11,7 @@ in
|
|||
../../hardware/hosts/sail.nix
|
||||
../nixos/ssh.nix
|
||||
|
||||
(import ../nixos/dendrite.nix (args // { inherit secret; }))
|
||||
../nixos/git.nix
|
||||
(import ../nixos/tailscale.nix (args // { inherit secret; }))
|
||||
|
||||
|
|
47
system/nixos/dendrite.nix
Normal file
47
system/nixos/dendrite.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ secret, ... }:
|
||||
|
||||
let
|
||||
connectionString = "postgres://${secret.dendrite.database.user}:${secret.dendrite.database.password}@10.99.99.3/dendrite?sslmode=disable";
|
||||
in
|
||||
{
|
||||
services.dendrite = {
|
||||
enable = true;
|
||||
|
||||
environmentFile = "/var/lib/dendrite/secrets/environment";
|
||||
|
||||
loadCredential = [
|
||||
"private_key:/var/lib/dendrite/secrets/matrix_key.pem"
|
||||
];
|
||||
|
||||
settings = {
|
||||
global = {
|
||||
server_name = "kempkens.io";
|
||||
private_key = "$CREDENTIALS_DIRECTORY/private_key";
|
||||
metrics.enabled = false;
|
||||
report_stats.enabled = false;
|
||||
};
|
||||
|
||||
app_service_api.database.connection_string = connectionString;
|
||||
federation_api.database.connection_string = connectionString;
|
||||
key_server.database.connection_string = connectionString;
|
||||
media_api.database.connection_string = connectionString;
|
||||
mscs.database.connection_string = connectionString;
|
||||
room_server.database.connection_string = connectionString;
|
||||
sync_api.database.connection_string = connectionString;
|
||||
user_api.account_database.connection_string = connectionString;
|
||||
user_api.device_database.connection_string = connectionString;
|
||||
|
||||
client_api = {
|
||||
registration_shared_secret = "$REGISTRATION_SHARED_SECRET";
|
||||
registration_disabled = true;
|
||||
};
|
||||
|
||||
mscs.mscs = [
|
||||
# threading
|
||||
"msc2946"
|
||||
# spaces
|
||||
"msc2836"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue