commit 7d4510217a5ce286c73244026e37fa9c3ea26c16 parent 90e1700d7afc70e11fbe5791de1601a3bbf285e8 Author: Vincent Demeester <vincent@sbr.pm> Date: Wed, 25 Nov 2020 17:15:31 +0100 pkgs: group my scripts under a folder… … call `my` 😅 Signed-off-by: Vincent Demeester <vincent@sbr.pm> Diffstat:
29 files changed, 11 insertions(+), 135 deletions(-)
diff --git a/overlays/sbr.nix b/overlays/sbr.nix @@ -3,19 +3,13 @@ let compileEmacsFiles = super.callPackage ./emacs/builder.nix; in rec { - scripts = import ../pkgs/scripts { + scripts = import ../pkgs/my/scripts { inherit (self) stdenv; }; - tmux-tpm = import ../pkgs/tmux-tpm { - inherit (self) stdenv lib fetchFromGitHub; - }; - vscodeliveshare = import ../pkgs/vscodeliveshare { - inherit (self) stdenv vscode-utils autoPatchelfHook xorg gnome3 utillinux openssl icu zlib curl lttng-ust libsecret libkrb5 gcc libunwind binutils; - }; - vrsync = import ../pkgs/vrsync { + vrsync = import ../pkgs/my/vrsync { inherit (self) stdenv lib; }; - vde-thinkpad = import ../pkgs/vde-thinkpad { + vde-thinkpad = import ../pkgs/my/vde-thinkpad { inherit (self) stdenv lib; }; bekind = super.callPackage ../tools/bekind { }; diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -32,10 +32,9 @@ let in rec { # pre nur-packages import - scripts = pkgs.callPackage ./scripts { }; - tmux-tpm = pkgs.callPackage ./tmux-tpm { }; - vrsync = pkgs.callPackage ./vrsync { }; - vde-thinkpad = pkgs.callPackage ./vde-thinkpad { }; + scripts = pkgs.callPackage ./my/scripts { }; + vrsync = pkgs.callPackage ./my/vrsync { }; + vde-thinkpad = pkgs.callPackage ./my/vde-thinkpad { }; bus = pkgs.callPackage ../tools/bus { }; bekind = pkgs.callPackage ../tools/bekind { }; diff --git a/pkgs/scripts/bin/authkey b/pkgs/my/scripts/bin/authkey diff --git a/pkgs/scripts/bin/che-inst b/pkgs/my/scripts/bin/che-inst diff --git a/pkgs/scripts/bin/chos4 b/pkgs/my/scripts/bin/chos4 diff --git a/pkgs/scripts/bin/decode-kubernetes-secrets.py b/pkgs/my/scripts/bin/decode-kubernetes-secrets.py diff --git a/pkgs/my/scripts/bin/git-remote-setup b/pkgs/my/scripts/bin/git-remote-setup @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +# Initialize a git repo and add my remotes +git init +git remote add sbr "git.sbr.system:git/$1" diff --git a/pkgs/scripts/bin/import-photos b/pkgs/my/scripts/bin/import-photos diff --git a/pkgs/scripts/bin/knix b/pkgs/my/scripts/bin/knix diff --git a/pkgs/scripts/bin/op-inst b/pkgs/my/scripts/bin/op-inst diff --git a/pkgs/scripts/bin/pbcopy b/pkgs/my/scripts/bin/pbcopy diff --git a/pkgs/scripts/bin/pbpaste b/pkgs/my/scripts/bin/pbpaste diff --git a/pkgs/scripts/bin/redhat-vpn b/pkgs/my/scripts/bin/redhat-vpn diff --git a/pkgs/scripts/bin/shot b/pkgs/my/scripts/bin/shot diff --git a/pkgs/scripts/bin/shotf b/pkgs/my/scripts/bin/shotf diff --git a/pkgs/scripts/bin/tktl b/pkgs/my/scripts/bin/tktl diff --git a/pkgs/scripts/bin/vpnpass b/pkgs/my/scripts/bin/vpnpass diff --git a/pkgs/scripts/builder.sh b/pkgs/my/scripts/builder.sh diff --git a/pkgs/scripts/default.nix b/pkgs/my/scripts/default.nix diff --git a/pkgs/vde-thinkpad/default.nix b/pkgs/my/vde-thinkpad/default.nix diff --git a/pkgs/vde-thinkpad/dock b/pkgs/my/vde-thinkpad/dock diff --git a/pkgs/vrsync/default.nix b/pkgs/my/vrsync/default.nix diff --git a/pkgs/vrsync/foo b/pkgs/my/vrsync/foo diff --git a/pkgs/vrsync/vrsync b/pkgs/my/vrsync/vrsync diff --git a/pkgs/scripts/bin/up b/pkgs/scripts/bin/up @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -# -*- coding: utf-8 -*- -# Author: Vincent Demeester <vincent@sbr.pm> -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# up is my main command I wanna run in the morning, it should try to be smart -DEFAULTS_ARGS="home-manager redhat-vpn" -ARGS=${@} - -[[ -z ${@} ]] && ARGS="${DEFAULTS_ARGS}" - -for script in ${ARGS}; do - command -v up-$script 2>/dev/null >/dev/null || { - echo up-$script is missing - } -done - -for script in ${ARGS}; do - up-$script -done diff --git a/pkgs/scripts/bin/up-home-manager b/pkgs/scripts/bin/up-home-manager @@ -1,48 +0,0 @@ -#!/usr/bin/env bash -# -*- coding: utf-8 -*- -# Author: Vincent Demeester <vincent@sbr.pm> -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# --- -# up-home-manager updates home-manager -update=no -pull=yes - -TARGETS=switch - -set -ue -while getopts "un" o; do - case "${o}" in - u) - update=yes - ;; - n) - pull=no - ;; - *) - echo "Invalid option"; exit 1; - ;; - esac -done -shift $((OPTIND-1)) - -cd $HOME/.config/nixpkgs/ -if [[ "$pull" == "yes" ]]; then - git pull --rebase --autostash -fi -if [[ "$update" == "yes" ]]; then - TARGETS="update $TARGETS" -fi - -make $TARGETS -cd - diff --git a/pkgs/scripts/bin/up-redhat-vpn b/pkgs/scripts/bin/up-redhat-vpn @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -# -*- coding: utf-8 -*- -# Author: Vincent Demeester <vincent@sbr.pm> -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# --- -redhat-vpn diff --git a/pkgs/tmux-tpm/builder.sh b/pkgs/tmux-tpm/builder.sh @@ -1,5 +0,0 @@ -source $stdenv/setup - -echo $out -mkdir -p $out -cp -R $src/* $out/ diff --git a/pkgs/tmux-tpm/default.nix b/pkgs/tmux-tpm/default.nix @@ -1,22 +0,0 @@ -{ stdenv, lib, fetchFromGitHub }: - -stdenv.mkDerivation rec { - name = "tmux-tpm"; - rev = "06d41226af02ca4f5bcf58169dd4f0a2aa42218c"; - version = "20200218-${lib.strings.substring 0 7 rev}"; - - src = fetchFromGitHub { - inherit rev; - owner = "tmux-plugins"; - repo = "tpm"; - sha256 = "1ap5x761abcpw6wd6jb575rws88prkpjygjks9cibvws59xsnki4"; - }; - - builder = ./builder.sh; - - meta = { - description = "Tmux Plugin Manager"; - homepage = "https://github.com/tmux-plugins/tpm"; - license = lib.licenses.mit; - }; -}