Annotate multiline strings with their language

This commit is contained in:
Simon Bruder 2021-08-05 13:23:07 +02:00
parent 46afd7123c
commit 821a352c49
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
11 changed files with 27 additions and 25 deletions

View file

@ -24,7 +24,7 @@ lib.mkIf config.sbruder.gui.enable {
sansSerif = [ "Roboto" "Source Han Sans" ]; sansSerif = [ "Roboto" "Source Han Sans" ];
serif = [ "Georgia" "Source Han Serif" ]; serif = [ "Georgia" "Source Han Serif" ];
}; };
localConf = '' localConf = /* xml */ ''
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd"> <!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig> <fontconfig>

View file

@ -4,7 +4,7 @@ let
overlaysCompat = pkgs.writeTextFile { overlaysCompat = pkgs.writeTextFile {
name = "overlays-compat"; name = "overlays-compat";
destination = "/overlays.nix"; destination = "/overlays.nix";
text = '' text = /* nix */ ''
self: super: self: super:
with super.lib; with super.lib;
let let

View file

@ -1,5 +1,5 @@
{ {
services.udev.extraRules = '' services.udev.extraRules = /* udevrules */ ''
# ST-Link # ST-Link
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", \ SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", \
MODE:="0666" MODE:="0666"

View file

@ -14,7 +14,7 @@
too-many-instance-attributes too-many-instance-attributes
''; '';
".gdbinit".text = '' ".gdbinit".text = /* gdb */ ''
# history # history
set history save on set history save on
set history filename ~/.gdb_history set history filename ~/.gdb_history
@ -25,7 +25,7 @@
}; };
xdg.configFile = { xdg.configFile = {
"pycodestyle".text = '' "pycodestyle".text = /* ini */ ''
[pycodestyle] [pycodestyle]
ignore = E265 ignore = E265
max-line-length = 120 max-line-length = 120

View file

@ -78,7 +78,7 @@ in
programs.neovim = { programs.neovim = {
enable = true; enable = true;
vimAlias = true; vimAlias = true;
extraConfig = '' extraConfig = /* vim */ ''
" Basic display " Basic display
set number set number
set colorcolumn=80 set colorcolumn=80
@ -182,7 +182,7 @@ in
plugins = (with pkgs.vimPlugins; [ plugins = (with pkgs.vimPlugins; [
{ {
plugin = deoplete-nvim; plugin = deoplete-nvim;
config = '' config = /* vim */ ''
let g:deoplete#enable_at_startup = 1 let g:deoplete#enable_at_startup = 1
''; '';
} }
@ -190,7 +190,7 @@ in
fzf-vim fzf-vim
{ {
plugin = nerdtree; plugin = nerdtree;
config = '' config = /* vim */ ''
map <Leader>N :NERDTreeTabsToggle<CR> map <Leader>N :NERDTreeTabsToggle<CR>
map <Leader>n :NERDTreeFocusToggle<CR> map <Leader>n :NERDTreeFocusToggle<CR>
''; '';
@ -198,7 +198,7 @@ in
nerdtree-git-plugin nerdtree-git-plugin
{ {
plugin = rust-vim; plugin = rust-vim;
config = '' config = /* vim */ ''
let g:rustfmt_autosave_if_config_present = 1 let g:rustfmt_autosave_if_config_present = 1
let g:rust_fold = 1 let g:rust_fold = 1
map <Leader>rt :RustTest<CR> map <Leader>rt :RustTest<CR>
@ -206,11 +206,13 @@ in
} }
{ {
plugin = tagbar; plugin = tagbar;
config = "nmap <F8> :TagbarToggle<CR>"; config = /* vim */ ''
nmap <F8> :TagbarToggle<CR>
'';
} }
{ {
plugin = ultisnips; plugin = ultisnips;
config = '' config = /* vim */ ''
let g:UltiSnipsSnippetDirectories = [ '${./UltiSnips}' ] let g:UltiSnipsSnippetDirectories = [ '${./UltiSnips}' ]
let g:UltiSnipsExpandTrigger = '<tab>' let g:UltiSnipsExpandTrigger = '<tab>'
let g:UltiSnipsJumpForwardTrigger = '<tab>' let g:UltiSnipsJumpForwardTrigger = '<tab>'
@ -219,7 +221,7 @@ in
} }
{ {
plugin = vim-airline; plugin = vim-airline;
config = '' config = /* vim */ ''
let g:airline_powerline_fonts = 1 let g:airline_powerline_fonts = 1
let g:airline_solarized_bg='dark' let g:airline_solarized_bg='dark'
let g:airline_theme='solarized' let g:airline_theme='solarized'
@ -236,7 +238,7 @@ in
vim-toml vim-toml
{ {
plugin = vimtex; plugin = vimtex;
config = '' config = /* vim */ ''
let g:tex_flavor='latex' let g:tex_flavor='latex'
let g:vimtex_view_method='zathura' let g:vimtex_view_method='zathura'
let g:tex_conceal='abdmg' let g:tex_conceal='abdmg'
@ -260,7 +262,7 @@ in
] ++ (lib.optionals nixosConfig.sbruder.full [ ] ++ (lib.optionals nixosConfig.sbruder.full [
{ {
plugin = LanguageClient-neovim; plugin = LanguageClient-neovim;
config = '' config = /* vim */ ''
let g:LanguageClient_serverCommands = { let g:LanguageClient_serverCommands = {
\ 'rust': ['${pkgs.rust-analyzer}/bin/rust-analyzer'], \ 'rust': ['${pkgs.rust-analyzer}/bin/rust-analyzer'],
\ 'go': ['${pkgs.gopls}/bin/gopls'], \ 'go': ['${pkgs.gopls}/bin/gopls'],

View file

@ -262,7 +262,7 @@ in
xdg.configFile."swaynag/config".text = xdg.configFile."swaynag/config".text =
let let
# adding it to the header doesnt work since the defaults overwrite it # adding it to the header doesnt work since the defaults overwrite it
commonConfig = '' commonConfig = /* ini */ ''
background=fdf6e3 background=fdf6e3
border-bottom=eee8d5 border-bottom=eee8d5
border=eee8d5 border=eee8d5
@ -270,7 +270,7 @@ in
button-text=657b83 button-text=657b83
''; '';
in in
'' /* ini */ ''
font=Monospace 12 font=Monospace 12
[warning] [warning]
@ -283,7 +283,7 @@ in
''; '';
# Start on tty1 # Start on tty1
programs.zsh.initExtra = '' programs.zsh.initExtra = /* sh */ ''
if [[ -z $WAYLAND_DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then if [[ -z $WAYLAND_DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
export XDG_SESSION_TYPE="wayland" # otherwise set to tty export XDG_SESSION_TYPE="wayland" # otherwise set to tty
unset __HM_SESS_VARS_SOURCED __NIXOS_SET_ENVIRONMENT_DONE # otherwise sessionVariables are not updated unset __HM_SESS_VARS_SOURCED __NIXOS_SET_ENVIRONMENT_DONE # otherwise sessionVariables are not updated

View file

@ -15,7 +15,7 @@ in
defaultTimeout = 5000; defaultTimeout = 5000;
extraConfig = '' extraConfig = /* ini */ ''
[urgency=critical] [urgency=critical]
text-color=#dc322f text-color=#dc322f
ignore-timeout=true ignore-timeout=true

View file

@ -80,7 +80,7 @@ in
}; };
}; };
"custom/screencast" = { "custom/screencast" = {
exec = pkgs.writeScript "screencast-monitor" '' exec = pkgs.writeScript "screencast-monitor" /* python */ ''
#!${pkgs.python3}/bin/python3 #!${pkgs.python3}/bin/python3
import subprocess import subprocess
import sys import sys
@ -226,7 +226,7 @@ in
}; };
"custom/calendar" = { "custom/calendar" = {
interval = 300; interval = 300;
exec = pkgs.writeScript "calendar" '' exec = pkgs.writeScript "calendar" /* python */ ''
#!${pkgs.python3}/bin/python3 #!${pkgs.python3}/bin/python3
import json import json
import subprocess import subprocess

View file

@ -5,7 +5,7 @@
escapeTime = 0; escapeTime = 0;
aggressiveResize = true; aggressiveResize = true;
baseIndex = 1; baseIndex = 1;
extraConfig = '' extraConfig = /* tmux */ ''
# screen behaviour # screen behaviour
unbind C-b unbind C-b
set -g prefix C-a set -g prefix C-a

View file

@ -10,7 +10,7 @@ in
]; ];
xdg.configFile = { xdg.configFile = {
"vdirsyncer/config".text = '' "vdirsyncer/config".text = /* ini */ ''
[general] [general]
status_path = "${config.xdg.configHome}/vdirsyncer/status/" status_path = "${config.xdg.configHome}/vdirsyncer/status/"
@ -49,7 +49,7 @@ in
password.fetch = ["command", "sh", "-c", "pass sbruder.de/mail | head -n 1"] password.fetch = ["command", "sh", "-c", "pass sbruder.de/mail | head -n 1"]
''; '';
"khal/config".text = '' "khal/config".text = /* toml */ ''
[calendars] [calendars]
[[calendar_local]] [[calendar_local]]
@ -68,7 +68,7 @@ in
longdatetimeformat = %Y-%m-%d %H:%M longdatetimeformat = %Y-%m-%d %H:%M
''; '';
"khard/khard.conf".text = '' "khard/khard.conf".text = /* toml */ ''
[addressbooks] [addressbooks]
[[personal]] [[personal]]
path = ~/.contacts/${contactsUuid}/ path = ~/.contacts/${contactsUuid}/

View file

@ -100,7 +100,7 @@ in
(lib.mkBefore '' (lib.mkBefore ''
prompt off # collides with starship prompt off # collides with starship
'') '')
(lib.mkAfter '' (lib.mkAfter /* sh */ ''
eval $(${pkgs.coreutils}/bin/dircolors -b ${dircolors-solarized}/dircolors.ansi-universal) eval $(${pkgs.coreutils}/bin/dircolors -b ${dircolors-solarized}/dircolors.ansi-universal)
# no sad smiley (starship shows exit status) # no sad smiley (starship shows exit status)