From fe5ec84f14710413a9e1b11b51175b76ba576a87 Mon Sep 17 00:00:00 2001 From: randogoth Date: Tue, 3 Feb 2026 07:41:19 +0200 Subject: [PATCH] added podman support --- modules/system/base.nix | 20 +++++++++++++++----- modules/system/packages.nix | 1 + modules/users/admin.nix | 12 +++++++++++- templates/home-home.nix | 12 +++++++----- 4 files changed, 34 insertions(+), 11 deletions(-) diff --git a/modules/system/base.nix b/modules/system/base.nix index e55b473..9700263 100644 --- a/modules/system/base.nix +++ b/modules/system/base.nix @@ -6,6 +6,10 @@ i18n.defaultLocale = "en_US.UTF-8"; console.keyMap = "us"; + boot.supportedFilesystems = [ "btrfs" "ext4" "vfat" "xfs" ]; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + nix.settings = { experimental-features = [ "nix-command" "flakes" ]; substituters = lib.mkBefore [ @@ -20,12 +24,18 @@ networking.useDHCP = lib.mkDefault true; - boot.supportedFilesystems = [ "btrfs" "ext4" "vfat" "xfs" ]; - - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - nixpkgs.config.allowUnfree = true; system.stateVersion = "25.11"; + + virtualisation = { + containers.enable = true; + # docker.enable = true; + podman = { + enable = true; + dockerCompat = true; + # Required for containers under podman-compose to be able to talk to each other. + defaultNetwork.settings.dns_enabled = true; + }; + }; } diff --git a/modules/system/packages.nix b/modules/system/packages.nix index 27d7c08..c3be557 100644 --- a/modules/system/packages.nix +++ b/modules/system/packages.nix @@ -9,5 +9,6 @@ pkgs.just pkgs.libnotify pkgs.micro + pkgs.podman-compose ]; } diff --git a/modules/users/admin.nix b/modules/users/admin.nix index b43fc80..764102a 100644 --- a/modules/users/admin.nix +++ b/modules/users/admin.nix @@ -1,9 +1,19 @@ { lib, pkgs, ... }: { + users.groups = { + docker = {}; + podman = {}; + }; + users.users.admin = { isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" ]; + extraGroups = [ + "wheel" + "networkmanager" + "podman" + "docker" + ]; hashedPassword = "$6$HrwFoHtYRwiTZsYo$gKNOvkQhjalczOLgoTXvVu1MaihYP4BdBnVpWkdoAf.5MAiV2mMPRibYyGv9ti1Q63AhGK7n4wOPjAU0O74mK0"; }; diff --git a/templates/home-home.nix b/templates/home-home.nix index 6b3b195..d88dde6 100644 --- a/templates/home-home.nix +++ b/templates/home-home.nix @@ -28,26 +28,28 @@ home.packages = with pkgs; [ # decibels # default GNOME audio player - gnome-calendar # default GNOME calendar + gnome-calendar # default GNOME calendar # gnome-contacts # default GNOME contacts - firefox # Mozilla web browser + firefox # Mozilla web browser # google-chrome # web browser from Google # chromium # open source web browser from Google # brave # privacy oriented web browser # opera # fast alternative web browser # vivaldi # powerful and personal web browser - thunderbird # full-featured Mozilla e-mail client + thunderbird # full-featured Mozilla e-mail client # geary # default GNOME email client - ptyxis # container aware GNOME terminal + ptyxis # container aware GNOME terminal # alacritty # GPU accelerated terminal emulator # kitty # GPU accelerated terminal emulator - jetbrains-toolbox # fresh versions of Android Studio and other tools + jetbrains-toolbox # fresh versions of Android Studio and other tools # devpod # open-source code spaces + pods # Podman desktop application + ]; home.file = {