diff --git a/hosts/MaxNixosLaptop/configuration.nix b/hosts/MaxNixosLaptop/configuration.nix index b343d07..7a67eb6 100644 --- a/hosts/MaxNixosLaptop/configuration.nix +++ b/hosts/MaxNixosLaptop/configuration.nix @@ -87,11 +87,6 @@ environment.sessionVariables.NIXOS_OZONE_WL = "1"; virtualisation = { - podman = { - enable = true; - dockerCompat = true; - defaultNetwork.settings.dns_enabled = true; - }; libvirtd = { enable = true; qemu = { diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 1a25226..fe36a3d 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -5,7 +5,7 @@ }: let cfg = config.myConfig; in { - imports = [./bootloader.nix ./locale.nix ./greetd.nix ./rebuild.nix ./sops.nix ./sway.nix ./wifi.nix ./music.nix ./cups.nix ./gpu/amd.nix ./touch.nix ./cache.nix ./nix.nix ./update.nix]; + imports = [./bootloader.nix ./locale.nix ./greetd.nix ./rebuild.nix ./sops.nix ./sway.nix ./wifi.nix ./music.nix ./cups.nix ./gpu/amd.nix ./touch.nix ./cache.nix ./nix.nix ./update.nix ./podman.nix]; options.myConfig = { enable = lib.mkEnableOption "my custom config"; @@ -26,6 +26,7 @@ in { rebuild.enable = true; cache.enable = true; autoUpdate.enable = true; + podman.enable = true; greetd.enable = lib.mkIf cfg.desktop true; sway.enable = lib.mkIf cfg.desktop true; diff --git a/modules/nixos/podman.nix b/modules/nixos/podman.nix new file mode 100644 index 0000000..5dcea4d --- /dev/null +++ b/modules/nixos/podman.nix @@ -0,0 +1,20 @@ +{ + lib, + config, + ... +}: let + cfg = config.myConfig.podman; +in { + options.myConfig.podman = { + enable = lib.mkEnableOption "podman"; + }; + + config = lib.mkIf cfg.enable { + virtualisation. + podman = { + enable = true; + dockerCompat = true; + defaultNetwork.settings.dns_enabled = true; + }; + }; +}