aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xhome/profiles/base-darwin/scripts/0x0.nix152
-rw-r--r--home/profiles/development/default.nix2
-rw-r--r--home/profiles/messaging/default.nix2
-rw-r--r--lib/mk_home.nix2
4 files changed, 79 insertions, 79 deletions
diff --git a/home/profiles/base-darwin/scripts/0x0.nix b/home/profiles/base-darwin/scripts/0x0.nix
index 2d7ef51..a246b6f 100755
--- a/home/profiles/base-darwin/scripts/0x0.nix
+++ b/home/profiles/base-darwin/scripts/0x0.nix
@@ -1,87 +1,87 @@
''
-# Copyright © 2018-2019 Hugo Locurcio and contributors
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in all
-# copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
+ # Copyright © 2018-2019 Hugo Locurcio and contributors
+ #
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
+ # of this software and associated documentation files (the "Software"), to deal
+ # in the Software without restriction, including without limitation the rights
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ # copies of the Software, and to permit persons to whom the Software is
+ # furnished to do so, subject to the following conditions:
+ #
+ # The above copyright notice and this permission notice shall be included in all
+ # copies or substantial portions of the Software.
+ #
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ # SOFTWARE.
-set -euo pipefail
-IFS=$'\n\t'
+ set -euo pipefail
+ IFS=$'\n\t'
-if [[ -t 1 ]]; then
- # stdout is a TTY, enable colors
- STYLE_COMMAND="\\e[0;97m"
- STYLE_ARG="\\e[0;96m"
- STYLE_ERROR="\\e[91m"
- STYLE_BOLD="\\e[1m"
- STYLE_NORMAL="\\e[22m"
- STYLE_RESET="\\e[0m"
-else
- # stdout is not a TTY, disable colors
- STYLE_COMMAND=""
- STYLE_ARG=""
- STYLE_ERROR=""
- STYLE_BOLD=""
- STYLE_NORMAL=""
- STYLE_RESET=""
-fi
+ if [[ -t 1 ]]; then
+ # stdout is a TTY, enable colors
+ STYLE_COMMAND="\\e[0;97m"
+ STYLE_ARG="\\e[0;96m"
+ STYLE_ERROR="\\e[91m"
+ STYLE_BOLD="\\e[1m"
+ STYLE_NORMAL="\\e[22m"
+ STYLE_RESET="\\e[0m"
+ else
+ # stdout is not a TTY, disable colors
+ STYLE_COMMAND=""
+ STYLE_ARG=""
+ STYLE_ERROR=""
+ STYLE_BOLD=""
+ STYLE_NORMAL=""
+ STYLE_RESET=""
+ fi
-# Prints an error message to stderr
-print_error() {
- echo -e "''${STYLE_ERROR}''${STYLE_BOLD}Error:''${STYLE_NORMAL} $1''${STYLE_RESET}" >&2
- exit 1
-}
+ # Prints an error message to stderr
+ print_error() {
+ echo -e "''${STYLE_ERROR}''${STYLE_BOLD}Error:''${STYLE_NORMAL} $1''${STYLE_RESET}" >&2
+ exit 1
+ }
-print_help() {
- base="''${0##*/}"
- echo -e "''${STYLE_BOLD}0x0, a wrapper script for https://0x0.st/''${STYLE_RESET}\n"
- echo -e " Upload a file:"
- echo -e " ''${STYLE_COMMAND}''${base} ''${STYLE_ARG}<file>''${STYLE_RESET}\n"
- echo -e " Upload from an URL (the file won't be fetched locally):"
- echo -e " ''${STYLE_COMMAND}''${base} ''${STYLE_ARG}<url>''${STYLE_RESET}\n"
- echo -e " Upload from standard input:"
- echo -e " ''${STYLE_COMMAND}''${base} ''${STYLE_ARG}-''${STYLE_RESET}\n"
- echo -e "The uploaded file's URL is printed to standard output when the upload is completed."
-}
+ print_help() {
+ base="''${0##*/}"
+ echo -e "''${STYLE_BOLD}0x0, a wrapper script for https://0x0.st/''${STYLE_RESET}\n"
+ echo -e " Upload a file:"
+ echo -e " ''${STYLE_COMMAND}''${base} ''${STYLE_ARG}<file>''${STYLE_RESET}\n"
+ echo -e " Upload from an URL (the file won't be fetched locally):"
+ echo -e " ''${STYLE_COMMAND}''${base} ''${STYLE_ARG}<url>''${STYLE_RESET}\n"
+ echo -e " Upload from standard input:"
+ echo -e " ''${STYLE_COMMAND}''${base} ''${STYLE_ARG}-''${STYLE_RESET}\n"
+ echo -e "The uploaded file's URL is printed to standard output when the upload is completed."
+ }
-case "''${1:-}" in
- # Exit with code 0 only if help was explicitly requested
- -h|--help)
- print_help
- exit 0
- ;;
- ''')
- print_help
- exit 1
- ;;
-esac
+ case "''${1:-}" in
+ # Exit with code 0 only if help was explicitly requested
+ -h|--help)
+ print_help
+ exit 0
+ ;;
+ ''')
+ print_help
+ exit 1
+ ;;
+ esac
-if [[ -f "$1" || "$1" = '-' ]]; then
- # Upload from file or stdin
- curl -F "file=@$1" https://0x0.st
+ if [[ -f "$1" || "$1" = '-' ]]; then
+ # Upload from file or stdin
+ curl -F "file=@$1" https://0x0.st
-elif [[ "$1" =~ ^https?://.* ]]; then
- # Upload from URL
- curl -F "url=$1" https://0x0.st
+ elif [[ "$1" =~ ^https?://.* ]]; then
+ # Upload from URL
+ curl -F "url=$1" https://0x0.st
-elif [[ -d "$1" ]]; then
- print_error "\"$1\" is a directory."
+ elif [[ -d "$1" ]]; then
+ print_error "\"$1\" is a directory."
-else
- print_error "\"$1\": no such file."
-fi
+ else
+ print_error "\"$1\": no such file."
+ fi
''
diff --git a/home/profiles/development/default.nix b/home/profiles/development/default.nix
index a80bbae..17ff953 100644
--- a/home/profiles/development/default.nix
+++ b/home/profiles/development/default.nix
@@ -113,7 +113,7 @@ in
pkgs.sbcl
# pkgs.lispPackages.quicklisp
# pkgs.lispPackages.clwrapper
- (pkgs.python3.withPackages(ps: with ps; [ pynvim ]))
+ (pkgs.python3.withPackages (ps: with ps; [ pynvim ]))
] ++ pkgs.lib.optionals (pkgs.stdenv.isLinux) [
# TODO: currently broken/doesn't support Darwin
pkgs.valgrind
diff --git a/home/profiles/messaging/default.nix b/home/profiles/messaging/default.nix
index 322df5f..eb45cc9 100644
--- a/home/profiles/messaging/default.nix
+++ b/home/profiles/messaging/default.nix
@@ -310,7 +310,7 @@ in
potr
pycrypto
pync
- ]))
+ ]))
availablePlugins.perl
availablePlugins.lua
];
diff --git a/lib/mk_home.nix b/lib/mk_home.nix
index a1466ba..5121c5b 100644
--- a/lib/mk_home.nix
+++ b/lib/mk_home.nix
@@ -19,7 +19,7 @@ let
stateVersion = version;
};
- # Make applications pop up in finder/spotlight
+ # Make applications pop up in finder/spotlight
home.activation = lib.mkIf pkgs.stdenv.isDarwin {
copyApplications =
let