From b6653cee0b53b3369c7eca9e7d4a7d66d11db5e4 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Wed, 18 Dec 2024 20:09:08 -0500 Subject: [PATCH] darwin compatible commit, touching up on modules, common system ietms --- modules/common/default.nix | 6 +++- modules/common/fonts.nix | 18 +++++------ modules/machine/cloud/configuration.nix | 23 ++++++------- modules/machine/sephiroth/configuration.nix | 3 +- modules/virtualization/podman.nix | 36 ++++++++------------- 5 files changed, 39 insertions(+), 47 deletions(-) diff --git a/modules/common/default.nix b/modules/common/default.nix index 18cfde2..195ad06 100644 --- a/modules/common/default.nix +++ b/modules/common/default.nix @@ -1,4 +1,8 @@ -{...}: { +{ + pkgs, + lib, + ... +}: { imports = [ ./core.nix ./fonts.nix diff --git a/modules/common/fonts.nix b/modules/common/fonts.nix index 57e2517..0e805af 100644 --- a/modules/common/fonts.nix +++ b/modules/common/fonts.nix @@ -1,14 +1,14 @@ { pkgs, lib, + ... }: { - fonts.packages = with pkgs; - [ - noto-fonts - noto-fonts-emoji - liberation_ttf - noto-fonts-cjk - monaspace - ] - ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); + fonts.packages = with pkgs; [ + nerdfonts + noto-fonts + noto-fonts-emoji + liberation_ttf + noto-fonts-cjk-sans + monaspace + ]; } diff --git a/modules/machine/cloud/configuration.nix b/modules/machine/cloud/configuration.nix index 43b1870..85913ee 100644 --- a/modules/machine/cloud/configuration.nix +++ b/modules/machine/cloud/configuration.nix @@ -44,7 +44,6 @@ firefox wttrbar cliphist - xivlauncher patchelf ]; @@ -108,18 +107,16 @@ powertop.enable = false; }; - podman = { - podman = { - enable = true; - extraPackages = with pkgs; [ - docker-credential-helpers - toolbox - cosign - crane - podman-tui - podman-desktop - ]; - }; + containers.podman = { + enable = true; + extraPackages = with pkgs; [ + docker-credential-helpers + toolbox + cosign + crane + podman-tui + podman-desktop + ]; }; customNetworking = { diff --git a/modules/machine/sephiroth/configuration.nix b/modules/machine/sephiroth/configuration.nix index bb08290..c27465e 100644 --- a/modules/machine/sephiroth/configuration.nix +++ b/modules/machine/sephiroth/configuration.nix @@ -168,9 +168,8 @@ system.stateVersion = 5; containers.podman = { - enable = false; + enable = true; extraPackages = with pkgs; [ - podman docker-credential-helpers cosign crane diff --git a/modules/virtualization/podman.nix b/modules/virtualization/podman.nix index de34445..44ee576 100644 --- a/modules/virtualization/podman.nix +++ b/modules/virtualization/podman.nix @@ -4,37 +4,29 @@ pkgs, ... }: let - cfg = config.containers; + cfg = config.containers.podman; in { options.containers = { podman = { enable = lib.mkEnableOption "Podman container runtime"; - dockerCompat = lib.mkEnableOption "Enable Docker compatibility"; + extraPackages = lib.mkOption { type = lib.types.listOf lib.types.package; default = []; - description = "Additional packages to install when Podman is enabled"; + description = "Additional container-related packages to install"; }; }; }; - config = lib.mkIf cfg.enable (lib.attrsets.optionalAttrs (config.nixpkgs.hostPlatform.isLinux) { - virtualisation.podman = { - enable = true; - dockerCompat = cfg.dockerCompat; - enableOnBoot = true; - defaultNetwork.settings.dns_enabled = true; - }; - } - // { - environment.systemPackages = - [ - pkgs.podman-compose - pkgs.buildah - pkgs.skopeo - pkgs.dive - pkgs.container-diff - ] - ++ cfg.extraPackages; - }); + config = lib.mkIf cfg.enable { + environment.systemPackages = + [ + pkgs.podman + pkgs.podman-compose + pkgs.buildah + pkgs.skopeo + pkgs.dive + ] + ++ cfg.extraPackages; + }; }