examples: add importable-configuration.nix
This replaces minimal-configuration.nix. importable-configuration.nix can be directly added to an existing NixOS configuration. This makes it easy for users to get started quickly.
This commit is contained in:
@@ -28,14 +28,14 @@ if [[ $EUID != 0 ]]; then
|
||||
fi
|
||||
|
||||
interactive=
|
||||
minimalConfig=
|
||||
configuration=
|
||||
for arg in "$@"; do
|
||||
case $arg in
|
||||
-i|--interactive)
|
||||
interactive=1
|
||||
;;
|
||||
--minimal-config)
|
||||
minimalConfig=1
|
||||
*)
|
||||
configuration=$arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@@ -61,9 +61,7 @@ echo "Node info:"
|
||||
c nodeinfo
|
||||
'
|
||||
|
||||
if [[ $minimalConfig ]]; then
|
||||
configuration=minimal-configuration.nix
|
||||
else
|
||||
if [[ ! $configuration ]]; then
|
||||
configuration=configuration.nix
|
||||
demoCmds="${demoCmds}${nodeInfoCmd}"
|
||||
fi
|
||||
@@ -84,7 +82,7 @@ read -d '' src <<EOF || true
|
||||
extra.enableWAN = true;
|
||||
config = { pkgs, config, lib, ... }: {
|
||||
imports = [
|
||||
<${configuration}>
|
||||
$(realpath "$configuration")
|
||||
];
|
||||
nix-bitcoin.generateSecrets = true;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user