diff --git a/modules/base/default.nix b/modules/base/default.nix index cf0ef2e..b357534 100644 --- a/modules/base/default.nix +++ b/modules/base/default.nix @@ -1,5 +1,6 @@ { ... }: { imports = [ + ./docker.nix ./fish.nix ./git.nix ./home-manager.nix diff --git a/modules/base/docker.nix b/modules/base/docker.nix new file mode 100644 index 0000000..d348960 --- /dev/null +++ b/modules/base/docker.nix @@ -0,0 +1,22 @@ +{ ... }: { + # Docker is a utility to pack, ship and run any application as a lightweight + # container. + # https://nixos.wiki/wiki/Docker + + virtualisation.docker = { + enable = true; + # Automatically `docker system prune` weekly + autoPrune.enable = true; + }; + + # Being a member of the docker group is effectively equivalent to being root, + # but without the annoyance of having to type your sudo password all the time. + users.extraGroups.docker.members = [ "caspervk" ]; + + # Persist docker volumes + environment.persistence."/nix/persist" = { + directories = [ + # { directory = "/etc/NetworkManager/system-connections"; user = "root"; group = "root"; mode = "0700"; } + ]; + }; +} diff --git a/modules/base/users.nix b/modules/base/users.nix index 7c7614b..3525996 100644 --- a/modules/base/users.nix +++ b/modules/base/users.nix @@ -14,7 +14,7 @@ "networkmanager" "wheel" # allows sudo "video" # allows controlling brightness - # todo: docker, systemd-journal, audio, input, power, nix ? + # todo: systemd-journal, audio, input, power, nix ? ]; uid = 1000; openssh.authorizedKeys.keys = [