diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-09-12 08:14:37 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-09-12 08:14:37 +0000 |
commit | 7d648ac22d941d0c7efdd987315ae0ddf9932ba0 (patch) | |
tree | 51a3e8126722c5a52a9a1e7e40b4eeaf4610db0b /nixpkgs/nixos/modules/virtualisation/lxc-instance-common.nix | |
parent | aa4353b499e6950b7333578f936455a628145c31 (diff) | |
parent | db9208ab987cdeeedf78ad9b4cf3c55f5ebd269b (diff) | |
download | nixlib-7d648ac22d941d0c7efdd987315ae0ddf9932ba0.tar nixlib-7d648ac22d941d0c7efdd987315ae0ddf9932ba0.tar.gz nixlib-7d648ac22d941d0c7efdd987315ae0ddf9932ba0.tar.bz2 nixlib-7d648ac22d941d0c7efdd987315ae0ddf9932ba0.tar.lz nixlib-7d648ac22d941d0c7efdd987315ae0ddf9932ba0.tar.xz nixlib-7d648ac22d941d0c7efdd987315ae0ddf9932ba0.tar.zst nixlib-7d648ac22d941d0c7efdd987315ae0ddf9932ba0.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/nixos/modules/virtualisation/lxc-instance-common.nix')
-rw-r--r-- | nixpkgs/nixos/modules/virtualisation/lxc-instance-common.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/nixpkgs/nixos/modules/virtualisation/lxc-instance-common.nix b/nixpkgs/nixos/modules/virtualisation/lxc-instance-common.nix new file mode 100644 index 000000000000..d6a0e05fb1c9 --- /dev/null +++ b/nixpkgs/nixos/modules/virtualisation/lxc-instance-common.nix @@ -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; +} |