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 = {
# Add whitespace after, to allow
# sudo to inherit all other aliases
sudo = "sudo ";
frick = "sudo $(fc -ln -1)";
@ -124,21 +126,36 @@
tree = "tree -a -I node_modules";
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 = ''
#'';
bashrcExtra = ''
# Check if shell is interactive
[[ $- == *i* ]] || return 0
bashrcExtra =
/*
bash
*/
''
# Check if shell is interactive
[[ $- == *i* ]] || return 0
${lib.strings.fileContents ./config/dracula/less.sh}
${lib.strings.fileContents ./config/dracula/fzf.sh}
${lib.strings.fileContents ./config/dracula/less.sh}
${lib.strings.fileContents ./config/dracula/fzf.sh}
${lib.strings.fileContents ./config/colorgrid.sh}
${lib.strings.fileContents ./config/bashrc}
'';
${lib.strings.fileContents ./config/colorgrid.sh}
${lib.strings.fileContents ./config/bashrc}
'';
#initExtra = ''
#'';
#logoutExtra = ''

View file

@ -11,7 +11,7 @@
bash.sessionVariables = {
# 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 = {
enable = true;

View file

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

View file

@ -13,15 +13,19 @@
plugins = with pkgs.tmuxPlugins; [dracula];
extraConfig = ''
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"
extraConfig =
/*
bash
*/
''
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 ",*256col*:Tc"
'';
set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
set -ga terminal-overrides ",*256col*:Tc"
'';
};
};
}

View file

@ -78,21 +78,25 @@ in {
# TODO: add mic sound
xdg.configFile."gsr.sh" = {
executable = true;
text = ''
export WINDOW=DP-5
export CONTAINER=mkv
export QUALITY=very_high
export CODEC=auto
export AUDIO_CODEC=aac
export FRAMERATE=60
export REPLAYDURATION=1200
export OUTPUTDIR=/home/matt/Videos/Replay
export MAKEFOLDERS=yes
# export ADDITIONAL_ARGS=
text =
/*
bash
*/
''
export WINDOW=DP-5
export CONTAINER=mkv
export QUALITY=very_high
export CODEC=auto
export AUDIO_CODEC=aac
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
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'
'';
# 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'
'';
};
};
}

View file

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

View file

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

View file

@ -84,9 +84,13 @@
services = {
tlp.enable = true;
udev.extraRules = ''
# give permanent path to keyboard XF86* binds
SUBSYSTEMS=="input", ATTRS{id/product}=="0006", ATTRS{id/vendor}=="0000", SYMLINK += "video-bus"
'';
udev.extraRules =
/*
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;
allowSubstitutes = true;
buildCommand = ''
dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
mkdir -p "$dst"
install -v -m644 "$src" "$dst/${addonId}.xpi"
'';
buildCommand =
/*
bash
*/
''
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 {

View file

@ -50,14 +50,19 @@
xdg.configFile = let
fontSize = lib.strings.floatToString config.vars.fontSize;
qtconf = ''
[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"
qtconf =
/*
ini
*/
''
[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]
icon_theme=Flat-Remix-Violet-Dark
style='';
[Appearance]
icon_theme=Flat-Remix-Violet-Dark
style=
'';
in {
"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";