From 16dd604ca9aec9ea92094553489870300f8fb697 Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Wed, 27 Sep 2023 07:52:00 +0800 Subject: [PATCH] nixos: rename hosts to machines + minor changes --- flake.nix | 6 +++--- {hosts => machines}/darwin/imac-2017.nix | 0 .../nixos}/81fw-lenovo-legion-y7000.nix | 18 +++++++++--------- .../nixos}/hardware/accessories/logitech.nix | 0 .../nixos}/hardware/accessories/xbox.nix | 0 .../nixos}/hardware/cpu/intel.nix | 0 {nixos => machines/nixos}/hardware/gpu/amd.nix | 0 .../nixos}/hardware/gpu/intel.nix | 0 .../nixos}/hardware/gpu/nvidia-prime.nix | 0 .../nixos}/hardware/gpu/nvidia.nix | 0 .../nixos}/hardware/misc/audio.nix | 0 .../nixos}/hardware/misc/bluetooth.nix | 0 .../nixos}/hardware/misc/opengl.nix | 0 {hosts => machines/nixos}/imac-2017.nix | 12 ++++++------ nixos/default.nix | 1 - nixos/hardware/default.nix | 7 ------- nixos/packages/default.nix | 1 + nixos/{hardware => packages}/hardware.nix | 0 18 files changed, 19 insertions(+), 26 deletions(-) rename {hosts => machines}/darwin/imac-2017.nix (100%) rename {hosts => machines/nixos}/81fw-lenovo-legion-y7000.nix (85%) rename {nixos => machines/nixos}/hardware/accessories/logitech.nix (100%) rename {nixos => machines/nixos}/hardware/accessories/xbox.nix (100%) rename {nixos => machines/nixos}/hardware/cpu/intel.nix (100%) rename {nixos => machines/nixos}/hardware/gpu/amd.nix (100%) rename {nixos => machines/nixos}/hardware/gpu/intel.nix (100%) rename {nixos => machines/nixos}/hardware/gpu/nvidia-prime.nix (100%) rename {nixos => machines/nixos}/hardware/gpu/nvidia.nix (100%) rename {nixos => machines/nixos}/hardware/misc/audio.nix (100%) rename {nixos => machines/nixos}/hardware/misc/bluetooth.nix (100%) rename {nixos => machines/nixos}/hardware/misc/opengl.nix (100%) rename {hosts => machines/nixos}/imac-2017.nix (88%) delete mode 100755 nixos/hardware/default.nix rename nixos/{hardware => packages}/hardware.nix (100%) diff --git a/flake.nix b/flake.nix index a323ea8..f5b9585 100755 --- a/flake.nix +++ b/flake.nix @@ -44,7 +44,7 @@ "iMac-macOS" = nix-darwin.lib.darwinSystem { system = "x86_64-darwin"; modules = [ - ./hosts/darwin/imac-2017.nix + ./machines/darwin/imac-2017.nix home-manager.darwinModules.home-manager { @@ -64,7 +64,7 @@ system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ - ./hosts/81fw-lenovo-legion-y7000.nix + ./machines/nixos/81fw-lenovo-legion-y7000.nix # Overlays { @@ -133,7 +133,7 @@ system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ - ./hosts/imac-2017.nix + ./machines/nixos/imac-2017.nix home-manager.nixosModules.home-manager { diff --git a/hosts/darwin/imac-2017.nix b/machines/darwin/imac-2017.nix similarity index 100% rename from hosts/darwin/imac-2017.nix rename to machines/darwin/imac-2017.nix diff --git a/hosts/81fw-lenovo-legion-y7000.nix b/machines/nixos/81fw-lenovo-legion-y7000.nix similarity index 85% rename from hosts/81fw-lenovo-legion-y7000.nix rename to machines/nixos/81fw-lenovo-legion-y7000.nix index e28df30..c10c3e0 100755 --- a/hosts/81fw-lenovo-legion-y7000.nix +++ b/machines/nixos/81fw-lenovo-legion-y7000.nix @@ -2,16 +2,16 @@ { imports = [ - ../nixos + ../../nixos - ../nixos/hardware/misc/audio.nix - ../nixos/hardware/misc/bluetooth.nix - ../nixos/hardware/misc/opengl.nix - ../nixos/hardware/cpu/intel.nix - ../nixos/hardware/gpu/intel.nix - ../nixos/hardware/gpu/nvidia.nix - ../nixos/hardware/gpu/nvidia-prime.nix - ../nixos/hardware/accessories/xbox.nix + ./hardware/misc/audio.nix + ./hardware/misc/bluetooth.nix + ./hardware/misc/opengl.nix + ./hardware/cpu/intel.nix + ./hardware/gpu/intel.nix + ./hardware/gpu/nvidia.nix + ./hardware/gpu/nvidia-prime.nix + ./hardware/accessories/xbox.nix (modulesPath + "/installer/scan/not-detected.nix") # what is this ]; diff --git a/nixos/hardware/accessories/logitech.nix b/machines/nixos/hardware/accessories/logitech.nix similarity index 100% rename from nixos/hardware/accessories/logitech.nix rename to machines/nixos/hardware/accessories/logitech.nix diff --git a/nixos/hardware/accessories/xbox.nix b/machines/nixos/hardware/accessories/xbox.nix similarity index 100% rename from nixos/hardware/accessories/xbox.nix rename to machines/nixos/hardware/accessories/xbox.nix diff --git a/nixos/hardware/cpu/intel.nix b/machines/nixos/hardware/cpu/intel.nix similarity index 100% rename from nixos/hardware/cpu/intel.nix rename to machines/nixos/hardware/cpu/intel.nix diff --git a/nixos/hardware/gpu/amd.nix b/machines/nixos/hardware/gpu/amd.nix similarity index 100% rename from nixos/hardware/gpu/amd.nix rename to machines/nixos/hardware/gpu/amd.nix diff --git a/nixos/hardware/gpu/intel.nix b/machines/nixos/hardware/gpu/intel.nix similarity index 100% rename from nixos/hardware/gpu/intel.nix rename to machines/nixos/hardware/gpu/intel.nix diff --git a/nixos/hardware/gpu/nvidia-prime.nix b/machines/nixos/hardware/gpu/nvidia-prime.nix similarity index 100% rename from nixos/hardware/gpu/nvidia-prime.nix rename to machines/nixos/hardware/gpu/nvidia-prime.nix diff --git a/nixos/hardware/gpu/nvidia.nix b/machines/nixos/hardware/gpu/nvidia.nix similarity index 100% rename from nixos/hardware/gpu/nvidia.nix rename to machines/nixos/hardware/gpu/nvidia.nix diff --git a/nixos/hardware/misc/audio.nix b/machines/nixos/hardware/misc/audio.nix similarity index 100% rename from nixos/hardware/misc/audio.nix rename to machines/nixos/hardware/misc/audio.nix diff --git a/nixos/hardware/misc/bluetooth.nix b/machines/nixos/hardware/misc/bluetooth.nix similarity index 100% rename from nixos/hardware/misc/bluetooth.nix rename to machines/nixos/hardware/misc/bluetooth.nix diff --git a/nixos/hardware/misc/opengl.nix b/machines/nixos/hardware/misc/opengl.nix similarity index 100% rename from nixos/hardware/misc/opengl.nix rename to machines/nixos/hardware/misc/opengl.nix diff --git a/hosts/imac-2017.nix b/machines/nixos/imac-2017.nix similarity index 88% rename from hosts/imac-2017.nix rename to machines/nixos/imac-2017.nix index 9e6521f..34e5444 100755 --- a/hosts/imac-2017.nix +++ b/machines/nixos/imac-2017.nix @@ -2,13 +2,13 @@ { imports = [ - ../nixos + ../../nixos - ../nixos/hardware/misc/audio.nix - ../nixos/hardware/misc/bluetooth.nix - ../nixos/hardware/misc/opengl.nix - ../nixos/hardware/cpu/intel.nix - ../nixos/hardware/gpu/amd.nix + ./hardware/misc/audio.nix + ./hardware/misc/bluetooth.nix + ./hardware/misc/opengl.nix + ./hardware/cpu/intel.nix + ./hardware/gpu/amd.nix (modulesPath + "/hardware/network/broadcom-43xx.nix") (modulesPath + "/installer/scan/not-detected.nix") # what is this ]; diff --git a/nixos/default.nix b/nixos/default.nix index 9485ed9..4f2958f 100755 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -3,7 +3,6 @@ { imports = [ ./boot - ./hardware ./i18n ./networking ./nix diff --git a/nixos/hardware/default.nix b/nixos/hardware/default.nix deleted file mode 100755 index 65a12eb..0000000 --- a/nixos/hardware/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: - -{ - imports = [ - ./hardware.nix - ]; -} diff --git a/nixos/packages/default.nix b/nixos/packages/default.nix index 9e5fa88..c081eef 100755 --- a/nixos/packages/default.nix +++ b/nixos/packages/default.nix @@ -3,6 +3,7 @@ { imports = [ ./core.nix + ./hardware.nix ./graphical ./overlays ./unfree diff --git a/nixos/hardware/hardware.nix b/nixos/packages/hardware.nix similarity index 100% rename from nixos/hardware/hardware.nix rename to nixos/packages/hardware.nix