mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Add docker
This commit is contained in:
parent
3e5481a2ba
commit
4dc3200d68
2 changed files with 27 additions and 1 deletions
|
|
@ -2,4 +2,31 @@
|
||||||
imports = [
|
imports = [
|
||||||
./media.nix
|
./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"];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
{ pkgs, lib, config, ... }: {
|
{ pkgs, lib, config, ... }: {
|
||||||
options.mods.docker.media = {
|
options.mods.docker.media = {
|
||||||
enable = lib.mkEnableOption {
|
enable = lib.mkEnableOption {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue