about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-05-01 19:28:33 -0700
committerFranck Cuny <franck@fcuny.net>2023-05-01 19:28:33 -0700
commitd4dcdf6fffa28beb7d328ee08e3c4e1bb40e5ebd (patch)
treea5e7001bc9e0a30bef85f28f45620a3d4f251e5a
parenthome/packages: rewrite scripts to use writeShellApplication (diff)
downloadworld-d4dcdf6fffa28beb7d328ee08e3c4e1bb40e5ebd.tar.gz
profiles/workstation: reduce the number of moving parts
There's too many moving parts and layers of abstractions, for no
benefits: I only have to manage 3-4 machines.

Going to create profiles, move things there, and stop with the `enable`
pattern.
-rw-r--r--hosts/aptos/default.nix21
-rw-r--r--profiles/workstation.nix6
2 files changed, 14 insertions, 13 deletions
diff --git a/hosts/aptos/default.nix b/hosts/aptos/default.nix
index 0676887..af796cf 100644
--- a/hosts/aptos/default.nix
+++ b/hosts/aptos/default.nix
@@ -1,7 +1,13 @@
-{ ... }:
+{ self, ... }:
 
 {
-  imports = [ ./hardware.nix ./sound.nix ./networking.nix ./services.nix ];
+  imports = [
+    ./hardware.nix
+    ./sound.nix
+    ./networking.nix
+    ./services.nix
+    "${self}/profiles/workstation.nix"
+  ];
 
   # Allow setting GTK configuration using home-manager
   programs.dconf.enable = true;
@@ -12,17 +18,6 @@
   # install and configure sway
   my.programs.sway.enable = true;
 
-  virtualisation.docker = { enable = true; };
-
-  virtualisation.containerd = {
-    enable = true;
-    settings = {
-      plugins."io.containerd.grpc.v1.cri" = {
-        containerd.snapshotter = "overlayfs";
-      };
-    };
-  };
-
   # This value determines the NixOS release from which the default
   # settings for stateful data, like file locations and database versions
   # on your system were taken. It‘s perfectly fine and recommended to leave
diff --git a/profiles/workstation.nix b/profiles/workstation.nix
new file mode 100644
index 0000000..484d110
--- /dev/null
+++ b/profiles/workstation.nix
@@ -0,0 +1,6 @@
+{ pkgs, config, lib, ... }:
+{
+  virtualisation.docker.enable = false;
+  virtualisation.podman.enable = true;
+  virtualisation.podman.dockerCompat = true;
+}