Reorganize and refactor project
This commit is contained in:
parent
ed1e654706
commit
afcc583dcf
35 changed files with 130 additions and 300 deletions
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
config = {
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
htop = "btop";
|
||||
gp = "git push";
|
||||
gco = "git checkout";
|
||||
gd = "git diff";
|
||||
gc = "git commit";
|
||||
gpl = "git pull";
|
||||
gb = "git branch";
|
||||
ga = "git add";
|
||||
gl = "git log";
|
||||
gs = "git status";
|
||||
tf = "tofu";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
config = {
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,186 +0,0 @@
|
|||
{ pkgs, lib, config, ... }: {
|
||||
imports = [
|
||||
./bash
|
||||
./neovim
|
||||
./firefox
|
||||
./ssh
|
||||
./syncthing
|
||||
./keepassxc
|
||||
./git
|
||||
./direnv
|
||||
./thunderbird
|
||||
./fzf
|
||||
./bat
|
||||
];
|
||||
|
||||
home = {
|
||||
username = "pim";
|
||||
homeDirectory = "/home/pim";
|
||||
stateVersion = "23.05";
|
||||
|
||||
packages = with pkgs; [
|
||||
unstable.moonlight-qt
|
||||
unstable.vlc
|
||||
unstable.nicotine-plus
|
||||
unstable.logseq
|
||||
unstable.signal-desktop
|
||||
unstable.telegram-desktop
|
||||
unstable.strawberry
|
||||
unstable.gimp
|
||||
unstable.libreoffice
|
||||
virt-manager
|
||||
gnome.gnome-tweaks
|
||||
unstable.impression
|
||||
poppler_utils # For pdfunite
|
||||
silicon
|
||||
unstable.dbeaver-bin
|
||||
unstable.wireshark
|
||||
units
|
||||
btrfs-progs
|
||||
exfat
|
||||
unstable.qFlipper
|
||||
f3
|
||||
unstable.insomnia
|
||||
unstable.vorta
|
||||
jellyfin-media-player
|
||||
jq
|
||||
kubectl
|
||||
file
|
||||
yq
|
||||
age
|
||||
sops
|
||||
nmap
|
||||
unstable.devenv
|
||||
unstable.attic-client
|
||||
unstable.hexchat
|
||||
sbctl
|
||||
borgbackup
|
||||
unstable.krita
|
||||
unstable.bottles-unwrapped
|
||||
];
|
||||
};
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
chromium.enable = true;
|
||||
alacritty.enable = true;
|
||||
|
||||
# Currently, it is not possible to have Home Manager manage Liberwolf extensions.
|
||||
# There is a draft PR which addresses this:
|
||||
# https://github.com/nix-community/home-manager/pull/3339
|
||||
# The extensions I currently use are:
|
||||
# - ublock-origin (already installed by librewolf)
|
||||
# - cookie-autodelete
|
||||
# - clearurls
|
||||
# - istilldontcareaboutcookies
|
||||
# - keepassxc-browser
|
||||
# - redirector
|
||||
# - violentmonkey
|
||||
# - boring-rss
|
||||
# - kagi-search
|
||||
# - refined-github
|
||||
librewolf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"identity.fxaccounts.enabled" = true;
|
||||
"privacy.clearOnShutdown.history" = false;
|
||||
"privacy.clearOnShutdown.downloads" = false;
|
||||
"browser.translations.automaticallyPopup" = false;
|
||||
"browser.aboutConfig.showWarning" = false;
|
||||
"privacy.clearOnShutdown.cookies" = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Let home-manager manage the X session
|
||||
xsession = { enable = true; };
|
||||
|
||||
xdg = {
|
||||
userDirs.enable = true;
|
||||
configFile."home/postgresql_server.crt".source = ./postgresql_server.crt;
|
||||
configFile."home/postgresql_client.crt".source = ./postgresql_client.crt;
|
||||
};
|
||||
|
||||
homeage = {
|
||||
identityPaths = [ "/home/pim/.ssh/age_ed25519" ];
|
||||
installationType = "systemd";
|
||||
|
||||
file."common-pg-tfbackend" = {
|
||||
source = ../secrets/common-pg-tfbackend.age;
|
||||
symlinks = [ "${config.xdg.configHome}/home/common.pg.tfbackend" ];
|
||||
};
|
||||
|
||||
file."ansible-vault-secret" = {
|
||||
source = ../secrets/ansible-vault-secret.age;
|
||||
symlinks = [ "${config.xdg.configHome}/home/ansible-vault-secret" ];
|
||||
};
|
||||
|
||||
file."powerdns-api-key" = {
|
||||
source = ../secrets/powerdns-api-key.json.age;
|
||||
symlinks = [ "${config.xdg.configHome}/home/powerdns-api-key.json" ];
|
||||
};
|
||||
|
||||
file."postgresql_client.key" = {
|
||||
source = ../secrets/postgresql_client.key.age;
|
||||
symlinks = [ "${config.xdg.configHome}/home/postgresql_client.key" ];
|
||||
};
|
||||
};
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
dconf.settings = with lib.hm.gvariant; {
|
||||
"org/gnome/desktop/sound".allow-volume-above-100-percent = true;
|
||||
"org.gnome.desktop.wm.preferences".auto-raise = true;
|
||||
|
||||
"org/gnome/shell".enabled-extensions = [
|
||||
"workspace-indicator@gnome-shell-extensions.gcampax.github.com"
|
||||
"pop-shell@system76.com"
|
||||
];
|
||||
|
||||
"org/gnome/desktop/input-sources" = {
|
||||
sources = [ (mkTuple [ "xkb" "us" ]) ];
|
||||
xkb-options = [ "terminate:ctrl_alt_bksp" "caps:escape" ];
|
||||
};
|
||||
|
||||
"org/gnome/shell/extensions/pop-shell" = {
|
||||
active-hint = true;
|
||||
fullscreen-launcher = false;
|
||||
mouse-cursor-focus-location = mkUint32 4;
|
||||
mouse-cursor-follows-active-window = true;
|
||||
show-skip-taskbar = false;
|
||||
show-title = true;
|
||||
smart-gaps = false;
|
||||
snap-to-grid = false;
|
||||
stacking-with-mouse = true;
|
||||
tile-by-default = true;
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
|
||||
binding = "<Super>t";
|
||||
command = lib.getExe config.programs.alacritty.package;
|
||||
name = "Terminal";
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
|
||||
binding = "<Super>e";
|
||||
command = "${lib.getExe config.programs.librewolf.package} --browser";
|
||||
name = "Browser";
|
||||
};
|
||||
|
||||
"org/gnome/desktop/wm/keybindings" = {
|
||||
close = [ "<Shift><Super>q" ];
|
||||
minimize = mkEmptyArray type.string;
|
||||
move-to-workspace-1 = [ "<Shift> <Super> 1" ];
|
||||
move-to-workspace-2 = [ "<Shift><Super>2" ];
|
||||
move-to-workspace-3 = [ "<Shift><Super>3" ];
|
||||
move-to-workspace-4 = [ "<Shift><Super>4" ];
|
||||
switch-applications = mkEmptyArray type.string;
|
||||
switch-applications-backward = mkEmptyArray type.string;
|
||||
switch-to-workspace-1 = [ "<Super>1" ];
|
||||
switch-to-workspace-2 = [ "<Super>2" ];
|
||||
switch-to-workspace-3 = [ "<Super>3" ];
|
||||
switch-to-workspace-4 = [ "<Super>4" ];
|
||||
toggle-fullscreen = [ "<Super>f" ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
config = {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
[
|
||||
{
|
||||
"slug": "sixindicator"
|
||||
},
|
||||
{
|
||||
"slug": "indicatetls"
|
||||
},
|
||||
{
|
||||
"pname": "http-version-indicator",
|
||||
"slug": "http2-indicator"
|
||||
}
|
||||
]
|
|
@ -1,11 +0,0 @@
|
|||
pkgs: lib:
|
||||
let
|
||||
rycee-addons = pkgs.nur.repos.rycee.firefox-addons;
|
||||
custom-addons = import ./custom-addons.nix pkgs lib;
|
||||
in
|
||||
with rycee-addons; [
|
||||
ublock-origin
|
||||
istilldontcareaboutcookies
|
||||
keepassxc-browser
|
||||
custom-addons.simple-style-fox-2
|
||||
]
|
|
@ -1,92 +0,0 @@
|
|||
pkgs: lib:
|
||||
let
|
||||
# Stolen from: https://github.com/nix-community/nur-combined/blob/master/repos/rycee/pkgs/firefox-addons/default.nix
|
||||
buildFirefoxXpiAddon = lib.makeOverridable ({ stdenv ? pkgs.stdenv
|
||||
, fetchurl ? pkgs.fetchurl, pname, version, addonId, url, sha256, meta, ...
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
inherit meta;
|
||||
|
||||
src = fetchurl { inherit url sha256; };
|
||||
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = true;
|
||||
|
||||
buildCommand = ''
|
||||
dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
|
||||
mkdir -p "$dst"
|
||||
install -v -m644 "$src" "$dst/${addonId}.xpi"
|
||||
'';
|
||||
});
|
||||
in {
|
||||
"http-version-indicator" = buildFirefoxXpiAddon {
|
||||
pname = "http-version-indicator";
|
||||
version = "3.2.1";
|
||||
addonId = "spdyindicator@chengsun.github.com";
|
||||
url =
|
||||
"https://addons.mozilla.org/firefox/downloads/file/3767224/http2_indicator-3.2.1.xpi";
|
||||
sha256 = "be9518017334ce502a1da514542c2ca4f974217d0c8e6c7c31d518aba57c09a8";
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/bsiegel/http-version-indicator";
|
||||
description =
|
||||
"An indicator showing the HTTP version used to load the page in the address bar.";
|
||||
mozPermissions = [ "<all_urls>" "tabs" "webNavigation" "webRequest" ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
"indicatetls" = buildFirefoxXpiAddon {
|
||||
pname = "indicatetls";
|
||||
version = "0.3.0";
|
||||
addonId = "{252ee273-8c8d-4609-b54d-62ae345be0a1}";
|
||||
url =
|
||||
"https://addons.mozilla.org/firefox/downloads/file/3608595/indicatetls-0.3.0.xpi";
|
||||
sha256 = "7a3b7edb1085f7b15d279c1013fac1d68f5247cfd6312d5275cb053e24a79465";
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/jannispinter/indicatetls";
|
||||
description =
|
||||
"Displays negotiated SSL/TLS protocol version and additional security information in the address bar";
|
||||
license = licenses.mpl20;
|
||||
mozPermissions = [
|
||||
"tabs"
|
||||
"webNavigation"
|
||||
"webRequest"
|
||||
"webRequestBlocking"
|
||||
"http://*/*"
|
||||
"https://*/*"
|
||||
];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
"sixindicator" = buildFirefoxXpiAddon {
|
||||
pname = "sixindicator";
|
||||
version = "1.3.0";
|
||||
addonId = "{8c9cad02-c069-4e93-909d-d874da819c49}";
|
||||
url =
|
||||
"https://addons.mozilla.org/firefox/downloads/file/3493442/sixindicator-1.3.0.xpi";
|
||||
sha256 = "415ab83ed4ac94d1efe114752a09df29536d1bd54cc9b7e5ce5d9ee55a84226d";
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/HostedDinner/SixIndicator";
|
||||
description =
|
||||
"Shows a simple icon, if IPv6 or IPv4 was used for the request of the site. When clicking on the icon, more information is shown, like the number of requests per domain and if these requests were made via IPv6 or IPv4.";
|
||||
license = licenses.mit;
|
||||
mozPermissions = [ "tabs" "webRequest" "<all_urls>" ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
"simple-style-fox-2" = buildFirefoxXpiAddon {
|
||||
pname = "simple-style-fox-2";
|
||||
version = "10.0";
|
||||
addonId = "{317526c6-ff2b-49c9-822e-d77b4a3da1d1}";
|
||||
url =
|
||||
"https://addons.mozilla.org/firefox/downloads/file/3934220/simple_style_fox_2-10.0.xpi";
|
||||
sha256 = "1aaac3ba08d21086d7087015f92a27661940df45a97bf5680588c883f799a97d";
|
||||
meta = with lib; {
|
||||
description = "Simple style fox 2";
|
||||
license = licenses.cc-by-30;
|
||||
mozPermissions = [ ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
firefoxAddons = import ./addons.nix pkgs lib;
|
||||
firefoxSettings = {
|
||||
"browser.aboutConfig.showWarning" = false;
|
||||
"browser.toolbars.bookmarks.visibility" = "always";
|
||||
"browser.tabs.firefox-view" = false;
|
||||
"browser.shell.checkDefaultBrowser" = false;
|
||||
"browser.translations.automaticallyPopup" = false;
|
||||
"signon.rememberSignons" = false;
|
||||
"media.webspeech.synth.dont_notify_on_error" = true;
|
||||
"browser.gesture.swipe.left" = false;
|
||||
"browser.gesture.swipe.right" = false;
|
||||
"browser.newtabpage.activity-stream.showSponsored" = false;
|
||||
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
profiles = {
|
||||
default = {
|
||||
id = 0;
|
||||
isDefault = true;
|
||||
settings = firefoxSettings;
|
||||
extensions = firefoxAddons;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
config = {
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
config = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Pim Kunis";
|
||||
userEmail = "pim@kunis.nl";
|
||||
extraConfig = {
|
||||
push.autoSetupRemote = true;
|
||||
commit.verbose = true;
|
||||
pull.rebase = true;
|
||||
};
|
||||
includes = [{
|
||||
path = "~/git/suecode/.gitconfig";
|
||||
condition = "gitdir:~/git/suecode/**";
|
||||
}];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{ pkgs, config, ... }: {
|
||||
config = {
|
||||
home.packages = [ pkgs.unstable.keepassxc ];
|
||||
homeage.file."keepassxc.ini" = {
|
||||
source = ../../secrets/keepassxc.ini.age;
|
||||
symlinks = [ "${config.xdg.configHome}/keepassxc/keepassxc.ini" ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
require("bufferline").setup({
|
||||
options = {
|
||||
diagnostics = "nvim_lsp",
|
||||
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||
local icon = level:match("error") and " " or " "
|
||||
return " " .. icon .. count
|
||||
end,
|
||||
separator_style = "slant",
|
||||
hover = { enabled = true, reveal = { "close" } },
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>ft", ":BufferLinePick<CR>", {})
|
|
@ -1,43 +0,0 @@
|
|||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
luasnip.config.setup({})
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete({}),
|
||||
["<CR>"] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
}),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
}),
|
||||
sources = { { name = "nvim_lsp" }, { name = "luasnip" } },
|
||||
})
|
|
@ -1,2 +0,0 @@
|
|||
vim.cmd([[autocmd FileType nix setlocal commentstring=#%s]])
|
||||
vim.cmd([[autocmd FileType terraform setlocal commentstring=#%s]])
|
|
@ -1,9 +0,0 @@
|
|||
vim.o.background = "dark"
|
||||
vim.cmd([[colorscheme gruvbox]])
|
||||
vim.g.mapleader = ";"
|
||||
vim.o.signcolumn = "yes"
|
||||
vim.wo.number = true
|
||||
vim.wo.relativenumber = true
|
||||
vim.wo.cursorline = true
|
||||
vim.opt.termguicolors = true
|
||||
vim.o.mousemoveevent = true
|
|
@ -1,83 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
config = {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
defaultEditor = true;
|
||||
extraLuaConfig = builtins.readFile ./core.lua;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
nil
|
||||
nodePackages.pyright
|
||||
neofetch
|
||||
gopls
|
||||
terraform-ls
|
||||
nixfmt-classic
|
||||
stylua
|
||||
black
|
||||
nixpkgs-fmt
|
||||
];
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = nvim-lspconfig;
|
||||
type = "lua";
|
||||
config = builtins.readFile ./lspconfig.lua;
|
||||
}
|
||||
gruvbox-nvim
|
||||
{
|
||||
plugin = leap-nvim;
|
||||
type = "lua";
|
||||
config = builtins.readFile ./leap.lua;
|
||||
}
|
||||
{
|
||||
plugin = telescope-nvim;
|
||||
type = "lua";
|
||||
config = builtins.readFile ./telescope.lua;
|
||||
}
|
||||
{
|
||||
plugin = vim-commentary;
|
||||
type = "lua";
|
||||
config = builtins.readFile ./commentary.lua;
|
||||
}
|
||||
vim-sleuth
|
||||
{
|
||||
plugin = gitsigns-nvim;
|
||||
type = "lua";
|
||||
config = ''require("gitsigns").setup()'';
|
||||
}
|
||||
{
|
||||
plugin = nvim-cmp;
|
||||
type = "lua";
|
||||
config = builtins.readFile ./cmp.lua;
|
||||
}
|
||||
cmp-nvim-lsp
|
||||
friendly-snippets
|
||||
neodev-nvim
|
||||
luasnip
|
||||
cmp_luasnip
|
||||
{
|
||||
plugin = nvim-treesitter.withAllGrammars;
|
||||
type = "lua";
|
||||
config = builtins.readFile ./treesitter.lua;
|
||||
}
|
||||
{
|
||||
plugin = bufferline-nvim;
|
||||
type = "lua";
|
||||
config = builtins.readFile ./bufferline.lua;
|
||||
}
|
||||
nvim-web-devicons
|
||||
lsp-format-nvim
|
||||
{
|
||||
plugin = pkgs.vimPlugins.none-ls-nvim;
|
||||
type = "lua";
|
||||
config = builtins.readFile ./none-ls.lua;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
programs.git.extraConfig.core.editor = "nvim";
|
||||
};
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
require("leap").add_default_mappings()
|
||||
-- Don't remap 'x' in visual mode.
|
||||
vim.keymap.del({ "x", "o" }, "x")
|
||||
vim.keymap.del({ "x", "o" }, "X")
|
|
@ -1,58 +0,0 @@
|
|||
require("lsp-format").setup({})
|
||||
|
||||
local on_attach = function(client, bufnr)
|
||||
local bufmap = function(keys, func)
|
||||
vim.keymap.set("n", keys, func, { buffer = bufnr })
|
||||
end
|
||||
|
||||
bufmap("<leader>r", vim.lsp.buf.rename)
|
||||
bufmap("<leader>a", vim.lsp.buf.code_action)
|
||||
|
||||
bufmap("gd", vim.lsp.buf.definition)
|
||||
bufmap("gD", vim.lsp.buf.declaration)
|
||||
bufmap("gI", vim.lsp.buf.implementation)
|
||||
bufmap("<leader>D", vim.lsp.buf.type_definition)
|
||||
|
||||
bufmap("gr", require("telescope.builtin").lsp_references)
|
||||
bufmap("<leader>s", require("telescope.builtin").lsp_document_symbols)
|
||||
bufmap("<leader>S", require("telescope.builtin").lsp_dynamic_workspace_symbols)
|
||||
|
||||
bufmap("K", vim.lsp.buf.hover)
|
||||
|
||||
vim.api.nvim_buf_create_user_command(bufnr, "Format", function(_)
|
||||
vim.lsp.buf.format()
|
||||
end, {})
|
||||
end
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
|
||||
|
||||
require("neodev").setup()
|
||||
require("lspconfig").nil_ls.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
})
|
||||
require("lspconfig").pyright.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
})
|
||||
require("lspconfig").gopls.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
})
|
||||
require("lspconfig").terraformls.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- require'lspconfig'.efm.setup {
|
||||
-- on_attach = require("lsp-format").on_attach,
|
||||
-- init_options = {documentFormatting = true},
|
||||
-- settings = {
|
||||
-- languages = {
|
||||
-- lua = {{formatCommand = "lua-format -i", formatStdin = true}},
|
||||
-- nix = {{formatCommand = "nixfmt", formatStdin = true}}
|
||||
-- }
|
||||
-- },
|
||||
-- filetypes = {"lua", "nix"}
|
||||
-- }
|
|
@ -1,53 +0,0 @@
|
|||
-- renamed to none-ls
|
||||
local null_ls_status_ok, null_ls = pcall(require, "null-ls")
|
||||
if not null_ls_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local formatting = null_ls.builtins.formatting
|
||||
local diagnostics = null_ls.builtins.diagnostics
|
||||
local code_actions = null_ls.builtins.code_actions
|
||||
|
||||
-- to setup format on save
|
||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||
|
||||
require("null-ls").setup({
|
||||
sources = {
|
||||
formatting.stylua,
|
||||
formatting.black,
|
||||
formatting.nixpkgs_fmt,
|
||||
formatting.mix,
|
||||
},
|
||||
|
||||
-- configure format on save
|
||||
on_attach = function(current_client, bufnr)
|
||||
if current_client.supports_method("textDocument/formatting") then
|
||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = augroup,
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
vim.lsp.buf.format({
|
||||
filter = function(client)
|
||||
-- only use null-ls for formatting instead of lsp server
|
||||
return client.name == "null-ls"
|
||||
end,
|
||||
bufnr = bufnr,
|
||||
})
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- formatting command
|
||||
vim.api.nvim_create_user_command("Format", function()
|
||||
vim.lsp.buf.format(nil, 10000)
|
||||
end, {})
|
||||
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>fm",
|
||||
":Format<CR>",
|
||||
{ desc = "Format current buffer (also done on save)", noremap = true, silent = true }
|
||||
)
|
|
@ -1,17 +0,0 @@
|
|||
local builtin = require("telescope.builtin")
|
||||
|
||||
vim.keymap.set("n", "<leader>ff", builtin.find_files, {})
|
||||
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
|
||||
vim.keymap.set("n", "<leader>fb", builtin.buffers, {})
|
||||
vim.keymap.set("n", "<leader>fr", builtin.lsp_references, {})
|
||||
vim.keymap.set("n", "<leader>fs", builtin.lsp_document_symbols, {})
|
||||
|
||||
require("telescope").setup({
|
||||
pickers = {
|
||||
find_files = { theme = "dropdown" },
|
||||
live_grep = { theme = "dropdown" },
|
||||
buffers = { theme = "dropdown" },
|
||||
lsp_references = { theme = "dropdown" },
|
||||
lsp_document_symbols = { theme = "dropdown" },
|
||||
},
|
||||
})
|
|
@ -1,9 +0,0 @@
|
|||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = {},
|
||||
|
||||
auto_install = false,
|
||||
|
||||
highlight = { enable = true },
|
||||
|
||||
indent = { enable = true },
|
||||
})
|
|
@ -1,17 +0,0 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIICrzCCAZcCFApupXAa2tPytpi3av47+az0Ggb4MA0GCSqGSIb3DQEBCwUAMBQx
|
||||
EjAQBgNVBAMMCWplZmtlLmh5cDAeFw0yMzExMjQyMjAzMjhaFw0yNDExMjMyMjAz
|
||||
MjhaMBQxEjAQBgNVBAMMCXRlcnJhZm9ybTCCASIwDQYJKoZIhvcNAQEBBQADggEP
|
||||
ADCCAQoCggEBALeJ/fYUCmwislUw4XcCxivCUuWuUWI+t/nke9/hWEWTmDG4Z7/a
|
||||
IAKqsGk0zNATQViAXmYZwdYK70AKQhxat3OJcuZarsurOXVjVJdT4Wr5SxHGHjd0
|
||||
bwd8JzFZPIfgYCILCISFjCIfpD58kBq2bkvI4rpn4tb2iPunXp0+S8iHDMB5wAOb
|
||||
FgT0muuz9ua4R76nq79O9wLbAVf38CDR9bMGcPcKknz0sl37jr7A/pDvQzpFWO33
|
||||
eJb64b7Qe4CHslWFj1tdEkXaMpMNWHhc2TmtLtlt6a+RY1R9KdX5x0lQTyJnEwJZ
|
||||
8YTKnlMoNvkfBznuARFmNNmUYPoHE6WgonMCAwEAATANBgkqhkiG9w0BAQsFAAOC
|
||||
AQEAaH1HVPThhAkrXE4Zmh49D1zvq5uy6moV326/ovnPQfco2jYBYO5mYxBF32mx
|
||||
ShEanbJJKkFjWkQHmsWt7nrkeloz6q8sD19nLyyWmMj0Pd6wcLv017Zdo902fh27
|
||||
Rl8qZS44vEc+N/5gc2eINMfXm/JOdXYntOVpFO/I+6b9Q2iWFX3YUAXiIDiEYBvS
|
||||
BBqyXC2nVg6Lp1KVg+EaYW27sj8b5HHXnpEGdXduVmOWttdaQVjYslqmH7mUKi9f
|
||||
2U9FicMvw6KvkRki+SLKeZr2yIP1QQOnWg0BPbeCpMfdMSu/AtLkAtugZeT8p1Ko
|
||||
3hMMyKKzyyhiwpzvk21QFNZ5LA==
|
||||
-----END CERTIFICATE-----
|
|
@ -1,67 +0,0 @@
|
|||
Certificate:
|
||||
Data:
|
||||
Version: 1 (0x0)
|
||||
Serial Number:
|
||||
ef:2f:4d:d4:26:7e:33:1b
|
||||
Signature Algorithm: sha256WithRSAEncryption
|
||||
Issuer: CN=jefke.hyp
|
||||
Validity
|
||||
Not Before: Nov 22 19:12:03 2023 GMT
|
||||
Not After : Oct 29 19:12:03 2123 GMT
|
||||
Subject: CN=jefke.hyp
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: rsaEncryption
|
||||
RSA Public-Key: (2048 bit)
|
||||
Modulus:
|
||||
00:c7:ab:eb:9c:d0:7f:4f:f1:ba:65:0a:8b:07:7b:
|
||||
2e:5b:f0:26:82:33:c9:73:e6:91:cc:11:94:05:1c:
|
||||
8d:67:29:cb:5e:67:35:02:80:54:af:99:4b:aa:ce:
|
||||
e8:56:62:be:63:cb:b2:4a:b0:a9:28:12:e2:77:50:
|
||||
7d:d5:d2:3b:48:d8:32:59:25:26:ff:a6:5c:f6:eb:
|
||||
ae:5b:3d:7a:14:10:ba:90:9c:6f:1f:b9:d8:99:0e:
|
||||
b7:09:5e:62:69:c4:c0:c6:27:b0:d3:60:0d:47:4c:
|
||||
a5:11:53:f2:f1:4a:f9:a6:bc:d6:a3:35:a2:e8:e5:
|
||||
a9:d1:60:e8:e5:18:ce:d2:60:80:4e:dc:48:ae:7f:
|
||||
b7:ea:76:51:28:39:a4:b0:95:82:95:93:98:b2:9f:
|
||||
23:c9:81:69:59:a3:e4:f7:5a:1c:01:31:96:c1:4b:
|
||||
59:21:f8:a2:e6:9e:21:78:0e:6b:c1:68:c7:5c:16:
|
||||
9a:06:54:df:b6:77:1d:2d:89:d0:c8:9e:db:b5:d4:
|
||||
8c:fb:b9:4f:b7:6e:39:5f:39:8e:48:73:76:7d:46:
|
||||
6e:1f:8d:14:cb:40:b5:ff:c6:f0:c0:44:3c:ed:52:
|
||||
3f:4f:7b:69:63:93:c6:41:e6:5e:ed:33:50:20:46:
|
||||
db:93:bf:e8:52:51:95:f1:81:73:58:da:67:21:7b:
|
||||
12:bd
|
||||
Exponent: 65537 (0x10001)
|
||||
Signature Algorithm: sha256WithRSAEncryption
|
||||
aa:5c:89:41:a6:b7:3d:65:87:ca:50:c4:f3:58:aa:d3:b4:55:
|
||||
b1:a7:8d:18:26:17:e5:8a:21:24:a1:49:53:77:31:5b:55:63:
|
||||
be:01:d8:fe:b7:06:7c:da:07:1f:94:6a:de:96:ad:ca:3b:20:
|
||||
2a:e1:35:90:19:83:6d:37:d1:15:12:de:3c:0e:46:be:66:a1:
|
||||
6a:1d:ec:72:dc:46:79:69:e4:af:77:c8:ff:cd:d6:7d:16:88:
|
||||
ab:44:fd:70:fc:40:47:ff:43:95:11:5a:9a:56:0c:d2:dd:7c:
|
||||
3b:87:aa:10:26:fa:25:a3:a0:43:8a:1b:ec:54:11:7e:65:67:
|
||||
d2:06:e1:3e:3b:e1:0e:b0:80:ef:4b:35:3f:fc:34:1d:95:2e:
|
||||
ee:c1:67:38:da:b3:74:86:4b:95:8c:0c:1d:51:28:c1:42:e9:
|
||||
77:68:d7:ec:3b:66:30:c6:e5:2a:62:ea:15:fb:24:56:cf:02:
|
||||
d0:25:54:a7:58:15:b5:2a:71:93:56:c0:69:7a:36:18:6c:31:
|
||||
b1:8e:3c:77:d7:77:ac:fc:e1:94:c5:08:bb:35:ac:48:5f:6b:
|
||||
8b:c8:c8:78:f4:a9:ca:4f:9d:51:54:89:97:c9:af:a1:fa:71:
|
||||
df:58:f6:ff:04:7c:c8:1c:95:6b:1a:e3:a7:f6:43:1c:27:94:
|
||||
10:03:ce:ec
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICpjCCAY4CCQDvL03UJn4zGzANBgkqhkiG9w0BAQsFADAUMRIwEAYDVQQDDAlq
|
||||
ZWZrZS5oeXAwIBcNMjMxMTIyMTkxMjAzWhgPMjEyMzEwMjkxOTEyMDNaMBQxEjAQ
|
||||
BgNVBAMMCWplZmtlLmh5cDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
|
||||
AMer65zQf0/xumUKiwd7LlvwJoIzyXPmkcwRlAUcjWcpy15nNQKAVK+ZS6rO6FZi
|
||||
vmPLskqwqSgS4ndQfdXSO0jYMlklJv+mXPbrrls9ehQQupCcbx+52JkOtwleYmnE
|
||||
wMYnsNNgDUdMpRFT8vFK+aa81qM1oujlqdFg6OUYztJggE7cSK5/t+p2USg5pLCV
|
||||
gpWTmLKfI8mBaVmj5PdaHAExlsFLWSH4ouaeIXgOa8Fox1wWmgZU37Z3HS2J0Mie
|
||||
27XUjPu5T7duOV85jkhzdn1Gbh+NFMtAtf/G8MBEPO1SP097aWOTxkHmXu0zUCBG
|
||||
25O/6FJRlfGBc1jaZyF7Er0CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAqlyJQaa3
|
||||
PWWHylDE81iq07RVsaeNGCYX5YohJKFJU3cxW1VjvgHY/rcGfNoHH5Rq3patyjsg
|
||||
KuE1kBmDbTfRFRLePA5Gvmahah3sctxGeWnkr3fI/83WfRaIq0T9cPxAR/9DlRFa
|
||||
mlYM0t18O4eqECb6JaOgQ4ob7FQRfmVn0gbhPjvhDrCA70s1P/w0HZUu7sFnONqz
|
||||
dIZLlYwMHVEowULpd2jX7DtmMMblKmLqFfskVs8C0CVUp1gVtSpxk1bAaXo2GGwx
|
||||
sY48d9d3rPzhlMUIuzWsSF9ri8jIePSpyk+dUVSJl8mvofpx31j2/wR8yByVaxrj
|
||||
p/ZDHCeUEAPO7A==
|
||||
-----END CERTIFICATE-----
|
|
@ -1,30 +0,0 @@
|
|||
{ config, lib, ... }: {
|
||||
config = {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
extraConfig = "User root";
|
||||
|
||||
matchBlocks = {
|
||||
github = lib.hm.dag.entryBefore [ "*" ] {
|
||||
hostname = "github.com";
|
||||
user = "pizzapim";
|
||||
identitiesOnly = true;
|
||||
};
|
||||
lewis = lib.hm.dag.entryBefore [ "*" ] { hostname = "lewis.dmz"; };
|
||||
atlas = lib.hm.dag.entryBefore [ "*" ] { hostname = "atlas.dmz"; };
|
||||
jefke = lib.hm.dag.entryBefore [ "*" ] { hostname = "jefke.dmz"; };
|
||||
warwick = lib.hm.dag.entryBefore [ "*" ] { hostname = "warwick.dmz"; };
|
||||
};
|
||||
};
|
||||
|
||||
homeage.file."sue_ed25519" = {
|
||||
source = ../../secrets/sue_ed25519.age;
|
||||
symlinks = [ "${config.home.homeDirectory}/.ssh/sue_ed25519" ];
|
||||
};
|
||||
|
||||
homeage.file."sue_azure_rsa" = {
|
||||
source = ../../secrets/sue_azure_rsa.age;
|
||||
symlinks = [ "${config.home.homeDirectory}/.ssh/sue_azure_rsa" ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{ config, ... }: {
|
||||
config = {
|
||||
services.syncthing.enable = true;
|
||||
|
||||
homeage.file."syncthing-key.pem" = {
|
||||
source = ../../secrets/syncthing-key.pem.age;
|
||||
symlinks = [ "${config.xdg.configHome}/syncthing/key.pem" ];
|
||||
};
|
||||
|
||||
homeage.file."syncthing-cert.pem" = {
|
||||
source = ../../secrets/syncthing-cert.pem.age;
|
||||
symlinks = [ "${config.xdg.configHome}/syncthing/cert.pem" ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
config = {
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
profiles.default = { isDefault = true; };
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue