quakeflake/nixos-modules/container.nix

32 lines
672 B
Nix
Raw Normal View History

2021-12-02 01:59:44 +01:00
{ pkgs, ... }:
{
# system
boot = {
isContainer = true;
tmpOnTmpfs = true;
};
nix = {
extraOptions = "experimental-features = nix-command flakes";
package = pkgs.nixUnstable;
};
system.stateVersion = "21.11";
# network
networking.useDHCP = false;
systemd.network.enable = false;
services.resolved.enable = false;
2021-12-02 02:43:25 +01:00
networking.firewall.allowedTCPPorts = [ 22 ];
2021-12-02 01:59:44 +01:00
services.openssh = {
2021-12-02 02:43:25 +01:00
startWhenNeeded = true;
permitRootLogin = "prohibit-password";
2021-12-02 01:59:44 +01:00
};
2021-12-02 02:43:25 +01:00
users.users.root.openssh.authorizedKeys.keyFiles = [
../astro.pub
];
2021-12-02 01:59:44 +01:00
environment.noXlibs = false;
environment.systemPackages = with pkgs; [
git tcpdump
];
}