create podman module

This commit is contained in:
Max Känner 2024-12-28 23:09:48 +01:00
parent f699955913
commit 1a478ba01e
3 changed files with 22 additions and 6 deletions

View File

@ -87,11 +87,6 @@
environment.sessionVariables.NIXOS_OZONE_WL = "1"; environment.sessionVariables.NIXOS_OZONE_WL = "1";
virtualisation = { virtualisation = {
podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
libvirtd = { libvirtd = {
enable = true; enable = true;
qemu = { qemu = {

View File

@ -5,7 +5,7 @@
}: let }: let
cfg = config.myConfig; cfg = config.myConfig;
in { 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 = { options.myConfig = {
enable = lib.mkEnableOption "my custom config"; enable = lib.mkEnableOption "my custom config";
@ -26,6 +26,7 @@ in {
rebuild.enable = true; rebuild.enable = true;
cache.enable = true; cache.enable = true;
autoUpdate.enable = true; autoUpdate.enable = true;
podman.enable = true;
greetd.enable = lib.mkIf cfg.desktop true; greetd.enable = lib.mkIf cfg.desktop true;
sway.enable = lib.mkIf cfg.desktop true; sway.enable = lib.mkIf cfg.desktop true;

20
modules/nixos/podman.nix Normal file
View File

@ -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;
};
};
}