mirror of
https://github.com/elitak/nixos-infect
synced 2024-11-22 19:23:28 +00:00
Update default nixpkgs version to 21.11 (#85)
* Update default nixpkgs version to 21.11 * Remove unnecessary `networking.firewall.allowPing` option It is a default: https://search.nixos.org/options?channel=21.05&show=networking.firewall.allowPing&from=0&size=50&sort=relevance&type=packages&query=networking.firewall.allowPing
This commit is contained in:
parent
048ef96c7d
commit
1fa358ed0a
2 changed files with 6 additions and 7 deletions
10
README.md
10
README.md
|
@ -45,7 +45,7 @@ and most importantly, simply didn't work for me!
|
|||
|
||||
4) run the script with:
|
||||
```
|
||||
curl https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect | NIX_CHANNEL=nixos-21.05 bash -x
|
||||
curl https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect | NIX_CHANNEL=nixos-21.11 bash -x
|
||||
```
|
||||
|
||||
*NB*: This script wipes out the targeted host's root filesystem when it runs to completion.
|
||||
|
@ -62,7 +62,7 @@ and supply to it the following example yaml stanzas:
|
|||
#cloud-config
|
||||
|
||||
runcmd:
|
||||
- curl https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect | PROVIDER=digitalocean NIX_CHANNEL=nixos-21.05 bash 2>&1 | tee /tmp/infect.log
|
||||
- curl https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect | PROVIDER=digitalocean NIX_CHANNEL=nixos-21.11 bash 2>&1 | tee /tmp/infect.log
|
||||
```
|
||||
|
||||
#### Potential tweaks:
|
||||
|
@ -80,7 +80,7 @@ write_files:
|
|||
environment.systemPackages = with pkgs; [ vim ];
|
||||
}
|
||||
runcmd:
|
||||
- curl https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect | PROVIDER=digitalocean NIXOS_IMPORT=./host.nix NIX_CHANNEL=nixos-21.05 bash 2>&1 | tee /tmp/infect.log
|
||||
- curl https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect | PROVIDER=digitalocean NIXOS_IMPORT=./host.nix NIX_CHANNEL=nixos-21.11 bash 2>&1 | tee /tmp/infect.log
|
||||
```
|
||||
|
||||
|
||||
|
@ -116,7 +116,7 @@ instantiate an Ubuntu box with the following "Startup Script":
|
|||
```bash
|
||||
#!/bin/sh
|
||||
|
||||
curl https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect | NIX_CHANNEL=nixos-21.05 bash
|
||||
curl https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect | NIX_CHANNEL=nixos-21.11 bash
|
||||
```
|
||||
|
||||
Allow for a few minutes over the usual Ubuntu deployment time for NixOS to download & install itself.
|
||||
|
@ -135,7 +135,7 @@ When creating a server provide the following script as "User data":
|
|||
```
|
||||
#!/bin/sh
|
||||
|
||||
curl https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect | NIX_CHANNEL=nixos-21.05 bash 2>&1 | tee /tmp/infect.log
|
||||
curl https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect | NIX_CHANNEL=nixos-21.11 bash 2>&1 | tee /tmp/infect.log
|
||||
```
|
||||
|
||||
#### Tested on
|
||||
|
|
|
@ -29,7 +29,6 @@ makeConf() {
|
|||
|
||||
boot.cleanTmpDir = true;
|
||||
networking.hostName = "$(hostname)";
|
||||
networking.firewall.allowPing = true;
|
||||
services.openssh.enable = true;
|
||||
users.users.root.openssh.authorizedKeys.keys = [$(while read -r line; do echo -n "
|
||||
\"$line\" "; done <<< "$keys")
|
||||
|
@ -269,7 +268,7 @@ infect() {
|
|||
# shellcheck disable=SC1090
|
||||
source ~/.nix-profile/etc/profile.d/nix.sh
|
||||
|
||||
[[ -z "$NIX_CHANNEL" ]] && NIX_CHANNEL="nixos-21.05"
|
||||
[[ -z "$NIX_CHANNEL" ]] && NIX_CHANNEL="nixos-21.11"
|
||||
nix-channel --remove nixpkgs
|
||||
nix-channel --add "https://nixos.org/channels/$NIX_CHANNEL" nixos
|
||||
nix-channel --update
|
||||
|
|
Loading…
Reference in a new issue