summary refs log tree commit diff
path: root/nixos/modules/virtualisation/lxc-instance-common.nix
blob: d6a0e05fb1c961411fe915e935345e73f4a86e27 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{lib, ...}:

{
  imports = [
    ./lxc-image-metadata.nix

    ../installer/cd-dvd/channel.nix
    ../profiles/clone-config.nix
    ../profiles/minimal.nix
  ];

  # Allow the user to login as root without password.
  users.users.root.initialHashedPassword = lib.mkOverride 150 "";

  # Some more help text.
  services.getty.helpLine = ''

    Log in as "root" with an empty password.
  '';

  # Containers should be light-weight, so start sshd on demand.
  services.openssh.enable = lib.mkDefault true;
  services.openssh.startWhenNeeded = lib.mkDefault true;

  # As this is intended as a standalone image, undo some of the minimal profile stuff
  environment.noXlibs = false;
  documentation.enable = true;
  documentation.nixos.enable = true;
  services.logrotate.enable = true;
}