Compare commits
No commits in common. "8adb055557e77a168cb42ccd076823ab4d901a77" and "983b89a5f44e12ad87256bc4f34534853edd69f3" have entirely different histories.
8adb055557
...
983b89a5f4
2 changed files with 0 additions and 37 deletions
12
README.md
12
README.md
|
@ -1,17 +1,5 @@
|
||||||
# Usefull commands
|
# Usefull commands
|
||||||
|
|
||||||
## Auto-install
|
|
||||||
|
|
||||||
```bash
|
|
||||||
curl -sSL https://git.mrdev023.fr/florian.richer/nixos/raw/branch/main/auto_install.sh | bash -s -- hostname --disk main /dev/XXX
|
|
||||||
```
|
|
||||||
|
|
||||||
or is auto_install.sh is in current folder
|
|
||||||
|
|
||||||
```bash
|
|
||||||
./auto_install.sh hostname --disk main /dev/XXX
|
|
||||||
```
|
|
||||||
|
|
||||||
## Configure
|
## Configure
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
if [ -e "flake.nix" ]; then
|
|
||||||
flake_url=.
|
|
||||||
echo "Log: flake.nix detected use '$flake_url' as flake url"
|
|
||||||
else
|
|
||||||
echo "File '$file' does not exist."
|
|
||||||
flake_url=git+https://git.mrdev023.fr/florian.richer/nixos.git?ref=dev-disko
|
|
||||||
echo "Log: flake.nix not detected use '$flake_url' as flake url"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
available_values=$(nix eval --extra-experimental-features 'nix-command flakes' "$flake_url#nixosConfigurations" --json --apply builtins.attrNames)
|
|
||||||
echo "Error: Hostsname is required. Please add the first parameter with one of the following list $available_values."
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
flake_name=$1
|
|
||||||
disko_install_args=("${@:2}")
|
|
||||||
echo "Log: Use $flake_name flake name with with '${disko_install_args[@]}' as arguments"
|
|
||||||
fi
|
|
||||||
|
|
||||||
sudo nix run --extra-experimental-features 'nix-command flakes' \
|
|
||||||
'github:nix-community/disko/latest#disko-install' -- \
|
|
||||||
--flake "$flake_url#$flake_name" \
|
|
||||||
${disko_install_args[@]}
|
|
Loading…
Add table
Add a link
Reference in a new issue