diff options
author | Jaka Hudoklin <jakahudoklin@gmail.com> | 2014-12-11 22:58:17 +0100 |
---|---|---|
committer | Jaka Hudoklin <jakahudoklin@gmail.com> | 2014-12-11 23:17:27 +0100 |
commit | deb28cf0b1af905f007a9219e1e11da6859faede (patch) | |
tree | c4b11429bc9e1c88a9329c405ecfd1bdbc484a63 /nixos/modules/virtualisation/lxc-container.nix | |
parent | a782b890d53b5c8a336677bb7c5394f9afb4c39b (diff) |
nixos: container tarball release
- Create container nixos profile
- Create lxc-container nixos config using container nixos profile
- Docker nixos image, use nixos profile for its base config
Diffstat (limited to 'nixos/modules/virtualisation/lxc-container.nix')
-rw-r--r-- | nixos/modules/virtualisation/lxc-container.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/lxc-container.nix b/nixos/modules/virtualisation/lxc-container.nix new file mode 100644 index 000000000000..2fa749d542ea --- /dev/null +++ b/nixos/modules/virtualisation/lxc-container.nix @@ -0,0 +1,26 @@ +{ config, pkgs, lib, ... }: + +with lib; + +{ + imports = [ + ../profiles/container.nix + ]; + + # Allow the user to login as root without password. + users.extraUsers.root.initialHashedPassword = mkOverride 150 ""; + + # Some more help text. + services.mingetty.helpLine = + '' + + Log in as "root" with an empty password. + ''; + + # Containers should be light-weight, so start sshd on demand. + services.openssh.enable = mkDefault true; + services.openssh.startWhenNeeded = mkDefault true; + + # Allow ssh connections + networking.firewall.allowedTCPPorts = [ 22 ]; +} |