Moving Docker Stuff To Proper Config

This commit is contained in:
Annika Merris 2024-05-28 10:01:49 -04:00
parent fb4275e049
commit 32b83aeae5
3 changed files with 21 additions and 4 deletions

View file

@ -77,6 +77,7 @@ inputs.nixpkgs.lib.nixosSystem {
vscode.enable = true;
# Utilities
# git is not optional
docker.enable = true;
yubikey.enable = true;
# TODO: Move this out
@ -88,11 +89,7 @@ inputs.nixpkgs.lib.nixosSystem {
nix-direnv.enable = true;
};
};
home.packages = [
pkgs.docker
];
};
virtualization.docker.enable = true;
}
];
}

View file

@ -1,6 +1,7 @@
{ ... }:
{
imports = [
./docker.nix
./git.nix
./yubikey-manager.nix
];

View file

@ -0,0 +1,19 @@
{ config, pkgs, lib, ... }:
{
options = {
docker = {
enable = lib.mkEnableOption {
description = "Enable docker";
default = false;
};
};
};
config = lib.mkIf (config.docker.enable) {
home-manager.users.${config.user} = {
home.packages = [
pkgs.docker
];
};
virtualization.docker.enable = true;
};
}