Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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