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-k8s-tools = true;
|
||||||
install-cloud-cli = true;
|
install-cloud-cli = true;
|
||||||
};
|
};
|
||||||
|
docker = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.configure-mic-leds = rec {
|
systemd.services.configure-mic-leds = rec {
|
||||||
|
|
|
@ -41,6 +41,7 @@ in
|
||||||
openssl_3_3
|
openssl_3_3
|
||||||
dig
|
dig
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
|
bitwarden-cli
|
||||||
]
|
]
|
||||||
++ lib.optionals cfg.install-editors [
|
++ lib.optionals cfg.install-editors [
|
||||||
pkgs.lazygit
|
pkgs.lazygit
|
||||||
|
|
|
@ -9,5 +9,6 @@
|
||||||
./python.nix
|
./python.nix
|
||||||
./ide.nix
|
./ide.nix
|
||||||
./cli.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