From f5bb0f2b608a25897bd36026633e0e9489ee90e0 Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Wed, 31 Jan 2024 10:44:15 +0800 Subject: [PATCH] treewide: ./{darwin,nixos}/hosts -> ./hosts --- README.md | 4 +++- flake.nix | 4 ++-- hosts/Aristotle/default.nix | 20 +++++++++++++++++++ .../Aristotle/hardware-configuration.nix | 0 {darwin/hosts => hosts}/Plato/default.nix | 4 ++-- .../Plato/hardware-configuration.nix | 0 nixos/hosts/Aristotle/default.nix | 20 ------------------- 7 files changed, 27 insertions(+), 25 deletions(-) create mode 100644 hosts/Aristotle/default.nix rename {nixos/hosts => hosts}/Aristotle/hardware-configuration.nix (100%) rename {darwin/hosts => hosts}/Plato/default.nix (65%) rename {darwin/hosts => hosts}/Plato/hardware-configuration.nix (100%) delete mode 100644 nixos/hosts/Aristotle/default.nix diff --git a/README.md b/README.md index 66db4a5..e969f25 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,14 @@ It just works™ ```  . │ # Darwin configuration is not actively maintained and sometimes it might break. +├── 󱂵 home ├──  darwin ├──  nixos │ ├──  hosts │ ├──  modules │ └──  profiles -│ +│ +├──  hosts ├──  flake.nix ├──  flake.lock │ diff --git a/flake.nix b/flake.nix index 06c03d0..ef97ce6 100755 --- a/flake.nix +++ b/flake.nix @@ -182,12 +182,12 @@ ### NixOS nixosConfigurations = { - "Aristotle" = mkNixOS "x86_64-linux" [./nixos/hosts/Aristotle]; + "Aristotle" = mkNixOS "x86_64-linux" [./hosts/Aristotle]; }; ### Darwin darwinConfigurations = { - "Plato" = mkDarwin "x86_64-darwin" [./darwin/hosts/Plato]; + "Plato" = mkDarwin "x86_64-darwin" [./hosts/Plato]; }; }; } diff --git a/hosts/Aristotle/default.nix b/hosts/Aristotle/default.nix new file mode 100644 index 0000000..de6894c --- /dev/null +++ b/hosts/Aristotle/default.nix @@ -0,0 +1,20 @@ +{...}: { + imports = [ + # OS + ../../nixos/profiles/laptop + ../../nixos/profiles/common/opt-in/zram-generator.nix + ../../nixos/profiles/common/opt-in/clash-meta-client + ../../nixos/profiles/common/opt-in/gaming + ../../nixos/profiles/common/opt-in/torrenting + + # Hardware + ./hardware-configuration.nix + ../../nixos/profiles/common/opt-in/lanzaboote.nix + ../../nixos/profiles/common/opt-in/impermanence.nix + ../../nixos/profiles/common/opt-in/disko.nix + ]; + + networking.hostName = "Aristotle"; + time.timeZone = "Asia/Shanghai"; + _module.args.disks = ["/dev/nvme0n1"]; # Disko +} diff --git a/nixos/hosts/Aristotle/hardware-configuration.nix b/hosts/Aristotle/hardware-configuration.nix similarity index 100% rename from nixos/hosts/Aristotle/hardware-configuration.nix rename to hosts/Aristotle/hardware-configuration.nix diff --git a/darwin/hosts/Plato/default.nix b/hosts/Plato/default.nix similarity index 65% rename from darwin/hosts/Plato/default.nix rename to hosts/Plato/default.nix index d6a815b..83689d0 100644 --- a/darwin/hosts/Plato/default.nix +++ b/hosts/Plato/default.nix @@ -1,8 +1,8 @@ # iMac 18,3 (2017) {...}: { imports = [ - ../../profiles/desktop - ../../profiles/common/opt-in/clash-meta-client.nix + ../../darwin/profiles/desktop + ../../darwin/profiles/common/opt-in/clash-meta-client.nix ./hardware-configuration.nix ]; diff --git a/darwin/hosts/Plato/hardware-configuration.nix b/hosts/Plato/hardware-configuration.nix similarity index 100% rename from darwin/hosts/Plato/hardware-configuration.nix rename to hosts/Plato/hardware-configuration.nix diff --git a/nixos/hosts/Aristotle/default.nix b/nixos/hosts/Aristotle/default.nix deleted file mode 100644 index 6aec996..0000000 --- a/nixos/hosts/Aristotle/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{...}: { - imports = [ - # OS - ../../profiles/laptop - ../../profiles/common/opt-in/zram-generator.nix - ../../profiles/common/opt-in/clash-meta-client - ../../profiles/common/opt-in/gaming - ../../profiles/common/opt-in/torrenting - - # Hardware - ./hardware-configuration.nix - ../../profiles/common/opt-in/lanzaboote.nix - ../../profiles/common/opt-in/impermanence.nix - ../../profiles/common/opt-in/disko.nix - ]; - - networking.hostName = "Aristotle"; - time.timeZone = "Asia/Shanghai"; - _module.args.disks = ["/dev/nvme0n1"]; # Disko -}