[Nix-dev] NixOS on systemd

Mathijs Kwik mathijs at bluescreen303.nl
Wed Sep 5 21:59:27 CEST 2012


Hi Eelco,

Apart from a bunch of services that I need to change to proper units,
my main issue has to do with a tmpfs on /tmp.
In configuration.nix, "fileSystems" contains:

    { mountPoint = "/tmp";
      device = "tmpfs";
      fsType = "tmpfs";
      options = "size=10g,mode=1777";
    }

Booting with systemd takes over 2 minutes (as opposed to 9sec).
Looking at the journal, I see this is due to a timeout:

Sep 05 21:44:16 bluebook systemd[1]: Job tmpfs.device/start timed out.
Sep 05 21:44:16 bluebook systemd[1]: Job local-fs.target/start failed
with result 'dependency'.
Sep 05 21:44:16 bluebook systemd[1]: Triggering OnFailure=
dependencies of local-fs.target.
Sep 05 21:44:16 bluebook systemd[1]: Failed to enqueue OnFailure= job:
Operation not permitted
Sep 05 21:44:16 bluebook systemd[1]: Job tmp.mount/start failed with
result 'dependency'.
Sep 05 21:44:16 bluebook systemd[1]: Job
systemd-fsck at tmpfs.service/start failed with result 'dependency'.
Sep 05 21:44:16 bluebook systemd[1]: Job tmpfs.device/start failed
with result 'timeout'.

% systemctl status tmpfs


                         tmpfs.service
	  Loaded: error (Reason: No such file or directory)
	  Active: inactive (dead)

Disabling the tmpfs in "fileSystems" fixes this, but then /tmp is just on-disk.


About changing services to units...
Do you want us to send pull requests against edolstra/systemd ?
Or have you planned another migration-path, like enabling systemd
config options on nixos/master, so people can switch back and forth?



On Thu, Aug 30, 2012 at 8:51 PM, Eelco Dolstra
<eelco.dolstra at logicblox.com> wrote:
> Hi all,
>
> For the last few months I've been working on and off on replacing Upstart with
> systemd as NixOS's init system.  This is now in a fairly usable state.  (I'm
> running it on my own laptop, but it hasn't been widely tested and there are
> undoubtedly many issues remaining.)
>
> If you want to test it, do:
>
> $ git clone -b systemd git://github.com/edolstra/nixos.git nixos-systemd
> $ nixos-rebuild switch -I nixos=/path/to/nixos-systemd
> $ reboot
>
> The reboot is required to switch to systemd.
>
> Things to note:
>
> * You can see and manage systemd units using "systemctl".  As a convenience for
> Upstart users, there are shell aliases "start", "stop" and "status" that run the
> corresponding "systemctl" command.  E.g. "status httpd" shows the status of the
> httpd.service unit.
>
> * Systemd service units can be defined through the boot.systemd.services option.
>  For compatibility, Upstart jobs defined in the "jobs" option are automatically
> converted to systemd services.  (See modules/system/upstart/upstart.nix.)
> However, this mapping is not perfect.  In particular, Upstart-specific
> constructs such as startOn and extraConfig should be rewritten.
>
> * ConsoleKit is gone.  Its role has been taken over by logind.  Use "loginctl"
> to manage user sessions.  Every user session runs in a separate cgroup (see
> "systemd-cgls" and "systemd-cgtop" for a nice view).
>
> * Syslogd no longer runs by default since systemd provides its own journal
> service.  This means /var/log/{messages,warn} are not used.  Instead you can run
> "journalctl" or "systemctl status" to see log messages.
>
> * KDE 4.7 can no longer suspend/hibernate.  Maybe a newer KDE fixes this.  You
> can however run "systemctl suspend" or "systemctl hibernate" (as a logged-in user).
>
> * There is no getty/login started on tty1.
>
> --
> Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev


More information about the nix-dev mailing list