summaryrefslogtreecommitdiff
path: root/os/srv/docker.nix
diff options
context:
space:
mode:
authoradikro <adikro@disroot.org>2025-12-24 16:21:00 +0100
committeradikro <adikro@disroot.org>2025-12-24 16:21:00 +0100
commit6aaa5993e4c1cfb205ed555d958702f9bba1770d (patch)
tree3af8cf20967cf10542edd2e51232b1da70002fde /os/srv/docker.nix
parent2ceabfd1d1dc03ca895e960048b73a82e29e45e8 (diff)
a bunch of changes, renames sys to os and refactored some of the logic
Diffstat (limited to 'os/srv/docker.nix')
-rw-r--r--os/srv/docker.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/os/srv/docker.nix b/os/srv/docker.nix
new file mode 100644
index 0000000..0ed1541
--- /dev/null
+++ b/os/srv/docker.nix
@@ -0,0 +1,14 @@
+{ config, lib, pkgs, username, ... }:
+let
+ cfg = config.sys.srv.docker;
+in
+{
+ options.sys.srv.docker.enable = lib.mkEnableOption "enables the docker container engine";
+ config = lib.mkIf cfg.enable {
+ virtualisation.docker.enable = true;
+
+ environment.systemPackages = [ pkgs.docker-compose ];
+
+ users.users.${username}.extraGroups = [ "docker" ];
+ };
+}