From 4ae7910f64f0c6648189a77ecb3783294f20b465 Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Wed, 4 Oct 2023 14:29:38 +0800 Subject: [PATCH 1/2] darwin: fix infinite recursion fae70de5cd217dea555a818364443b3481f63f91 is the first bad commit --- flake.nix | 1 + flakes/darwin/home-manager.nix | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index add207d..9973818 100755 --- a/flake.nix +++ b/flake.nix @@ -43,6 +43,7 @@ darwinConfigurations = { "iMac-macOS" = nix-darwin.lib.darwinSystem { system = "x86_64-darwin"; + specialArgs = { inherit inputs; }; modules = [ ./machines/darwin/imac-2017.nix ./users/guanranwang/darwin.nix diff --git a/flakes/darwin/home-manager.nix b/flakes/darwin/home-manager.nix index 7a6e7ab..e5ba846 100644 --- a/flakes/darwin/home-manager.nix +++ b/flakes/darwin/home-manager.nix @@ -1,7 +1,7 @@ { inputs, ... }: { - imports = [ inputs.home-manager.nixosModules.home-manager ]; + imports = [ inputs.home-manager.darwinModules.home-manager ]; home-manager = { useGlobalPkgs = true; From cd83b24c86c63d4372c5705297075b4628cc1d3e Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Wed, 4 Oct 2023 14:30:29 +0800 Subject: [PATCH 2/2] darwin,home: use default.nix to import .nix files --- users/guanranwang/home-manager/darwin/default.nix | 9 +++++++++ users/guanranwang/home-manager/darwin/home.nix | 5 ----- 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 users/guanranwang/home-manager/darwin/default.nix diff --git a/users/guanranwang/home-manager/darwin/default.nix b/users/guanranwang/home-manager/darwin/default.nix new file mode 100644 index 0000000..97e6931 --- /dev/null +++ b/users/guanranwang/home-manager/darwin/default.nix @@ -0,0 +1,9 @@ +{ ... }: + +{ + imports = [ + ../common/home.nix + ./home.nix + ./dotfiles.nix + ]; +} \ No newline at end of file diff --git a/users/guanranwang/home-manager/darwin/home.nix b/users/guanranwang/home-manager/darwin/home.nix index 941cc37..97e2224 100644 --- a/users/guanranwang/home-manager/darwin/home.nix +++ b/users/guanranwang/home-manager/darwin/home.nix @@ -1,11 +1,6 @@ { config, pkgs, lib, ... }: { - imports = [ - ./dotfiles.nix - ../common/home.nix - ]; - home = { username = "guanranwang"; homeDirectory = "/Users/guanranwang";