add rust stuff to neovim config
This commit is contained in:
parent
f4678130d3
commit
429b20293a
3 changed files with 82 additions and 0 deletions
53
hosts/ocelot/gotosocial.nix
Normal file
53
hosts/ocelot/gotosocial.nix
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
{ ... }:
|
||||||
|
let
|
||||||
|
bind-address = "127.0.0.1";
|
||||||
|
host = "test-gts.cherrykitten.xyz";
|
||||||
|
port = 8553;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.gotosocial = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
inherit bind-address host port;
|
||||||
|
application-name = "CherryKitten";
|
||||||
|
setupPostgresqlDB = true;
|
||||||
|
landing-page-user = "sammy";
|
||||||
|
|
||||||
|
instance-expose-suspended = true;
|
||||||
|
instance-expose-suspended-web = true;
|
||||||
|
accounts-registration-open = false;
|
||||||
|
|
||||||
|
media-image-max-size = 41943040;
|
||||||
|
media-video-max-size = 83886080;
|
||||||
|
media-description-max-chars = 3000;
|
||||||
|
media-remote-cache-days = 14;
|
||||||
|
media-emoji-local-max-size = 204800;
|
||||||
|
media-emoji-remote-max-size = 204800;
|
||||||
|
|
||||||
|
statuses-max-chars = 69420;
|
||||||
|
statuses-cw-max-chars = 200;
|
||||||
|
statuses-poll-max-options = 10;
|
||||||
|
statuses-poll-option-max-chars = 150;
|
||||||
|
statuses-media-max-files = 16;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
|
services.nginx = {
|
||||||
|
enable = true;
|
||||||
|
clientMaxBodySize = "40M";
|
||||||
|
virtualHosts = {
|
||||||
|
"${host}" = {
|
||||||
|
forceSSL = false;
|
||||||
|
locations = {
|
||||||
|
"/" = {
|
||||||
|
recommendedProxySettings = true;
|
||||||
|
proxyWebsockets = true;
|
||||||
|
proxyPass = "http://${bind-address}:${toString port}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -11,6 +11,11 @@
|
||||||
ansible-language-server
|
ansible-language-server
|
||||||
nil
|
nil
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
|
# rust
|
||||||
|
rustc
|
||||||
|
cargo
|
||||||
|
rust-analyzer
|
||||||
|
rustfmt
|
||||||
];
|
];
|
||||||
|
|
||||||
plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
|
|
@ -12,6 +12,30 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
rust_analyzer = {
|
||||||
|
settings = {
|
||||||
|
["rust_analyzer"] = {
|
||||||
|
check = {
|
||||||
|
command = "clippy",
|
||||||
|
},
|
||||||
|
completion = {
|
||||||
|
fullFunctionSignatures = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
styleLints = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
imports = {
|
||||||
|
granularity = {
|
||||||
|
enforce = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue