···35353636 config = {
37373838- environment.etc =
3939- [ # Name Service Switch configuration file. Required by the C library.
4040- # !!! Factor out the mdns stuff. The avahi module should define
4141- # an option used by this module.
4242- { source = pkgs.writeText "nsswitch.conf"
4343- ''
4444- passwd: files ldap
4545- group: files ldap
4646- shadow: files ldap
4747- hosts: files ${optionalString nssmdns "mdns_minimal [NOTFOUND=return]"} dns ${optionalString nssmdns "mdns"} ${optionalString nsswins "wins"} myhostname
4848- networks: files dns
4949- ethers: files
5050- services: files
5151- protocols: files
5252- '';
5353- target = "nsswitch.conf";
5454- }
5555- ];
3838+ # Name Service Switch configuration file. Required by the C
3939+ # library. !!! Factor out the mdns stuff. The avahi module
4040+ # should define an option used by this module.
4141+ environment.etc."nsswitch.conf".text =
4242+ ''
4343+ passwd: files ldap
4444+ group: files ldap
4545+ shadow: files ldap
4646+ hosts: files ${optionalString nssmdns "mdns_minimal [NOTFOUND=return]"} dns ${optionalString nssmdns "mdns"} ${optionalString nsswins "wins"} myhostname mymachines
4747+ networks: files dns
4848+ ethers: files
4949+ services: files
5050+ protocols: files
5151+ '';
56525757- # Use nss-myhostname to ensure that our hostname always resolves to
5858- # a valid IP address. It returns all locally configured IP
5959- # addresses, or ::1 and 127.0.0.2 as fallbacks.
6060- system.nssModules = [ pkgs.systemd ];
5353+ # Systemd provides nss-myhostname to ensure that our hostname
5454+ # always resolves to a valid IP address. It returns all locally
5555+ # configured IP addresses, or ::1 and 127.0.0.2 as
5656+ # fallbacks. Systemd also provides nss-mymachines to return IP
5757+ # addresses of local containers.
5858+ system.nssModules = [ config.systemd.package ];
61596260 };
6361}
···277277278278 NotifyAccess = "all";
279279280280- # Note that on reboot, systemd-nspawn returns 10, so this
280280+ # Note that on reboot, systemd-nspawn returns 133, so this
281281 # unit will be restarted. On poweroff, it returns 0, so the
282282 # unit won't be restarted.
283283+ RestartForceExitStatus = "133";
284284+ SuccessExitStatus = "133";
285285+283286 Restart = "on-failure";
284287285288 # Hack: we don't want to kill systemd-nspawn, since we call