add nvim buffer switch keymap & change dbt models

This commit is contained in:
Sam 2024-09-14 20:19:07 +01:00
parent a8e0ae35da
commit f7ffba2266
4 changed files with 57 additions and 50 deletions

View File

@ -361,11 +361,11 @@
"nix-secrets": { "nix-secrets": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1722540163, "lastModified": 1726340825,
"narHash": "sha256-5/sOGSmWksxMKuLzcpWBMYRkphFLcz7XensO2gwEC/4=", "narHash": "sha256-6gv36ea3aAjJH7osZVzVU0GRoJeVR+iwSP9bSaJC+MI=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "a403495cd9a28b44b10c64cc340d04d759b6d21c", "rev": "73d4d304a201f7db200ffb5955c8a2f521f635a7",
"revCount": 158, "revCount": 160,
"type": "git", "type": "git",
"url": "ssh://git@git.bitlab21.com/sam/nix-secrets.git" "url": "ssh://git@git.bitlab21.com/sam/nix-secrets.git"
}, },

View File

@ -2,32 +2,32 @@
programs.nixvim.keymaps = [ programs.nixvim.keymaps = [
# Switching buffers # Switching buffers
{ {
mode = [ "n" ]; mode = ["n"];
action = "<C-W>h"; action = "<C-w>h";
key = "<S-h>"; key = "<S-h>";
options = { options = {
silent = true; silent = true;
}; };
} }
{ {
mode = [ "n" ]; mode = ["n"];
action = "<C-W>j"; action = "<C-w>j";
key = "<S-j>"; key = "<S-j>";
options = { options = {
silent = true; silent = true;
}; };
} }
{ {
mode = [ "n" ]; mode = ["n"];
action = "<C-W>k"; action = "<C-w>k";
key = "<S-k>"; key = "<S-k>";
options = { options = {
silent = true; silent = true;
}; };
} }
{ {
mode = [ "n" ]; mode = ["n"];
action = "<C-W>l"; action = "<C-w>l";
key = "<S-l>"; key = "<S-l>";
options = { options = {
silent = true; silent = true;
@ -36,7 +36,7 @@
# Toggle nvim-tree # Toggle nvim-tree
{ {
mode = [ "n" ]; mode = ["n"];
action = "<cmd>NvimTreeFindFileToggle<CR>"; action = "<cmd>NvimTreeFindFileToggle<CR>";
key = "tt"; key = "tt";
options = { options = {
@ -46,40 +46,40 @@
# Clear search highlighting # Clear search highlighting
{ {
mode = [ "n" ]; mode = ["n"];
key = "<space><space>"; key = "<space><space>";
action = "<cmd>nohlsearch<CR>"; action = "<cmd>nohlsearch<CR>";
options = { noremap = true; }; options = {noremap = true;};
} }
# Telescope Plugin # Telescope Plugin
{ {
# find files # find files
mode = [ "n" ]; mode = ["n"];
key = "<Leader>ff"; key = "<Leader>ff";
action = "<cmd>Telescope find_files<CR>"; action = "<cmd>Telescope find_files<CR>";
options = { noremap = true; }; options = {noremap = true;};
} }
{ {
# live grep # live grep
mode = [ "n" ]; mode = ["n"];
key = "<Leader>fg"; key = "<Leader>fg";
action = "<cmd>Telescope live_grep<CR>"; action = "<cmd>Telescope live_grep<CR>";
options = { noremap = true; }; options = {noremap = true;};
} }
{ {
# buffers # buffers
mode = [ "n" ]; mode = ["n"];
key = "<Leader>fb"; key = "<Leader>fb";
action = "<cmd>Telescope buffers<CR>"; action = "<cmd>Telescope buffers<CR>";
options = { noremap = true; }; options = {noremap = true;};
} }
{ {
# help tags # help tags
mode = [ "n" ]; mode = ["n"];
key = "<Leader>fh"; key = "<Leader>fh";
action = "<cmd>Telescope help_tags<CR>"; action = "<cmd>Telescope help_tags<CR>";
options = { noremap = true; }; options = {noremap = true;};
} }
]; ];
} }

View File

@ -3,16 +3,16 @@
lsp = { lsp = {
enable = true; enable = true;
servers = { servers = {
lua-ls = { enable = true; }; lua-ls = {enable = true;};
nixd = { enable = true; }; nixd = {enable = true;};
bashls = { enable = true; }; bashls = {enable = true;};
pyright = { enable = true; }; pyright = {enable = true;};
html = { enable = true; }; html = {enable = true;};
marksman = { enable = true; }; marksman = {enable = true;};
ccls = { enable = true; }; ccls = {enable = true;};
cssls = { enable = true; }; cssls = {enable = true;};
r-language-server = { enable = true; }; r-language-server = {enable = true;};
tsserver = { enable = true; }; tsserver = {enable = true;};
}; };
keymaps = { keymaps = {
lspBuf = { lspBuf = {
@ -36,7 +36,7 @@
action = "type_definition"; action = "type_definition";
desc = "Type Definition"; desc = "Type Definition";
}; };
K = { gK = {
action = "hover"; action = "hover";
desc = "Hover"; desc = "Hover";
}; };

View File

@ -44,12 +44,15 @@ in {
"github-access-token" = { "github-access-token" = {
mode = "0655"; mode = "0655";
}; };
"software/postgres/btc_models/password" = {}; "software/postgres/baseddata_models/password" = {};
"software/postgres/btc_models/ip" = {}; "software/postgres/baseddata_models/ip" = {};
"software/postgres/btc_models/username" = {}; "software/postgres/baseddata_models/username" = {};
"software/postgres/osm/password" = {}; "software/postgres/osm/password" = {};
"software/postgres/osm/ip" = {}; "software/postgres/osm/ip" = {};
"software/postgres/osm/username" = {}; "software/postgres/osm/username" = {};
"software/postgres/bitcoin/password" = {};
"software/postgres/bitcoin/ip" = {};
"software/postgres/bitcoin/username" = {};
"software/zotero/username" = {}; "software/zotero/username" = {};
"software/zotero/password" = {}; "software/zotero/password" = {};
"software/zotero/guid" = {}; "software/zotero/guid" = {};
@ -66,16 +69,20 @@ in {
content = '' content = ''
[ [
{ {
"url": "postgresql://${config.sops.placeholder."software/postgres/btc_models/username"}:${config.sops.placeholder."software/postgres/btc_models/password"}@${config.sops.placeholder."software/postgres/btc_models/ip"}/btc_models", "url": "postgresql://${config.sops.placeholder."software/postgres/baseddata_models/username"}:${config.sops.placeholder."software/postgres/baseddata_models/password"}@${config.sops.placeholder."software/postgres/baseddata_models/ip"}/btc_models",
"name": "btc_models" "name": "baseddata_models"
}, },
{ {
"url": "postgresql://${config.sops.placeholder."software/postgres/btc_models/username"}:${config.sops.placeholder."software/postgres/btc_models/password"}@${config.sops.placeholder."software/postgres/btc_models/ip"}/dev_btc_models", "url": "postgresql://${config.sops.placeholder."software/postgres/baseddata_models/username"}:${config.sops.placeholder."software/postgres/baseddata_models/password"}@${config.sops.placeholder."software/postgres/baseddata_models/ip"}/dev_baseddata_models",
"name": "dev_btc_models" "name": "dev_baseddata_models"
}, },
{ {
"url": "postgresql://${config.sops.placeholder."software/postgres/osm/username"}:${config.sops.placeholder."software/postgres/osm/password"}@${config.sops.placeholder."software/postgres/osm/ip"}/osm", "url": "postgresql://${config.sops.placeholder."software/postgres/osm/username"}:${config.sops.placeholder."software/postgres/osm/password"}@${config.sops.placeholder."software/postgres/osm/ip"}/osm",
"name": "osm" "name": "osm"
},
{
"url": "postgresql://${config.sops.placeholder."software/postgres/bitcoin/username"}:${config.sops.placeholder."software/postgres/bitcoin/password"}@${config.sops.placeholder."software/postgres/bitcoin/ip"}/bitcoin",
"name": "bitcoin"
} }
] ]
''; '';
@ -86,27 +93,27 @@ in {
owner = "${username}"; owner = "${username}";
mode = "0600"; mode = "0600";
content = '' content = ''
bitcoin: baseddata:
target: dev target: dev
outputs: outputs:
dev: dev:
dbname: dev_btc_models dbname: dev_baseddata_models
host: ${config.sops.placeholder."software/postgres/btc_models/ip"} host: ${config.sops.placeholder."software/postgres/baseddata_models/ip"}
pass: '${config.sops.placeholder."software/postgres/btc_models/password"}' pass: '${config.sops.placeholder."software/postgres/baseddata_models/password"}'
port: 5432 port: 5432
schema: models schema: models
threads: 6 threads: 6
type: postgres type: postgres
user: ${config.sops.placeholder."software/postgres/btc_models/username"} user: ${config.sops.placeholder."software/postgres/baseddata_models/username"}
prod: prod:
dbname: btc_models dbname: baseddata_models
host: ${config.sops.placeholder."software/postgres/btc_models/ip"} host: ${config.sops.placeholder."software/postgres/baseddata_models/ip"}
pass: '${config.sops.placeholder."software/postgres/btc_models/password"}' pass: '${config.sops.placeholder."software/postgres/baseddata_models/password"}'
port: 5432 port: 5432
schema: models schema: models
threads: 6 threads: 6
type: postgres type: postgres
user: ${config.sops.placeholder."software/postgres/btc_models/username"} user: ${config.sops.placeholder."software/postgres/baseddata_models/username"}
''; '';
}; };