Commit Graph

301 Commits

Author SHA1 Message Date
Franz Pletz
0f5cd17f2c
nixos-generate-config: add programs options examples 2017-09-23 20:03:19 +02:00
Jörg Thalheim
7d5633ea7a Merge pull request #27342 from lheckemann/installer-changes
Installer changes
2017-09-15 16:19:11 +01:00
Eelco Dolstra
6dad1f70ce
nix: 1.11.14 -> 1.11.15 2017-09-15 16:38:33 +02:00
Graham Christensen
8a11b0d7df Merge pull request #28775 from grahamc/describe-stateVersion
Document the stateVersion more
2017-08-31 06:47:09 -04:00
Eelco Dolstra
79954b9d1f
nix: 1.11.13 -> 1.11.14 2017-08-31 11:00:09 +02:00
Graham Christensen
8efb46b609
configuration.nix: Document the stateVersion more 2017-08-30 21:41:35 -04:00
Graham Christensen
af51aa79d2
installer: add a comment hinting about enabling libinput for touchpads 2017-08-30 20:24:36 -04:00
Pascal Bach
322d0c562c auto-upgrade: add proxy support
Add the proxy variables so that auto upgrade works behind a proxy.
2017-08-30 01:25:47 +02:00
Eelco Dolstra
17642b5fd0
nix: 1.11.12 -> 1.11.13 2017-07-18 10:54:01 +02:00
Eelco Dolstra
40cf34aaae
nix: 1.11.11 -> 1.11.12 2017-07-13 16:37:11 +02:00
Linus Heckemann
77ce02201e nixos-install: use FIFO for system closure
This avoids running out of space in space-constrained environments,
e.g. VMs with relatively small amounts of memory and tmp on tmpfs
2017-07-13 06:30:24 +01:00
Linus Heckemann
8b1f1d93fa nixos-install: only search for nixpkgs when needed 2017-07-13 06:26:44 +01:00
Linus Heckemann
fa5700544b nixos-install: quote nixos-prepare-root arguments
This prevents the script from breaking when channel_root is empty.
2017-07-12 21:58:25 +01:00
Eelco Dolstra
707703185d
nixos-rebuild: Respect empty NIX_REMOTE
Fixes #11384.

Note: in Nix 1.12, you can set NIX_REMOTE to "local" to avoid
ambiguity.
2017-07-07 11:58:10 +02:00
Eelco Dolstra
5446934b41
nix: 1.11.10 -> 1.11.11
(cherry picked from commit 7b1e936b24ca60810cdb6d46b68300cd179836f1)
2017-06-19 19:03:39 +02:00
Eelco Dolstra
0bffe03828
nix: 1.11.9 -> 1.11.10 2017-06-12 20:13:27 +02:00
Jörg Thalheim
361314ca71
nixos-prepare-root: force symlink at /run
Otherwise a reinstall will fail.
2017-05-01 16:10:58 +02:00
Eelco Dolstra
e4190943c8
nix: 1.11.8 -> 1.11.9 2017-04-25 17:19:10 +02:00
Dan Peebles
f1708a9d7d make-disk-image: change to be less VM-centric
This changes much of the make-disk-image.nix logic (and thus most NixOS
image building) to use LKL to set up the target directory structure rather
than a Linux VM. The only work we still do in a VM is less IO-heavy stuff
that while still time-consuming, is less of the overall load. The goal is
to kill more of that stuff, but that will require deeper changes to NixOS
activation scripts and switch-to-configuration.pl, and I don't want to
bite off too much at once.
2017-04-24 02:30:00 +00:00
Dan Peebles
d990aa7163 Refactor nixos-install to separate out filesystem build logic
The key distinction I'm drawing is that there's a component that deals
with the store of the machine being built, and another component for
the store building it. The inner part of it assumes nothing from the
builder (doesn't need chroot or root powers) so it can run comfortably
inside a Nix build, as well as nixos-rebuild. I have some upcoming work
that will use that to significantly speed up and streamline image builds
for NixOS, especially on virtualized hosts like EC2, but it's also a
reasonable speedup on native hosts.
2017-04-16 16:09:41 +00:00
Eelco Dolstra
2cb25f8b59
nix: 1.11.7 -> 1.11.8 2017-03-21 14:49:23 +01:00
Franz Pletz
fb50cde71e
nixos/treewide: systemd.time is in manvolume 7
cc #23396
2017-03-21 08:28:53 +01:00
Eelco Dolstra
d72a34311a
Remove nixFallback
This causes unintended schema upgrades, and is no longer needed now
that we have nixos/modules/installer/tools/nix-fallback-paths.nix.
2017-03-06 15:54:50 +01:00
Thomas Tuegel
d91637c546
nixos-generate-config: rename plasma5 desktop 2017-03-03 07:28:29 -06:00
Eelco Dolstra
8e1fa01f3a
nix: 1.11.6 -> 1.11.7 2017-02-24 12:53:53 +01:00
Eelco Dolstra
14c47bd546 Merge pull request #22758 from dezgeg/pr-nixos-rebuild
nixos-rebuild: Don't rebuild nixos-rebuild when --fast is used
2017-02-14 16:35:43 +01:00
Parnell Springmeyer
467bb3f674
/run/wrapper is not a filesystem, no need to skip it 2017-02-14 07:32:24 -06:00
Parnell Springmeyer
9e36a58649
Merging against upstream master 2017-02-13 17:16:28 -06:00
Tuomas Tynkkynen
2000f0941e nixos-rebuild: Don't build nixos-rebuild with --fast 2017-02-13 21:52:32 +02:00
Tuomas Tynkkynen
23fee8bfbd nixos-rebuild: Support passing e.g. '-j8'
Where there is no space between '-j' and the number.
2017-02-13 21:52:30 +02:00
Graham Christensen
b12564cc1b
nixos: update default cases from KDM/KDE4 to SDDM/KDE5 2017-02-09 21:52:00 -05:00
taku0
8dfa60ce73 nixos-generate-config.pl, all-hardware.nix: Add support for Hyper-V 2017-02-05 18:22:26 +09:00
Guillaume Maudoux
698f178d4e default nixos config: add firewall options.
By showing how to open ports in the firewall and how to disable it, we make users aware that there is a firewall enabled by default.
2017-02-03 16:45:11 +01:00
Parnell Springmeyer
4aa0923009
Getting rid of the var indirection and using a bin path instead 2017-01-29 04:11:01 -06:00
Parnell Springmeyer
e92b8402b0
Addressing PR feedback 2017-01-28 20:48:03 -08:00
Parnell Springmeyer
a26a796d5c
Merging against master - updating smokingpig, rebase was going to be messy 2017-01-26 02:00:04 -08:00
Parnell Springmeyer
025555d7f1
More fixes and improvements 2017-01-26 00:05:40 -08:00
Parnell Springmeyer
bae00e8aa8
setcap-wrapper: Merging with upstream master and resolving conflicts 2017-01-25 11:08:05 -08:00
Eelco Dolstra
96b6968950
nix: 1.11.5 -> 1.11.6 2017-01-13 11:38:09 +01:00
Eelco Dolstra
0108c31e22
nix: 1.11.4 -> 1.11.5 2017-01-03 11:25:38 +01:00
gnidorah
90deca3a0c nixos-generate-config: detect CPU governor
* cpu-freq: Try powersave if ondemand is not available

* Revert "cpu-freq: Try powersave if ondemand is not available"

This reverts commit 4dc56db37e32dcfecd667ebbf88263e47b296097.
Consult available scaling governors; for freshly generated configs, this provides a better experience than relying on a default that might not work everywhere.
2017-01-02 17:20:28 +01:00
Maximilian Güntner
0cf907ae12
nixos-rebuild: Fix SSHOPTS typo
Signed-off-by: Maximilian Güntner <code@klandest.in>
2016-12-18 22:39:27 +01:00
Eric Sagnes
e14de56613 module system: extensible option types 2016-11-06 00:05:58 +01:00
Joachim Fasting
645ff13a4b
nixos autoUpgrade: fix use of startAt
`startAt = ""` as in `startAt = optionalString false ...` results
in an invalid timer unit (due to "" being promoted to a singleton
list and not filtered out).

Ref: c9941c4b5ef7acc1cb8d734acb383410d99c01ba
2016-10-23 17:56:39 +02:00
Tuomas Tynkkynen
a34ec1517f nixos-install: Bug fix for root password not being asked
Since some changes to the setuid wrappers, there is a symlink involved
and it doesn't resolve correctly inside the chroot. Do the check inside
the chroot to make it work again.
2016-09-29 23:17:53 +03:00
obadz
1c9ac8aabc grub: add boot.loader.grub.efiInstallAsRemovable
Closes #16374
2016-09-16 18:02:36 +01:00
Eelco Dolstra
f2ddf2a9be nix: 1.11.3 -> 1.11.4 2016-09-06 16:15:22 +02:00
Eelco Dolstra
1fef99942e nixos-rebuild: Move the Nix fallback store paths into a separate file 2016-09-06 16:07:47 +02:00
obadz
3f1ceae281 Partially revert "Revert "nixos: remove rsync from base install and add explicit path in nixos-install""
This partially reverts commit 0aa75206705afc71b991cceeede644c87088d583.

Fine for rsync to be in system path but we still need the explicit path
in nixos-install in case it is invoked from non-NixOS systems and also
to fix OVA test failure

See also 0aa7520670

cc @edolstra
2016-09-06 11:49:03 +01:00
Eelco Dolstra
0aa7520670 Revert "nixos: remove rsync from base install and add explicit path in nixos-install"
This reverts commit 582313bafef4c81cb6df2dcf2ece4757eb5c8082.

Removing rsync is actually pointless because nixos-install depends on
it. So if it's part of the system closure, we may as well provide it
to users.

Probably with the next Nix release we can drop the use of rsync and
use "nix copy" instead.
2016-09-05 13:45:59 +02:00
Alexander Ried
1542bddcc8 nixos-install.sh: Create /var (#18266)
Got lost in a6670c1a0b8cda8235296900cff950f39f60cf4f
2016-09-03 19:17:44 +02:00
Parnell Springmeyer
98c058a1ee Adapting everything for the merged permissions wrappers work. 2016-09-01 19:21:06 -05:00
Parnell Springmeyer
81b33eb466 security: Updating the machinery for creating the wrapper programs dir in var and updating ping and ping6 for changed config interface. 2016-09-01 19:16:36 -05:00
Parnell Springmeyer
6fe93ae42a installer: adding perl 'next if' skip command for setcap-wrappers dir 2016-09-01 19:15:09 -05:00
Parnell Springmeyer
00dc2c559c installer: adding mkdir command for the setcap-wrappers dir 2016-09-01 19:15:09 -05:00
Domen Kožar
a6670c1a0b Fixes #18124: atomically replace /var/setuid-wrappers/ (#18186)
Before this commit updating /var/setuid-wrappers/ folder introduced
a small window where NixOS activation scripts could be terminated
and resulted into empty /var/setuid-wrappers/ folder.

That's very unfortunate because one might lose sudo binary.

Instead we use two atomic operations mv and ln (as described in
https://axialcorps.com/2013/07/03/atomically-replacing-files-and-directories/)
to achieve atomicity.

Since /var/setuid-wrappers is not a directory anymore, tmpfs mountpoints
were removed in installation scripts and in boot process.

Tested:

- upgrade /var/setuid-wrappers/ from folder to a symlink
- make sure /run/setuid-wrappers-dirs/ legacy symlink is really deleted
2016-09-01 20:57:51 +02:00
obadz
697518d467 nixos-install: remove manifest related stuff 2016-08-24 16:09:30 +01:00
Shea Levy
2942895d55 Merge branch 'install-bootloader-flag' 2016-08-17 21:16:29 -04:00
obadz
24f8cf08cc nixos/lib/make-disk-image: refactor to use nixos-install
- Replace hand-rolled version of nixos-install in make-disk-image by an
  actual call to nixos-install
- Required a few cleanups of nixos-install
- nixos-install invokes an activation script which the hand-rolled version
  in make-disk-image did not do. We remove /etc/machine-id as that's
  a host-specific, impure, output of the activation script

Testing:

nix-build '<nixpkgs/nixos/release.nix>' -A tests.installer.simple passes

Also tried generating an image with:

nix-build -E 'let
    pkgs = import <nixpkgs> {};
    lib = pkgs.lib;
    nixos = import <nixpkgs/nixos> {
      configuration = {
        fileSystems."/".device = "/dev/disk/by-label/nixos";
        boot.loader.grub.devices = [ "/dev/sda" ];
        boot.loader.grub.extraEntries = '"''"'
          menuentry "Ubuntu" {
             insmod ext2
             search --set=root --label ubuntu
             configfile /boot/grub/grub.cfg
          }
        '"''"';
      };
    };
  in import <nixpkgs/nixos/lib/make-disk-image.nix> {
    inherit pkgs lib;
    config = nixos.config;
    diskSize = 2000;
    partitioned = false;
    installBootLoader = false;
  }'

Then installed the image:
$ sudo df if=./result/nixos.img of=/dev/sdaX bs=1M
$ sudo resize2fs /dev/disk/by-label/nixos
$ sudo mount /dev/disk/by-label/nixos /mnt
$ sudo mount --rbind /proc /mnt/proc
$ sudo mount --rbind /dev /mnt/dev
$ sudo chroot /mnt /nix/var/nix/profiles/system/bin/switch-to-configuration boot

[ … optionally do something about passwords … ]

and successfully rebooted to that image.

Was doing all this from inside a Ubuntu VM with a single user nix install.
2016-08-16 15:31:16 +01:00
Shea Levy
b4954a8f38 Deprecate --install-grub in favor of --install-bootloader for nixos-rebuild.
Fixes #14293
2016-08-16 07:51:58 -04:00
obadz
806e88c137 nixos-install: cleanups & improvements to run on non-NixOS systems
- Fix --no-bootloader which didn't do what it advertised
- Hardcode nixbld GID so that systems which do not have a nixbld user
  can still run nixos-install (only with --closure since they can't
  build anything)
- Cleanup: get rid of NIX_CONF_DIR(=/tmp)/nix.conf and pass arguments instead
- Cleanup: don't assume that the target system has '<nixpkgs/nixos>' or
  '<nixos-config>' to see if config.users.mutableUsers. Instead check if
  /var/setuid-wrappers/passwd is there

Installing NixOS now works from a Ubuntu host (using --closure).

nix-build -A tests.installer.simple '<nixpkgs/nixos/release.nix>' succeeds ✓
2016-08-16 02:47:49 +01:00
obadz
582313bafe nixos: remove rsync from base install and add explicit path in nixos-install
As per 60b3f95ad8 (commitcomment-18507812)
2016-08-09 21:39:40 +01:00
obadz
57b7c3c545 nixos-install: more robust way of sourcing fresh version of self 2016-08-09 21:39:40 +01:00
aszlig
55d881eea3
Revert adding .git-revision unconditionally
This reverts commit 1e534e234b0a92bf06361fa41b7ac8691fdbc769.

We already should have a .git directory if it is managed via Git,
otherwise there is no way to get the Git revision if neither
.git-revision or .git is present.

But having .git-revision _and_ .git present seems very much redundant to
me.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @bennofs, @Profpatsch
Issue: #17218
2016-08-09 14:15:06 +02:00
obadz
037d9c6cab nixos-install: add options --closure, --no-channel-copy, --no-root-passwd, and --no-bootloader
Closes #17236

nix-build -A tests.installer.simple '<nixos/release.nix>' succeeds ✓
2016-08-04 16:22:25 +01:00
Benno Fünfstück
1e534e234b fix nixos-version --hash when building from git 2016-07-23 22:59:03 +02:00
davidak
d97a107426 nixos-version: fix syntax error and add -h (#16906)
* nixos-version: fix syntax error

* nixos-version: add -h parameter
2016-07-13 09:11:32 +02:00
Graham Christensen
d9724bcdbf doc: add man page for nixos-version (#16869) 2016-07-12 16:29:13 +02:00
Nikolay Amiantov
21f9180d49 Merge pull request #15579 from abbradar/nixos-install-ssl
nixos-install: fix SSL certificate error
2016-06-23 07:48:45 +04:00
Eelco Dolstra
9f0e137338 Rename boot.loader.gummiboot.enable -> boot.loader.systemd-boot.enable 2016-06-01 12:55:52 +02:00
Eelco Dolstra
a7baec7cb1 nixos-generate-config: Emit LUKS configuration for boot device 2016-05-25 18:04:41 +02:00
Eelco Dolstra
c6ab4ab206 nixos-generate-config: Enable strictness 2016-05-25 18:04:34 +02:00
Nikolay Amiantov
1193790b95 nixos-install: fix SSL certificate error 2016-05-20 15:30:56 +03:00
Tuomas Tynkkynen
1d4b21ef42 treewide: Use correct output of config.nix.package in non-string contexts 2016-04-25 16:44:38 +02:00
Eelco Dolstra
25387a1bed nixos-checkout: Remove
This command was useful when NixOS was spread across multiple
repositories, but now it's pretty pointless (and obfuscates what
happens, i.e. "git clone git://github.com/NixOS/nixpkgs.git").
2016-04-20 20:57:02 +02:00
Vladimír Čunát
39ebb01d6e Merge branch 'staging', containing closure-size #7701 2016-04-13 09:25:28 +02:00
Vladimír Čunát
5c04313451 nixos-generate-config: lower priority of nix.maxJobs
Fixes #6429.
2016-04-12 08:09:52 +02:00
Vladimír Čunát
30f14243c3 Merge branch 'master' into closure-size
Comparison to master evaluations on Hydra:
  - 1255515 for nixos
  - 1255502 for nixpkgs
2016-04-10 11:17:52 +02:00
Vladimír Čunát
d1df28f8e5 Merge 'staging' into closure-size
This is mainly to get the update of bootstrap tools.
Otherwise there were mysterious segfaults:
https://github.com/NixOS/nixpkgs/pull/7701#issuecomment-203389817
2016-04-07 14:40:51 +02:00
Domen Kožar
55a86b799e nixos-generate-config.pl: correct path for broadcom-43xx
(cherry picked from commit b01eedaeecd4bd292fd9a22225c9490a285e3b77)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-31 23:47:20 +01:00
Eelco Dolstra
c94f8a4abd nixos-rebuild: Fix Nix fallback
Somebody forgot that Bash is not a real programming language...
2016-03-30 16:36:18 +02:00
Vladimír Čunát
09af15654f Merge master into closure-size
The kde-5 stuff still didn't merge well.
I hand-fixed what I saw, but there may be more problems.
2016-03-08 09:58:19 +01:00
Eelco Dolstra
f3d94cfc23 Revert "Add the tool "nixos-typecheck" that can check an option declaration to:"
This reverts commit cad8957eabcbf73062226d28366fd446c15c8737. It
breaks NixOps, but more importantly, such major changes to the module
system really need to be reviewed.
2016-03-01 20:52:06 +01:00
Thomas Strobel
cad8957eab Add the tool "nixos-typecheck" that can check an option declaration to:
- Enforce that an option declaration has a "defaultText" if and only if the
   type of the option derives from "package", "packageSet" or "nixpkgsConfig"
   and if a "default" attribute is defined.

 - Enforce that the value of the "example" attribute is wrapped with "literalExample"
   if the type of the option derives from "package", "packageSet" or "nixpkgsConfig".

 - Warn if a "defaultText" is defined in an option declaration if the type of
   the option does not derive from "package", "packageSet" or "nixpkgsConfig".

 - Warn if no "type" is defined in an option declaration.
2016-02-29 01:09:00 +01:00
Vladimír Čunát
e9520e81b3 Merge branch 'master' into staging 2016-02-17 10:06:31 +01:00
Vladimír Čunát
d039c87984 Merge branch 'master' into closure-size 2016-02-14 08:33:51 +01:00
Nikolay Amiantov
46f3975d99 nixos-install: don't check that /mnt is a mount point 2016-02-10 02:08:36 +03:00
Vladimír Čunát
a115bff08c Merge branch 'master' into staging 2016-02-07 13:52:42 +01:00
Aneesh Agrawal
3c5fca9618 filesystems: use list of strings for fs options
Allow usage of list of strings instead of a comma-separated string
for filesystem options. Deprecate the comma-separated string style
with a warning message; convert this to a hard error after 16.09.
15.09 was just released, so this provides a deprecation period during
the 16.03 release.

closes #10518

Signed-off-by: Robin Gloster <mail@glob.in>
2016-02-06 19:48:30 +00:00
Vladimír Čunát
ae74c356d9 Merge recent 'staging' into closure-size
Let's get rid of those merge conflicts.
2016-02-03 16:57:19 +01:00
Guillaume Maudoux
9f358f809d Configure a default trust store for openssl 2016-02-03 12:42:01 +01:00
Rickard Nilsson
e430f14da3 nixos-rebuild: Don't propagate --no-out-link arg to nix-store 2016-02-01 10:54:58 +01:00
Rickard Nilsson
b5b7805543 nixos-rebuild: Do not create result symlinks for boot/switch actions (resolves #12665) 2016-02-01 10:37:53 +01:00
Vladimír Čunát
3e1599f57b nixos-generate-config: fix #12595: broadcom quoting 2016-01-25 07:57:53 +01:00
Rickard Nilsson
51c6383ebd nixos-rebuild: Build only the 'out' output of nix (not 'doc' and 'debug' too)
This fixes the failing NixOS installer tests.
2016-01-20 10:01:59 +01:00
Rickard Nilsson
fb2eae08d5 Revert "Revert "nixos-rebuild: Add option for building and/or deploying on a remote host""
This reverts commit 78be7f5a53e3945b72482a99c639f5fe8cc75fd6.
2016-01-20 10:01:59 +01:00
Vladimír Čunát
716aac2519 Merge branch 'staging' into closure-size 2016-01-19 09:55:31 +01:00
Domen Kožar
78be7f5a53 Revert "nixos-rebuild: Add option for building and/or deploying on a remote host"
This reverts commit ca0c46040649ab4a6d5d7bc838b393fdcbcae10c.

All the installer tests are failing due to this change. cc @rickynils
2016-01-10 17:50:50 +01:00
Eelco Dolstra
104c252b61 Merge pull request #11279 from rickynils/nixos-rebuild-remote
nixos-rebuild: Add option for building and/or deploying on a remote host
2016-01-04 11:52:25 +01:00
Tobias Geerinckx-Rice
82419575aa btrfsProgs -> canonical btrfs-progs 2016-01-03 20:38:44 +01:00