add docker to the system #23
@@ -5,6 +5,7 @@
|
|||||||
../../modules/nixos/audio.nix
|
../../modules/nixos/audio.nix
|
||||||
../../modules/nixos/bootloader.nix
|
../../modules/nixos/bootloader.nix
|
||||||
../../modules/nixos/certificates.nix
|
../../modules/nixos/certificates.nix
|
||||||
|
../../modules/nixos/docker.nix
|
||||||
../../modules/nixos/gnupg.nix
|
../../modules/nixos/gnupg.nix
|
||||||
../../modules/nixos/locales.nix
|
../../modules/nixos/locales.nix
|
||||||
../../modules/nixos/networking.nix
|
../../modules/nixos/networking.nix
|
||||||
|
|||||||
23
modules/nixos/docker.nix
Normal file
23
modules/nixos/docker.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{ config, lib, pkgs, ...}:
|
||||||
|
|
||||||
|
{
|
||||||
|
virtualisation.docker = {
|
||||||
|
enable = true;
|
||||||
|
# Customize Docker daemon settings
|
||||||
|
daemon.settings = {
|
||||||
|
dns = [ "1.1.1.1" "8.8.8.8" ];
|
||||||
|
log-driver = "journald";
|
||||||
|
registry-mirrors = [ "https://mirror.gcr.io" ];
|
||||||
|
storage-driver = "overlay2";
|
||||||
|
};
|
||||||
|
# Use the rootless mode
|
||||||
|
rootless = {
|
||||||
|
enable = true;
|
||||||
|
setSocketVariable = true;
|
||||||
|
};
|
||||||
|
# Install docker-compose
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
docker-compose
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
users.users.aaron = {
|
users.users.aaron = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
group = "users";
|
group = "users";
|
||||||
extraGroups = [ "wheel" "networkmanager" ];
|
extraGroups = [ "wheel" "networkmanager" "docker" ];
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user