mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-11-21 22:03:19 +01:00
add docker
This commit is contained in:
parent
dbb1d8ed51
commit
9694489910
@ -43,6 +43,7 @@ in
|
|||||||
#../../modules/digikam.nix
|
#../../modules/digikam.nix
|
||||||
#../../modules/android.nix
|
#../../modules/android.nix
|
||||||
#../../modules/podman.nix
|
#../../modules/podman.nix
|
||||||
|
#../../modules/docker.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "yodaTab";
|
networking.hostName = "yodaTab";
|
||||||
|
@ -42,7 +42,8 @@ in
|
|||||||
../../modules/thunderbird.nix
|
../../modules/thunderbird.nix
|
||||||
../../modules/digikam.nix
|
../../modules/digikam.nix
|
||||||
../../modules/android.nix
|
../../modules/android.nix
|
||||||
../../modules/podman.nix
|
#../../modules/podman.nix
|
||||||
|
../../modules/docker.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "yodaTux";
|
networking.hostName = "yodaTux";
|
||||||
|
@ -44,7 +44,8 @@ in
|
|||||||
#../../modules/thunderbird.nix
|
#../../modules/thunderbird.nix
|
||||||
#../../modules/digikam.nix
|
#../../modules/digikam.nix
|
||||||
#../../modules/android.nix
|
#../../modules/android.nix
|
||||||
../../modules/podman.nix
|
#../../modules/podman.nix
|
||||||
|
../../modules/docker.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "yodaYoga";
|
networking.hostName = "yodaYoga";
|
||||||
|
29
modules/docker.nix
Normal file
29
modules/docker.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# https://nixos.wiki/wiki/Docker#Installation
|
||||||
|
|
||||||
|
# TODO: rootless Docker. https://nixos.wiki/wiki/Docker#Rootless_docker
|
||||||
|
# TODO: run as systemd services. https://nixos.wiki/wiki/Docker#docker_containers_as_systemd_services
|
||||||
|
|
||||||
|
virtualisation = {
|
||||||
|
docker = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# As we use btrfs, we enable the according storageDriver option.
|
||||||
|
storageDriver = "btrfs";
|
||||||
|
|
||||||
|
# Run `docker system prune -f` every week.
|
||||||
|
autoPrune.enable = true;
|
||||||
|
autoPrune.dates = "weekly";
|
||||||
|
# https://docs.docker.com/engine/reference/commandline/system_prune/#options
|
||||||
|
autoPrune.flags = [
|
||||||
|
"--all"
|
||||||
|
"--volumes"
|
||||||
|
# https://docs.docker.com/engine/reference/commandline/system_prune/#filter
|
||||||
|
# https://pkg.go.dev/maze.io/x/duration#ParseDuration
|
||||||
|
"--filter until=7d"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -5,7 +5,7 @@
|
|||||||
# https://search.nixos.org/options?channel=23.05&query=virtualisation.podman
|
# https://search.nixos.org/options?channel=23.05&query=virtualisation.podman
|
||||||
|
|
||||||
# TODO: Run as systemd services. https://nixos.wiki/wiki/Podman#Run_Podman_containers_as_systemd_services
|
# TODO: Run as systemd services. https://nixos.wiki/wiki/Podman#Run_Podman_containers_as_systemd_services
|
||||||
# TODO: Podman Terminal UI: https://github.com/containers/podman-tui#podman-tui
|
# TODO: Podman Terminal UI. https://github.com/containers/podman-tui#podman-tui
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
podman-compose
|
podman-compose
|
||||||
|
Loading…
Reference in New Issue
Block a user