Skip to content

Instantly share code, notes, and snippets.

@offlinehacker
Last active August 20, 2021 11:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save offlinehacker/af12978e3df87f8fdb552ee471e26b70 to your computer and use it in GitHub Desktop.
Save offlinehacker/af12978e3df87f8fdb552ee471e26b70 to your computer and use it in GitHub Desktop.
nixos container
{ pkgs, lib, ...}: {
imports = [
./nixos/modules/profiles/minimal.nix
];
boot.isContainer = true;
boot.specialFileSystems = lib.mkForce {};
networking.hostName = "";
services.journald.console = "/dev/console";
systemd.services.audit.enable = false;
systemd.services.systemd-logind.enable = false;
systemd.services.console-getty.enable = false;
services.nscd.enable = false;
systemd.sockets.nix-daemon.enable = lib.mkDefault false;
systemd.services.nix-daemon.enable = lib.mkDefault false;
services.postgresql.enable = true;
}
{ pkgs, lib, ...}: {
imports = [
./nixos/modules/profiles/minimal.nix
];
boot.isContainer = true;
boot.specialFileSystems = lib.mkForce {};
networking.hostName = "";
services.journald.console = "/dev/console";
systemd.services.audit.enable = false;
systemd.services.systemd-logind.enable = false;
systemd.services.console-getty.enable = false;
services.nscd.enable = false;
systemd.sockets.nix-daemon.enable = lib.mkDefault false;
systemd.services.nix-daemon.enable = lib.mkDefault false;
services.postgresql.enable = true;
}
podman run --systemd=true --pids-limit 0 --tmpfs /run --tmpfs /run/wrappers -ti localhost/xtruder/nixos-postgresql:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment