From 79e66fce1c2b5a7de3e9a0e75b591ca9552a62ef Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Thu, 9 Dec 2021 12:10:44 +1000 Subject: [PATCH] nixos/podman: sort files into directories Makes codeowners, git history, etc. a bit simpler now that podman has expanded beyond the original single file module and test. --- .github/CODEOWNERS | 4 ++-- nixos/modules/module-list.nix | 3 +-- .../virtualisation/{podman.nix => podman/default.nix} | 4 ++-- .../{podman-dnsname.nix => podman/dnsname.nix} | 0 .../network-socket-ghostunnel.nix} | 0 .../network-socket.nix} | 4 ++++ nixos/tests/all-tests.nix | 6 +++--- nixos/tests/{podman.nix => podman/default.nix} | 2 +- nixos/tests/{podman-dnsname.nix => podman/dnsname.nix} | 2 +- .../tls-ghostunnel.nix} | 2 +- 10 files changed, 15 insertions(+), 12 deletions(-) rename nixos/modules/virtualisation/{podman.nix => podman/default.nix} (98%) rename nixos/modules/virtualisation/{podman-dnsname.nix => podman/dnsname.nix} (100%) rename nixos/modules/virtualisation/{podman-network-socket-ghostunnel.nix => podman/network-socket-ghostunnel.nix} (100%) rename nixos/modules/virtualisation/{podman-network-socket.nix => podman/network-socket.nix} (97%) rename nixos/tests/{podman.nix => podman/default.nix} (99%) rename nixos/tests/{podman-dnsname.nix => podman/dnsname.nix} (97%) rename nixos/tests/{podman-tls-ghostunnel.nix => podman/tls-ghostunnel.nix} (99%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 719f61203d22..d85ff2d08a57 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -219,9 +219,9 @@ # Podman, CRI-O modules and related /nixos/modules/virtualisation/containers.nix @NixOS/podman @zowoq @adisbladis /nixos/modules/virtualisation/cri-o.nix @NixOS/podman @zowoq @adisbladis -/nixos/modules/virtualisation/podman.nix @NixOS/podman @zowoq @adisbladis +/nixos/modules/virtualisation/podman @NixOS/podman @zowoq @adisbladis /nixos/tests/cri-o.nix @NixOS/podman @zowoq @adisbladis -/nixos/tests/podman.nix @NixOS/podman @zowoq @adisbladis +/nixos/tests/podman @NixOS/podman @zowoq @adisbladis # Docker tools /pkgs/build-support/docker @roberth @utdemir diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 8cb7c39005c5..c83a69233384 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -1192,8 +1192,7 @@ ./virtualisation/kvmgt.nix ./virtualisation/openvswitch.nix ./virtualisation/parallels-guest.nix - ./virtualisation/podman.nix - ./virtualisation/podman-network-socket-ghostunnel.nix + ./virtualisation/podman/default.nix ./virtualisation/qemu-guest-agent.nix ./virtualisation/railcar.nix ./virtualisation/spice-usb-redirection.nix diff --git a/nixos/modules/virtualisation/podman.nix b/nixos/modules/virtualisation/podman/default.nix similarity index 98% rename from nixos/modules/virtualisation/podman.nix rename to nixos/modules/virtualisation/podman/default.nix index 385475c84a1a..94fd727a4b56 100644 --- a/nixos/modules/virtualisation/podman.nix +++ b/nixos/modules/virtualisation/podman/default.nix @@ -39,8 +39,8 @@ let in { imports = [ - ./podman-dnsname.nix - ./podman-network-socket.nix + ./dnsname.nix + ./network-socket.nix (lib.mkRenamedOptionModule [ "virtualisation" "podman" "libpod" ] [ "virtualisation" "containers" "containersConf" ]) ]; diff --git a/nixos/modules/virtualisation/podman-dnsname.nix b/nixos/modules/virtualisation/podman/dnsname.nix similarity index 100% rename from nixos/modules/virtualisation/podman-dnsname.nix rename to nixos/modules/virtualisation/podman/dnsname.nix diff --git a/nixos/modules/virtualisation/podman-network-socket-ghostunnel.nix b/nixos/modules/virtualisation/podman/network-socket-ghostunnel.nix similarity index 100% rename from nixos/modules/virtualisation/podman-network-socket-ghostunnel.nix rename to nixos/modules/virtualisation/podman/network-socket-ghostunnel.nix diff --git a/nixos/modules/virtualisation/podman-network-socket.nix b/nixos/modules/virtualisation/podman/network-socket.nix similarity index 97% rename from nixos/modules/virtualisation/podman-network-socket.nix rename to nixos/modules/virtualisation/podman/network-socket.nix index 1429164630b3..94d8da9d2b61 100644 --- a/nixos/modules/virtualisation/podman-network-socket.nix +++ b/nixos/modules/virtualisation/podman/network-socket.nix @@ -9,6 +9,10 @@ let in { + imports = [ + ./network-socket-ghostunnel.nix + ]; + options.virtualisation.podman.networkSocket = { enable = mkOption { type = types.bool; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 63be67892017..a1113ff631e3 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -369,9 +369,9 @@ in plikd = handleTest ./plikd.nix {}; plotinus = handleTest ./plotinus.nix {}; podgrab = handleTest ./podgrab.nix {}; - podman = handleTestOn ["x86_64-linux"] ./podman.nix {}; - podman-dnsname = handleTestOn ["x86_64-linux"] ./podman-dnsname.nix {}; - podman-tls-ghostunnel = handleTestOn ["x86_64-linux"] ./podman-tls-ghostunnel.nix {}; + podman = handleTestOn ["x86_64-linux"] ./podman/default.nix {}; + podman-dnsname = handleTestOn ["x86_64-linux"] ./podman/dnsname.nix {}; + podman-tls-ghostunnel = handleTestOn ["x86_64-linux"] ./podman/tls-ghostunnel.nix {}; pomerium = handleTestOn ["x86_64-linux"] ./pomerium.nix {}; postfix = handleTest ./postfix.nix {}; postfix-raise-smtpd-tls-security-level = handleTest ./postfix-raise-smtpd-tls-security-level.nix {}; diff --git a/nixos/tests/podman.nix b/nixos/tests/podman/default.nix similarity index 99% rename from nixos/tests/podman.nix rename to nixos/tests/podman/default.nix index 7eae575fd7f0..b52a7f060ad6 100644 --- a/nixos/tests/podman.nix +++ b/nixos/tests/podman/default.nix @@ -1,6 +1,6 @@ # This test runs podman and checks if simple container starts -import ./make-test-python.nix ( +import ../make-test-python.nix ( { pkgs, lib, ... }: { name = "podman"; meta = { diff --git a/nixos/tests/podman-dnsname.nix b/nixos/tests/podman/dnsname.nix similarity index 97% rename from nixos/tests/podman-dnsname.nix rename to nixos/tests/podman/dnsname.nix index dd352f754dcf..3768ae79e067 100644 --- a/nixos/tests/podman-dnsname.nix +++ b/nixos/tests/podman/dnsname.nix @@ -1,4 +1,4 @@ -import ./make-test-python.nix ( +import ../make-test-python.nix ( { pkgs, lib, ... }: let inherit (pkgs) writeTextDir python3 curl; diff --git a/nixos/tests/podman-tls-ghostunnel.nix b/nixos/tests/podman/tls-ghostunnel.nix similarity index 99% rename from nixos/tests/podman-tls-ghostunnel.nix rename to nixos/tests/podman/tls-ghostunnel.nix index 0e687b199b26..c0bc47cc40b1 100644 --- a/nixos/tests/podman-tls-ghostunnel.nix +++ b/nixos/tests/podman/tls-ghostunnel.nix @@ -1,7 +1,7 @@ /* This test runs podman as a backend for the Docker CLI. */ -import ./make-test-python.nix ( +import ../make-test-python.nix ( { pkgs, lib, ... }: let gen-ca = pkgs.writeScript "gen-ca" ''