style: add lang comments for treesitter language injection
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-01-08 11:25:18 -05:00
parent 4a716fc931
commit 907ad13aa8
10 changed files with 124 additions and 66 deletions

View file

@ -117,6 +117,8 @@
]; ];
shellAliases = { shellAliases = {
# Add whitespace after, to allow
# sudo to inherit all other aliases
sudo = "sudo "; sudo = "sudo ";
frick = "sudo $(fc -ln -1)"; frick = "sudo $(fc -ln -1)";
@ -124,21 +126,36 @@
tree = "tree -a -I node_modules"; tree = "tree -a -I node_modules";
cp = "cp -r"; cp = "cp -r";
chore = "(cd ~/.nix; git add flake.lock; git commit -m 'chore: update flake.lock'; git push)"; chore =
/*
bash
*/
''
(
cd ~/.nix
git add flake.lock
git commit -m 'chore: update flake.lock'
git push
)
'';
}; };
#profileExtra = '' #profileExtra = ''
#''; #'';
bashrcExtra = '' bashrcExtra =
# Check if shell is interactive /*
[[ $- == *i* ]] || return 0 bash
*/
''
# Check if shell is interactive
[[ $- == *i* ]] || return 0
${lib.strings.fileContents ./config/dracula/less.sh} ${lib.strings.fileContents ./config/dracula/less.sh}
${lib.strings.fileContents ./config/dracula/fzf.sh} ${lib.strings.fileContents ./config/dracula/fzf.sh}
${lib.strings.fileContents ./config/colorgrid.sh} ${lib.strings.fileContents ./config/colorgrid.sh}
${lib.strings.fileContents ./config/bashrc} ${lib.strings.fileContents ./config/bashrc}
''; '';
#initExtra = '' #initExtra = ''
#''; #'';
#logoutExtra = '' #logoutExtra = ''

View file

@ -11,7 +11,7 @@
bash.sessionVariables = { bash.sessionVariables = {
# FIXME: why is this not set by home-manager? # FIXME: why is this not set by home-manager?
"RIPGREP_CONFIG_PATH" = "${config.xdg.configHome}/ripgrep/ripgreprc"; RIPGREP_CONFIG_PATH = "${config.xdg.configHome}/ripgrep/ripgreprc";
}; };
ripgrep = { ripgrep = {
enable = true; enable = true;

View file

@ -164,7 +164,11 @@ in {
{ {
plugin = todo-comments-nvim; plugin = todo-comments-nvim;
type = "lua"; type = "lua";
config = "require('todo-comments').setup()"; config =
/*
lua
*/
''require('todo-comments').setup()'';
} }
{ {
plugin = gitsigns-nvim; plugin = gitsigns-nvim;

View file

@ -13,15 +13,19 @@
plugins = with pkgs.tmuxPlugins; [dracula]; plugins = with pkgs.tmuxPlugins; [dracula];
extraConfig = '' extraConfig =
bind-key -n Home send Escape "OH" /*
bind-key -n End send Escape "OF" bash
bind -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M" */
bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M" ''
bind-key -n Home send Escape "OH"
bind-key -n End send Escape "OF"
bind -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
set -ga terminal-overrides ',xterm*:smcup@:rmcup@' set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
set -ga terminal-overrides ",*256col*:Tc" set -ga terminal-overrides ",*256col*:Tc"
''; '';
}; };
}; };
} }

View file

@ -78,21 +78,25 @@ in {
# TODO: add mic sound # TODO: add mic sound
xdg.configFile."gsr.sh" = { xdg.configFile."gsr.sh" = {
executable = true; executable = true;
text = '' text =
export WINDOW=DP-5 /*
export CONTAINER=mkv bash
export QUALITY=very_high */
export CODEC=auto ''
export AUDIO_CODEC=aac export WINDOW=DP-5
export FRAMERATE=60 export CONTAINER=mkv
export REPLAYDURATION=1200 export QUALITY=very_high
export OUTPUTDIR=/home/matt/Videos/Replay export CODEC=auto
export MAKEFOLDERS=yes export AUDIO_CODEC=aac
# export ADDITIONAL_ARGS= export FRAMERATE=60
export REPLAYDURATION=1200
export OUTPUTDIR=/home/matt/Videos/Replay
export MAKEFOLDERS=yes
# export ADDITIONAL_ARGS=
# Disable compositor in X11 for best performance # Disable compositor in X11 for best performance
exec /bin/sh -c 'AUDIO="''${AUDIO_DEVICE:-$(pactl get-default-sink).monitor}"; gpu-screen-recorder -v no -w $WINDOW -c $CONTAINER -q $QUALITY -k $CODEC -ac $AUDIO_CODEC -a "$AUDIO" -f $FRAMERATE -r $REPLAYDURATION -o "$OUTPUTDIR" -mf $MAKEFOLDERS $ADDITIONAL_ARGS' exec /bin/sh -c 'AUDIO="''${AUDIO_DEVICE:-$(pactl get-default-sink).monitor}"; gpu-screen-recorder -v no -w $WINDOW -c $CONTAINER -q $QUALITY -k $CODEC -ac $AUDIO_CODEC -a "$AUDIO" -f $FRAMERATE -r $REPLAYDURATION -o "$OUTPUTDIR" -mf $MAKEFOLDERS $ADDITIONAL_ARGS'
''; '';
}; };
}; };
} }

View file

@ -3,15 +3,19 @@
in { in {
# https://nixos.wiki/wiki/Distributed_build # https://nixos.wiki/wiki/Distributed_build
home-manager.users.root = { home-manager.users.root = {
home.file.".ssh/config".text = '' home.file.".ssh/config".text =
Host ${servivi} /*
# Prevent using ssh-agent or another keyfile, useful for testing ssh_config
IdentitiesOnly yes */
IdentityFile ${config.sops.secrets.nixremote.path} ''
Host ${servivi}
# Prevent using ssh-agent or another keyfile, useful for testing
IdentitiesOnly yes
IdentityFile ${config.sops.secrets.nixremote.path}
# The weakly privileged user on the remote builder if not set, 'root' is used which will hopefully fail # The weakly privileged user on the remote builder if not set, 'root' is used which will hopefully fail
User nixremote User nixremote
''; '';
}; };
programs.ssh.knownHosts = { programs.ssh.knownHosts = {

View file

@ -53,17 +53,29 @@ in {
// { // {
paths = map (x: snapPath + x) v.paths; paths = map (x: snapPath + x) v.paths;
preHook = v.preHook or "" + '' preHook =
if [[ ! -d ${pathPrefix} ]]; then v.preHook
mkdir -p ${pathPrefix} or ""
fi +
/*
bash
*/
''
if [[ ! -d ${pathPrefix} ]]; then
mkdir -p ${pathPrefix}
fi
${pkgs.btrfs-progs}/bin/btrfs subvolume snapshot -r / ${snapPath} ${pkgs.btrfs-progs}/bin/btrfs subvolume snapshot -r / ${snapPath}
''; '';
postHook = '' postHook =
${pkgs.btrfs-progs}/bin/btrfs subvolume delete ${snapPath} /*
'' + v.postHook or ""; bash
*/
''
${pkgs.btrfs-progs}/bin/btrfs subvolume delete ${snapPath}
''
+ v.postHook or "";
}) })
tempJobs; tempJobs;
}; };

View file

@ -84,9 +84,13 @@
services = { services = {
tlp.enable = true; tlp.enable = true;
udev.extraRules = '' udev.extraRules =
# give permanent path to keyboard XF86* binds /*
SUBSYSTEMS=="input", ATTRS{id/product}=="0006", ATTRS{id/vendor}=="0000", SYMLINK += "video-bus" udev
''; */
''
# give permanent path to keyboard XF86* binds
SUBSYSTEMS=="input", ATTRS{id/product}=="0006", ATTRS{id/vendor}=="0000", SYMLINK += "video-bus"
'';
}; };
} }

View file

@ -24,11 +24,15 @@
preferLocalBuild = true; preferLocalBuild = true;
allowSubstitutes = true; allowSubstitutes = true;
buildCommand = '' buildCommand =
dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" /*
mkdir -p "$dst" bash
install -v -m644 "$src" "$dst/${addonId}.xpi" */
''; ''
dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
mkdir -p "$dst"
install -v -m644 "$src" "$dst/${addonId}.xpi"
'';
}); });
packages = import ./generated-firefox-addons.nix { packages = import ./generated-firefox-addons.nix {

View file

@ -50,14 +50,19 @@
xdg.configFile = let xdg.configFile = let
fontSize = lib.strings.floatToString config.vars.fontSize; fontSize = lib.strings.floatToString config.vars.fontSize;
qtconf = '' qtconf =
[Fonts] /*
fixed="Sans Serif,${fontSize},-1,5,50,0,0,0,0,0" ini
general="Sans Serif,${fontSize},-1,5,50,0,0,0,0,0" */
''
[Fonts]
fixed="Sans Serif,${fontSize},-1,5,50,0,0,0,0,0"
general="Sans Serif,${fontSize},-1,5,50,0,0,0,0,0"
[Appearance] [Appearance]
icon_theme=Flat-Remix-Violet-Dark icon_theme=Flat-Remix-Violet-Dark
style=''; style=
'';
in { in {
"Kvantum/Dracula/Dracula.kvconfig".source = "${pkgs.dracula-theme}/share/Kvantum/Dracula-purple-solid/Dracula-purple-solid.kvconfig"; "Kvantum/Dracula/Dracula.kvconfig".source = "${pkgs.dracula-theme}/share/Kvantum/Dracula-purple-solid/Dracula-purple-solid.kvconfig";
"Kvantum/Dracula/Dracula.svg".source = "${pkgs.dracula-theme}/share/Kvantum/Dracula-purple-solid/Dracula-purple-solid.svg"; "Kvantum/Dracula/Dracula.svg".source = "${pkgs.dracula-theme}/share/Kvantum/Dracula-purple-solid/Dracula-purple-solid.svg";