configurations of hq services
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

lxc-container.nix 814B

12345678910111213141516171819202122232425262728293031
  1. { pkgs, lib, ... }:
  2. {
  3. imports =
  4. [ <nixpkgs/nixos/modules/profiles/minimal.nix>
  5. <nixpkgs/nixos/modules/profiles/docker-container.nix>
  6. ];
  7. nix.useSandbox = false;
  8. nix.maxJobs = lib.mkDefault 1;
  9. nix.buildCores = lib.mkDefault 4;
  10. boot.isContainer = true;
  11. # /sbin/init
  12. boot.loader.initScript.enable = true;
  13. boot.loader.grub.enable = false;
  14. # Create a few files early before packing tarball for Proxmox
  15. # architecture/OS detection.
  16. system.extraSystemBuilderCmds =
  17. ''
  18. mkdir -m 0755 -p $out/bin
  19. ln -s ${pkgs.bash}/bin/bash $out/bin/sh
  20. mkdir -m 0755 -p $out/sbin
  21. ln -s ../init $out/sbin/init
  22. '';
  23. fileSystems."/" = { fsType = "rootfs"; device = "rootfs"; };
  24. # Required for remote deployment
  25. services.openssh.enable = true;
  26. }