fix(docker): add enable option
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-09-05 08:53:54 -04:00
parent 79e642451a
commit 86b7e0b1ec
2 changed files with 10 additions and 1 deletions

View file

@ -69,5 +69,6 @@ in {
sshd.enable = true; sshd.enable = true;
}; };
khepri.enable = true;
services.kmscon.enable = true; services.kmscon.enable = true;
} }

View file

@ -12,6 +12,14 @@ in {
imports = [khepri.nixosModules.default]; imports = [khepri.nixosModules.default];
options.khepri = { options.khepri = {
enable = mkOption {
default = cfg.compositions != {};
type = types.bool;
description = ''
Option to enable docker even without compositions.
'';
};
rwDataDir = mkOption { rwDataDir = mkOption {
default = "/var/lib/docker"; default = "/var/lib/docker";
type = types.str; type = types.str;
@ -26,7 +34,7 @@ in {
}; };
}; };
config = mkIf (cfg.compositions != {}) { config = mkIf (cfg.enable) {
users.extraUsers.${mainUser}.extraGroups = ["docker"]; users.extraUsers.${mainUser}.extraGroups = ["docker"];
virtualisation = { virtualisation = {