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 847B

1234567891011121314151617181920212223242526272829303132
  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. networking.useNetworkd = true;
  11. boot.isContainer = true;
  12. # /sbin/init
  13. boot.loader.initScript.enable = true;
  14. boot.loader.grub.enable = false;
  15. # Create a few files early before packing tarball for Proxmox
  16. # architecture/OS detection.
  17. system.extraSystemBuilderCmds =
  18. ''
  19. mkdir -m 0755 -p $out/bin
  20. ln -s ${pkgs.bash}/bin/bash $out/bin/sh
  21. mkdir -m 0755 -p $out/sbin
  22. ln -s ../init $out/sbin/init
  23. '';
  24. fileSystems."/" = { fsType = "rootfs"; device = "rootfs"; };
  25. # Required for remote deployment
  26. services.openssh.enable = true;
  27. }