Cleanup home-manager modules
This commit is contained in:
parent
6a00933db4
commit
c1d2701998
72 changed files with 551 additions and 580 deletions
21
flake.nix
21
flake.nix
|
|
@ -68,7 +68,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
pkgs = import nixpkgs nixpkgsSettings;
|
pkgs = import nixpkgs nixpkgsSettings;
|
||||||
unstablePkgs = import nixpkgs nixpkgsSettings;
|
unstablePkgs = import unstable nixpkgsSettings;
|
||||||
|
|
||||||
homeManagerSettings = {
|
homeManagerSettings = {
|
||||||
home-manager = {
|
home-manager = {
|
||||||
|
|
@ -83,7 +83,7 @@
|
||||||
nixos-hardware.nixosModules.common-cpu-intel
|
nixos-hardware.nixosModules.common-cpu-intel
|
||||||
nixos-hardware.nixosModules.common-pc-laptop
|
nixos-hardware.nixosModules.common-pc-laptop
|
||||||
nixos-hardware.nixosModules.common-pc-laptop-ssd
|
nixos-hardware.nixosModules.common-pc-laptop-ssd
|
||||||
./odin/base.nix
|
./odin/common_configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
thorBaseModules = [
|
thorBaseModules = [
|
||||||
|
|
@ -99,7 +99,7 @@
|
||||||
modules = odinBaseModules ++ [
|
modules = odinBaseModules ++ [
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
homeManagerSettings
|
homeManagerSettings
|
||||||
{ home-manager.users.bertof = import ./odin.nix; }
|
{ home-manager.users.bertof = import ./home_manager/odin.nix; }
|
||||||
] ++ extraModules;
|
] ++ extraModules;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -108,7 +108,7 @@
|
||||||
modules = odinBaseModules ++ [
|
modules = odinBaseModules ++ [
|
||||||
home-manager-unstable.nixosModules.home-manager
|
home-manager-unstable.nixosModules.home-manager
|
||||||
homeManagerSettings
|
homeManagerSettings
|
||||||
{ home-manager.users.bertof = import ./odin.nix; }
|
{ home-manager.users.bertof = import ./home_manager/odin.nix; }
|
||||||
] ++ extraModules;
|
] ++ extraModules;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -136,19 +136,18 @@
|
||||||
|
|
||||||
nixosConfigurations = rec {
|
nixosConfigurations = rec {
|
||||||
|
|
||||||
thor = thor-unstable;
|
thor = thor-stable;
|
||||||
|
|
||||||
thor-stable = thorStable [ ./nixos_modules/pro_audio.nix ];
|
thor-stable = thorStable [ ./nixos_modules/pro_audio.nix ];
|
||||||
thor-unstable = thorUnstable [ ./nixos_modules/pro_audio.nix ];
|
thor-unstable = thorUnstable [ ./nixos_modules/pro_audio.nix ];
|
||||||
thor-big-data = thorUnstable [ ./nixos_modules/pro_audio.nix ./nixos_modules/big_data.nix ];
|
thor-big-data = thorUnstable [ ./nixos_modules/pro_audio.nix ./nixos_modules/big_data.nix ];
|
||||||
|
|
||||||
odin = odin-intel-unstable;
|
odin = odin-intel-stable;
|
||||||
|
|
||||||
odin-intel-unstable = odinUnstable [ ./odin/odin-intel.nix ./nixos_modules/pro_audio.nix ];
|
|
||||||
odin-nvidia-unstable = odinUnstable [ ./odin/odin-nvidia.nix ./nixos_modules/pro_audio.nix ];
|
|
||||||
odin-intel-stable = odinStable [ ./odin/odin-intel.nix ./nixos_modules/pro_audio.nix ];
|
|
||||||
odin-nvidia-stable = odinStable [ ./odin/odin-nvidia.nix ./nixos_modules/pro_audio.nix ];
|
|
||||||
|
|
||||||
|
odin-intel-unstable = odinUnstable [ ./odin/configuration-intel.nix ./nixos_modules/pro_audio.nix ];
|
||||||
|
odin-nvidia-unstable = odinUnstable [ ./odin/configuration-nvidia.nix ./nixos_modules/pro_audio.nix ];
|
||||||
|
odin-intel-stable = odinStable [ ./odin/configuration-intel.nix ./nixos_modules/pro_audio.nix ];
|
||||||
|
odin-nvidia-stable = odinStable [ ./odin/configuration-nvidia.nix ./nixos_modules/pro_audio.nix ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
50
home_manager/basic_env.nix
Normal file
50
home_manager/basic_env.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home = {
|
||||||
|
language.base = "it_IT.UTF-8";
|
||||||
|
keyboard = {
|
||||||
|
layout = "it";
|
||||||
|
options = [ "terminate:ctrl_alt_bksp" "compose:rctrl" ];
|
||||||
|
};
|
||||||
|
packages = with pkgs; [
|
||||||
|
file
|
||||||
|
htop
|
||||||
|
mmv-go
|
||||||
|
neofetch
|
||||||
|
nixos-option
|
||||||
|
nix-tree
|
||||||
|
unrar
|
||||||
|
unzip
|
||||||
|
wget
|
||||||
|
xclip
|
||||||
|
yq
|
||||||
|
zip
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./modules/configurations.nix
|
||||||
|
|
||||||
|
./modules/bash.nix
|
||||||
|
./modules/bat.nix
|
||||||
|
./modules/bottom.nix
|
||||||
|
./modules/broot.nix
|
||||||
|
./modules/dircolors.nix
|
||||||
|
./modules/direnv.nix
|
||||||
|
./modules/fonts.nix
|
||||||
|
./modules/fzf.nix
|
||||||
|
./modules/git.nix
|
||||||
|
./modules/gpg.nix
|
||||||
|
./modules/info.nix
|
||||||
|
./modules/jq.nix
|
||||||
|
./modules/keychain.nix
|
||||||
|
./modules/lf.nix
|
||||||
|
./modules/man.nix
|
||||||
|
./modules/shell_aliases.nix
|
||||||
|
./modules/ssh.nix
|
||||||
|
./modules/starship.nix
|
||||||
|
./modules/tmux.nix
|
||||||
|
./modules/zoxide.nix
|
||||||
|
./modules/zsh.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
6
home_manager/modules/cpp.nix
Normal file
6
home_manager/modules/cpp.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
clang-tools
|
||||||
|
];
|
||||||
|
}
|
||||||
9
home_manager/modules/go.nix
Normal file
9
home_manager/modules/go.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
programs.go = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
gopls
|
||||||
|
];
|
||||||
|
}
|
||||||
7
home_manager/modules/javascript.nix
Normal file
7
home_manager/modules/javascript.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
flow
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
284
home_manager/modules/kakoune.nix
Normal file
284
home_manager/modules/kakoune.nix
Normal file
|
|
@ -0,0 +1,284 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
strPalette = with pkgs.rice; palette.toRgbShortHex colorPalette;
|
||||||
|
themeBuilder = palette: with palette; ''
|
||||||
|
set-face global value rgb:${normal.magenta},default
|
||||||
|
set-face global type rgb:${bright.white},default
|
||||||
|
set-face global identifier rgb:${normal.cyan},default
|
||||||
|
set-face global string rgb:${normal.green},default
|
||||||
|
set-face global error rgb:${normal.red},default
|
||||||
|
set-face global keyword rgb:${normal.blue},default
|
||||||
|
set-face global operator rgb:${normal.blue},default
|
||||||
|
set-face global attribute rgb:${bright.blue},default
|
||||||
|
set-face global comment rgb:${bright.blue},default
|
||||||
|
set-face global meta rgb:${normal.yellow},default
|
||||||
|
set-face global Default rgb:${normal.white},default
|
||||||
|
set-face global PrimarySelection rgb:${normal.black},rgb:${dark.yellow}
|
||||||
|
set-face global SecondarySelection rgb:${normal.black},rgb:${dark.white}
|
||||||
|
set-face global PrimaryCursor rgb:${normal.black},rgb:${normal.yellow}
|
||||||
|
set-face global SecondaryCursor rgb:${normal.black},rgb:${normal.white}
|
||||||
|
set-face global MenuForeground rgb:${normal.white},rgb:${bright.black}
|
||||||
|
set-face global MenuBackground default,rgb:${normal.black}
|
||||||
|
set-face global MenuInfo default,rgb:${normal.black}
|
||||||
|
set-face global Information rgb:${dark.black},rgb:${normal.cyan}
|
||||||
|
set-face global StatusLine rgb:${normal.white},rgb:${normal.black}
|
||||||
|
set-face global StatusLineMode rgb:${normal.blue},rgb:${normal.black}
|
||||||
|
set-face global StatusLineInfo rgb:${normal.blue},rgb:${normal.black}
|
||||||
|
set-face global StatusLineValue rgb:${normal.blue},rgb:${normal.black}
|
||||||
|
set-face global StatusCursor rgb:${dark.black},rgb:${normal.yellow}
|
||||||
|
set-face global Prompt rgb:${normal.cyan},rgb:${normal.black}
|
||||||
|
set-face global BufferPadding default,default
|
||||||
|
'';
|
||||||
|
|
||||||
|
packages = with pkgs; [
|
||||||
|
yaml-language-server
|
||||||
|
nodePackages.vscode-langservers-extracted
|
||||||
|
rnix-lsp
|
||||||
|
# (pkgs.makeDesktopItem
|
||||||
|
# {
|
||||||
|
# name = "kakoune";
|
||||||
|
# exec = "kak %U";
|
||||||
|
# icon = "kakoune";
|
||||||
|
# desktopName = "Kakoune";
|
||||||
|
# comment = "Kakoune text editor";
|
||||||
|
# terminal = true;
|
||||||
|
# categories = [ "Development" ];
|
||||||
|
# })
|
||||||
|
editorconfig-core-c
|
||||||
|
aspell
|
||||||
|
aspellDicts.en
|
||||||
|
aspellDicts.en-computers
|
||||||
|
aspellDicts.en-science
|
||||||
|
aspellDicts.it
|
||||||
|
];
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.sessionVariables = { EDITOR = "kak"; VISUAL = "kak"; };
|
||||||
|
programs.bash.shellAliases = { k = "kak"; };
|
||||||
|
programs.zsh.shellAliases = { k = "kak"; };
|
||||||
|
home.packages = packages;
|
||||||
|
programs.kakoune = {
|
||||||
|
enable = true;
|
||||||
|
config = {
|
||||||
|
colorScheme = "nord";
|
||||||
|
tabStop = 2;
|
||||||
|
indentWidth = 2;
|
||||||
|
alignWithTabs = true;
|
||||||
|
scrollOff = { lines = 5; columns = 3; };
|
||||||
|
ui = { setTitle = true; changeColors = true; enableMouse = true; };
|
||||||
|
wrapLines = { enable = true; word = true; };
|
||||||
|
numberLines = { enable = true; highlightCursor = true; };
|
||||||
|
keyMappings = [
|
||||||
|
{ mode = "normal"; docstring = "Edit file"; key = "<c-e>"; effect = ":edit<space>"; }
|
||||||
|
{ mode = "user"; docstring = "Code actions"; key = "a"; effect = ":lsp-code-actions<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Comment block"; key = "b"; effect = ":comment-block<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Comment line"; key = "l"; effect = ":comment-line<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Copy to clipboard"; key = "y"; effect = "<a-|>${pkgs.xclip}/bin/xclip -i -selection clipboard<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Format code with formatter"; key = "f"; effect = ":format<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Format code with LSP"; key = "F"; effect = ":lsp-formatting-sync<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Jump to definition"; key = "d"; effect = ":lsp-definition<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Rename object"; key = "r"; effect = ":lsp-rename-prompt<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Jump to type definition"; key = "t"; effect = ":lsp-type-definition<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "List project diagnostics"; key = "i"; effect = ":lsp-diagnostics<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Paste from clipboard (after)"; key = "P"; effect = "<a-!>${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Paste from clipboard (before)"; key = "p"; effect = "!${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Show hover info"; key = "q"; effect = ":lsp-hover<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Spellcheck English"; key = "S"; effect = ":spell en<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Spellcheck"; key = "s"; effect = ":spell "; }
|
||||||
|
{ mode = "normal"; docstring = "Try next snippet placeholder"; key = "<c-n>"; effect = "<a-;>: insert-c-n<ret>"; }
|
||||||
|
# { mode = "normal"; docstring = "Search"; key = "/"; effect = "/(?i)"; }
|
||||||
|
# { mode = "normal"; docstring = "Reverse search"; key = "<a-/>"; effect = "<a-/>(?i)"; }
|
||||||
|
];
|
||||||
|
hooks = with pkgs; [
|
||||||
|
{ name = "BufCreate"; option = ".*"; commands = "editorconfig-load"; }
|
||||||
|
# { name = "ModuleLoaded"; option = "auto-pairs"; commands = "auto-pairs-enable"; }
|
||||||
|
{ name = "ModuleLoaded"; option = "powerline"; commands = "powerline-enable; powerline-start"; }
|
||||||
|
{ name = "BufSetOption"; option = "filetype=latex"; commands = "set-option buffer formatcmd latexindent"; }
|
||||||
|
{ name = "BufSetOption"; option = "filetype=python"; commands = "set-option buffer formatcmd 'black -'"; }
|
||||||
|
{ name = "BufSetOption"; option = "filetype=(markdown|html|json|yaml|css|scss|less)"; commands = "set-option buffer formatcmd prettier"; }
|
||||||
|
{ name = "BufSetOption"; option = "filetype=rust"; commands = "set-option buffer formatcmd 'rustfmt'"; }
|
||||||
|
{ name = "BufSetOption"; option = "filetype=sh"; commands = "set-option buffer formatcmd 'rustfmt'"; }
|
||||||
|
];
|
||||||
|
# TODO add more formatters from https://github.com/mawww/kakoune/wiki/Format
|
||||||
|
};
|
||||||
|
extraConfig = builtins.concatStringsSep "\n" [
|
||||||
|
"# Custom commands"
|
||||||
|
"add-highlighter global/ regex \\h+$ 0:Error # Highlight trailing spaces"
|
||||||
|
"eval %sh{kak-lsp --kakoune -s $kak_session}"
|
||||||
|
"lsp-enable"
|
||||||
|
''
|
||||||
|
def -hidden insert-c-n %{
|
||||||
|
try %{
|
||||||
|
lsp-snippets-select-next-placeholders
|
||||||
|
exec '<a-;>d'
|
||||||
|
} catch %{
|
||||||
|
exec -with-hooks '<c-n>'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
''
|
||||||
|
"require-module powerline"
|
||||||
|
"require-module connect-broot"
|
||||||
|
"require-module connect-lf"
|
||||||
|
"require-module connect-rofi"
|
||||||
|
];
|
||||||
|
plugins = with pkgs.kakounePlugins; [
|
||||||
|
prelude-kak
|
||||||
|
kak-lsp
|
||||||
|
auto-pairs-kak
|
||||||
|
powerline-kak
|
||||||
|
connect-kak
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# THEME FILE
|
||||||
|
xdg.configFile."kak/colors/nord.kak".text = with strPalette; ''
|
||||||
|
set-face global value rgb:${normal.magenta},default
|
||||||
|
set-face global type rgb:${bright.white},default
|
||||||
|
set-face global identifier rgb:${normal.cyan},default
|
||||||
|
set-face global string rgb:${normal.green},default
|
||||||
|
set-face global error rgb:${normal.red},default
|
||||||
|
set-face global keyword rgb:${normal.blue},default
|
||||||
|
set-face global operator rgb:${normal.blue},default
|
||||||
|
set-face global attribute rgb:${bright.blue},default
|
||||||
|
set-face global comment rgb:${bright.blue},default
|
||||||
|
set-face global meta rgb:${normal.yellow},default
|
||||||
|
set-face global Default rgb:${normal.white},default
|
||||||
|
set-face global PrimarySelection rgb:${normal.black},rgb:${dark.yellow}
|
||||||
|
set-face global SecondarySelection rgb:${normal.black},rgb:${dark.white}
|
||||||
|
set-face global PrimaryCursor rgb:${normal.black},rgb:${normal.yellow}
|
||||||
|
set-face global SecondaryCursor rgb:${normal.black},rgb:${normal.white}
|
||||||
|
set-face global MenuForeground rgb:${normal.white},rgb:${bright.black}
|
||||||
|
set-face global MenuBackground default,rgb:${normal.black}
|
||||||
|
set-face global MenuInfo default,rgb:${normal.black}
|
||||||
|
set-face global Information rgb:${dark.black},rgb:${normal.cyan}
|
||||||
|
set-face global StatusLine rgb:${normal.white},rgb:${normal.black}
|
||||||
|
set-face global StatusLineMode rgb:${normal.blue},rgb:${normal.black}
|
||||||
|
set-face global StatusLineInfo rgb:${normal.blue},rgb:${normal.black}
|
||||||
|
set-face global StatusLineValue rgb:${normal.blue},rgb:${normal.black}
|
||||||
|
set-face global StatusCursor rgb:${dark.black},rgb:${normal.yellow}
|
||||||
|
set-face global Prompt rgb:${normal.cyan},rgb:${normal.black}
|
||||||
|
set-face global BufferPadding default,default
|
||||||
|
'';
|
||||||
|
|
||||||
|
xdg.configFile."kak-lsp/kak-lsp.toml".text = with pkgs; ''
|
||||||
|
snippet_support = false
|
||||||
|
verbosity = 2
|
||||||
|
[server]
|
||||||
|
timeout = 1800 # seconds = 30 minutes
|
||||||
|
|
||||||
|
[language.c_cpp]
|
||||||
|
filetypes = ["c", "cpp"]
|
||||||
|
roots = ["compile_commands.json", ".clangd"]
|
||||||
|
command = "clangd"
|
||||||
|
offset_encoding = "utf-8"
|
||||||
|
|
||||||
|
[language.json]
|
||||||
|
filetypes = ["json"]
|
||||||
|
roots = ["package.json"]
|
||||||
|
command = "vscode-json-language-server"
|
||||||
|
args = ["--stdio"]
|
||||||
|
|
||||||
|
[language.yaml]
|
||||||
|
filetypes = ["yaml"]
|
||||||
|
roots = [".git"]
|
||||||
|
command = "yaml-language-server"
|
||||||
|
args = ["--stdio"]
|
||||||
|
|
||||||
|
[language.yaml.settings]
|
||||||
|
# See https://github.com/redhat-developer/yaml-language-server#language-server-settings
|
||||||
|
# Defaults are at https://github.com/redhat-developer/yaml-language-server/blob/master/src/yamlSettings.ts
|
||||||
|
yaml.format.enable = true
|
||||||
|
|
||||||
|
[language.go]
|
||||||
|
filetypes = ["go"]
|
||||||
|
roots = ["Gopkg.toml", "go.mod", ".git", ".hg"]
|
||||||
|
command = "gopls"
|
||||||
|
offset_encoding = "utf-8"
|
||||||
|
settings_section = "gopls"
|
||||||
|
|
||||||
|
[language.go.settings.gopls]
|
||||||
|
# See https://github.com/golang/tools/blob/master/gopls/doc/settings.md
|
||||||
|
# "build.buildFlags" = []
|
||||||
|
|
||||||
|
[language.html]
|
||||||
|
filetypes = ["html"]
|
||||||
|
roots = ["package.json"]
|
||||||
|
command = "vscode-html-language-server"
|
||||||
|
args = ["--stdio"]
|
||||||
|
|
||||||
|
[language.css]
|
||||||
|
filetypes = ["css"]
|
||||||
|
roots = ["package.json", ".git"]
|
||||||
|
command = "vscode-css-language-server"
|
||||||
|
args = ["--stdio"]
|
||||||
|
|
||||||
|
[language.less]
|
||||||
|
filetypes = ["less"]
|
||||||
|
roots = ["package.json", ".git"]
|
||||||
|
command = "vscode-css-language-server"
|
||||||
|
args = ["--stdio"]
|
||||||
|
|
||||||
|
[language.scss]
|
||||||
|
filetypes = ["scss"]
|
||||||
|
roots = ["package.json", ".git"]
|
||||||
|
command = "vscode-css-language-server"
|
||||||
|
args = ["--stdio"]
|
||||||
|
|
||||||
|
[language.javascript]
|
||||||
|
filetypes = ["javascript"]
|
||||||
|
roots = [".flowconfig"]
|
||||||
|
command = "flow"
|
||||||
|
args = ["lsp"]
|
||||||
|
|
||||||
|
[language.latex]
|
||||||
|
filetypes = ["latex"]
|
||||||
|
roots = [".git"]
|
||||||
|
command = "texlab"
|
||||||
|
settings_section = "texlab"
|
||||||
|
|
||||||
|
[language.latex.settings.texlab]
|
||||||
|
# See https://github.com/latex-lsp/texlab/blob/master/src/options.rs
|
||||||
|
# bibtexFormatter = "texlab"
|
||||||
|
|
||||||
|
[language.nix]
|
||||||
|
filetypes = ["nix"]
|
||||||
|
roots = ["flake.nix", "shell.nix", ".git"]
|
||||||
|
command = "rnix-lsp"
|
||||||
|
|
||||||
|
[language.python]
|
||||||
|
filetypes = ["python"]
|
||||||
|
roots = ["requirements.txt", "setup.py", ".git", ".hg"]
|
||||||
|
command = "pylsp"
|
||||||
|
offset_encoding = "utf-8"
|
||||||
|
|
||||||
|
[language.python.settings]
|
||||||
|
# See https://github.com/palantir/python-language-server#configuration
|
||||||
|
# and https://github.com/palantir/python-language-server/blob/develop/vscode-client/package.json
|
||||||
|
# "pyls.configurationSources" = ["flake8"]
|
||||||
|
|
||||||
|
[language.rust]
|
||||||
|
filetypes = ["rust"]
|
||||||
|
roots = ["Cargo.toml"]
|
||||||
|
command = "rust-analyzer"
|
||||||
|
settings_section = "rust-analyzer"
|
||||||
|
|
||||||
|
[language.rust.settings.rust-analyzer]
|
||||||
|
hoverActions.enable = false # kak-lsp doesn't support this at the moment
|
||||||
|
# cargo.features = []
|
||||||
|
# See https://rust-analyzer.github.io/manual.html#configuration
|
||||||
|
# If you get 'unresolved proc macro' warnings, you have two options
|
||||||
|
# 1. The safe choice is two disable the warning:
|
||||||
|
diagnostics.disabled = ["unresolved-proc-macro"]
|
||||||
|
# 2. Or you can opt-in for proc macro support
|
||||||
|
procMacro.enable = true
|
||||||
|
cargo.loadOutDirsFromCheck = true
|
||||||
|
# See https://github.com/rust-analyzer/rust-analyzer/issues/6448
|
||||||
|
|
||||||
|
[language.bash]
|
||||||
|
filetypes = ["sh"]
|
||||||
|
roots = [".git", ".hg"]
|
||||||
|
command = "bash-language-server"
|
||||||
|
args = ["start"]
|
||||||
|
'';
|
||||||
|
}
|
||||||
8
home_manager/modules/latex.nix
Normal file
8
home_manager/modules/latex.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ pkgs, lib, ...}:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
tex2nix
|
||||||
|
texlab
|
||||||
|
texlive.combined.scheme-medium
|
||||||
|
];
|
||||||
|
}
|
||||||
10
home_manager/modules/python.nix
Normal file
10
home_manager/modules/python.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
black
|
||||||
|
] ++ (with pkgs.python3Packages; [
|
||||||
|
python-lsp-server
|
||||||
|
# pyls-black # not updated to the new pylsp
|
||||||
|
pyls-flake8
|
||||||
|
pyls-isort
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
@ -20,5 +20,5 @@
|
||||||
|
|
||||||
@theme "nord"
|
@theme "nord"
|
||||||
'';
|
'';
|
||||||
xdg.configFile."rofi/nord.rasi".source = ../configs/rofi/nord.rasi;
|
xdg.configFile."rofi/nord.rasi".source = ../../configs/rofi/nord.rasi;
|
||||||
}
|
}
|
||||||
10
home_manager/modules/rust.nix
Normal file
10
home_manager/modules/rust.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
bacon
|
||||||
|
cargo
|
||||||
|
clippy
|
||||||
|
rust-analyzer
|
||||||
|
rustfmt
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -15,6 +15,7 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.bash = { inherit shellAliases; };
|
home = { inherit shellAliases; };
|
||||||
programs.zsh = { inherit shellAliases; };
|
# programs.bash = { inherit shellAliases; };
|
||||||
|
# programs.zsh = { inherit shellAliases; };
|
||||||
}
|
}
|
||||||
151
home_manager/odin.nix
Normal file
151
home_manager/odin.nix
Normal file
|
|
@ -0,0 +1,151 @@
|
||||||
|
{ pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
# # pulseaudio
|
||||||
|
easyeffects
|
||||||
|
tex2nix
|
||||||
|
|
||||||
|
kubectl
|
||||||
|
docker-compose
|
||||||
|
docker-machine
|
||||||
|
|
||||||
|
arandr
|
||||||
|
ark
|
||||||
|
authy
|
||||||
|
bitwarden
|
||||||
|
catgirl # IRC
|
||||||
|
cava
|
||||||
|
discord
|
||||||
|
droidcam
|
||||||
|
# element-desktop # matrix client
|
||||||
|
# evolution
|
||||||
|
filelight
|
||||||
|
# firefox
|
||||||
|
gallery-dl
|
||||||
|
# gnome.dconf-editor
|
||||||
|
# gnome.eog
|
||||||
|
# gnome.evince
|
||||||
|
gnome.geary
|
||||||
|
gnome.gnome-calendar
|
||||||
|
# gnomeExtensions.appindicator
|
||||||
|
# gnomeExtensions.caffeine
|
||||||
|
# gnomeExtensions.dash-to-dock
|
||||||
|
# gnomeExtensions.dynamic-panel-transparency
|
||||||
|
# gnomeExtensions.gtile
|
||||||
|
# gnomeExtensions.just-perfection
|
||||||
|
# gnomeExtensions.vitals
|
||||||
|
# gnome.file-roller
|
||||||
|
# gnome.gnome-screenshot
|
||||||
|
# gnome.gnome-sound-recorder
|
||||||
|
# gnome.gnome-sudoku
|
||||||
|
# gnome.gnome-system-monitor
|
||||||
|
# gnome.gnome-tweaks
|
||||||
|
# gnome.nautilus
|
||||||
|
# gnome.quadrapassel
|
||||||
|
# gnome.seahorse
|
||||||
|
# gnome.sushi
|
||||||
|
google-chrome
|
||||||
|
gucharmap
|
||||||
|
httpie
|
||||||
|
# hyperspace-cli
|
||||||
|
inkscape
|
||||||
|
jetbrains.datagrip
|
||||||
|
kmail
|
||||||
|
kompare
|
||||||
|
kontact
|
||||||
|
korganizer
|
||||||
|
krita
|
||||||
|
ksystemlog
|
||||||
|
kubectl
|
||||||
|
lutris
|
||||||
|
kcolorchooser
|
||||||
|
kompare
|
||||||
|
korganizer
|
||||||
|
# keepassxc
|
||||||
|
kgpg
|
||||||
|
# kid3 # tag mp3
|
||||||
|
krita
|
||||||
|
ksystemlog
|
||||||
|
lutris
|
||||||
|
meld
|
||||||
|
mmv-go
|
||||||
|
mpv
|
||||||
|
neofetch
|
||||||
|
nixos-option
|
||||||
|
nix-prefetch-scripts
|
||||||
|
nix-tree
|
||||||
|
obsidian
|
||||||
|
okular
|
||||||
|
openvpn
|
||||||
|
p7zip
|
||||||
|
pavucontrol
|
||||||
|
pcmanfm
|
||||||
|
pentablet-driver
|
||||||
|
procps
|
||||||
|
ripgrep
|
||||||
|
skypeforlinux
|
||||||
|
spotify
|
||||||
|
unstable.tdesktop
|
||||||
|
teams
|
||||||
|
tracker
|
||||||
|
transmission-gtk
|
||||||
|
unrar
|
||||||
|
unzip
|
||||||
|
virt-manager
|
||||||
|
wget
|
||||||
|
# wineFull
|
||||||
|
wireguard-tools
|
||||||
|
xclip
|
||||||
|
xournalpp
|
||||||
|
yq
|
||||||
|
zip
|
||||||
|
zoom-us
|
||||||
|
zotero
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./basic_env.nix
|
||||||
|
|
||||||
|
./modules/cpp.nix
|
||||||
|
./modules/go.nix
|
||||||
|
./modules/java.nix
|
||||||
|
./modules/javascript.nix
|
||||||
|
./modules/latex.nix
|
||||||
|
./modules/python.nix
|
||||||
|
./modules/rust.nix
|
||||||
|
|
||||||
|
./modules/alacritty.nix
|
||||||
|
# ./modules/bspwm.nix
|
||||||
|
# ./modules/dunst.nix
|
||||||
|
# ./modules/grobi.nix
|
||||||
|
./modules/gtk_theme.nix
|
||||||
|
./modules/joystickwake.nix
|
||||||
|
./modules/kakoune.nix
|
||||||
|
# ./modules/keepassxc.nix
|
||||||
|
./modules/kitty.nix
|
||||||
|
./modules/latex.nix
|
||||||
|
./modules/libinput-gestures.nix
|
||||||
|
./modules/mangohud.nix
|
||||||
|
./modules/megasync.nix
|
||||||
|
# ./modules/noti.nix
|
||||||
|
./modules/obs-studio.nix
|
||||||
|
./modules/office.nix
|
||||||
|
./modules/onedrive.nix
|
||||||
|
# ./modules/picom.nix
|
||||||
|
# ./modules/polybar.nix
|
||||||
|
./modules/pro_audio.nix
|
||||||
|
# ./modules/pycharm.nix
|
||||||
|
./modules/rofimoji.nix
|
||||||
|
./modules/rofi.nix
|
||||||
|
# ./modules/screen_locker.nix
|
||||||
|
# ./modules/security.nix
|
||||||
|
# ./modules/sxhkd.nix
|
||||||
|
./modules/syncthing.nix
|
||||||
|
./modules/terminator.nix
|
||||||
|
# ./modules/update_background.nix
|
||||||
|
./modules/webapp.nix
|
||||||
|
# ./modules/xidlehook.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
programs.go = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,453 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
let
|
|
||||||
strPalette = with pkgs.rice;
|
|
||||||
palette.toRgbShortHex colorPalette;
|
|
||||||
packages = with pkgs;
|
|
||||||
[
|
|
||||||
(pkgs.makeDesktopItem
|
|
||||||
{
|
|
||||||
name = "kakoune";
|
|
||||||
exec = "kak %U";
|
|
||||||
icon = "kakoune";
|
|
||||||
desktopName = "Kakoune";
|
|
||||||
comment = "Kakoune text editor";
|
|
||||||
terminal = true;
|
|
||||||
categories = [ "Development" ];
|
|
||||||
})
|
|
||||||
] ++ [
|
|
||||||
# editorconfig-core-c
|
|
||||||
python3.pkgs.editorconfig
|
|
||||||
] ++ (
|
|
||||||
[
|
|
||||||
clang-tools
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
[
|
|
||||||
yaml-language-server
|
|
||||||
nodePackages.vscode-langservers-extracted
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
[
|
|
||||||
nodePackages.vscode-langservers-extracted
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
[
|
|
||||||
flow
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
[
|
|
||||||
texlab
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
[
|
|
||||||
rnix-lsp
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
with python3.pkgs;
|
|
||||||
[
|
|
||||||
black
|
|
||||||
# pyls-black
|
|
||||||
pyls-flake8
|
|
||||||
pyls-isort
|
|
||||||
# pyls-mypy
|
|
||||||
python-lsp-server
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
[
|
|
||||||
cargo
|
|
||||||
cargo-watch
|
|
||||||
clippy
|
|
||||||
rust-analyzer
|
|
||||||
rustc
|
|
||||||
rustfmt
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
[
|
|
||||||
nodePackages.bash-language-server
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
[
|
|
||||||
aspell
|
|
||||||
aspellDicts.en
|
|
||||||
aspellDicts.en-computers
|
|
||||||
aspellDicts.en-science
|
|
||||||
aspellDicts.it
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "kak";
|
|
||||||
VISUAL = "kak";
|
|
||||||
};
|
|
||||||
programs.bash.shellAliases = { k = "kak"; };
|
|
||||||
programs.zsh.shellAliases = { k = "kak"; };
|
|
||||||
home.packages = packages;
|
|
||||||
programs.kakoune = {
|
|
||||||
enable = true;
|
|
||||||
config = {
|
|
||||||
colorScheme = "nord";
|
|
||||||
tabStop = 2;
|
|
||||||
indentWidth = 2;
|
|
||||||
alignWithTabs = true;
|
|
||||||
scrollOff = {
|
|
||||||
lines = 5;
|
|
||||||
columns = 3;
|
|
||||||
};
|
|
||||||
ui = {
|
|
||||||
setTitle = true;
|
|
||||||
changeColors = true;
|
|
||||||
enableMouse = true;
|
|
||||||
};
|
|
||||||
wrapLines = {
|
|
||||||
enable = true;
|
|
||||||
word = true;
|
|
||||||
};
|
|
||||||
numberLines = {
|
|
||||||
enable = true;
|
|
||||||
highlightCursor = true;
|
|
||||||
};
|
|
||||||
keyMappings = with pkgs;
|
|
||||||
[
|
|
||||||
{
|
|
||||||
mode = "normal";
|
|
||||||
docstring = "Edit file";
|
|
||||||
key = "<c-e>";
|
|
||||||
effect = ":edit<space>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Code actions";
|
|
||||||
key = "a";
|
|
||||||
effect = ":lsp-code-actions<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Comment block";
|
|
||||||
key = "b";
|
|
||||||
effect = ":comment-block<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Comment line";
|
|
||||||
key = "l";
|
|
||||||
effect = ":comment-line<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Copy to clipboard";
|
|
||||||
key = "y";
|
|
||||||
effect = "<a-|>${xclip}/bin/xclip -i -selection clipboard<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Format code with formatter";
|
|
||||||
key = "f";
|
|
||||||
effect = ":format<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Format code with LSP";
|
|
||||||
key = "F";
|
|
||||||
effect = ":lsp-formatting-sync<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Jump to definition";
|
|
||||||
key = "d";
|
|
||||||
effect = ":lsp-definition<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Rename object";
|
|
||||||
key = "r";
|
|
||||||
effect = ":lsp-rename-prompt<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Jump to type definition";
|
|
||||||
key = "t";
|
|
||||||
effect = ":lsp-type-definition<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "List project diagnostics";
|
|
||||||
key = "i";
|
|
||||||
effect = ":lsp-diagnostics<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Paste from clipboard (after)";
|
|
||||||
key = "P";
|
|
||||||
effect = "<a-!>${xclip}/bin/xclip -selection clipboard -o<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Paste from clipboard (before)";
|
|
||||||
key = "p";
|
|
||||||
effect = "!${xclip}/bin/xclip -selection clipboard -o<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Show hover info";
|
|
||||||
key = "q";
|
|
||||||
effect = ":lsp-hover<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Spellcheck English";
|
|
||||||
key = "S";
|
|
||||||
effect = ":spell en<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Spellcheck";
|
|
||||||
key = "s";
|
|
||||||
effect = ":spell ";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "normal";
|
|
||||||
docstring = "Try next snippet placeholder";
|
|
||||||
key = "<c-n>";
|
|
||||||
effect = "<a-;>: insert-c-n<ret>";
|
|
||||||
}
|
|
||||||
# {
|
|
||||||
# mode = "normal";
|
|
||||||
# docstring = "Search";
|
|
||||||
# key = "/";
|
|
||||||
# effect = "/(?i)";
|
|
||||||
# }
|
|
||||||
# {
|
|
||||||
# mode = "normal";
|
|
||||||
# docstring = "Reverse search";
|
|
||||||
# key = "<a-/>";
|
|
||||||
# effect = "<a-/>(?i)";
|
|
||||||
# }
|
|
||||||
];
|
|
||||||
hooks = with pkgs;
|
|
||||||
[
|
|
||||||
{
|
|
||||||
name = "BufCreate";
|
|
||||||
option = ".*";
|
|
||||||
commands = "editorconfig-load";
|
|
||||||
}
|
|
||||||
# {
|
|
||||||
# name = "ModuleLoaded";
|
|
||||||
# option = "auto-pairs";
|
|
||||||
# commands = "auto-pairs-enable";
|
|
||||||
# }
|
|
||||||
{
|
|
||||||
name = "ModuleLoaded";
|
|
||||||
option = "powerline";
|
|
||||||
commands = builtins.concatStringsSep "\n" [ "powerline-enable" ];
|
|
||||||
}
|
|
||||||
] ++ (
|
|
||||||
[
|
|
||||||
{
|
|
||||||
name = "BufSetOption";
|
|
||||||
option = "filetype=latex";
|
|
||||||
commands = "set-option buffer formatcmd ${texlive.bin.latexindent}/bin/latexindent";
|
|
||||||
}
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
[
|
|
||||||
{
|
|
||||||
name = "BufSetOption";
|
|
||||||
option = "filetype=python";
|
|
||||||
commands = "set-option buffer formatcmd '${python3.pkgs.black}/bin/black -'";
|
|
||||||
}
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
[
|
|
||||||
{
|
|
||||||
name = "BufSetOption";
|
|
||||||
option = "filetype=(markdown|html|json|yaml|css|scss|less)";
|
|
||||||
commands = "set-option buffer formatcmd ${nodePackages.prettier}/bin/prettier";
|
|
||||||
}
|
|
||||||
]
|
|
||||||
);
|
|
||||||
# TODO add more formatters from https://github.com/mawww/kakoune/wiki/Format
|
|
||||||
};
|
|
||||||
extraConfig = builtins.concatStringsSep "\n" [
|
|
||||||
"# Custom commands"
|
|
||||||
"add-highlighter global/ regex \\h+$ 0:Error # Highlight trailing spaces"
|
|
||||||
"eval %sh{kak-lsp --kakoune -s $kak_session}"
|
|
||||||
"lsp-enable"
|
|
||||||
''
|
|
||||||
def -hidden insert-c-n %{
|
|
||||||
try %{
|
|
||||||
lsp-snippets-select-next-placeholders
|
|
||||||
exec '<a-;>d'
|
|
||||||
} catch %{
|
|
||||||
exec -with-hooks '<c-n>'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
''
|
|
||||||
"require-module powerline"
|
|
||||||
"powerline-start"
|
|
||||||
"require-module connect-broot"
|
|
||||||
"require-module connect-lf"
|
|
||||||
"require-module connect-rofi"
|
|
||||||
];
|
|
||||||
plugins = with pkgs.kakounePlugins; [
|
|
||||||
prelude-kak
|
|
||||||
kak-lsp
|
|
||||||
auto-pairs-kak
|
|
||||||
powerline-kak
|
|
||||||
connect-kak
|
|
||||||
];
|
|
||||||
};
|
|
||||||
xdg.configFile."kak/colors/nord.kak".text = with strPalette; ''
|
|
||||||
set-face global value rgb:${normal.magenta},default
|
|
||||||
set-face global type rgb:${bright.white},default
|
|
||||||
set-face global identifier rgb:${normal.cyan},default
|
|
||||||
set-face global string rgb:${normal.green},default
|
|
||||||
set-face global error rgb:${normal.red},default
|
|
||||||
set-face global keyword rgb:${normal.blue},default
|
|
||||||
set-face global operator rgb:${normal.blue},default
|
|
||||||
set-face global attribute rgb:${bright.blue},default
|
|
||||||
set-face global comment rgb:${bright.blue},default
|
|
||||||
set-face global meta rgb:${normal.yellow},default
|
|
||||||
set-face global Default rgb:${normal.white},default
|
|
||||||
set-face global PrimarySelection rgb:${normal.black},rgb:${dark.yellow}
|
|
||||||
set-face global SecondarySelection rgb:${normal.black},rgb:${dark.white}
|
|
||||||
set-face global PrimaryCursor rgb:${normal.black},rgb:${normal.yellow}
|
|
||||||
set-face global SecondaryCursor rgb:${normal.black},rgb:${normal.white}
|
|
||||||
set-face global MenuForeground rgb:${normal.white},rgb:${bright.black}
|
|
||||||
set-face global MenuBackground default,rgb:${normal.black}
|
|
||||||
set-face global MenuInfo default,rgb:${normal.black}
|
|
||||||
set-face global Information rgb:${dark.black},rgb:${normal.cyan}
|
|
||||||
set-face global StatusLine rgb:${normal.white},rgb:${normal.black}
|
|
||||||
set-face global StatusLineMode rgb:${normal.blue},rgb:${normal.black}
|
|
||||||
set-face global StatusLineInfo rgb:${normal.blue},rgb:${normal.black}
|
|
||||||
set-face global StatusLineValue rgb:${normal.blue},rgb:${normal.black}
|
|
||||||
set-face global StatusCursor rgb:${dark.black},rgb:${normal.yellow}
|
|
||||||
set-face global Prompt rgb:${normal.cyan},rgb:${normal.black}
|
|
||||||
set-face global BufferPadding default,default
|
|
||||||
'';
|
|
||||||
xdg.configFile."kak-lsp/kak-lsp.toml".text = with pkgs; builtins.concatStringsSep "\n"
|
|
||||||
[
|
|
||||||
''
|
|
||||||
snippet_support = false
|
|
||||||
verbosity = 2
|
|
||||||
[server]
|
|
||||||
timeout = 1800 # seconds = 30 minutes
|
|
||||||
''
|
|
||||||
''
|
|
||||||
[language.c_cpp]
|
|
||||||
filetypes = ["c", "cpp"]
|
|
||||||
roots = ["compile_commands.json", ".clangd"]
|
|
||||||
command = "${clang-tools}/bin/clangd"
|
|
||||||
offset_encoding = "utf-8"
|
|
||||||
''
|
|
||||||
''
|
|
||||||
[language.json]
|
|
||||||
filetypes = ["json"]
|
|
||||||
roots = ["package.json"]
|
|
||||||
command = "${nodePackages.vscode-langservers-extracted}/bin/vscode-json-language-server"
|
|
||||||
args = ["--stdio"]
|
|
||||||
[language.yaml]
|
|
||||||
filetypes = ["yaml"]
|
|
||||||
roots = [".git"]
|
|
||||||
command = "${yaml-language-server}/bin/yaml-language-server"
|
|
||||||
args = ["--stdio"]
|
|
||||||
[language.yaml.settings]
|
|
||||||
# See https://github.com/redhat-developer/yaml-language-server#language-server-settings
|
|
||||||
# Defaults are at https://github.com/redhat-developer/yaml-language-server/blob/master/src/yamlSettings.ts
|
|
||||||
yaml.format.enable = true
|
|
||||||
''
|
|
||||||
''
|
|
||||||
[language.go]
|
|
||||||
filetypes = ["go"]
|
|
||||||
roots = ["Gopkg.toml", "go.mod", ".git", ".hg"]
|
|
||||||
command = "gopls"
|
|
||||||
offset_encoding = "utf-8"
|
|
||||||
settings_section = "gopls"
|
|
||||||
[language.go.settings.gopls]
|
|
||||||
# See https://github.com/golang/tools/blob/master/gopls/doc/settings.md
|
|
||||||
# "build.buildFlags" = []
|
|
||||||
''
|
|
||||||
''
|
|
||||||
[language.html]
|
|
||||||
filetypes = ["html"]
|
|
||||||
roots = ["package.json"]
|
|
||||||
command = "${nodePackages.vscode-langservers-extracted}/bin/vscode-html-language-server"
|
|
||||||
args = ["--stdio"]
|
|
||||||
[language.css]
|
|
||||||
filetypes = ["css"]
|
|
||||||
roots = ["package.json", ".git"]
|
|
||||||
command = "${nodePackages.vscode-langservers-extracted}/bin/vscode-css-language-server"
|
|
||||||
args = ["--stdio"]
|
|
||||||
[language.less]
|
|
||||||
filetypes = ["less"]
|
|
||||||
roots = ["package.json", ".git"]
|
|
||||||
command = "${nodePackages.vscode-langservers-extracted}/bin/vscode-css-language-server"
|
|
||||||
args = ["--stdio"]
|
|
||||||
[language.scss]
|
|
||||||
filetypes = ["scss"]
|
|
||||||
roots = ["package.json", ".git"]
|
|
||||||
command = "${nodePackages.vscode-langservers-extracted}/bin/vscode-css-language-server"
|
|
||||||
args = ["--stdio"]
|
|
||||||
''
|
|
||||||
''
|
|
||||||
[language.javascript]
|
|
||||||
filetypes = ["javascript"]
|
|
||||||
roots = [".flowconfig"]
|
|
||||||
command = "${flow}/bin/flow"
|
|
||||||
args = ["lsp"]
|
|
||||||
''
|
|
||||||
''
|
|
||||||
[language.latex]
|
|
||||||
filetypes = ["latex"]
|
|
||||||
roots = [".git"]
|
|
||||||
command = "${texlab}/bin/texlab"
|
|
||||||
settings_section = "texlab"
|
|
||||||
[language.latex.settings.texlab]
|
|
||||||
# See https://github.com/latex-lsp/texlab/blob/master/src/options.rs
|
|
||||||
# bibtexFormatter = "${texlab}/bin/texlab"
|
|
||||||
''
|
|
||||||
''
|
|
||||||
[language.nix]
|
|
||||||
filetypes = ["nix"]
|
|
||||||
roots = ["flake.nix", "shell.nix", ".git"]
|
|
||||||
command = "${rnix-lsp}/bin/rnix-lsp"
|
|
||||||
''
|
|
||||||
''
|
|
||||||
[language.python]
|
|
||||||
filetypes = ["python"]
|
|
||||||
roots = ["requirements.txt", "setup.py", ".git", ".hg"]
|
|
||||||
command = "${python3.pkgs.python-lsp-server}/bin/pylsp"
|
|
||||||
offset_encoding = "utf-8"
|
|
||||||
[language.python.settings]
|
|
||||||
# See https://github.com/palantir/python-language-server#configuration
|
|
||||||
# and https://github.com/palantir/python-language-server/blob/develop/vscode-client/package.json
|
|
||||||
# "pyls.configurationSources" = ["flake8"]
|
|
||||||
''
|
|
||||||
''
|
|
||||||
[language.rust]
|
|
||||||
filetypes = ["rust"]
|
|
||||||
roots = ["Cargo.toml"]
|
|
||||||
command = "${rust-analyzer}/bin/rust-analyzer"
|
|
||||||
settings_section = "rust-analyzer"
|
|
||||||
[language.rust.settings.rust-analyzer]
|
|
||||||
hoverActions.enable = false # kak-lsp doesn't support this at the moment
|
|
||||||
# cargo.features = []
|
|
||||||
# See https://rust-analyzer.github.io/manual.html#configuration
|
|
||||||
# If you get 'unresolved proc macro' warnings, you have two options
|
|
||||||
# 1. The safe choice is two disable the warning:
|
|
||||||
diagnostics.disabled = ["unresolved-proc-macro"]
|
|
||||||
# 2. Or you can opt-in for proc macro support
|
|
||||||
procMacro.enable = true
|
|
||||||
cargo.loadOutDirsFromCheck = true
|
|
||||||
# See https://github.com/rust-analyzer/rust-analyzer/issues/6448
|
|
||||||
''
|
|
||||||
''
|
|
||||||
[language.bash]
|
|
||||||
filetypes = ["sh"]
|
|
||||||
roots = [".git", ".hg"]
|
|
||||||
command = "${nodePackages.bash-language-server}/bin/bash-language-server"
|
|
||||||
args = ["start"]
|
|
||||||
''
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{ pkgs, lib, ...}:
|
|
||||||
{
|
|
||||||
home.packages = [
|
|
||||||
pkgs.texlive.combined.scheme-full
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.initrd.checkJournalingFS = true;
|
boot.initrd.checkJournalingFS = true;
|
||||||
boot.kernelPackages = pkgs.linuxKernel.packages.linux_5_16;
|
boot.kernelPackages = pkgs.linuxKernel.packages.linux_5_17;
|
||||||
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
||||||
|
|
||||||
# # Cross-build arm
|
# # Cross-build arm
|
||||||
|
|
@ -117,7 +117,7 @@
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
environment.systemPackages = with pkgs; [ tmux firefox kakoune vim ];
|
environment.systemPackages = with pkgs; [ tmux firefox kakoune vim git ];
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
# started in user sessions.
|
# started in user sessions.
|
||||||
65
thor/flake.lock
generated
65
thor/flake.lock
generated
|
|
@ -1,65 +0,0 @@
|
||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"home-manager": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1648834319,
|
|
||||||
"narHash": "sha256-i5Aj4Aw64D/A0X6XW5LxSS4XBnYj7gMz+kN4dpsbdk8=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"rev": "0bdbdea2e26c984b096f4f7d10e3c88536a980b0",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"ref": "release-21.11",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixos-hardware": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1648141026,
|
|
||||||
"narHash": "sha256-h8e3+5EZFbYHTMb0DN2ACuQTJBNHpqigvmEV1w2WIuE=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixos-hardware",
|
|
||||||
"rev": "feceb4d24f582817d8f6e737cd40af9e162dee05",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixos-hardware",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1649024309,
|
|
||||||
"narHash": "sha256-AWbvj/NHZXVwAnHaVOFlxg7tcNerEKrKBmgGfztSHWM=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "af0a9bc0e5341855518e9c1734d7ef913e5138b9",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-21.11",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"home-manager": "home-manager",
|
|
||||||
"nixos-hardware": "nixos-hardware",
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
{
|
|
||||||
description = "Thor system configuration";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
|
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
home-manager.url = "github:nix-community/home-manager/release-21.11";
|
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
|
||||||
# nixos-hardware.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager, nixos-hardware }:
|
|
||||||
let
|
|
||||||
system = "x86_64-linux";
|
|
||||||
pkgs = import nixpkgs {
|
|
||||||
inherit system;
|
|
||||||
config = { allowUnfree = true; };
|
|
||||||
};
|
|
||||||
lib = nixpkgs.lib;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
nixosConfigurations = {
|
|
||||||
thor = lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
|
|
||||||
modules = [
|
|
||||||
nixos-hardware.nixosModules.common-cpu-amd
|
|
||||||
nixos-hardware.nixosModules.common-pc-ssd
|
|
||||||
./configuration.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue