Commit Graph

77 Commits

Author SHA1 Message Date
Cabia Rangris 95c32c17ae
Added cockbox support and documentation (#103)
* Added required modules for Cockbox

* Added cockbox to the docs
2022-06-12 16:17:46 -07:00
Keith 90dbc4b073
Improve flexibility, enable pre-setting NIXOS_CONFIG, & NIXOS_LUSTRATE (#100)
* Improve flexibility, enable pre-setting of NIXOS_CONFIG, and NIXOS_LUSTRATE

* Added success/failure to table

* Use existing swap

* Use existing swap

* Check for exisitng Swap device

* typo fix

* typo fix
2022-04-20 01:17:21 -07:00
Vincent Bernat d9012e22d3
Using sh instead of $SHELL (#96)
Nix install script should be parsed by a Bourne-like shell, like bash
or sh. If the user invokes the script using a Korn shell or a Z Shell,
the script won't work. Nix documentation says to use "sh".
2022-04-03 10:22:32 -07:00
Matthias Tafelmeier 36e19e3b30
infect: have swap usage optional (#91)
Doesn't work everywhere with swapon, e.g. osuosl openstack cluster.

Without swap it can succeed though, it's not a hard prerequisite for the
infection to take effect.
2022-01-03 09:26:23 -08:00
Kid 2ec52a0ede
Enable `zramSwap.enable` by default (#86) 2021-12-30 21:59:08 -08:00
Vincent Bernat be0cbff9e0
Also check for /dev/xvda (Xen) (#88) 2021-12-30 21:58:42 -08:00
Kid 1fa358ed0a
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
2021-12-03 10:53:33 -08:00
asdfasdf 1e2ab19808
Add a search path /home/$SUDO_USER/ for ssh keys (#79) 2021-07-31 10:32:35 -07:00
José Albornoz d4b99a21bf
Update default nix to latest stable 21.05 (#78) 2021-06-19 12:17:08 -07:00
ilian f9dcc164a3
Add support for Oracle Cloud Infrastructure (#77)
* Check environment before making any changes

* Ignore missing dnf in checkEnv

* Add EFI support

* Generate correct file system type config

* Fix XFS tools build error on AArch64 by updating channel

* Add test results for Oracle Cloud Infrastructure

* Fix spacing
2021-06-09 13:45:06 -07:00
Johannes Spangenberg 58edeb3933
Fix prefixLength for gateway6 route (#73) 2021-05-03 23:32:42 -07:00
Robert Scott 69fa0226d3
Add basic NVMe support (#74)
* grubdev detection: also check for /dev/nvme0n1

* add nvme to boot.initrd.kernelModules
2021-05-03 23:21:50 -07:00
mschwaig bdfc7b6a8d
avoid using NIX_PATH in resulting hardware-configuration.nix (#65)
This makes the resulting hardware-configuration.nix usable from a system
that is a nix flake without having to replace that usage of NIX_PATH first.
2020-12-31 22:50:30 -08:00
Akshay Mankar dfc6f222da
Prefer to if to '&&' (#64)
doNetConf check always true

Co-authored-by: Eric Litak <elitak@gmail.com>
2020-12-25 21:35:33 -08:00
Eric Litak a688bfaa0a rewrite loopback namservers to 8.8.8.8 2020-12-10 14:29:38 -08:00
Eric Litak 8df82582c0 removing some cruft 2020-11-27 22:13:34 -08:00
Eric Litak 1f4ca1ba1a nameserver parsing fix 2020-11-24 14:54:19 -08:00
Eric Litak 10e8dfe80a xzcat dep check 2020-11-24 14:23:30 -08:00
Jonas Chevalier f42e554a40
random fixes (#63)
* use the nameservers

That variable was being set, but not used

* fix shellcheck issues
2020-11-23 16:47:55 -08:00
DavHau 30441b1236
Improve providers fix dns (#58)
* remove digitalocean as default; fix digitalocean dns; update channels

fixes #53
fixes #49

* fix doNetConf check
2020-08-21 08:57:57 -07:00
peeech a78d378528
nixos-infect: curl -L to follow 301 redirect (#55) 2020-06-21 14:46:22 -07:00
jleeuwes f5da2577dd
Debian 10 fixes (#51)
* Fix missing curl/wget not being detected

If `which curl` failed, a function `curl` would always be created, whether or not `wget` is present.
So `req curl || req wget` (or even `req curl`) would never trigger `ERROR: Missing both curl and wget`.

* Install curl on Debian

In newer versions of Debian, wget is not installed by default and neither is curl.
So install curl if wget is missing and apt-get is present.
Behavior on other platforms should stay the same with this change.
2020-04-05 13:31:17 -07:00
DavHau 613fa20813
improve authorized_keys parsing (#46) 2020-02-19 15:22:02 -08:00
DavHau d8512ed9d3
add LVM support (#44) 2020-02-13 17:04:27 -08:00
kosmonavtika 0c2eef5dbb use nixos version 19.09 (#42) 2019-11-12 13:14:32 -08:00
Danylo Hlynskyi 38fb735eab Make routes config explicit. (#39)
This helps Hetzner Cloud, which doesn't populate routes by
default and thus network doesn't work.

Fixes https://github.com/elitak/nixos-infect/issues/25
2019-10-11 00:32:54 -07:00
le Duc Banal d28f8f9679 Update nixos-infect (#38)
Fix both issues cited in this [comment](https://github.com/elitak/nixos-infect/issues/18#issuecomment-508904427)
2019-07-07 10:09:47 -07:00
Marek Mahut 6c6e63594d Making swap sooner as dnf under DigitalOcean requires more memory (#36) 2019-05-10 19:42:20 -07:00
asymmetric b95ff459a8 Use if rather than test before rebooting (#35)
* whitespace

* Use if rather than test before rebooting

When the -z returned false, the script would return its error code, 1,
resulting in a failure.
2019-05-05 11:23:09 -07:00
Lorenzo Manacorda a009827712 add NO_REBOOT variable
Useful when nixos-infect is used within programs that manage the
machine's state, like nixops.
2019-04-21 05:41:52 -07:00
asymmetric 2d3b1dffa9 nixos 18.09 -> 19.03
Bump to latest release.
2019-04-19 16:44:08 -07:00
obadz dc533ec3c9 Fix Startup Script issue on Vultr 2018-12-08 17:16:07 -08:00
obadz 5596ad166a Support for Vultr 2018-12-08 02:14:22 -08:00
obadz 20853bf8d8 nixos 18.03 -> 18.09 2018-12-08 02:14:22 -08:00
Danylo Hlynskyi 1f8634dd48 more robust removeSwap
During my nixos-infect tests I have sometimes canceled infection in the middle.
Rerun of nixos-infect failed because there were some old swap files, which
were no longer available as swap devices.

`swapoff -a` will handle this for us (we are going reboot anyway)
2018-07-12 15:04:17 -07:00
Danylo Hlynskyi 89b92f3de1 Fix hardcode of eth0 in several places
The problem was that some VPS (from GigaCloud provider, Ukraine) provided `ens3` interface
name, but after infection it was renamed to `eth0` via udev rules.
2018-07-12 15:02:59 -07:00
ibrahim Sağıroğlu 914dad1039 fix eth1 rule (#17)
* fix eth1 rule

* gateway6 without eth1

* actually use eth0
2018-07-12 15:02:14 -07:00
obadz 82d0ebb06e disable dhcp 2018-06-10 00:25:27 +01:00
Eric Litak 5d08c81d09 one last update to 18.03 2018-04-04 15:28:27 -07:00
obadz f657821bb5
missed one more usage of the old configuration keys 2018-03-24 16:29:49 +00:00
obadz 6f696404e9
update ip4/ip6 configuration keys per 18.03 warnings 2018-03-23 20:37:49 +00:00
zimbatm 5d8c2ed208 NIXOS_IMPORT option
Allow to boot and configure the machine in one go
2017-04-19 00:25:50 +01:00
zimbatm 89c2c6b7f4 disable invalid shellcheck warnings 2017-04-15 17:59:26 +01:00
zimbatm 8f31ebc55d SC2046: Quote this to prevent word splitting 2017-04-15 17:59:26 +01:00
zimbatm e745ee3aa2 don't use bash arrays for values 2017-04-15 17:59:26 +01:00
zimbatm 9c0a833bda SC2006: Use $(STATEMENT) instead of legacy `STATEMENT` 2017-04-15 17:59:26 +01:00
zimbatm 3bd6fe9352 SC2086: Double quote to prevent globbing and word splitting 2017-04-15 17:59:26 +01:00
zimbatm ff398f6447 SC2068: Double quote array expansions to avoid re-splitting elements. 2017-04-15 17:59:26 +01:00
Nicolas Pouillard ffb0e964c3 Revert the `users.users.root` change 2017-04-11 13:43:59 +02:00
Henri Bourcereau 3926cea21a optional eth1, works on OVH VPS 2017-04-10 17:50:09 +02:00