Compare commits

..

6 Commits

Author SHA1 Message Date
Dave Gallant
d6d5ce1012 Delete .github/dependabot.yml 2024-02-18 21:26:57 -05:00
renovate[bot]
96f234b1cb Add renovate.json (#94)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-18 21:26:40 -05:00
Dave Gallant
b8f7ee686e nix flake update: 2024-02-19_02-19-31 2024-02-18 21:19:31 -05:00
Dave Gallant
113a7b94e2 Add automatic commit msg when updating flakes 2024-02-18 21:12:54 -05:00
Dave Gallant
f2f5b9ee3e Remove git-crypt 2024-02-18 20:06:48 -05:00
Dave Gallant
adb94b9e57 Migrate to nixvim 2024-02-18 19:17:42 -05:00
12 changed files with 67 additions and 132 deletions

View File

@@ -1,4 +0,0 @@
# Do not edit this file. To specify the files to encrypt, create your own
# .gitattributes file in the directory where your files are.
* !filter !diff
*.gpg binary

1
.gitattributes vendored
View File

@@ -1 +0,0 @@
**/.aws/** filter=git-crypt diff=git-crypt

View File

@@ -1,10 +0,0 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
reviewers:
- davegallant
assignees:
- davegallant

View File

@@ -25,6 +25,10 @@ rollback:
update:
nix flake update
make
git add .
git commit -S -m "nix flake update: $$(TZ=UTC date +%Y-%m-%d_%H-%M-%S)"
git push
fmt:
alejandra .

View File

@@ -36,7 +36,3 @@ make rollback
## Pre-commit hooks
Pre-commit hooks are automatically activated when [direnv](https://github.com/direnv/direnv) is installed.
## Encryption
Overly sensitive configuration is encrypted with [git-crypt](https://www.agwa.name/projects/git-crypt/).

18
flake.lock generated
View File

@@ -30,11 +30,11 @@
]
},
"locked": {
"lastModified": 1707707289,
"narHash": "sha256-YuDt/eSTXMEHv8jS8BEZJgqCcG8Tr3cyqaZjJFXZHsw=",
"lastModified": 1708231718,
"narHash": "sha256-IZdieFWvhBkxoOFMDejqLUYqD94WN6k0YSpw0DFy+4g=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "44f50a5ecaab72a61d5fd8e5c5717bc4bf9c25dd",
"rev": "0e6857fa1d632637488666c08e7b02c08e3178f8",
"type": "github"
},
"original": {
@@ -204,11 +204,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1708151420,
"narHash": "sha256-MGT/4aGCWQPQiu6COqJdCj9kSpLPiShgbwpbC38YXC8=",
"lastModified": 1708247094,
"narHash": "sha256-H2VS7VwesetGDtIaaz4AMsRkPoSLEVzL/Ika8gnbUnE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6e2f00c83911461438301db0dba5281197fe4b3a",
"rev": "045b51a3ae66f673ed44b5bbd1f4a341d96703bf",
"type": "github"
},
"original": {
@@ -220,11 +220,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1708105575,
"narHash": "sha256-sS4AItZeUnAei6v8FqxNlm+/27MPlfoGym/TZP0rmH0=",
"lastModified": 1708161998,
"narHash": "sha256-6KnemmUorCvlcAvGziFosAVkrlWZGIc6UNT9GUYr0jQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1d1817869c47682a6bee85b5b0a6537b6c0fba26",
"rev": "84d981bae8b5e783b3b548de505b22880559515f",
"type": "github"
},
"original": {

Binary file not shown.

View File

@@ -4,16 +4,6 @@
unstable,
...
}: let
hound-nvim = pkgs.vimUtils.buildVimPlugin {
name = "hound-nvim";
nativeBuildInputs = with pkgs; [lua53Packages.luacheck stylua];
src = pkgs.fetchFromGitHub {
owner = "davegallant";
repo = "hound.nvim";
rev = "e85ba4f65ece79fe6332d8a0ccc594a0d367f4ed";
sha256 = "sha256-fxPtixVB6dVjrxpJ1oP+eA00JSiKxWuii8pMxVeuyMY=";
};
};
inherit (pkgs) stdenv;
in {
home.stateVersion = "23.11";
@@ -380,6 +370,38 @@ in {
nixvim = {
enable = true;
colorschemes.gruvbox.enable = true;
keymaps = [
{
key = "<C-n>";
mode = ["n"];
action = "<cmd>tabnew<cr>";
options = {
silent = true;
};
}
# copy to OS clipboard
{
key = "<leader>y";
mode = ["v"];
action = "\"+y";
}
{
key = "gD";
mode = ["n"];
action = "<cmd>lua vim.lsp.buf.declaration()<CR>";
}
{
key = "gd";
mode = ["n"];
action = "<cmd>lua vim.lsp.buf.definition()<CR>";
}
{
key = "gr";
mode = ["n"];
action = "<cmd>lua vim.lsp.buf.references()<CR>";
}
];
plugins = {
cmp-path.enable = true;
cmp-treesitter.enable = true;
@@ -388,6 +410,19 @@ in {
gitblame.enable = true;
gitsigns.enable = true;
lualine.enable = true;
lsp.enable = true;
lsp.servers = {
#ansiblels.enable = true;
bashls.enable = true;
#dockerls.enable = true;
gopls.enable = true;
#helm-ls.enable = true;
jsonls.enable = true;
pyright.enable = true;
rnix-lsp.enable = true;
terraformls.enable = true;
yamlls.enable = true;
};
nvim-cmp.enable = true;
rainbow-delimiters.enable = true;
treesitter.enable = true;
@@ -461,15 +496,6 @@ in {
-- Format JSON
vim.cmd([[command! JsonFormat execute "::%!jq '.'"]])
-- Tab shortcuts
vim.api.nvim_set_keymap("n", "<C-n>", "<cmd>tabnew<cr>", { noremap = true })
-- Copy to OS clipboard
vim.api.nvim_set_keymap("v", "<leader>y", '"+y', { noremap = true })
-- Folding
vim.api.nvim_set_keymap("n", "<space>", "za", { silent = true, noremap = true })
-- Remember line number
vim.cmd([[au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif]])
@@ -486,18 +512,6 @@ in {
vim.cmd([[highlight ExtraWhitespace ctermbg=red guibg=red]])
vim.cmd([[match ExtraWhitespace /\s\+$/]])
-------------------------------------------------------------------------------
-- LSP {{{1 -------------------------------------------------------------------
-------------------------------------------------------------------------------
-- See `:help vim.lsp.*` for documentation on any of the below functions
local opts = { noremap=true, silent=true }
vim.api.nvim_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
vim.api.nvim_set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
vim.api.nvim_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
vim.api.nvim_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
vim.api.nvim_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
-------------------------------------------------------------------------------
-- completion {{{1 -------------------------------------------------------------------
-------------------------------------------------------------------------------
@@ -509,66 +523,6 @@ in {
local cmp = require("cmp")
-------------------------------------------------------------------------------
-- lsp {{{1 -------------------------------------------------------------------
-------------------------------------------------------------------------------
local lspconfig = require "lspconfig"
lspconfig.ansiblels.setup({
capabilities = capabilities,
cmd = {os.getenv("HOME") .. "/.npm-packages/bin/ansible-language-server", "--stdio"};
})
lspconfig.bashls.setup({
capabilities = capabilities,
})
lspconfig.gopls.setup({
capabilities = capabilities,
})
lspconfig.pyright.setup({
capabilities = capabilities,
})
lspconfig.rls.setup({
capabilities = capabilities,
})
lspconfig.rnix.setup({
capabilities = capabilities,
})
lspconfig.solargraph.setup({
capabilities = capabilities,
})
lspconfig.terraformls.setup({
filetypes={"terraform","tf","hcl"},
capabilities = capabilities,
})
lspconfig.tflint.setup({
capabilities = capabilities,
})
lspconfig.yamlls.setup({
capabilities = capabilities,
})
-------------------------------------------------------------------------------
-- Plugins {{{1 ---------------------------------------------------------------
-------------------------------------------------------------------------------
-- status line
require("lualine").setup({
options = {
theme = "gruvbox",
},
})
-- folding
vim.api.nvim_exec(
[[
@@ -579,12 +533,6 @@ in {
]],
true
)
-- vim-prettier
vim.g["prettier#autoformat"] = 1
-- git-blame
vim.g.gitblame_enabled = 1
'';
};
@@ -630,9 +578,4 @@ in {
};
};
};
home.file = {
# ".config/nvim/lua".source = ./nvim/lua;
".aws/config".source = ./.aws/config;
};
}

View File

@@ -21,6 +21,8 @@
};
};
systemd.services.NetworkManager-wait-online.enable = false;
services = {
sshd.enable = true;
tailscale.enable = true;

View File

@@ -12,7 +12,6 @@ in {
# essentials
curl
gcc
git-crypt
gnumake
gnupg
imagemagick
@@ -58,7 +57,7 @@ in {
unstable.google-cloud-sdk
unstable.awscli2
# language servers
# LSP
nodePackages.bash-language-server
nodePackages.pyright
nodePackages.yaml-language-server

6
renovate.json Normal file
View File

@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
]
}