mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 04:05:40 +03:00
nixos/lxd: add virtual-machine support, image and module
This commit is contained in:
parent
73982ef92a
commit
efd1605be6
15 changed files with 365 additions and 232 deletions
30
nixos/modules/virtualisation/lxc-instance-common.nix
Normal file
30
nixos/modules/virtualisation/lxc-instance-common.nix
Normal file
|
@ -0,0 +1,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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue