Eelco Dolstra
6b185a131f
Use config.system.build.systemd in the toplevel derivation
2012-10-10 16:49:59 -04:00
Eelco Dolstra
d71c0bb834
Respect partOf etc. for socket and target units
2012-10-09 15:14:15 -04:00
Eelco Dolstra
f451afea8f
Remove ‘services.journald.logKernelMessages’
...
This option no longer exists in systemd.
2012-10-08 10:51:17 -04:00
Eelco Dolstra
52483c36bb
Lowercase debug output
2012-10-04 21:44:45 -04:00
Eelco Dolstra
fdea3ac3d2
stage-2-init: Don't rely on groups being initialised
2012-10-04 16:15:30 -04:00
Eelco Dolstra
666620cdd5
Use ‘mountpoint -q’
2012-10-02 10:32:56 -04:00
Eelco Dolstra
2044ae785d
Use "wants" instead of "requires"
2012-10-02 10:32:29 -04:00
Eelco Dolstra
7932978617
Fix Upstart compatibility jobs that depend on "stopped udevtrigger"
...
It's not enough to say "after udev-settle.service" since
udev-settle.service is not wanted/required anywhere - we need to say
"wants udev-settle.service" as well.
This should fix problems with ALSA and X11 initialisation that people
have been seeing.
2012-10-02 10:31:02 -04:00
Eelco Dolstra
2cf5e3cb66
Add options ‘boot.systemd.targets’ and ‘boot.systemd.sockets’
2012-10-01 18:58:11 -04:00
Eelco Dolstra
ca13a913d9
Oops, lost some code
2012-10-01 18:20:22 -04:00
Eelco Dolstra
13d747c11a
Support postStart scripts in service units
2012-10-01 16:45:49 -04:00
Eelco Dolstra
891be375b5
Make unitConfig/serviceConfig attribute sets
...
So instead of:
boot.systemd.services."foo".serviceConfig =
''
StartLimitInterval=10
CPUShare=500
'';
you can say:
boot.systemd.services."foo".serviceConfig.StartLimitInterval = 10;
boot.systemd.services."foo".serviceConfig.CPUShare = 500;
This way all unit options are available and users can set/override
options in configuration.nix.
2012-10-01 16:27:42 -04:00
Eelco Dolstra
353522ef79
Remove JoinControllers line because upstream reverted joining cpuset
2012-10-01 14:33:01 -04:00
Eelco Dolstra
3ad370ae0a
Merge remote-tracking branch 'origin/master' into systemd
...
Conflicts:
modules/misc/ids.nix
modules/services/mail/postfix.nix
modules/services/system/nscd.nix
modules/services/x11/desktop-managers/xfce.nix
modules/system/boot/stage-1.nix
2012-09-28 11:35:27 -04:00
Eelco Dolstra
3e6bb7d1de
Move setting ownership of /nix/store to stage-2-init
...
This is necessary because the store might be bind-mounted read-only.
2012-09-28 10:59:58 -04:00
Eelco Dolstra
a139fa14b1
Optionally make the Nix store read-only to enforce immutability
...
This will be the default once Nix 1.2 is released.
2012-09-25 16:33:21 -04:00
Shea Levy
bf116c7876
busyboxKeymap: Support unicode keymaps
2012-09-24 17:15:26 -04:00
Peter Simons
573b6b710f
Merge pull request #26 from aszlig/boottime-keymap
...
stage-1: Add option to load keymap during bootup.
2012-09-24 07:33:03 -07:00
Eelco Dolstra
1ad655bdcf
Don't join the cpuset controller with cpu/cpuacct
...
This works around the problem described here:
http://lists.freedesktop.org/archives/systemd-devel/2012-September/006648.html
2012-09-21 22:56:13 -04:00
Eelco Dolstra
4fa9b4b257
Restart systemd if necessary
2012-09-21 14:58:28 -04:00
Eelco Dolstra
83c6b1cf3a
Set $LOCALE_ARCHIVE in systemd services
...
Systemd sets locale variables like $LANG when running services, so
$LOCALE_ARCHIVE should also be set to prevent warnings like "perl:
warning: Setting locale failed.".
2012-09-18 18:12:39 -04:00
Eelco Dolstra
aac6fe44b6
Merge branch 'master' of github.com:NixOS/nixos into systemd
2012-09-11 10:58:57 -04:00
Mathijs Kwik
bce1cdd59c
fix kernel 3.4+ early cifs mounting (qemu-vm target)
...
kernel 3.4+ needs cifs-utils to mount CIFS filesystems.
the kernel itself (and busybox's cifs mount code) are no longer able
to do this in some/most cases and will error out saying:
"CIFS VFS: connecting to DFS root not implemented yet"
Nixos' qemu-vm target is hurt by this, as it wants to mount /nix/store
via cifs very early in the boot process.
This commit makes sure the initrd for affected kernels is built with
cifs-utils if needed.
2012-08-30 18:31:45 +02:00
Mathijs Kwik
aba9f76105
change permission of /run/lock to allow non-root access to subdirectories
2012-08-26 10:17:22 +02:00
Eelco Dolstra
8adc1ee92e
switch-to-configuration: Stop sockets corresponding to services
...
If a service has a corresponding socket unit, then stop the socket
before stopping the service. This prevents it from being restarted
behind our backs. Also, don't restart the service; it will be
restarted on demand via the socket.
2012-08-23 12:12:58 -04:00
Eelco Dolstra
dfb6e891b9
switch-to-configuration: Don't restart systemd-user-sessions.service
...
Restarting it causes all user sessions to be killed.
2012-08-23 11:11:14 -04:00
Eelco Dolstra
af550048e8
switch-to-configuration: Don't restart the suspend/hibernate targets
...
Restarting them has the side effect of suspending/hibernating the
system again.
2012-08-23 11:11:04 -04:00
Eelco Dolstra
b02c488fde
Automatically append ".service" to the name of service units
2012-08-23 10:25:27 -04:00
Eelco Dolstra
223f04b3ca
Add option ‘boot.systemd.packages’ to use units from the specified packages
2012-08-21 11:28:47 -04:00
Eelco Dolstra
f3def8194e
switch-to-configuration: Restart all active targets
2012-08-20 16:19:03 -04:00
Eelco Dolstra
3f4ffffed7
Fix a Perl warning
2012-08-20 11:32:50 -04:00
Eelco Dolstra
08f14b33c1
Merge branch 'master' of github.com:NixOS/nixos into systemd
2012-08-20 11:27:38 -04:00
Eelco Dolstra
36e05e8dd2
Add some more backward compatibility hacks
2012-08-20 11:21:11 -04:00
Petr Rockai
5dc8bc5f2a
Do not assume that /dev/console can always be written.
2012-08-18 14:29:09 +02:00
Eelco Dolstra
a44e575196
switch-to-configuration: Respect the ‘restartIfChanged’ attribute
2012-08-17 13:14:42 -04:00
Eelco Dolstra
7e99541afe
Fix initrd for the latest lvm2
2012-08-16 15:37:13 -04:00
Eelco Dolstra
d18c2afc6f
Add an ip-up target for services that require IP connectivity
2012-08-15 15:38:52 -04:00
Eelco Dolstra
981347429a
Add support for PartOf dependencies
2012-08-15 15:36:54 -04:00
Eelco Dolstra
a133eb5991
Add some missing targets
...
Also make multi-user.target pull in remote-fs.target to mount remote
filesystems.
2012-08-14 18:14:48 -04:00
Eelco Dolstra
55b2736566
Add a target ‘fs.target’ that waits for all filesystems
2012-08-14 18:14:16 -04:00
Eelco Dolstra
a44a7271a8
Warn about Upstart modules with an unknown startOn condition
2012-08-14 17:30:11 -04:00
Eelco Dolstra
7a7d04af8a
systemd: Use the kernel modules from /run/booted-system
...
This prevents failures in systemd-modules-load.service like "Failed to
lookup alias 'ipv6': Function not implemented".
2012-08-14 17:09:44 -04:00
Eelco Dolstra
4475294f57
Fix a hang during shutdown
...
Subtle: dhcpcd.service would call resolvconf during shutdown, which in
turn would start invalidate-nscd.service, causing the shutdown to be
cancelled. Instead, give nscd.service a proper reload action, and do
"systemctl reload --no-block nscd.service". The --no-block is
necessary to prevent that command from waiting until a timeout occurs
(bug in systemd?).
2012-08-14 16:45:50 -04:00
Eelco Dolstra
88bfdca8e0
stage-1: Use systemd-udevd instead of the old udevd
2012-08-14 15:31:15 -04:00
aszlig
c9e05f1ed8
stage-1: Load boot-time keymap by default.
...
This also removes the configuration option, as suggested by @edolstra.
2012-08-12 16:54:31 +02:00
aszlig
eb0b2651b8
stage-1: Add option to load keymap during bootup.
...
As non-QWERTY keyboards don't feel so warm and cozy if they hug QWERTY LUKS
password prompts, it was on honor for me to serve King Dvorak XV to fight the
glorious keyboard war against... what?! Yes, I'm awake!
We're fighting with loadkeys to spit out busybox binary keymaps against loadkmap
(loadkeys does have a special target -b for that).
And yep, I'm somewhat abusing preLVMCommands, if someone got issues with that,
feel free to introduce a new substitute in stage-i-init.sh.
Sent from my iPhone
2012-08-12 13:38:36 +02:00
Eelco Dolstra
39030211af
Add a unitConfig option to set the [Unit] section of units
2012-08-10 18:56:12 -04:00
Eelco Dolstra
e00967a54a
stage-2-init: Drop udev from the $PATH
2012-08-10 18:41:20 -04:00
Eelco Dolstra
a4a90685ea
switch-to-configuration: Handle swap devices
2012-08-10 15:52:47 -04:00
Eelco Dolstra
a3c75462c1
switch-to-configuration: Handle switching all systemd units
2012-08-10 15:15:59 -04:00
Lluís Batlle i Rossell
746b572ee6
stage2init: fix respecting 'noatime' mount options for /
...
We had a "mount -o remount,rw none /" that was setting back 'relatime',
although we had set 'noatime' at initrd mount. Removing the word 'none' fixed
it.
Specifying a device (in this case 'none'), makes mount to forget previous
device options. According to manpage, it says not to read fstab or mtab. But the
effect is that of setting 'relatime', if it was mounted 'noatime.
2012-08-10 20:51:13 +02:00
Eelco Dolstra
ce7ead7bd7
switch-to-configuration: Handle changes to fileSystems
...
We now automatically remount filesystems with changed options, mount
new filesystems, and unmount obsolete filesystems.
2012-08-10 10:56:55 -04:00
Eelco Dolstra
f31ab09b85
Set uniq type on boot.loader.kernelFile
2012-08-09 11:00:35 -04:00
Shea Levy
20d4dee426
The efi boot stub code should only be run if it is enabled
2012-08-09 10:37:43 -04:00
Eelco Dolstra
6b2a14d698
Fix NixOS evaluation
2012-08-09 10:04:25 -04:00
Shea Levy
da787e3071
efi-boot-stub: List required kernel config
2012-08-08 23:02:46 -04:00
Eelco Dolstra
21da462ad5
Merge pull request #25 from shlevy/required-kernel-config
...
Required kernel config
2012-08-08 10:33:41 -07:00
Shea Levy
c39f493ebb
Minor reorganization
2012-08-07 18:09:08 -04:00
Eelco Dolstra
66ff6a382a
stage-1-init: Close temporary file descriptor
...
Otherwise this fd will be inherited all the way into the Upstart jobs.
2012-08-07 10:05:33 -04:00
Shea Levy
0ea2643c63
The initrd mounts some tmpfses
2012-08-07 06:57:01 -04:00
Eelco Dolstra
52b6e10315
Use systemd-modules-load.service to load required kernel modules
2012-08-06 16:52:08 -04:00
Rickard Nilsson
e33dfa936f
Use busybox mount instead of klibc nfsmount for nfs mounts in initrd.
2012-08-06 16:25:22 -04:00
Eelco Dolstra
d33fd9a1f8
switch-to-configuration: Assume that services that are auto-restarting are going to fail
2012-08-06 15:48:46 -04:00
Eelco Dolstra
b11c5d5991
nscd: Ensure that invalidate-nscd starts after nscd
2012-08-06 12:26:52 -04:00
Eelco Dolstra
9f9ae7c7e9
Share option definitions between the systemd and Upstart compatibility modules
2012-08-06 11:45:59 -04:00
Eelco Dolstra
f74ffe3550
Remove obsolete Upstart shutdown job
2012-08-06 10:58:27 -04:00
Eelco Dolstra
2a91bb5282
switch-to-configuration: Print new units
2012-08-03 17:13:34 -04:00
Eelco Dolstra
320682a558
switch-to-configuration: Don't ellipsize log output
2012-08-03 14:39:59 -04:00
Eelco Dolstra
0d6b96a525
switch-to-configuration: Fix the call to install the boot loader
2012-08-03 14:07:43 -04:00
Eelco Dolstra
aa6fd9f8a2
switch-to-configuration: Handle unit template instances
2012-08-03 13:47:59 -04:00
Eelco Dolstra
bd3c9febc9
switch-to-configuration: Stop units in one call to systemctl
2012-08-03 13:29:56 -04:00
Eelco Dolstra
b6bd0a4f84
switch-to-configuration: Restart services that were manually started
2012-08-03 11:53:14 -04:00
Eelco Dolstra
56ce5614f9
switch-to-configuration: Print all failed services
2012-08-03 10:40:01 -04:00
Eelco Dolstra
4d2deff7af
Stop obsolete units, restart changed units, start new units
2012-08-02 17:26:23 -04:00
Eelco Dolstra
0fc68a3d1d
Rewrite switch-to-configuration in Perl
...
This will make it more efficient to do systemd dependency graph
processing (if necessary).
2012-08-02 15:11:29 -04:00
Eelco Dolstra
d4fec178fd
Merge remote-tracking branch 'origin/master' into systemd
2012-08-02 13:44:16 -04:00
Rickard Nilsson
a6039e1be2
LUKS root: Fix key file check
...
Check for null instead of empty string
2012-08-02 11:39:31 +02:00
Rickard Nilsson
0958b224ac
LUKS root: Add option for using a key file instead of a passphrase.
2012-08-02 11:30:33 +02:00
Rickard Nilsson
ecdbc94e05
LUKS root: Add option allowDiscards (for SSD disks)
2012-08-02 11:27:28 +02:00
Shea Levy
feb010a366
NixOS kernels should support ELF executables
2012-08-02 00:47:36 -04:00
Shea Levy
9e300052bd
Add test to check that a machine with a minimal kernel but all of the requiredKernelConfig options set boots and shuts down
2012-08-01 22:32:16 -04:00
Shea Levy
2a983acaff
Enable specifying which kernel config options are needed for a given module
2012-08-01 21:50:43 -04:00
Eelco Dolstra
5f57110e1f
install-grub.pl: Fix Xen support
2012-08-01 21:48:29 +02:00
Eelco Dolstra
6576d81ff1
Fix "please: command not found" in switch-to-configuration
2012-07-30 15:19:30 -04:00
Eelco Dolstra
174d6a07e0
Fix whitespace
2012-07-30 13:49:10 -04:00
Eelco Dolstra
557f39aa0f
install-grub.pl: Apply the configuration limit only to old generations
2012-07-25 16:37:29 -04:00
Eelco Dolstra
b52117c34d
Treat init-script as a boot loader
2012-07-25 11:30:16 -04:00
Eelco Dolstra
8b91a5f2ff
Move boot loader modules to modules/system/boot/loader
2012-07-25 10:59:03 -04:00
Eelco Dolstra
b15e1fbb08
Boot loader refactoring
...
- Renamed system.build.menuBuilder to system.build.installBootLoader.
- ‘install-grub.pl’ (formerly grub-menu-builder.pl) now generates the
GRUB menu *and* installs GRUB (if necessary).
- ‘switch-to-configuration.sh’ has no boot loader specific knowledge
anymore. It just calls installBootLoader.
2012-07-25 10:47:32 -04:00
Eelco Dolstra
a0721ad2b3
stage-1-init: Use mount --move to move /sys etc. to the target root
...
This fixes warnings about /sys/kernel/security during shutdown and
cleans up /proc/mounts.
2012-07-24 22:04:28 -04:00
Eelco Dolstra
f0c82f4543
Pass the ‘--recheck’ flag to grub-install
2012-07-24 19:22:19 -04:00
Eelco Dolstra
f07f221f0e
Replace grub-menu-builder with a much faster version
...
The old GRUB menu builder script is quite slow, typically taking
several seconds. This is a real annoyance since it's run every time
you switch to a new configuration. Therefore this patch replaces the
Bash script with a much faster Perl script. In a VirtualBox test, the
execution time went from 2.7s to 0.1s. The Perl version is also more
correct because it uses XML to get the GRUB configuration (through
builtins.toXML), so there are no shell escaping issues.
The new script currently lacks support for subconfigurations defined
through "nesting.children".
2012-07-24 19:16:27 -04:00
Your Name
8bde72d99c
Mount securityfs needed for AppArmor and some TPM drivers.
...
Should be harmless.
2012-07-22 16:31:49 +03:00
Eelco Dolstra
71ca633431
Start agetty on tty1
...
‘logind’ automatically starts agetty on all virtual consoles except
tty1. We have to do that ourselves.
2012-07-20 18:32:24 -04:00
Eelco Dolstra
0edf138fc7
switch-to-configuration: Initial systemd support
...
It reloads the configuration, but doesn't (re)start jobs yet.
2012-07-20 18:25:36 -04:00
Eelco Dolstra
fd2cef50cd
Don't pull in Upstart
2012-07-20 18:25:23 -04:00
Eelco Dolstra
0b865edb16
switch-to-configuration: require a reboot going from Upstart to systemd
2012-07-20 16:23:52 -04:00
Eelco Dolstra
5fabcf63a3
Get delayed shutdowns to work
2012-07-20 15:40:50 -04:00
Eelco Dolstra
1375e7951d
Enable systemd-journal-flush.service (added by systemd 187)
2012-07-20 12:02:42 -04:00
Eelco Dolstra
02e37ba6b0
Shorten filenames of start scripts to make log messages more readable
2012-07-19 17:41:42 -04:00