From cc6a13c9c68d7e81ec0af7d69f0973ec45252148 Mon Sep 17 00:00:00 2001 From: Brian Hicks Date: Thu, 22 Dec 2022 13:25:52 -0600 Subject: [PATCH] format everything with nixpkgs-fmt --- dotfiles/fzf/default.nix | 3 +- dotfiles/git/default.nix | 11 +- dotfiles/k9s/default.nix | 3 +- dotfiles/kakoune/default.nix | 16 +- dotfiles/tmux/default.nix | 3 +- dotfiles/zsh/default.nix | 57 ++-- flake.nix | 100 +++--- machines/flame/default.nix | 21 +- machines/flame/defaults.nix | 4 +- machines/sequoia/default.nix | 24 +- machines/torch/default.nix | 8 +- machines/torch/hardware-configuration.nix | 15 +- machines/vbox-dev/default.nix | 13 +- machines/vbox-dev/hardware-configuration.nix | 12 +- nixos/brian/default.nix | 8 +- nixos/i3/default.nix | 4 +- nixos/nix/default.nix | 3 +- pkgs/git-gclone/default.nix | 3 +- pkgs/kak-ayu/default.nix | 11 +- pkgs/kak-ayu/node-env.nix | 330 +++++++++++-------- pkgs/kak-ayu/node-packages.nix | 24 +- pkgs/kak-ayu/node.nix | 15 +- pkgs/kak-tree/default.nix | 15 +- pkgs/lazygit-window/default.nix | 3 +- pkgs/tmux-session/default.nix | 9 +- 25 files changed, 413 insertions(+), 302 deletions(-) diff --git a/dotfiles/fzf/default.nix b/dotfiles/fzf/default.nix index 49336fa..3fe2f11 100644 --- a/dotfiles/fzf/default.nix +++ b/dotfiles/fzf/default.nix @@ -11,7 +11,6 @@ ]; changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d"; - changeDirWidgetOptions = - [ "--preview '${pkgs.tree}/bin/tree -C {} | head -200'" ]; + changeDirWidgetOptions = [ "--preview '${pkgs.tree}/bin/tree -C {} | head -200'" ]; }; } diff --git a/dotfiles/git/default.nix b/dotfiles/git/default.nix index f680b7d..c0d009a 100644 --- a/dotfiles/git/default.nix +++ b/dotfiles/git/default.nix @@ -1,10 +1,11 @@ { pkgs, ... }: let - lazygit-config = if pkgs.stdenv.isDarwin then - "Library/Application Support/jesseduffield/lazygit/config.yml" - else - ".config/jesseduffield/lazygit/config.yml"; -in { + lazygit-config = + if pkgs.stdenv.isDarwin + then "Library/Application Support/jesseduffield/lazygit/config.yml" + else ".config/jesseduffield/lazygit/config.yml"; +in +{ programs.git = { enable = true; diff --git a/dotfiles/k9s/default.nix b/dotfiles/k9s/default.nix index fa0ee81..7fb2e85 100644 --- a/dotfiles/k9s/default.nix +++ b/dotfiles/k9s/default.nix @@ -42,7 +42,8 @@ let }; }; }; -in { +in +{ # for non-work contexts, I use a version of k9s that uses the macOS system # directories, but in work contexts I use an (older) version that uses # ~/.k9s. Gotta have both for my skins to work! diff --git a/dotfiles/kakoune/default.nix b/dotfiles/kakoune/default.nix index 99bacf7..b197057 100644 --- a/dotfiles/kakoune/default.nix +++ b/dotfiles/kakoune/default.nix @@ -1,13 +1,17 @@ { pkgs, ... }: let copyCommand = - if pkgs.stdenv.isDarwin then "pbcopy" else "${pkgs.xclip}/bin/xclip -in"; + if pkgs.stdenv.isDarwin + then "pbcopy" + else "${pkgs.xclip}/bin/xclip -in"; pasteCommand = - if pkgs.stdenv.isDarwin then "pbpaste" else "${pkgs.xclip}/bin/xclip -out"; + if pkgs.stdenv.isDarwin + then "pbpaste" + else "${pkgs.xclip}/bin/xclip -out"; - similar-sort-files-cmd = arg: - "git ls-files --others --cached --exclude-standard | ${pkgs.similar-sort}/bin/similar-sort ${arg} | grep -v ${arg} | fzf --tiebreak index"; -in { + similar-sort-files-cmd = arg: "git ls-files --others --cached --exclude-standard | ${pkgs.similar-sort}/bin/similar-sort ${arg} | grep -v ${arg} | fzf --tiebreak index"; +in +{ home.packages = [ # there's no configuration option for shellcheck.kak; it has to be in the PATH # to work! @@ -343,7 +347,7 @@ in { hook global WinSetOption filetype=terraform %{ expandtab-with-width 2 - + evaluate-commands %sh{ if which terraform > /dev/null; then echo 'set-option buffer formatcmd "terraform fmt -"' diff --git a/dotfiles/tmux/default.nix b/dotfiles/tmux/default.nix index bf7b11f..804575c 100644 --- a/dotfiles/tmux/default.nix +++ b/dotfiles/tmux/default.nix @@ -16,7 +16,8 @@ let ${pkgs.git}/bin/git rev-parse --abbrev-ref HEAD fi ''; -in { +in +{ home.packages = [ pkgs.tmux-session ]; programs.tmux = { diff --git a/dotfiles/zsh/default.nix b/dotfiles/zsh/default.nix index a622e48..a7a71e2 100644 --- a/dotfiles/zsh/default.nix +++ b/dotfiles/zsh/default.nix @@ -17,8 +17,9 @@ let extraInitExtra = builtins.foldl' (soFar: new: soFar + "\n" + builtins.readFile new) "" - extras; -in { + extras; +in +{ programs.zsh = { enable = true; @@ -27,37 +28,41 @@ in { enableAutosuggestions = true; enableCompletion = true; - plugins = [{ - name = "fzf-tab"; - src = pkgs.fzf-tab; - }]; + plugins = [ + { + name = "fzf-tab"; + src = pkgs.fzf-tab; + } + ]; - initExtra = '' - EDITOR=hx - export EDITOR + initExtra = + '' + EDITOR=hx + export EDITOR - alias ready='gh pr create --reviewer NoRedInk/team-kraken' + alias ready='gh pr create --reviewer NoRedInk/team-kraken' - # see `man zshoptions` - setopt PROMPT_SUBST # do parameter, command, and arithmetic expansion in prompts - setopt PROMPT_SP # preserve partial lines, adding inverse-colored % after a line + # see `man zshoptions` + setopt PROMPT_SUBST # do parameter, command, and arithmetic expansion in prompts + setopt PROMPT_SP # preserve partial lines, adding inverse-colored % after a line - EMOJI_NEUTRAL=(πŸ˜ƒ πŸ€“ πŸ‘Ύ πŸ€– πŸ’― 🐡 🦍 🐺 🐈 πŸ¦„ πŸ¦… πŸ¦‰ 🐬 πŸ‹ πŸ™ 🌲 🌳 πŸ€ 🍁 πŸ‡ 🍍 🍩 🌍 🌎 🌏 πŸš„ 🚍 🚲 πŸ›΄ 🚑 🚠 πŸš€) - EMOJI_UNHAPPY=(😡 😲 🀑 πŸ‘Ή 😿 πŸ’” πŸ’’) - EMOJI_PROMPT="''${EMOJI_NEUTRAL[$RANDOM % ''${#EMOJI_NEUTRAL[@]}]}" - EMOJI_PROMPT_ERROR="''${EMOJI_UNHAPPY[$RANDOM % ''${#EMOJI_UNHAPPY[@]}]}" + EMOJI_NEUTRAL=(πŸ˜ƒ πŸ€“ πŸ‘Ύ πŸ€– πŸ’― 🐡 🦍 🐺 🐈 πŸ¦„ πŸ¦… πŸ¦‰ 🐬 πŸ‹ πŸ™ 🌲 🌳 πŸ€ 🍁 πŸ‡ 🍍 🍩 🌍 🌎 🌏 πŸš„ 🚍 🚲 πŸ›΄ 🚑 🚠 πŸš€) + EMOJI_UNHAPPY=(😡 😲 🀑 πŸ‘Ή 😿 πŸ’” πŸ’’) + EMOJI_PROMPT="''${EMOJI_NEUTRAL[$RANDOM % ''${#EMOJI_NEUTRAL[@]}]}" + EMOJI_PROMPT_ERROR="''${EMOJI_UNHAPPY[$RANDOM % ''${#EMOJI_UNHAPPY[@]}]}" - PROMPT="%(?.$EMOJI_PROMPT .$EMOJI_PROMPT_ERROR [%F{red}%?%f] )%B%F{blue}%c%f%b %F{blue}Β»%f " - RPROMPT= + PROMPT="%(?.$EMOJI_PROMPT .$EMOJI_PROMPT_ERROR [%F{red}%?%f] )%B%F{blue}%c%f%b %F{blue}Β»%f " + RPROMPT= - # 1password plugins - alias gh="op plugin run -- gh" + # 1password plugins + alias gh="op plugin run -- gh" - # grab Homebrew binaries if needed - if test -d /opt/homebrew/bin; then - export PATH="$PATH:/opt/homebrew/bin" - fi - '' + extraInitExtra; + # grab Homebrew binaries if needed + if test -d /opt/homebrew/bin; then + export PATH="$PATH:/opt/homebrew/bin" + fi + '' + + extraInitExtra; history = { save = 10000; diff --git a/flake.nix b/flake.nix index 63b87f2..2f0bf59 100644 --- a/flake.nix +++ b/flake.nix @@ -126,7 +126,8 @@ # up in this package. I'd love to move it to a real flake, though, # so things would be all in one place! kak-tree = final.callPackage ./pkgs/kak-tree { inherit naersk; }; - in { + in + { comma = final.callPackage inputs.comma { }; # is this going to cause problems by not actually being a package? @@ -152,55 +153,57 @@ kak-tree = kak-tree.kak-tree; - kakounePlugins = let - buildKakounePlugin = name: input: - final.kakouneUtils.buildKakounePlugin { - pname = name; - version = input.rev; - src = input; + kakounePlugins = + let + buildKakounePlugin = name: input: + final.kakouneUtils.buildKakounePlugin { + pname = name; + version = input.rev; + src = input; + }; + in + prev.kakounePlugins // { + active-window = + buildKakounePlugin "active-window" inputs.active-window; + + auto-pairs = final.kakouneUtils.buildKakounePlugin { + pname = "auto-pairs"; + version = "vendored"; + src = ./vendor/auto-pairs.kak; }; - in prev.kakounePlugins // { - active-window = - buildKakounePlugin "active-window" inputs.active-window; - - auto-pairs = final.kakouneUtils.buildKakounePlugin { - pname = "auto-pairs"; - version = "vendored"; - src = ./vendor/auto-pairs.kak; - }; - kak-ayu = final.callPackage ./pkgs/kak-ayu { }; + kak-ayu = final.callPackage ./pkgs/kak-ayu { }; - kak-tmux-command = final.kakouneUtils.buildKakounePlugin { - pname = "kak-tmux-command"; - version = "source"; - src = ./pkgs/kak-tmux-command; - }; + kak-tmux-command = final.kakouneUtils.buildKakounePlugin { + pname = "kak-tmux-command"; + version = "source"; + src = ./pkgs/kak-tmux-command; + }; - kak-tree = kak-tree.kakounePlugins.kak-tree; + kak-tree = kak-tree.kakounePlugins.kak-tree; - kakoune-auto-percent = buildKakounePlugin "kakoune-auto-percent" - inputs.kakoune-auto-percent; + kakoune-auto-percent = buildKakounePlugin "kakoune-auto-percent" + inputs.kakoune-auto-percent; - kakoune-find = - buildKakounePlugin "kakoune-find" inputs.kakoune-find; + kakoune-find = + buildKakounePlugin "kakoune-find" inputs.kakoune-find; - kakoune-idris = - buildKakounePlugin "kakoune-idris" inputs.kakoune-idris; + kakoune-idris = + buildKakounePlugin "kakoune-idris" inputs.kakoune-idris; - kakoune-surround = - buildKakounePlugin "kakoune-surround" inputs.kakoune-surround; + kakoune-surround = + buildKakounePlugin "kakoune-surround" inputs.kakoune-surround; - prelude-kak = buildKakounePlugin "prelude.kak" inputs.prelude-kak; + prelude-kak = buildKakounePlugin "prelude.kak" inputs.prelude-kak; - shellcheck-kak = - buildKakounePlugin "shellcheck.kak" inputs.shellcheck-kak; + shellcheck-kak = + buildKakounePlugin "shellcheck.kak" inputs.shellcheck-kak; - smarttab-kak = - buildKakounePlugin "smarttab.kak" inputs.smarttab-kak; + smarttab-kak = + buildKakounePlugin "smarttab.kak" inputs.smarttab-kak; - tug = buildKakounePlugin "tug" inputs.tug; - }; + tug = buildKakounePlugin "tug" inputs.tug; + }; k9s-skins = final.stdenv.mkDerivation { pname = "k9s-skins"; @@ -219,13 +222,15 @@ ${final.pandoc}/bin/pandoc -s -f markdown -t man $1 | ${final.groff}/bin/groff -T utf8 -man | ${final.less}/bin/less ''; - niv = let - nivSources = import "${inputs.niv}/nix/sources.nix" { }; - nivNixpkgs = import nivSources.nixpkgs { - sources = nivSources; - inherit system; - }; - in (nivNixpkgs.callPackage inputs.niv { }).niv; + niv = + let + nivSources = import "${inputs.niv}/nix/sources.nix" { }; + nivNixpkgs = import nivSources.nixpkgs { + sources = nivSources; + inherit system; + }; + in + (nivNixpkgs.callPackage inputs.niv { }).niv; nix-index = inputs.nix-index.packages.${system}.nix-index; @@ -254,7 +259,10 @@ prev.tree-grepper.overrideAttrs (attrs: { doCheck = false; }); }) ]; - in { + in + { + formatter.aarch64-darwin = inputs.nixpkgs.legacyPackages.aarch64-darwin.nixpkgs-fmt; + nixosConfigurations.torch = inputs.nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; modules = [ diff --git a/machines/flame/default.nix b/machines/flame/default.nix index d07e224..061b67a 100644 --- a/machines/flame/default.nix +++ b/machines/flame/default.nix @@ -1,6 +1,7 @@ -{ config, pkgs, ... }: - -{ +{ config +, pkgs +, ... +}: { # List packages installed in system profile. To search by name, run: # $ nix-env -qaP | grep wget environment.systemPackages = [ @@ -33,12 +34,14 @@ # /etc/nix/nix.conf. github.com/nix-community/linuxkit-nix seems to do the # rest just fine. nix.distributedBuilds = true; - nix.buildMachines = [{ - hostName = "nix-docker"; - system = "x86_64-linux"; - maxJobs = 4; - sshKey = "/etc/nix/docker_rsa"; - }]; + nix.buildMachines = [ + { + hostName = "nix-docker"; + system = "x86_64-linux"; + maxJobs = 4; + sshKey = "/etc/nix/docker_rsa"; + } + ]; # dotfiles home-manager = { diff --git a/machines/flame/defaults.nix b/machines/flame/defaults.nix index 4b69eca..b934b11 100644 --- a/machines/flame/defaults.nix +++ b/machines/flame/defaults.nix @@ -1,6 +1,4 @@ -{ ... }: - -{ +{ ... }: { system.keyboard = { enableKeyMapping = true; diff --git a/machines/sequoia/default.nix b/machines/sequoia/default.nix index b67f246..db4d3e5 100644 --- a/machines/sequoia/default.nix +++ b/machines/sequoia/default.nix @@ -1,6 +1,7 @@ -{ config, pkgs, ... }: - -{ +{ config +, pkgs +, ... +}: { # List packages installed in system profile. To search by name, run: # $ nix-env -qaP | grep wget @@ -25,12 +26,14 @@ # use nixbuild.net for distributed builds nix.distributedBuilds = true; - nix.buildMachines = [{ - hostName = "eu.nixbuild.net"; - system = "x86_64-linux"; - maxJobs = 100; - supportedFeatures = [ "benchmark" "big-parallel" ]; - }]; + nix.buildMachines = [ + { + hostName = "eu.nixbuild.net"; + system = "x86_64-linux"; + maxJobs = 100; + supportedFeatures = [ "benchmark" "big-parallel" ]; + } + ]; nix.extraOptions = '' builders-use-substitutes = true experimental-features = nix-command flakes @@ -38,8 +41,7 @@ programs.ssh.knownHosts = { nixBuild = { hostNames = [ "eu.nixbuild.net" ]; - publicKey = - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPIQCZc54poJ8vqawd8TraNryQeJnvH1eLpIDgbiqymM"; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPIQCZc54poJ8vqawd8TraNryQeJnvH1eLpIDgbiqymM"; }; }; diff --git a/machines/torch/default.nix b/machines/torch/default.nix index 55e7d71..b94e9ee 100644 --- a/machines/torch/default.nix +++ b/machines/torch/default.nix @@ -1,10 +1,10 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running β€˜nixos-help’). -inputs: -{ config, pkgs, ... }: - -{ +inputs: { config + , pkgs + , ... + }: { imports = [ # hardware ./hardware-configuration.nix diff --git a/machines/torch/hardware-configuration.nix b/machines/torch/hardware-configuration.nix index fd777c4..a53324f 100644 --- a/machines/torch/hardware-configuration.nix +++ b/machines/torch/hardware-configuration.nix @@ -1,16 +1,18 @@ # Do not modify this file! It was generated by β€˜nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - -{ +{ config +, lib +, pkgs +, modulesPath +, ... +}: { imports = [ (modulesPath + "/hardware/network/broadcom-43xx.nix") (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = - [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; @@ -25,8 +27,7 @@ fsType = "vfat"; }; - swapDevices = - [{ device = "/dev/disk/by-uuid/1dbbf463-6dc4-46a1-8686-1647374bcc84"; }]; + swapDevices = [{ device = "/dev/disk/by-uuid/1dbbf463-6dc4-46a1-8686-1647374bcc84"; }]; # high-resolution display hardware.video.hidpi.enable = lib.mkDefault true; diff --git a/machines/vbox-dev/default.nix b/machines/vbox-dev/default.nix index db2d58c..1cac793 100644 --- a/machines/vbox-dev/default.nix +++ b/machines/vbox-dev/default.nix @@ -1,11 +1,12 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running β€˜nixos-help’). -inputs: -{ config, pkgs, ... }: - -{ - imports = [ # Include the results of the hardware scan. +inputs: { config + , pkgs + , ... + }: { + imports = [ + # Include the results of the hardware scan. ./hardware-configuration.nix (import ../../nixos/nix inputs) @@ -91,6 +92,4 @@ inputs: # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "21.05"; # Did you read the comment? - } - diff --git a/machines/vbox-dev/hardware-configuration.nix b/machines/vbox-dev/hardware-configuration.nix index b7121e9..d858d90 100644 --- a/machines/vbox-dev/hardware-configuration.nix +++ b/machines/vbox-dev/hardware-configuration.nix @@ -1,13 +1,15 @@ # Do not modify this file! It was generated by β€˜nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - -{ +{ config +, lib +, pkgs +, modulesPath +, ... +}: { imports = [ ]; - boot.initrd.availableKernelModules = - [ "ata_piix" "ohci_pci" "sd_mod" "sr_mod" ]; + boot.initrd.availableKernelModules = [ "ata_piix" "ohci_pci" "sd_mod" "sr_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; diff --git a/nixos/brian/default.nix b/nixos/brian/default.nix index d764ce3..dc1cf22 100644 --- a/nixos/brian/default.nix +++ b/nixos/brian/default.nix @@ -1,4 +1,7 @@ -{ pkgs, config, ... }: { +{ pkgs +, config +, ... +}: { environment.shells = [ pkgs.zsh ]; users.users.brian = { @@ -36,8 +39,7 @@ compression = "auto,zlib,6"; encryption.mode = "repokey-blake2"; - encryption.passCommand = - "cat /home/brian/.ssh/borgbase-brian-home-encryption-key"; + encryption.passCommand = "cat /home/brian/.ssh/borgbase-brian-home-encryption-key"; environment.BORG_RSH = "ssh -i /home/brian/.ssh/borgbase_ed25519"; diff --git a/nixos/i3/default.nix b/nixos/i3/default.nix index c43f62b..3e1bb2d 100644 --- a/nixos/i3/default.nix +++ b/nixos/i3/default.nix @@ -187,9 +187,7 @@ # this to work! ${pkgs.polybarFull}/bin/polybar-msg cmd quit - ${pkgs.polybarFull}/bin/polybar --config=${ - ./polybar.ini - } top 2>&1 | tee -a /tmp/polybar-top.log & disown + ${pkgs.polybarFull}/bin/polybar --config=${./polybar.ini} top 2>&1 | tee -a /tmp/polybar-top.log & disown '' }/bin/launch-polybar.sh diff --git a/nixos/nix/default.nix b/nixos/nix/default.nix index dac0e63..782876f 100644 --- a/nixos/nix/default.nix +++ b/nixos/nix/default.nix @@ -1,5 +1,4 @@ -inputs: -{ pkgs, ... }: { +inputs: { pkgs, ... }: { nix = { package = pkgs.nixUnstable; extraOptions = '' diff --git a/pkgs/git-gclone/default.nix b/pkgs/git-gclone/default.nix index 76f1035..8ae851a 100644 --- a/pkgs/git-gclone/default.nix +++ b/pkgs/git-gclone/default.nix @@ -8,8 +8,7 @@ pkgs.stdenv.mkDerivation { mkdir -p $out/bin cp ./git-gclone.sh $out/bin/git-gclone wrapProgram $out/bin/git-gclone --prefix PATH : ${ - pkgs.lib.makeBinPath [ pkgs.git ] + pkgs.lib.makeBinPath [pkgs.git] } ''; } - diff --git a/pkgs/kak-ayu/default.nix b/pkgs/kak-ayu/default.nix index ab4a88a..df03c08 100644 --- a/pkgs/kak-ayu/default.nix +++ b/pkgs/kak-ayu/default.nix @@ -1,8 +1,11 @@ -{ pkgs ? import { inherit system; }, system ? builtins.currentSystem +{ pkgs ? import { inherit system; } +, system ? builtins.currentSystem +, }: - -let builder = (import ./node.nix { inherit pkgs system; }).package; -in with pkgs; +let + builder = (import ./node.nix { inherit pkgs system; }).package; +in +with pkgs; stdenv.mkDerivation { name = "kak-ayu"; src = ./fakesrc; diff --git a/pkgs/kak-ayu/node-env.nix b/pkgs/kak-ayu/node-env.nix index 2590dd2..4166162 100644 --- a/pkgs/kak-ayu/node-env.nix +++ b/pkgs/kak-ayu/node-env.nix @@ -1,15 +1,29 @@ # This file originates from node2nix - -{lib, stdenv, nodejs, python2, pkgs, libtool, runCommand, writeTextFile, writeShellScript}: - +{ lib +, stdenv +, nodejs +, python2 +, pkgs +, libtool +, runCommand +, writeTextFile +, writeShellScript +, +}: let # Workaround to cope with utillinux in Nixpkgs 20.09 and util-linux in Nixpkgs master - utillinux = if pkgs ? utillinux then pkgs.utillinux else pkgs.util-linux; + utillinux = + if pkgs ? utillinux + then pkgs.utillinux + else pkgs.util-linux; - python = if nodejs ? python then nodejs.python else python2; + python = + if nodejs ? python + then nodejs.python + else python2; # Create a tar wrapper that filters all the 'Ignoring unknown extended header keyword' noise - tarWrapper = runCommand "tarWrapper" {} '' + tarWrapper = runCommand "tarWrapper" { } '' mkdir -p $out/bin cat > $out/bin/tar < { +{ pkgs ? import { inherit system; - }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-16_x"}: - + } +, system ? builtins.currentSystem +, nodejs ? pkgs."nodejs-16_x" +, +}: let nodeEnv = import ./node-env.nix { inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript; inherit pkgs nodejs; - libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; + libtool = + if pkgs.stdenv.isDarwin + then pkgs.darwin.cctools + else null; }; in import ./node-packages.nix { diff --git a/pkgs/kak-tree/default.nix b/pkgs/kak-tree/default.nix index 066a540..e3bf389 100644 --- a/pkgs/kak-tree/default.nix +++ b/pkgs/kak-tree/default.nix @@ -1,4 +1,7 @@ -{ pkgs, naersk, ... }: +{ pkgs +, naersk +, ... +}: let src = pkgs.fetchgit { url = "https://github.com/ul/kak-tree.git"; @@ -6,7 +9,8 @@ let sha256 = "1xd5qa8im0rjplp23v2fymh80kp1z25r7fd1v65s5wndxd49c0cs"; fetchSubmodules = true; }; -in { +in +{ kakounePlugins.kak-tree = pkgs.kakouneUtils.buildKakounePlugin { pname = "kak-tree"; version = src.rev; @@ -15,9 +19,10 @@ in { kak-tree = naersk.buildPackage { root = src; - cargoBuildOptions = (defaults: - defaults ++ [ + cargoBuildOptions = defaults: + defaults + ++ [ ''--features "bash css elm haskell html javascript json python ruby"'' - ]); + ]; }; } diff --git a/pkgs/lazygit-window/default.nix b/pkgs/lazygit-window/default.nix index b2ad597..cdb56b9 100644 --- a/pkgs/lazygit-window/default.nix +++ b/pkgs/lazygit-window/default.nix @@ -10,8 +10,7 @@ pkgs.stdenv.mkDerivation { mkdir -p $out/bin cp ./lazygit-window.sh $out/bin/lazygit-window wrapProgram $out/bin/lazygit-window --prefix PATH : ${ - pkgs.lib.makeBinPath [ pkgs.tmux pkgs.lazygit ] + pkgs.lib.makeBinPath [pkgs.tmux pkgs.lazygit] } ''; } - diff --git a/pkgs/tmux-session/default.nix b/pkgs/tmux-session/default.nix index 4b8239f..849da82 100644 --- a/pkgs/tmux-session/default.nix +++ b/pkgs/tmux-session/default.nix @@ -1,4 +1,7 @@ -{ sources ? import ../../nix/sources.nix, pkgs ? import sources.nixpkgs { } }: +{ sources ? import ../../nix/sources.nix +, pkgs ? import sources.nixpkgs { } +, +}: pkgs.stdenv.mkDerivation { name = "tmux-session"; src = ./.; @@ -8,12 +11,12 @@ pkgs.stdenv.mkDerivation { mkdir -p $out/bin cp ./tmux-session $out/bin/tmux-session wrapProgram $out/bin/tmux-session --prefix PATH : ${ - pkgs.lib.makeBinPath [ pkgs.tmux ] + pkgs.lib.makeBinPath [pkgs.tmux] } cp ./tmux-jump $out/bin/tmux-jump wrapProgram $out/bin/tmux-jump --prefix PATH : ${ - pkgs.lib.makeBinPath [ pkgs.findutils pkgs.fzf ] + pkgs.lib.makeBinPath [pkgs.findutils pkgs.fzf] } ''; }