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 # reload when these files change
use flake || use nix 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, ... }: { { pkgs, lib, budUtils, ... }: {
bud.cmds = with pkgs; { bud.cmds = with pkgs; {
get = { get = {
writer = budUtils.writeBashWithPaths [ nixUnstable git coreutils ]; writer = budUtils.writeBashWithPaths [ nixFlakes git coreutils ];
synopsis = "get [DEST]"; synopsis = "get [DEST]";
help = "Copy the desired template to DEST"; help = "Copy the desired template to DEST";
script = ./get.bash; script = ./get.bash;

View file

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

View file

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

View file

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

View file

@ -32,7 +32,17 @@ in
xdg.portal = { xdg.portal = {
enable = true; 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; gtkUsePortal = true;
}; };

View file

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

View file

@ -78,10 +78,8 @@ in
nodePackages.typescript nodePackages.typescript
nodePackages.vim-language-server nodePackages.vim-language-server
nodePackages.vue-language-server nodePackages.vue-language-server
nodePackages.vscode-langservers-extracted
nodePackages.yaml-language-server nodePackages.yaml-language-server
nodePackages.vscode-json-languageserver-bin
nodePackages.vscode-html-languageserver-bin
nodePackages.vscode-css-languageserver-bin
python3Full python3Full
python-language-server python-language-server
solargraph solargraph
@ -132,6 +130,7 @@ in
vim-vue vim-vue
vim-javascript vim-javascript
vim-json vim-json
SchemaStore-nvim
vim-markdown vim-markdown
yats-vim yats-vim
vim-ruby 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 " https://gitlab.com/Iron_E/dotfiles/-/blob/master/.config/nvim/lua/_config/plugin/nvim_lsp.lua
lua <<EOF lua <<EOF
local nvim_lsp = require('lspconfig') local nvim_lsp = require('lspconfig')
-- Attach `completion-nvim` to the buffer.
local function lsp_setup() -- Use an on_attach function to only map the following keys
require('completion').on_attach() -- 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 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({ for lsp_key, lsp_settings in pairs({
'bashls', ------------------------------- Bash 'bashls', ------------------------------- Bash
'ccls', --------------------------------- C / C++ / Objective-C 'ccls', --------------------------------- C / C++ / Objective-C
@ -42,9 +77,15 @@ lua <<EOF
['workspace'] = vim.fn.stdpath('cache')..'/java-workspaces' ['workspace'] = vim.fn.stdpath('cache')..'/java-workspaces'
} }
}, },
'jsonls', ------------------------------- JSON ['jsonls'] = { -------------------------- JSON
['settings'] = {
['json'] = {
['schemas' ] = require('schemastore').json.schemas()
}
}
},
'phpactor', ----------------------------- PHP 'phpactor', ----------------------------- PHP
'pyls', --------------------------------- Python 'pylsp', -------------------------------- Python
'rnix', --------------------------------- Nix 'rnix', --------------------------------- Nix
'solargraph', --------------------------- Ruby 'solargraph', --------------------------- Ruby
'rust_analyzer', ------------------------ Rust 'rust_analyzer', ------------------------ Rust
@ -55,7 +96,6 @@ lua <<EOF
['filetypes'] = { "terraform", "hcl", "tf" } ['filetypes'] = { "terraform", "hcl", "tf" }
}, },
'tsserver', ----------------------------- Typescript / JavaScript 'tsserver', ----------------------------- Typescript / JavaScript
'angularls', ---------------------------- Angular
'vuels', -------------------------------- Vue 'vuels', -------------------------------- Vue
'svelte', ------------------------------- Svelte 'svelte', ------------------------------- Svelte
['yamlls'] = { -------------------------- YAML ['yamlls'] = { -------------------------- YAML
@ -66,6 +106,7 @@ lua <<EOF
['https://json.schemastore.org/github-action'] = '.github/action.{yml,yaml}', ['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/ansible-stable-2.9'] = 'roles/tasks/*.{yml,yaml}',
['https://json.schemastore.org/drone'] = '*.drone.{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. -- The `lsp` is an index in this case.
nvim_lsp[lsp_settings].setup{['on_attach'] = lsp_setup} nvim_lsp[lsp_settings].setup{['on_attach'] = lsp_setup}
else -- Use the LSP's configuration. 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_settings.on_attach = function()
lsp_setup() if on_attach_setting then on_attach_setting() end
if on_attach_setting then on_attach_setting() end end
end
nvim_lsp[lsp_key].setup(lsp_settings) nvim_lsp[lsp_key].setup(lsp_settings)
end 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' let g:gutentags_file_list_command = 'git ls-files'
" Golang " Golang
" Go test shortcut " Go test, Def, Decls shortcut
nmap <Leader>got :GoTest<CR> nmap <Leader>got :GoTest<CR>:botright copen<CR>
autocmd FileType go nmap gd :GoDef<CR>
autocmd FileType go nmap gD :GoDecls<CR>
" Go formatting " Go formatting
autocmd FileType go setlocal noexpandtab shiftwidth=4 tabstop=4 softtabstop=4 nolist autocmd FileType go setlocal noexpandtab shiftwidth=4 tabstop=4 softtabstop=4 nolist

View file

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

View file

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

View file

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

View file

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

View file

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