diff --git a/common/home/bash/default.nix b/common/home/bash/default.nix index 6dcd0432..3b27ac34 100644 --- a/common/home/bash/default.nix +++ b/common/home/bash/default.nix @@ -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 = '' diff --git a/common/home/bash/programs.nix b/common/home/bash/programs.nix index e00fcc9d..4be98555 100644 --- a/common/home/bash/programs.nix +++ b/common/home/bash/programs.nix @@ -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; diff --git a/common/home/neovim/default.nix b/common/home/neovim/default.nix index 56ed1cf5..8432a543 100644 --- a/common/home/neovim/default.nix +++ b/common/home/neovim/default.nix @@ -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; diff --git a/common/home/tmux/default.nix b/common/home/tmux/default.nix index 2b2ab2e2..88378c06 100644 --- a/common/home/tmux/default.nix +++ b/common/home/tmux/default.nix @@ -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" + ''; }; }; } diff --git a/devices/binto/modules/gpu-replay.nix b/devices/binto/modules/gpu-replay.nix index f28c49a5..21bbf407 100644 --- a/devices/binto/modules/gpu-replay.nix +++ b/devices/binto/modules/gpu-replay.nix @@ -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' + ''; }; }; } diff --git a/devices/oksys/modules/remote-builder.nix b/devices/oksys/modules/remote-builder.nix index d43157a7..be7b0e51 100644 --- a/devices/oksys/modules/remote-builder.nix +++ b/devices/oksys/modules/remote-builder.nix @@ -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 = { diff --git a/devices/servivi/modules/borgbackup.nix b/devices/servivi/modules/borgbackup.nix index 5a07f263..85f86070 100644 --- a/devices/servivi/modules/borgbackup.nix +++ b/devices/servivi/modules/borgbackup.nix @@ -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; }; diff --git a/devices/wim/hardware-configuration.nix b/devices/wim/hardware-configuration.nix index de2b601a..9825bece 100644 --- a/devices/wim/hardware-configuration.nix +++ b/devices/wim/hardware-configuration.nix @@ -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" + ''; }; } diff --git a/home/firefox/addons/default.nix b/home/firefox/addons/default.nix index e5aa2f28..fc75dfd1 100644 --- a/home/firefox/addons/default.nix +++ b/home/firefox/addons/default.nix @@ -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 { diff --git a/home/theme.nix b/home/theme.nix index 91de4e59..113f6282 100644 --- a/home/theme.nix +++ b/home/theme.nix @@ -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";