diff --git a/modules/base/default.nix b/modules/base/default.nix index 35c6ea8..475f0d8 100644 --- a/modules/base/default.nix +++ b/modules/base/default.nix @@ -11,6 +11,7 @@ ./network.nix ./nix.nix ./packages.nix + ./podman.nix ./ripgrep.nix ./ssh.nix ./sudo.nix diff --git a/modules/base/podman.nix b/modules/base/podman.nix new file mode 100644 index 0000000..1193ae8 --- /dev/null +++ b/modules/base/podman.nix @@ -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"; + } + ]; + }; +} diff --git a/modules/borg.nix b/modules/borg.nix index cb6815e..c999192 100644 --- a/modules/borg.nix +++ b/modules/borg.nix @@ -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" ];