mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 07:53:55 -05:00
hoenn: allow cli override of variable names
This commit is contained in:
parent
fb75cd9ec9
commit
3ecdcd5ff6
|
@ -5,9 +5,9 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
hoenn = pkgs.writeShellScriptBin "hoenn" ''
|
hoenn = pkgs.writeShellScriptBin "hoenn" ''
|
||||||
FLAKE="github:alyraffauf/nixcfg"
|
FLAKE=''${FLAKE:-"github:alyraffauf/nixcfg"}
|
||||||
HOST=${config.networking.hostName}
|
HOST=''${HOST:-${config.networking.hostName}}
|
||||||
FLAKE_SRC="https://github.com/alyraffauf/nixcfg.git"
|
GIT=''${GIT:-"https://github.com/alyraffauf/nixcfg.git"}
|
||||||
|
|
||||||
if [ "$1" = "sync" ]; then
|
if [ "$1" = "sync" ]; then
|
||||||
if [ "$2" == "" ] || [ "$2" == "now" ]; then
|
if [ "$2" == "" ] || [ "$2" == "now" ]; then
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
sudo ${pkgs.nix}/bin/nix-collect-garbage -d
|
sudo ${pkgs.nix}/bin/nix-collect-garbage -d
|
||||||
exit 0;
|
exit 0;
|
||||||
elif [ "$1" == "clone" ]; then
|
elif [ "$1" == "clone" ]; then
|
||||||
${pkgs.git}/bin/git clone $FLAKE_SRC
|
${pkgs.git}/bin/git clone $GIT
|
||||||
cd nixcfg
|
cd nixcfg
|
||||||
exit 0;
|
exit 0;
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue