Commit graph

4163 commits

Author SHA1 Message Date
Eelco Dolstra
d380152f39 Update some tests for systemd 2012-10-24 18:11:21 +02:00
Eelco Dolstra
b6f9e05269 Update NFS client/server modules for systemd 2012-10-24 18:10:58 +02:00
Eelco Dolstra
c6abc572e8 Run all tests on both 32 and 64 bit 2012-10-24 12:59:19 +02:00
Eelco Dolstra
719aeb36ca Tests: Depend on ‘network.target’ 2012-10-24 12:58:58 +02:00
Eelco Dolstra
2d9258da67 auto.nix: Use SLiM to implement auto-logins 2012-10-24 12:31:02 +02:00
Eelco Dolstra
224c825a36 Add option ‘users.motd’ for setting a message of the day shown on login
Note that this uses pam_motd.
2012-10-23 09:10:48 -04:00
Eelco Dolstra
c980faebe2 upstart.nix: Set ‘Type’ to ‘oneshot’ for Upstart tasks
This way the service will only reach the "started" state when the task
has finished.
2012-10-23 08:30:50 -04:00
Eelco Dolstra
e5fa3f108e Set uniqueness constraint on boot.devShmSize etc. 2012-10-23 07:50:23 -04:00
Eelco Dolstra
7efde0740e Add user option ‘isAlias’ to allow one user account to alias another 2012-10-23 13:35:06 +02:00
Eelco Dolstra
c8628e0293 Don't let interfaces get IPv6 addresses if networking.enableIPv6 is false 2012-10-19 15:41:01 -04:00
Eelco Dolstra
ac8db6fd33 firewall.nix: Don't fail if IPv6 is disabled 2012-10-19 15:21:06 -04:00
Eelco Dolstra
3d6824feaa Machine.pm: Don't add .service implicitly
Systemd will add .service anyway if no unit type is given.
2012-10-19 10:32:09 -04:00
Eelco Dolstra
06cbe62537 switch-to-configuration: Support services activated by multiple sockets 2012-10-18 13:26:47 -04:00
Eelco Dolstra
b4a1893cdd systemd-vconsole-setup: Don't put the X server in non-raw mode
‘systemd-vconsole-setup’ by default operates on /dev/tty0, the
currently active tty.  Since it puts /dev/tty0 in Unicode or ASCII
mode, if the X server is currently active when it runs, keys such as
Alt-F4 won't reach the X server anymore.  So use /dev/tty1 instead.
2012-10-18 11:58:37 -04:00
Eelco Dolstra
a4cad32c3d Generate more user-friendly script filenames
This is primarily important in journal entries.
2012-10-18 11:58:37 -04:00
Peter Simons
6a9b855412 modules/programs/bash: '/run/current-system/sw' is already a part of $NIX_PROFILES 2012-10-16 19:07:19 +02:00
Peter Simons
c7fb0defe6 modules/programs/bash: clean-up variables used in initialization of bash-completion 2012-10-16 18:41:20 +02:00
Peter Simons
4ca0617f4a modules/programs/bash: improve bash completion support
The new configuration.nix option 'environment.enableBashCompletion'
determines whether bash completion is automatically enabled system-wide
for all interactive shells or not. The default setting is 'off'.
2012-10-16 18:23:28 +02:00
Eelco Dolstra
10ac80115b switch-to-configuration: Fix bad Perl 2012-10-14 21:12:11 -04:00
Eelco Dolstra
53f216885f Ignore systemd-modules-load errors
On NixOS, ‘boot.kernelModules’ has historically contained modules that
may not exist or load everywhere, so don't barf on those.
2012-10-12 17:39:06 -04:00
Eelco Dolstra
161c837c49 Port automatic filesystem creation to systemd 2012-10-12 17:32:36 -04:00
Eelco Dolstra
12d1cd87ce Systemd unit names can contain Nix-illegal characters, so don't include them 2012-10-12 17:32:05 -04:00
Eelco Dolstra
3f6d53cc97 Move escapeSystemdPath to lib/utils.nix
The new file ‘utils.nix’ is intended for NixOS-specific library
functions (i.e. stuff that shouldn't go into Nixpkgs' lib/).
2012-10-12 17:01:49 -04:00
Eelco Dolstra
e8de4455ab Update automatic swapfile creation for systemd 2012-10-12 16:47:29 -04:00
Eelco Dolstra
97a2de983b Ensure that swap.target is pulled in by switch-to-configuration even if it failed earlier 2012-10-12 16:38:00 -04:00
Eelco Dolstra
fd7dbc99ab switch-to-configuration: Handle multiple swap devices properly 2012-10-12 16:37:14 -04:00
Eelco Dolstra
b968244aa1 Move fs.target to filesystems.nix 2012-10-12 15:08:44 -04:00
Peter Simons
7ce9893bef network-interfaces.nix: interfaces that are part of a bridge must be brought 'up' for the bridge to function 2012-10-12 18:14:39 +02:00
Eelco Dolstra
e3c1865067 Let the tun services depend on /dev/net/tun 2012-10-11 17:59:41 -04:00
Eelco Dolstra
d63da5892c Ensure that systemd-modules-load is restarted when boot.kernelModules changes 2012-10-11 17:58:46 -04:00
Eelco Dolstra
71a541afb6 dhcpcd: Don't depend on network-interfaces.target
Dhcpcd automatically detects new interfaces, so we can start it right
away.
2012-10-11 17:57:54 -04:00
Eelco Dolstra
b606165bd9 Allow a unit to declare "triggers" that force a restart
The triggers are just arbitrary strings that are included in the unit
under X-Restart-Triggers.  The idea is that if they change between
reconfigurations, switch-to-configuration will restart the unit
because its store path changed.  This is mostly useful for services
that implicitly depend on generated files in /etc.  Thus you can say

  restartTriggers = [ confFile ];

where ‘confFile’ is the derivation that generated the /etc file in
question.
2012-10-11 17:54:43 -04:00
Eelco Dolstra
285f587025 Move non-interface specific initialisation to ‘network-setup.service’
The unit ‘network-interface.service’ has been replaced by
‘network-interfaces.target’.
2012-10-11 16:18:48 -04:00
Eelco Dolstra
2cf9bb929b Add a ‘restart’ alias 2012-10-11 16:18:34 -04:00
Eelco Dolstra
1c53b2e299 Don't flush addresses unless necessary
Flushing is bad if the Nix store is on a remote filesystem accessed
over that interface.

http://hydra.nixos.org/build/3184162

Also added a interface option ‘prefixLength’ as a better alternative
to ‘subnetMask’.
2012-10-11 15:36:52 -04:00
Eelco Dolstra
4104f60800 Fix accidental commit 2012-10-11 12:43:08 -04:00
Eelco Dolstra
bd1071d02b Remove "wants" dependencies on <interface>.service
Instead it's enough to depend on
sys-subsystem-net-devices-<interface>.device, which in turn has a
"wants" dependency on the service (if any) that creates the interface.
2012-10-10 22:47:50 -04:00
Eelco Dolstra
d7458b5fc2 Split the monolithic network-interface service into multiple units
For each statically configured interface, we now create a unit
‘<interface>-cfg.service’ which gets started as soon as the network
device comes up.  Similarly, each bridge defined in
‘networking.bridges’ and virtual interface in ‘networking.interfaces’
is created by a service ‘<interface>.service’.

So if we have

  networking.bridges.br0.interfaces = [ "eth0" "eth1" ];
  networking.interfaces =
    [ { name = "br0";
        ipAddress = "192.168.1.1";
      }
    ];

then there will be a unit ‘br0.service’ that depends on
‘sys-subsystem-net-devices-eth0.device’ and
‘sys-subsystem-net-devices-eth1.device’, and a unit ‘br0-cfg.service’
that depends on ‘sys-subsystem-net-devices-br0.device’.
2012-10-10 17:55:42 -04:00
Eelco Dolstra
62b707de07 Add support for postStop scripts 2012-10-10 17:55:13 -04:00
Eelco Dolstra
e9b221c2ff firewall.nix: Don't spam the log 2012-10-10 16:51:05 -04:00
Eelco Dolstra
17a7f48364 Add an option for BindsTo dependencies 2012-10-10 16:50:41 -04:00
Eelco Dolstra
6b185a131f Use config.system.build.systemd in the toplevel derivation 2012-10-10 16:49:59 -04:00
Eelco Dolstra
ad94b9e50e Use optionalAttrs 2012-10-10 16:49:47 -04:00
Eelco Dolstra
6902452901 Whitespace 2012-10-09 15:14:32 -04:00
Eelco Dolstra
d71c0bb834 Respect partOf etc. for socket and target units 2012-10-09 15:14:15 -04:00
Eelco Dolstra
dd3fe9d792 Merge remote-tracking branch 'origin/master' into systemd
Conflicts:
	modules/services/system/nscd.nix
2012-10-08 13:47:37 -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
2b2f0067b8 Add an /etc/hosts entry mapping localhost to ::1 2012-10-07 00:46:24 -04:00
Eelco Dolstra
570e523a88 Remove 127.0.0.1 mapping for the system's hostname
Also remove the <hostname>.<domain> mapping.
2012-10-07 00:40:00 -04:00
Eelco Dolstra
74295866f5 Don't include NSS modules in $LD_LIBRARY_PATH
This is broken because it requires restarting applications to see new
NSS modules.  The proper way to handle NSS modules is through nscd.
See commit 554ae9908b.
2012-10-07 00:37:36 -04:00