refactor os configurations
All checks were successful
Build iso when a new version is pushed / test (push) Successful in 2m10s
All checks were successful
Build iso when a new version is pushed / test (push) Successful in 2m10s
This commit is contained in:
36
osConfigs/modules/docker.nix
Normal file
36
osConfigs/modules/docker.nix
Normal file
@ -0,0 +1,36 @@
|
||||
# **************************************************************************** #
|
||||
# #
|
||||
# ::: :::::::: #
|
||||
# docker.nix :+: :+: :+: #
|
||||
# +:+ +:+ +:+ #
|
||||
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2025/09/06 00:10:58 by tomoron #+# #+# #
|
||||
# Updated: 2025/09/06 01:06:23 by tomoron ### ########.fr #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.mods.docker = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "enable docker";
|
||||
};
|
||||
boot = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "start docker with the system (if false, trigered by docker.socket)";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.docker.enable {
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
liveRestore = false;
|
||||
enableOnBoot = config.mods.docker.boot;
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user