mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
32 lines
904 B
Nix
32 lines
904 B
Nix
{ pkgs, lib, ... }: {
|
|
imports = [
|
|
./media.nix
|
|
];
|
|
|
|
options.mods.docker.media = {
|
|
enable = lib.mkEnableOption {
|
|
default = false;
|
|
description = "enables docker containers for media server";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf config.mods.docker.media.enable {
|
|
environment.systemPackages = [
|
|
pkgs.arion
|
|
|
|
# Do install the docker CLI to talk to podman.
|
|
# Not needed when virtualisation.docker.enable = true;
|
|
pkgs.docker-client
|
|
];
|
|
|
|
# Arion works with Docker, but for NixOS-based containers, you need Podman
|
|
# since NixOS 21.05.
|
|
virtualisation.docker.enable = false;
|
|
virtualisation.podman.enable = true;
|
|
virtualisation.podman.dockerSocket.enable = true;
|
|
virtualisation.podman.defaultNetwork.dnsname.enable = true;
|
|
|
|
# Use your username instead of `myuser`
|
|
users.extraUsers.${mods.user.name}.extraGroups = ["podman"];
|
|
};
|
|
}
|