feat(docker): khepri -> nixos-docker-compose

This commit is contained in:
matt1432 2025-01-30 23:25:25 -05:00
parent 467968eb4f
commit 42ca2912c7
31 changed files with 230 additions and 243 deletions
modules/docker

View file

@ -1,4 +1,4 @@
khepri: {
self: {
config,
lib,
pkgs,
@ -6,11 +6,11 @@ khepri: {
}: let
inherit (lib) mkIf mkOption types;
cfg = config.khepri;
cfg = config.roles.docker;
in {
imports = [khepri.nixosModules.default];
imports = [self.inputs.docker-compose.nixosModules.default];
options.khepri = {
options.roles.docker = {
enable = mkOption {
default = cfg.compositions != {};
type = types.bool;
@ -19,14 +19,6 @@ in {
'';
};
rwDataDir = mkOption {
default = "/var/lib/docker";
type = types.str;
description = ''
Directory to place persistent data in.
'';
};
storageDriver = mkOption {
default = "btrfs"; # I use BTRFS on all my servers
type = types.str;
@ -41,12 +33,9 @@ in {
daemon.settings.dns = ["8.8.8.8" "1.1.1.1"];
};
# khepri uses oci-containers under the hood and it must be set to docker to work
oci-containers.backend = "docker";
};
# Script for updating the images of all images of a compose.nix file
# Script for updating the images of a compose.nix file
environment.systemPackages = [
(pkgs.callPackage ./updateImage.nix {})
];