diff --git a/flake.nix b/flake.nix
index 11d6ceb..0181c6e 100644
--- a/flake.nix
+++ b/flake.nix
@@ -62,7 +62,7 @@
 
       homeConfigurations = {
         "lu@yukari" = lib.homeManagerConfiguration {
-          pkgs = nixpkgs.legacyPackages.x86_64-linux;
+          pkgs = pkgsFor.x86_64-linux;
           extraSpecialArgs = { inherit inputs outputs; };
           modules = [
             ./home/yukari.nix
@@ -70,12 +70,12 @@
         };
 
         "lu@enoko" = lib.homeManagerConfiguration {
-            pkgs = nixpkgs.legacyPackages.x86_64-linux;
-            extraSpecialArgs = { inherit inputs outputs; };
-            modules = [
-              ./home/enoko.nix
-            ];
-          };
+          pkgs = pkgsFor.x86_64-linux;
+          extraSpecialArgs = { inherit inputs outputs; };
+          modules = [
+            ./home/enoko.nix
+          ];
+        };
       };
     };
 }
diff --git a/home/global.nix b/home/global.nix
index f616d05..1459173 100644
--- a/home/global.nix
+++ b/home/global.nix
@@ -16,7 +16,7 @@
   nix = {
     package = lib.mkDefault pkgs.nix;
     settings = {
-      experimental-features = ["nix-command" "flakes" "repl-flake"];
+      experimental-features = ["nix-command" "flakes"];
       warn-dirty = false;
     };
   };
diff --git a/nixos/common/default.nix b/nixos/common/default.nix
index c659113..5698eee 100644
--- a/nixos/common/default.nix
+++ b/nixos/common/default.nix
@@ -1,8 +1,28 @@
-{ ... }: {
+{ lib, pkgs, ... }: {
   imports = [
     ./audio.nix
   ];
 
+  # use nix version 2.22
+  nix = {
+    package = pkgs.nixVersions.nix_2_22;
+
+    settings = {
+      auto-optimise-store = lib.mkDefault true;
+      experimental-features = [
+        "nix-command"
+        "flakes"
+        "ca-derivations"
+      ];
+    };
+
+    gc = {
+      automatic = true;
+      dates = "weekly";
+      options = "--delete-older-than +3";
+    };
+  };
+
   # auto mount external drives
   services.devmon.enable = true;
   services.gvfs.enable = true;
diff --git a/nixos/enoko/configuration.nix b/nixos/enoko/configuration.nix
index 069d918..c91498e 100644
--- a/nixos/enoko/configuration.nix
+++ b/nixos/enoko/configuration.nix
@@ -21,7 +21,6 @@
     flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
   in {
     settings = {
-      experimental-features = "nix-command flakes";
       flake-registry = "";
       nix-path = config.nix.nixPath;
     };
diff --git a/nixos/yukari/configuration.nix b/nixos/yukari/configuration.nix
index 231477a..a2949c1 100644
--- a/nixos/yukari/configuration.nix
+++ b/nixos/yukari/configuration.nix
@@ -21,7 +21,6 @@
     flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
   in {
     settings = {
-      experimental-features = "nix-command flakes";
       flake-registry = "";
       nix-path = config.nix.nixPath;
     };
diff --git a/shell.nix b/shell.nix
index 6ea1dc4..717bccc 100644
--- a/shell.nix
+++ b/shell.nix
@@ -10,7 +10,7 @@
 , ...
 }: {
   default = pkgs.mkShell {
-    NIX_CONFIG = "extra-experimental-features = nix-command flakes repl-flake";
+    NIX_CONFIG = "extra-experimental-features = nix-command flakes";
     nativeBuildInputs = with pkgs; [
       home-manager
       git