From d14da7c82c19b56700f38d90e605e02510a32b90 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Wed, 6 Mar 2024 23:49:20 -0500 Subject: [PATCH] made homelab import virtualization in order to share code between hosts --- flake.nix | 1 - modules/homelab/default.nix | 18 +++++------------- modules/virtualization/default.nix | 3 +++ 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/flake.nix b/flake.nix index 36eedeaf..9fde06ac 100644 --- a/flake.nix +++ b/flake.nix @@ -103,7 +103,6 @@ ./system ./users/aly ./desktop/gnome - ./modules/virtualization ./modules/homelab ./modules/steam ./modules/via-qmk diff --git a/modules/homelab/default.nix b/modules/homelab/default.nix index 4c907824..fc3b5a62 100644 --- a/modules/homelab/default.nix +++ b/modules/homelab/default.nix @@ -1,23 +1,15 @@ { config, pkgs, ... }: + { + imports = [ + ../virtualization + ]; + # Open TCP ports for audiobookshelf, plex-server, and transmission-server. networking.firewall.allowedTCPPorts = [ 51413 13378 32400 9091 ]; networking.firewall.allowedUDPPorts = [ 51413 ]; virtualisation = { - podman = { - enable = true; - - # Create a `docker` alias for podman, to use it as a drop-in replacement - dockerCompat = true; - - # Required for containers under podman-compose to be able to talk to each other. - defaultNetwork.settings.dns_enabled = true; - }; - oci-containers = { - backend = "podman"; - }; - oci-containers.containers = { audiobookshelf = { ports = ["0.0.0.0:13378:80"]; diff --git a/modules/virtualization/default.nix b/modules/virtualization/default.nix index d7fb2ac2..6feaea6b 100644 --- a/modules/virtualization/default.nix +++ b/modules/virtualization/default.nix @@ -18,5 +18,8 @@ # Required for containers under podman-compose to be able to talk to each other. defaultNetwork.settings.dns_enabled = true; }; + oci-containers = { + backend = "podman"; + }; }; } \ No newline at end of file