Compare commits

...

4 commits

Author SHA1 Message Date
Anish Lakhwara 47e073f9d1 more woodpecker updates 2022-12-21 22:33:39 +10:00
Anish Lakhwara a309cf3fb3 nicer lsp 2022-12-21 21:43:00 +10:00
Anish Lakhwara 3bea51a834 working towards woodpecker 2022-12-21 21:42:06 +10:00
Anish Lakhwara d2252ae1fe realign notifications 2022-12-20 16:55:48 +10:00
10 changed files with 109 additions and 49 deletions

View file

@ -16,6 +16,7 @@ D('sealight.xyz', REG_NONE, DnsProvider(DNS_HEDNS),
A('bridge', '69.61.38.225', TTL(300)),
A('rss', '69.61.38.225', TTL(300)),
A('git', '69.61.38.225', TTL(300)),
A('ci', '69.61.38.225', TTL(300)),
// vultr -> nulled: lituus
A('@', '45.77.48.108', TTL(300)),
A('jitsi', '45.77.48.108', TTL(300)),

View file

@ -35,7 +35,7 @@
origin = top-right
# Offset from the origin
offset = 18x36
offset = 12x36
# Scale factor. It is auto-detected if value is 0.
scale = 0

View file

@ -19,6 +19,15 @@ let
sha256 = "rs3NTZwWdsmBGXnrgUeVxUiNjbN/ULxJHifPYJD9mT4=";
};
};
my-lspsaga = pkgs.vimUtils.buildVimPluginFrom2Nix {
name = "lspsaga.nvim";
src = pkgs.fetchFromGitHub {
owner = "glepnir";
repo = "lspsaga.nvim";
rev = "b7b4777369b441341b2dcd45c738ea4167c11c9e";
sha256 = "sciX/fMxzY1YOxXxjj1+ymrdMi451avcFFu+14R+/pk=";
};
};
nvim-luapad = pkgs.vimUtils.buildVimPluginFrom2Nix {
name = "nvim-luapad";
src = pkgs.fetchFromGitHub {
@ -57,16 +66,6 @@ let
};
meta.homepage = "https://github.com/folke/which-key.nvim/";
};
my-conjure = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "conjure";
version = "2022-05-04";
src = pkgs.fetchFromGitHub {
owner = "olical";
repo = "conjure";
rev = "2e7f449d06753f2996e186954e96afc60edd5862";
sha256 = "ZV0vPYiZI5/3Isw2l7rrLuiO+kA9G0vrA6OxHFkLTFw=";
};
};
scnvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "scnvim";
version = "2022-06-04";
@ -261,6 +260,8 @@ in
" Sexp in Conjure (since it's fennel)
let g:sexp_filetypes = "clojure,scheme,lisp,janet,fennel,yuck"
let g:conjure#filetype#fennel = "conjure.client.fennel.stdio"
" let g:conjure#extract#tree_sitter#enabled = true
map <localleader>lt :ConjureLogToggle<CR>
let g:rainbow_active = 0
autocmd BufReadPost,BufNewFile c,clj,cljs RainbowParenthesesToggleAll
@ -338,23 +339,25 @@ in
let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.8 } }
" lsp commands
nnoremap <leader>vd :lua vim.lsp.buf.definition()<CR>
" nnoremap <leader>vd :lua vim.lsp.buf.definition()<CR>
nnoremap <leader>vi :lua require('telescope.builtin').lsp_implementation()<CR>
nnoremap <leader>vsh :lua vim.lsp.buf.signature_help()<CR>
nnoremap <leader>vrr :lua require('telescope.builtin').lsp_references()<CR>
nnoremap <leader>vrn :lua vim.lsp.buf.rename()<CR>
nnoremap <leader>vh :lua vim.lsp.buf.hover()<CR>
nnoremap <leader>vca :lua vim.lsp.buf.code_action()<CR>
nnoremap <leader>vsd :lua vim.lsp.util.show_line_diagnostics()<CR>
nnoremap <leader>vn :lua vim.lsp.diagnostic.goto_next()<CR>
nnoremap <leader>va :lua require('telescope.builtin').lsp_code_actions(require('telescope.themes').get_cursor())<cr>
" nnoremap <leader>vrn :lua vim.lsp.buf.rename()<CR>
" nnoremap <leader>vh :lua vim.lsp.buf.hover()<CR>
" nnoremap <leader>vca :lua vim.lsp.buf.code_action()<CR>
" nnoremap <leader>vsd :lua vim.lsp.util.show_line_diagnostics()<CR>
" nnoremap <leader>vn :lua vim.lsp.diagnostic.goto_next()<CR>
" nnoremap <leader>va :lua require('telescope.builtin').lsp_code_actions(require('telescope.themes').get_cursor())<cr>
" lspsaga stuff doesn't work
" nnoremap <leader>vd :call Lspsaga peek_definition<CR>
" nnoremap <leader>vrn :call Lspsaga rename<CR><CR>
" nnoremap <leader>vh :call Lspsaga hover_doc<CR>
" nnoremap <leader>vca :call Lspsaga code_action<CR>
" nnoremap <leader>vsd :call Lspsaga show_line_diagnostics<CR>
" nnoremap <leader>vn :call Lspsaga diagnostic_jump_prev<CR>
nnoremap <leader>vd :Lspsaga peek_definition<CR>
nnoremap <leader>vrn :Lspsaga rename<CR><CR>
nnoremap <leader>vh :Lspsaga hover_doc<CR>
nnoremap <leader>vca :Lspsaga code_action<CR>
nnoremap <leader>vsd :Lspsaga show_line_diagnostics<CR>
nnoremap <leader>vs :Dasht<Space>
nnoremap <leader>vn :Lspsaga diagnostic_jump_prev<CR>
nnoremap <leader>vo :LSoutlineToggle<CR>
" dashboard
let g:dashboard_custom_header = [
@ -582,18 +585,37 @@ in
local navic = require("nvim-navic")
-- lspsaga, code_action lightbulb is annoying
-- local saga = require('lspsaga')
-- saga.init_lsp_saga({
-- code_action_lightbulb = {
-- enable = true,
-- enable_in_insert = true,
-- cache_code_action = true,
-- sign = true,
-- update_time = 150,
-- sign_priority = 4,
-- virtual_text = false,
-- },
-- })
local saga = require('lspsaga')
saga.init_lsp_saga({
border_style = "rounded",
code_action_icon = "",
code_action_num_shortcut = true,
code_action_lightbulb = {
enable = false,
enable_in_insert = false,
cache_code_action = true,
sign = true,
update_time = 150,
sign_priority = 20,
virtual_text = false,
},
code_action_keys = {
quit = 'q',
exec = '<CR>',
},
-- show outline
show_outline = {
win_position = 'right',
--set special filetype win that outline window split.like NvimTree neotree
-- defx, db_ui
auto_enter = true,
auto_preview = true,
virt_text = '',
jump_key = 'o',
-- auto refresh when change buffer
auto_refresh = true,
},
})
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
@ -806,6 +828,11 @@ in
}
require('twilight').setup{}
-- hologram
require('hologram').setup{
auto_display = true -- WIP automatic markdown image display, may be prone to breaking
}
EOF
'';
@ -855,7 +882,8 @@ in
nvim-peekup
zen-mode-nvim
twilight-nvim
lspsaga-nvim
my-lspsaga
vim-dasht
# language
vim-nix
@ -870,6 +898,7 @@ in
vimwiki
taskwiki
vim-zettel
hologram-nvim
# lsp stuff
# nvim-lint

View file

@ -19,6 +19,7 @@
../profiles/wallabag
../profiles/finance
# ../profiles/archivebox
../profiles/woodpecker-agent
];
# For some reason this doesn't work in the profile, but does over here??

View file

@ -6,6 +6,7 @@
../profiles/server
../profiles/metrics
../profiles/gitea
../profiles/woodpecker-server
../profiles/rss-bridge
../profiles/mount-mossnet
../profiles/freshrss

View file

@ -1,12 +1,17 @@
{ pkgs, config, self, ... }:
{
users.users.woodpecker-runner = {
isSystemUser = true;
group = "woodpecker-runner";
home = "/var/lib/woodpecker";
createHome = true;
};
users.groups.woodpecker-runner = { };
# Allow the exec runner to write to build with nix
nix.allowedUsers = [ "woodpecker-runner" ];
nix.settings.allowed-users = [ "woodpecker-runner" ];
age.secrets.woodpecker-agent-secret.owner = "woodpecker-runner";
age.secrets.woodpecker-agent-secret.file = "${self}/secrets/woodpecker-agent-secret.age";
systemd.services.woodpecker-runner-exec = {
enable = true;
@ -30,15 +35,19 @@
];
serviceConfig = {
Environment = [
"WOODPECKER_RUNNER_CAPACITY=2"
"WOODPECKER_RUNNER_CAPACITY=6"
"WOODPECKER_RUNNER_NAME=woodpecker-agent"
"WOODPECKER_SERVER=https://ci.sealight.xyz/"
"WOODPECKER_HOSTNAME=mossnet"
"WOODPECKER_BACKEND=local"
"NIX_REMOTE=daemon"
"PAGER=cat"
];
BindPaths = [
"/nix/var/nix/daemon-socket/socket"
"/run/nscd/socket"
# "/var/lib/woodpecker"
"/var/lib/woodpecker"
"/var/empty/usr"
];
BindReadOnlyPaths = [
"/etc/passwd:/etc/passwd"
@ -55,7 +64,7 @@
"/nix/"
];
EnvironmentFile = [
# /run/agenix/woodpecker-agent-secret
/run/agenix/woodpecker-agent-secret
];
ExecStart = "${pkgs.woodpecker-agent}/bin/woodpecker-agent";
User = "woodpecker-runner";

View file

@ -1,6 +1,12 @@
{ self, ... }:
{
age.secrets.woodpecker-server-secrets.owner = "woodpecker";
age.secrets.woodpecker-server-secrets.file = "${self}/secrets/woodpecker-server-secrets.age";
age.secrets.woodpecker-agent-secret.owner = "woodpecker";
age.secrets.woodpecker-agent-secret.file = "${self}/secrets/woodpecker-agent-secret.age";
users.users.woodpecker = {
group = woodpecker;
group = "woodpecker";
description = "woodpecker user";
home = "/var/lib/woodpecker";
createHome = true;
@ -28,12 +34,11 @@
wantedBy = [ "multi-user.target" ];
serviceConfig = {
EnvironmentFile = [
# GITEA_CLIENT_SECRET etc
# /run/agenix/woodpecker
/run/agenix/woodpecker-server-secrets
/run/agenix/woodpecker-agent-secret
];
Environment = [
"WOODPECKER_OPEN=true"
"WOODPECKER_AGENT_SECRET=${WOODPECKER_AGENT_SECRET}"
"WOODPECKER_GITEA=true"
"WOODPECKER_GITEA_URL=https://git.sealight.xyz"
@ -42,6 +47,12 @@
"WOODPECKER_DATABASE_DRIVER=postgres"
"WOODPECKER_SERVER_PORT=:3030"
"WOODPECKER_USER_CREATE=username:aynish,admin:true" # set your admin username
"${config.environment.etc."ssl/certs/ca-certificates.crt".source}:/etc/ssl/certs/ca-certificates.crt"
"${config.environment.etc."ssh/ssh_known_hosts".source}:/etc/ssh/ssh_known_hosts"
"${builtins.toFile "ssh_config" ''
Host git.sealight.xyz
ForwardAgent yes
''}:/etc/ssh/ssh_config"
];
ExecStart = "${pkgs.woodpecker-server}/bin/woodpecker-server";
User = woodpecker;

View file

@ -25,8 +25,7 @@ in
"telegram-matrix-env.age".publicKeys = [ lituus ];
"wallabag.age".publicKeys = [ mossnet ];
"woodpecker-agent-secret.age".publicKeys = [ lituus helix ];
"woodpecker-client-id.age".publicKeys = [ helix ];
"woodpecker-client-secret.age".publicKeys = [ helix ];
"woodpecker-agent-secret.age".publicKeys = [ mossnet helix ];
"woodpecker-server-secrets.age".publicKeys = [ helix ];
"gitea-dbpass.age".publicKeys = [ helix ];
}

View file

@ -0,0 +1,9 @@
age-encryption.org/v1
-> ssh-ed25519 K2vF/Q SYAkEEvz6aqkzh8r+TgvnwfQNJ3pLxGUcYmHK3DaNhM
ayICZI0Ctmw1AtIReiXx5KXUSz8qZtkRZQx9eNS0z1g
-> ssh-ed25519 kgCrKA Ii00pfHYObHJbBJziVQLUR43s61t0JOTT0YZJ9OaqE0
NUJddte8zIZhrVtSeTU9iq9UW955ANlA6JZm8MQf+P8
-> QrEy[-grease yS' ]r: PIx`w:SK
uaB9Bdjdf3Sy5fL1qQNsfYZhoCRG51MPDfw75A
--- 8jiDkupjnxMlSfXvJQGK4pVFDTuqNbsvHGsqLzDHjQ0
eœT—8Ÿp<EFBFBD>`² øáG®¥Ç<C2A5>t·è÷4ƒòóѯ·Ç2ZŒ<5A>/ +fÝæxb¢TIèÕùnåÏ<C3A5>ú#¶Rº 5±úTíüñ9 åèä4=ÌYÉd¦\aìÔI

Binary file not shown.