From 32b83aeae5dceeeebf6d5d9e45a78ca0198ee41c Mon Sep 17 00:00:00 2001 From: Annika Merris Date: Tue, 28 May 2024 10:01:49 -0400 Subject: [PATCH] Moving Docker Stuff To Proper Config --- hosts/kim/default.nix | 5 +---- modules/common/utilities/default.nix | 1 + modules/common/utilities/docker.nix | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 modules/common/utilities/docker.nix diff --git a/hosts/kim/default.nix b/hosts/kim/default.nix index beab798..e9db07e 100644 --- a/hosts/kim/default.nix +++ b/hosts/kim/default.nix @@ -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; } ]; } diff --git a/modules/common/utilities/default.nix b/modules/common/utilities/default.nix index fed3658..d4a13b3 100644 --- a/modules/common/utilities/default.nix +++ b/modules/common/utilities/default.nix @@ -1,6 +1,7 @@ { ... }: { imports = [ + ./docker.nix ./git.nix ./yubikey-manager.nix ]; diff --git a/modules/common/utilities/docker.nix b/modules/common/utilities/docker.nix new file mode 100644 index 0000000..2d1eb7d --- /dev/null +++ b/modules/common/utilities/docker.nix @@ -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; + }; +}