added docker
This commit is contained in:
parent
838dbe9866
commit
e41ded4213
4 changed files with 39 additions and 0 deletions
|
@ -29,6 +29,9 @@
|
|||
install-k8s-tools = true;
|
||||
install-cloud-cli = true;
|
||||
};
|
||||
docker = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.configure-mic-leds = rec {
|
||||
|
|
|
@ -41,6 +41,7 @@ in
|
|||
openssl_3_3
|
||||
dig
|
||||
wl-clipboard
|
||||
bitwarden-cli
|
||||
]
|
||||
++ lib.optionals cfg.install-editors [
|
||||
pkgs.lazygit
|
||||
|
|
|
@ -9,5 +9,6 @@
|
|||
./python.nix
|
||||
./ide.nix
|
||||
./cli.nix
|
||||
./docker.nix
|
||||
];
|
||||
}
|
||||
|
|
34
nixosModules/dev/docker.nix
Normal file
34
nixosModules/dev/docker.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.krop.docker;
|
||||
in
|
||||
{
|
||||
options.krop.docker = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether to enable Docker service.";
|
||||
};
|
||||
addUserToGroup = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = "Whether to add the user to the Docker group.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
};
|
||||
users.users.krop = lib.mkIf cfg.addUserToGroup {
|
||||
extraGroups = ["docker"];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue