network/nix/nixos-module/container/defaults.nix

39 lines
791 B
Nix
Raw Normal View History

2023-11-08 01:13:30 +01:00
{ config, lib, modulesPath, pkgs, ... }:
2021-03-05 20:05:50 +01:00
{
imports = [
(modulesPath + "/profiles/minimal.nix")
(modulesPath + "/virtualisation/lxc-container.nix")
];
2023-11-08 01:13:30 +01:00
environment = {
etc."machine-id".text = builtins.substring 0 8 (builtins.hashString "sha256" config.networking.hostName);
systemPackages = with pkgs; [
ripgrep
];
};
2023-06-04 23:02:06 +02:00
2021-03-05 20:05:50 +01:00
nix = {
settings = {
sandbox = false;
max-jobs = lib.mkDefault 4;
cores = lib.mkDefault 4;
};
2021-03-05 20:05:50 +01:00
};
systemd.services =
let
noNestOpts.serviceConfig = {
PrivateTmp = lib.mkOverride 0 false;
};
in {
nscd = noNestOpts;
systemdLogind = noNestOpts;
nix-daemon.enable = false;
2021-03-05 20:05:50 +01:00
};
systemd.sockets.nix-daemon.enable = false;
services.openssh.enable = false;
2021-03-05 20:05:50 +01:00
}