From e319b4884983a678b9e40413be96aa37b820d1c7 Mon Sep 17 00:00:00 2001 From: fleaz Date: Mon, 14 Feb 2022 18:13:38 +0100 Subject: [PATCH] Add docker module and install for all --- machines/cray/configuration.nix | 5 ----- machines/jimbo/configuration.nix | 5 ----- modules/docker.nix | 8 ++++++++ roles/all.nix | 1 + users/fleaz.nix | 3 ++- 5 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 modules/docker.nix diff --git a/machines/cray/configuration.nix b/machines/cray/configuration.nix index 52748f4..2bc7197 100644 --- a/machines/cray/configuration.nix +++ b/machines/cray/configuration.nix @@ -38,11 +38,6 @@ services.printing.enable = true; services.printing.drivers = with pkgs; [ splix ]; - virtualisation.podman = { - enable = true; - dockerCompat = true; - }; - # output = { # "*".bg = "/home/fleaz/Downloads/spongebob.jpg fill"; # "DVI-D-1" = { diff --git a/machines/jimbo/configuration.nix b/machines/jimbo/configuration.nix index d85ca8c..e7abc47 100644 --- a/machines/jimbo/configuration.nix +++ b/machines/jimbo/configuration.nix @@ -109,11 +109,6 @@ in services.openssh.enable = true; programs.ssh.startAgent = true; - virtualisation.podman = { - enable = true; - dockerCompat = true; - dockerSocket.enable = true; - }; # List services that you want to enable: diff --git a/modules/docker.nix b/modules/docker.nix new file mode 100644 index 0000000..b987a0d --- /dev/null +++ b/modules/docker.nix @@ -0,0 +1,8 @@ +{ + virtualisation.docker = { + enable = true; + storageDriver = "overlay2"; + liveRestore = true; + autoPrune.enable = true; + }; +} diff --git a/roles/all.nix b/roles/all.nix index 215c367..3ebdb6f 100644 --- a/roles/all.nix +++ b/roles/all.nix @@ -7,6 +7,7 @@ ../modules/remote-builder.nix ../modules/sound.nix ../modules/ssh.nix + ../modules/docker.nix ../users/fleaz.nix ]; } diff --git a/users/fleaz.nix b/users/fleaz.nix index 6fd2e03..0121fcb 100644 --- a/users/fleaz.nix +++ b/users/fleaz.nix @@ -2,8 +2,9 @@ users.users.fleaz = { isNormalUser = true; extraGroups = [ - "wheel" # Enable ‘sudo’ for the user. + "wheel" # Enable ‘sudo’ for the user. "networkmanager" # Access to networkmanager + "docker" # Access to the "/run/docker.sock" ]; shell = pkgs.zsh; hashedPassword = "$6$9dARC6e2RxgPC9f1$QfXpT71cXA7YiFhv75Nnq2OrbQ8xlHMzgrJdaBaETaAVHLX5j8QUAl71dxMlqD.CtTLxe566kL5Q6da7Kqnvp/";