summaryrefslogtreecommitdiff
path: root/config/container.nix
blob: 60cb2d9517f3cf78a38ba34005237c6f298391b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ config, lib, pkgs, ... }:
{
  boot.isContainer = true;
  networking.firewall.allowedTCPPorts = [ 22 ];
  services = {
    openssh.enable = lib.mkDefault true;
    openssh.passwordAuthentication = false;
  };
  system.activationScripts.installInitScript = ''
    ln -fs $systemConfig/init /init
    mkdir -p /sbin/init || true
    ln -fs $systemConfig/init /sbin/init
  '';
  boot.specialFileSystems = {
    "/dev/pts" = {
      options = lib.mkAfter [ "ptmxmode=666" ];
    };
  };
}