summaryrefslogtreecommitdiff
path: root/config/container.nix
blob: eaf78c3ed29576822b2002fa3dc3b4f84271321a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{ config, lib, pkgs, ... }: {
  boot.isContainer = true;
  networking.firewall.allowedTCPPorts = [ 22 ];
  services = {
    openssh.enable = lib.mkDefault true;
    openssh.settings.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" ]; };
  };
}