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