From e564497622817b91b8c09ac7ce0d9b3e991b5ec0 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Wed, 19 Jan 2022 11:15:35 -0500 Subject: [PATCH 1/4] Switch containers to podman --- modules/containers.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/modules/containers.nix b/modules/containers.nix index db20045..5474d1a 100644 --- a/modules/containers.nix +++ b/modules/containers.nix @@ -1,5 +1,12 @@ +{ pkgs, ... }: { - # Enable Docker - # TODO: podman - virtualisation.docker.enable = true; + # Enable Podman w/ docker compose compatibility + virtualisation.podman = { + enable = true; + dockerCompat = true; + }; + + environment.systemPackages = with pkgs; [ + docker-compose + ]; } \ No newline at end of file From 26772f936d3fae8bbd35f37ea5201271daa61305 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Wed, 19 Jan 2022 11:19:11 -0500 Subject: [PATCH 2/4] Update kitchen config --- machines/kitchen/configuration.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/machines/kitchen/configuration.nix b/machines/kitchen/configuration.nix index 57a0844..a4c35ae 100644 --- a/machines/kitchen/configuration.nix +++ b/machines/kitchen/configuration.nix @@ -27,6 +27,7 @@ wget micro firefox + chromium pkgs.gnome.gnome-tweaks ]; @@ -57,8 +58,7 @@ users.users.michael = { isNormalUser = true; description = "Michael Thomas"; - extraGroups = [ "wheel" "docker" "adbusers" ]; # Enable ‘sudo’ for the user. - + extraGroups = [ "wheel" "docker" "adbusers" "dialout" ]; shell = pkgs.zsh; }; From 695006312e7b78fc2ea952e0da5e0822a448e60f Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Wed, 19 Jan 2022 11:19:42 -0500 Subject: [PATCH 3/4] Remove some unnecessary stuff after moving to flakes --- user/.gitignore | 2 -- user/README.md | 2 +- user/install.sh | 5 ----- 3 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 user/.gitignore delete mode 100755 user/install.sh diff --git a/user/.gitignore b/user/.gitignore deleted file mode 100644 index bb462fd..0000000 --- a/user/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/home.nix -/config.nix \ No newline at end of file diff --git a/user/README.md b/user/README.md index 6ece2ce..6d56a4e 100644 --- a/user/README.md +++ b/user/README.md @@ -1,5 +1,5 @@ # Home Manager Configuration -This directory contains my configuration for home-manager, which can be easily installed by running `./install.sh {machine name}`. +This directory contains my configuration for home-manager. The `machines` folder contains userland configs for specific machines. Each of these configs will import modules from the `modules` folder for shell config, git config, etc. \ No newline at end of file diff --git a/user/install.sh b/user/install.sh deleted file mode 100755 index 441fcdd..0000000 --- a/user/install.sh +++ /dev/null @@ -1,5 +0,0 @@ -# Where first arg is directory under machines -mkdir -p $HOME/.config -ln -s $(pwd) $HOME/.config/nixpkgs -ln -s $(pwd)/machines/$1/home.nix $HOME/.config/nixpkgs/home.nix -ln -s $(pwd)/machines/$1/config.nix $HOME/.config/nixpkgs/config.nix From 7f9a4ee0062614728b7bba99b9ba67dc6c63dea8 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Wed, 19 Jan 2022 13:38:32 -0500 Subject: [PATCH 4/4] Update podman config --- machines/work/configuration.nix | 2 +- modules/containers.nix | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/machines/work/configuration.nix b/machines/work/configuration.nix index cadde05..dae2962 100644 --- a/machines/work/configuration.nix +++ b/machines/work/configuration.nix @@ -34,7 +34,7 @@ in users.users.${defaultUser} = { isNormalUser = true; - extraGroups = [ "wheel" "docker" ]; + extraGroups = [ "wheel" "docker" "podman" ]; shell = pkgs.zsh; }; diff --git a/modules/containers.nix b/modules/containers.nix index 5474d1a..9cb3218 100644 --- a/modules/containers.nix +++ b/modules/containers.nix @@ -3,10 +3,12 @@ # Enable Podman w/ docker compose compatibility virtualisation.podman = { enable = true; - dockerCompat = true; + dockerSocket.enable = true; + defaultNetwork.dnsname.enable = true; }; environment.systemPackages = with pkgs; [ + docker-client docker-compose ]; } \ No newline at end of file