chore: clean up after upstream updates

This commit is contained in:
teutat3s 2022-01-19 01:13:15 +01:00
parent 907b08930a
commit 0629024cf5
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1
15 changed files with 110 additions and 42 deletions

12
.envrc
View file

@ -1,2 +1,10 @@
watch_file shell/* flake.nix
use flake || use nix
# reload when these files change
watch_file flake.nix
watch_file shell.nix
{
# shell gc root dir
mkdir -p "$(direnv_layout_dir)"
eval "$(nix print-dev-env --profile $(direnv_layout_dir)/flake-profile)"
} || use nix

View file

@ -1,7 +1,7 @@
{ pkgs, lib, budUtils, ... }: {
bud.cmds = with pkgs; {
get = {
writer = budUtils.writeBashWithPaths [ nixUnstable git coreutils ];
writer = budUtils.writeBashWithPaths [ nixFlakes git coreutils ];
synopsis = "get [DEST]";
help = "Copy the desired template to DEST";
script = ./get.bash;

View file

@ -50,7 +50,7 @@
# end ANTI CORRUPTION LAYER
# PubSolarOS additions
nix-dram.url = "github:dramforever/nix-dram";
nix-dram.url = "github:pub-solar/nix-dram";
};
outputs =

View file

@ -100,6 +100,7 @@ in
gnome3.adwaita-icon-theme
gnome.eog
gnome3.nautilus
gnome.yelp
wine

View file

@ -12,10 +12,9 @@ in
config = mkIf cfg.enable {
home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
home.packages = [
#mySignalDesktop
signal-desktop
tdesktop
element-desktop-wayland
element-desktop
irssi
];
};

View file

@ -32,7 +32,17 @@ in
xdg.portal = {
enable = true;
extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-wlr ];
wlr = {
enable = true;
settings = {
screencast = {
max_fps = 30;
chooser_type = "simple";
chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or";
};
};
};
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
gtkUsePortal = true;
};

View file

@ -15,8 +15,9 @@ in
# Needed to get zsh completion for system packages (e.g. systemd).
environment.pathsToLink = [ "/share/zsh" ];
services.lorri.enable = true;
environment.shells = with pkgs; [
zsh
];
environment.systemPackages = with pkgs; [
screen
];

View file

@ -78,10 +78,8 @@ in
nodePackages.typescript
nodePackages.vim-language-server
nodePackages.vue-language-server
nodePackages.vscode-langservers-extracted
nodePackages.yaml-language-server
nodePackages.vscode-json-languageserver-bin
nodePackages.vscode-html-languageserver-bin
nodePackages.vscode-css-languageserver-bin
python3Full
python-language-server
solargraph
@ -132,6 +130,7 @@ in
vim-vue
vim-javascript
vim-json
SchemaStore-nvim
vim-markdown
yats-vim
vim-ruby

View file

@ -14,11 +14,46 @@ set shortmess+=c
" https://gitlab.com/Iron_E/dotfiles/-/blob/master/.config/nvim/lua/_config/plugin/nvim_lsp.lua
lua <<EOF
local nvim_lsp = require('lspconfig')
-- Attach `completion-nvim` to the buffer.
local function lsp_setup()
require('completion').on_attach()
-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
local on_attach = function(client, bufnr)
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
-- Enable completion triggered by <c-x><c-o>
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Mappings.
local opts = { noremap=true, silent=true }
-- See `:help vim.lsp.*` for documentation on any of the below functions
buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
buf_set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
buf_set_keymap('n', '<leader>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
buf_set_keymap('n', '<leader>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
buf_set_keymap('n', '<leader>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
buf_set_keymap('n', '<leader>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
buf_set_keymap('n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
buf_set_keymap('n', '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
buf_set_keymap('n', '<leader>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
buf_set_keymap('n', '<leader>dp', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
buf_set_keymap('n', '<leader>dn', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
buf_set_keymap('n', '<leader>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
buf_set_keymap('n', '<leader>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
end
-- Add additional capabilities supported by nvim-cmp
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
-- vscode HTML lsp needs this https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#html
capabilities.textDocument.completion.completionItem.snippetSupport = true
for lsp_key, lsp_settings in pairs({
'bashls', ------------------------------- Bash
'ccls', --------------------------------- C / C++ / Objective-C
@ -42,9 +77,15 @@ lua <<EOF
['workspace'] = vim.fn.stdpath('cache')..'/java-workspaces'
}
},
'jsonls', ------------------------------- JSON
['jsonls'] = { -------------------------- JSON
['settings'] = {
['json'] = {
['schemas' ] = require('schemastore').json.schemas()
}
}
},
'phpactor', ----------------------------- PHP
'pyls', --------------------------------- Python
'pylsp', -------------------------------- Python
'rnix', --------------------------------- Nix
'solargraph', --------------------------- Ruby
'rust_analyzer', ------------------------ Rust
@ -55,7 +96,6 @@ lua <<EOF
['filetypes'] = { "terraform", "hcl", "tf" }
},
'tsserver', ----------------------------- Typescript / JavaScript
'angularls', ---------------------------- Angular
'vuels', -------------------------------- Vue
'svelte', ------------------------------- Svelte
['yamlls'] = { -------------------------- YAML
@ -66,6 +106,7 @@ lua <<EOF
['https://json.schemastore.org/github-action'] = '.github/action.{yml,yaml}',
['https://json.schemastore.org/ansible-stable-2.9'] = 'roles/tasks/*.{yml,yaml}',
['https://json.schemastore.org/drone'] = '*.drone.{yml,yaml}',
['https://json.schemastore.org/swagger-2.0'] = 'swagger.{yml,yaml}',
}
}
}
@ -75,12 +116,11 @@ lua <<EOF
-- The `lsp` is an index in this case.
nvim_lsp[lsp_settings].setup{['on_attach'] = lsp_setup}
else -- Use the LSP's configuration.
local on_attach_setting = lsp_settings.on_attach
local on_attach_setting = on_attach
lsp_settings.on_attach = function()
lsp_setup()
if on_attach_setting then on_attach_setting() end
end
lsp_settings.on_attach = function()
if on_attach_setting then on_attach_setting() end
end
nvim_lsp[lsp_key].setup(lsp_settings)
end

View file

@ -5,8 +5,10 @@ autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
let g:gutentags_file_list_command = 'git ls-files'
" Golang
" Go test shortcut
nmap <Leader>got :GoTest<CR>
" Go test, Def, Decls shortcut
nmap <Leader>got :GoTest<CR>:botright copen<CR>
autocmd FileType go nmap gd :GoDef<CR>
autocmd FileType go nmap gD :GoDecls<CR>
" Go formatting
autocmd FileType go setlocal noexpandtab shiftwidth=4 tabstop=4 softtabstop=4 nolist

View file

@ -18,6 +18,10 @@ in
size = 10000;
};
loginExtra = ''
[ "$(tty)" = "/dev/tty1" ] && exec sway
'';
shellAliases = {
nano = "nvim";
vi = "nvim";
@ -66,13 +70,14 @@ in
bindkey '^R' fzf-history-widget
# ArrowUp/Down start searching history with current input
autoload -U history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
bindkey "^[[A" history-beginning-search-backward-end
bindkey "^[[B" history-beginning-search-forward-end
bindkey "^P" history-beginning-search-backward-end
bindkey "^N" history-beginning-search-forward-end
autoload -U up-line-or-beginning-search
autoload -U down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
bindkey "^[[A" up-line-or-beginning-search
bindkey "^[[B" down-line-or-beginning-search
bindkey "^P" up-line-or-beginning-search
bindkey "^N" down-line-or-beginning-search
# MAKE CTRL+S WORK IN VIM
stty -ixon

View file

@ -17,7 +17,7 @@ in
virtualisation.libvirtd = {
enable = true;
qemuOvmf = true;
qemu.ovmf.enable = true;
};
users.users = pkgs.lib.setAttrByPath [ psCfg.user.name ] {
extraGroups = [ "libvirtd" ];

View file

@ -1,20 +1,20 @@
self: with self;
let
websocket-client = python38.pkgs.buildPythonPackage rec {
websocket-client = python39.pkgs.buildPythonPackage rec {
pname = "websocket-client";
version = "1.0.0";
version = "1.2.1";
doCheck = false;
src = python38.pkgs.fetchPypi {
src = python39.pkgs.fetchPypi {
inherit pname version;
sha256 = "sha256-UFGzii9MJ/vXygd+uyPsaWWmJt7VqVY382vhs1tsT4E=";
sha256 = "sha256-jftxXYqZL1cS//jIQ62ulOIrIqmbLF5rDsShqYHMTg0=";
};
};
in
python38.pkgs.buildPythonPackage rec {
python39.pkgs.buildPythonPackage rec {
pname = "Mopidy-Jellyfin";
version = "1.0.2";
doCheck = false;
propagatedBuildInputs = with python38.pkgs; [
propagatedBuildInputs = with python39.pkgs; [
unidecode
websocket-client
requests
@ -22,7 +22,7 @@ python38.pkgs.buildPythonPackage rec {
pykka
mopidy
];
src = python38.pkgs.fetchPypi {
src = python39.pkgs.fetchPypi {
inherit pname version;
sha256 = "sha256-5XimIIQSpvNyQbSOFtSTkA0jhA0V68BbyQEQNnov+0g=";
};

View file

@ -4,7 +4,7 @@
"height": 26, // Waybar height
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["mpd"],
//"modules-center": ["mpd"],
"modules-right": ["sway/language", "pulseaudio", "network", "idle_inhibitor", "battery", "clock", "tray"],
"sway/workspaces": {
"disable-scroll": true

View file

@ -15,6 +15,9 @@ in
imports = [ "${extraModulesPath}/git/hooks.nix" ];
git = { inherit hooks; };
# override for our own welcome
devshell.name = pkgs.lib.mkForce "PubSolarOS";
# tempfix: remove when merged https://github.com/numtide/devshell/pull/123
devshell.startup.load_profiles = pkgs.lib.mkForce (pkgs.lib.noDepEntry ''
# PATH is devshell's exorbitant privilige:
@ -35,7 +38,7 @@ in
];
commands = with pkgs; [
(devos nixUnstable)
(devos nixFlakes)
(devos agenix)
{
category = "devos";