From 530274e081e1ecd7a910f4f4ef5ce6abe0bb13e4 Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Tue, 2 Sep 2025 23:26:46 +0200 Subject: [PATCH] Rearrange file structure --- flake.nix | 4 +-- hosts/darwin/MacBook-Air/home.nix | 2 +- .../MacBook-Air/{default.nix => system.nix} | 3 +- .../darwin/home-default.nix | 28 +++++++++---------- hosts/darwin/iMac/home.nix | 2 +- hosts/darwin/iMac/{default.nix => system.nix} | 3 +- .../darwin/system-default.nix | 0 system/default.nix | 7 ----- 8 files changed, 20 insertions(+), 29 deletions(-) rename hosts/darwin/MacBook-Air/{default.nix => system.nix} (81%) rename home/common.nix => hosts/darwin/home-default.nix (70%) rename hosts/darwin/iMac/{default.nix => system.nix} (80%) rename system/darwin/default.nix => hosts/darwin/system-default.nix (100%) delete mode 100644 system/default.nix diff --git a/flake.nix b/flake.nix index e011332..eeddc8f 100644 --- a/flake.nix +++ b/flake.nix @@ -21,14 +21,14 @@ { darwinConfigurations."iMac" = nix-darwin.lib.darwinSystem { modules = [ - ./hosts/darwin/iMac + ./hosts/darwin/iMac/system.nix ]; specialArgs = { inherit nix-homebrew; }; }; darwinConfigurations."MacBook-Air" = nix-darwin.lib.darwinSystem { modules = [ - ./hosts/darwin/MacBook-Air + ./hosts/darwin/MacBook-Air/system.nix ]; specialArgs = { inherit nix-homebrew; }; }; diff --git a/hosts/darwin/MacBook-Air/home.nix b/hosts/darwin/MacBook-Air/home.nix index 21d61e2..dd8b76f 100644 --- a/hosts/darwin/MacBook-Air/home.nix +++ b/hosts/darwin/MacBook-Air/home.nix @@ -2,7 +2,7 @@ { imports = [ - ../../../home/common.nix + ../home-default.nix ]; # MacBook Air-specific home configuration diff --git a/hosts/darwin/MacBook-Air/default.nix b/hosts/darwin/MacBook-Air/system.nix similarity index 81% rename from hosts/darwin/MacBook-Air/default.nix rename to hosts/darwin/MacBook-Air/system.nix index 11f5b5b..41f0479 100644 --- a/hosts/darwin/MacBook-Air/default.nix +++ b/hosts/darwin/MacBook-Air/system.nix @@ -7,7 +7,6 @@ # Import common Darwin configuration imports = [ - ../../../system - ../../../system/darwin + ../system-default.nix ]; } diff --git a/home/common.nix b/hosts/darwin/home-default.nix similarity index 70% rename from home/common.nix rename to hosts/darwin/home-default.nix index ffc3b4c..0789921 100644 --- a/home/common.nix +++ b/hosts/darwin/home-default.nix @@ -3,20 +3,20 @@ { imports = [ nixvim.homeModules.nixvim - ../modules/nvim.nix - ../modules/tmux.nix - ../modules/zsh.nix - ../modules/ssh.nix - ../modules/git.nix - ../modules/lazygit.nix - ../modules/papis.nix - ../modules/termscp.nix - ../modules/rsync.nix - ../modules/btop.nix - ../modules/firefox.nix - ../modules/ghostty.nix - ../modules/syncthing.nix - ../config/fonts.nix + ../../modules/nvim.nix + ../../modules/tmux.nix + ../../modules/zsh.nix + ../../modules/ssh.nix + ../../modules/git.nix + ../../modules/lazygit.nix + ../../modules/papis.nix + ../../modules/termscp.nix + ../../modules/rsync.nix + ../../modules/btop.nix + ../../modules/firefox.nix + ../../modules/ghostty.nix + ../../modules/syncthing.nix + ../../config/fonts.nix ]; nixpkgs.config.allowUnfree = true; diff --git a/hosts/darwin/iMac/home.nix b/hosts/darwin/iMac/home.nix index 7bb4c24..1ec08e3 100644 --- a/hosts/darwin/iMac/home.nix +++ b/hosts/darwin/iMac/home.nix @@ -2,7 +2,7 @@ { imports = [ - ../../../home/common.nix + ../home-default.nix ]; # iMac-specific home configuration diff --git a/hosts/darwin/iMac/default.nix b/hosts/darwin/iMac/system.nix similarity index 80% rename from hosts/darwin/iMac/default.nix rename to hosts/darwin/iMac/system.nix index 1b46ec3..5df8cb9 100644 --- a/hosts/darwin/iMac/default.nix +++ b/hosts/darwin/iMac/system.nix @@ -7,7 +7,6 @@ # Import common Darwin configuration imports = [ - ../../../system - ../../../system/darwin + ../system-default.nix ]; } diff --git a/system/darwin/default.nix b/hosts/darwin/system-default.nix similarity index 100% rename from system/darwin/default.nix rename to hosts/darwin/system-default.nix diff --git a/system/default.nix b/system/default.nix deleted file mode 100644 index 84194dc..0000000 --- a/system/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config, pkgs, ... }: - -{ - imports = [ - ]; - -}