This commit is contained in:
Casper V. Kristensen 2024-04-29 22:50:28 +02:00
parent 252127cd36
commit 24b13a61ab
3 changed files with 34 additions and 1 deletions

View file

@ -11,6 +11,7 @@
./network.nix
./nix.nix
./packages.nix
./podman.nix
./ripgrep.nix
./ssh.nix
./sudo.nix

30
modules/base/podman.nix Normal file
View file

@ -0,0 +1,30 @@
{...}: {
# Podman can run rootless containers and be a drop-in replacement for Docker.
# It is used for systemd services containers defined using
# `virtualisation.oci-containers`.
# https://wiki.nixos.org/wiki/Podman
virtualisation.containers.enable = true;
virtualisation.podman = {
enable = true;
# Automatically `podman system prune` weekly
autoPrune.enable = true;
# Required for containers under podman-compose to be able to talk to each
# other.
defaultNetwork.settings = {
dns_enabled = true;
ipv6_enabled = true;
};
};
# Persist docker volumes
environment.persistence."/nix/persist" = {
directories = [
{
directory = "/var/lib/containers";
user = "root";
group = "root";
mode = "0700";
}
];
};
}

View file

@ -90,15 +90,17 @@
"! /**/found.000/*"
"! /**/.cache"
"! /**/Cache"
"! /**/cache"
"! /**/Cache"
"! /srv/torrents"
"! /var/lib/containers/overlay*"
"! /var/lib/docker/overlay2"
"- *.tmp"
"! /home/*/Android/Sdk"
"! /home/*/Downloads"
"! /home/*/GOG Games"
"! /home/*/.local/share/containers/storage/overlay*"
"! /home/*/.steam"
];