From a76daab3cef3a3f51b405ea030dc742f7733d93c Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Sun, 21 Jan 2024 15:16:39 +0800 Subject: [PATCH] refactor: hosts --- README.md | 2 +- .../shoukei => 12kingdoms_shoukei}/README.md | 0 .../apple-set-os-loader.nix | 0 .../brcm-firmware/default.nix | 0 .../brcm-firmware/firmware.tar.xz | Bin .../brcm-firmware/flake.lock | 0 .../brcm-firmware/flake.nix | 0 .../default.nix | 0 .../hardware-configuration.nix | 0 .../shoukei => 12kingdoms_shoukei}/home.nix | 0 .../impermanence.nix | 0 .../suzu => 12kingdoms_suzu}/default.nix | 0 hosts/{idols/ai => idols_ai}/README.md | 0 hosts/{idols/ai => idols_ai}/cifs-mount.nix | 0 hosts/{idols/ai => idols_ai}/default.nix | 0 .../hardware-configuration.nix | 0 hosts/{idols/ai => idols_ai}/home.nix | 0 hosts/{idols/ai => idols_ai}/impermanence.nix | 0 hosts/{idols/ai => idols_ai}/secureboot.nix | 0 .../default.nix | 0 .../aquamarine => idols_aquamarine}/home.nix | 0 hosts/{idols/kana => idols_kana}/default.nix | 0 hosts/{idols/kana => idols_kana}/home.nix | 0 hosts/{idols/ruby => idols_ruby}/default.nix | 0 hosts/{idols/ruby => idols_ruby}/home.nix | 0 .../default.nix | 0 .../default.nix | 0 .../default.nix | 0 nixos-installer/README.md | 12 +++---- nixos-installer/README.shoukei.md | 12 +++---- nixos-installer/flake.nix | 8 ++--- systems/vars.nix | 34 +++++++++--------- 32 files changed, 34 insertions(+), 34 deletions(-) rename hosts/{12kingdoms/shoukei => 12kingdoms_shoukei}/README.md (100%) rename hosts/{12kingdoms/shoukei => 12kingdoms_shoukei}/apple-set-os-loader.nix (100%) rename hosts/{12kingdoms/shoukei => 12kingdoms_shoukei}/brcm-firmware/default.nix (100%) rename hosts/{12kingdoms/shoukei => 12kingdoms_shoukei}/brcm-firmware/firmware.tar.xz (100%) rename hosts/{12kingdoms/shoukei => 12kingdoms_shoukei}/brcm-firmware/flake.lock (100%) rename hosts/{12kingdoms/shoukei => 12kingdoms_shoukei}/brcm-firmware/flake.nix (100%) rename hosts/{12kingdoms/shoukei => 12kingdoms_shoukei}/default.nix (100%) rename hosts/{12kingdoms/shoukei => 12kingdoms_shoukei}/hardware-configuration.nix (100%) rename hosts/{12kingdoms/shoukei => 12kingdoms_shoukei}/home.nix (100%) rename hosts/{12kingdoms/shoukei => 12kingdoms_shoukei}/impermanence.nix (100%) rename hosts/{12kingdoms/suzu => 12kingdoms_suzu}/default.nix (100%) rename hosts/{idols/ai => idols_ai}/README.md (100%) rename hosts/{idols/ai => idols_ai}/cifs-mount.nix (100%) rename hosts/{idols/ai => idols_ai}/default.nix (100%) rename hosts/{idols/ai => idols_ai}/hardware-configuration.nix (100%) rename hosts/{idols/ai => idols_ai}/home.nix (100%) rename hosts/{idols/ai => idols_ai}/impermanence.nix (100%) rename hosts/{idols/ai => idols_ai}/secureboot.nix (100%) rename hosts/{idols/aquamarine => idols_aquamarine}/default.nix (100%) rename hosts/{idols/aquamarine => idols_aquamarine}/home.nix (100%) rename hosts/{idols/kana => idols_kana}/default.nix (100%) rename hosts/{idols/kana => idols_kana}/home.nix (100%) rename hosts/{idols/ruby => idols_ruby}/default.nix (100%) rename hosts/{idols/ruby => idols_ruby}/home.nix (100%) rename hosts/{rolling_girls/chiaya => rolling_girls_chiaya}/default.nix (100%) rename hosts/{rolling_girls/nozomi => rolling_girls_nozomi}/default.nix (100%) rename hosts/{rolling_girls/yukina => rolling_girls_yukina}/default.nix (100%) diff --git a/README.md b/README.md index 2246fb8e..e2feb6d6 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ See [./secrets](./secrets) for details. ## How to Deploy this Flake? -> :red_circle: **IMPORTANT**: **You should NOT deploy this flake directly on your machine:exclamation: It will not succeed.** this flake contains my hardware configuration(such as [hardware-configuration.nix](hosts/idols/ai/hardware-configuration.nix), [cifs-mount.nix](https://github.com/ryan4yin/nix-config/blob/v0.1.1/hosts/idols/ai/cifs-mount.nix), [Nvidia Support](https://github.com/ryan4yin/nix-config/blob/v0.1.1/hosts/idols/ai/default.nix#L77-L91), etc.) which is not suitable for your hardware, and my private secrets repository [ryan4yin/nix-secrets](https://github.com/ryan4yin/nix-config/tree/main/secrets) that only I have access to. You may use this repo as a reference to build your own configuration. +> :red_circle: **IMPORTANT**: **You should NOT deploy this flake directly on your machine:exclamation: It will not succeed.** this flake contains my hardware configuration(such as [hardware-configuration.nix](hosts/idols_ai/hardware-configuration.nix), [cifs-mount.nix](https://github.com/ryan4yin/nix-config/blob/v0.1.1/hosts/idols_ai/cifs-mount.nix), [Nvidia Support](https://github.com/ryan4yin/nix-config/blob/v0.1.1/hosts/idols_ai/default.nix#L77-L91), etc.) which is not suitable for your hardware, and my private secrets repository [ryan4yin/nix-secrets](https://github.com/ryan4yin/nix-config/tree/main/secrets) that only I have access to. You may use this repo as a reference to build your own configuration. For NixOS: diff --git a/hosts/12kingdoms/shoukei/README.md b/hosts/12kingdoms_shoukei/README.md similarity index 100% rename from hosts/12kingdoms/shoukei/README.md rename to hosts/12kingdoms_shoukei/README.md diff --git a/hosts/12kingdoms/shoukei/apple-set-os-loader.nix b/hosts/12kingdoms_shoukei/apple-set-os-loader.nix similarity index 100% rename from hosts/12kingdoms/shoukei/apple-set-os-loader.nix rename to hosts/12kingdoms_shoukei/apple-set-os-loader.nix diff --git a/hosts/12kingdoms/shoukei/brcm-firmware/default.nix b/hosts/12kingdoms_shoukei/brcm-firmware/default.nix similarity index 100% rename from hosts/12kingdoms/shoukei/brcm-firmware/default.nix rename to hosts/12kingdoms_shoukei/brcm-firmware/default.nix diff --git a/hosts/12kingdoms/shoukei/brcm-firmware/firmware.tar.xz b/hosts/12kingdoms_shoukei/brcm-firmware/firmware.tar.xz similarity index 100% rename from hosts/12kingdoms/shoukei/brcm-firmware/firmware.tar.xz rename to hosts/12kingdoms_shoukei/brcm-firmware/firmware.tar.xz diff --git a/hosts/12kingdoms/shoukei/brcm-firmware/flake.lock b/hosts/12kingdoms_shoukei/brcm-firmware/flake.lock similarity index 100% rename from hosts/12kingdoms/shoukei/brcm-firmware/flake.lock rename to hosts/12kingdoms_shoukei/brcm-firmware/flake.lock diff --git a/hosts/12kingdoms/shoukei/brcm-firmware/flake.nix b/hosts/12kingdoms_shoukei/brcm-firmware/flake.nix similarity index 100% rename from hosts/12kingdoms/shoukei/brcm-firmware/flake.nix rename to hosts/12kingdoms_shoukei/brcm-firmware/flake.nix diff --git a/hosts/12kingdoms/shoukei/default.nix b/hosts/12kingdoms_shoukei/default.nix similarity index 100% rename from hosts/12kingdoms/shoukei/default.nix rename to hosts/12kingdoms_shoukei/default.nix diff --git a/hosts/12kingdoms/shoukei/hardware-configuration.nix b/hosts/12kingdoms_shoukei/hardware-configuration.nix similarity index 100% rename from hosts/12kingdoms/shoukei/hardware-configuration.nix rename to hosts/12kingdoms_shoukei/hardware-configuration.nix diff --git a/hosts/12kingdoms/shoukei/home.nix b/hosts/12kingdoms_shoukei/home.nix similarity index 100% rename from hosts/12kingdoms/shoukei/home.nix rename to hosts/12kingdoms_shoukei/home.nix diff --git a/hosts/12kingdoms/shoukei/impermanence.nix b/hosts/12kingdoms_shoukei/impermanence.nix similarity index 100% rename from hosts/12kingdoms/shoukei/impermanence.nix rename to hosts/12kingdoms_shoukei/impermanence.nix diff --git a/hosts/12kingdoms/suzu/default.nix b/hosts/12kingdoms_suzu/default.nix similarity index 100% rename from hosts/12kingdoms/suzu/default.nix rename to hosts/12kingdoms_suzu/default.nix diff --git a/hosts/idols/ai/README.md b/hosts/idols_ai/README.md similarity index 100% rename from hosts/idols/ai/README.md rename to hosts/idols_ai/README.md diff --git a/hosts/idols/ai/cifs-mount.nix b/hosts/idols_ai/cifs-mount.nix similarity index 100% rename from hosts/idols/ai/cifs-mount.nix rename to hosts/idols_ai/cifs-mount.nix diff --git a/hosts/idols/ai/default.nix b/hosts/idols_ai/default.nix similarity index 100% rename from hosts/idols/ai/default.nix rename to hosts/idols_ai/default.nix diff --git a/hosts/idols/ai/hardware-configuration.nix b/hosts/idols_ai/hardware-configuration.nix similarity index 100% rename from hosts/idols/ai/hardware-configuration.nix rename to hosts/idols_ai/hardware-configuration.nix diff --git a/hosts/idols/ai/home.nix b/hosts/idols_ai/home.nix similarity index 100% rename from hosts/idols/ai/home.nix rename to hosts/idols_ai/home.nix diff --git a/hosts/idols/ai/impermanence.nix b/hosts/idols_ai/impermanence.nix similarity index 100% rename from hosts/idols/ai/impermanence.nix rename to hosts/idols_ai/impermanence.nix diff --git a/hosts/idols/ai/secureboot.nix b/hosts/idols_ai/secureboot.nix similarity index 100% rename from hosts/idols/ai/secureboot.nix rename to hosts/idols_ai/secureboot.nix diff --git a/hosts/idols/aquamarine/default.nix b/hosts/idols_aquamarine/default.nix similarity index 100% rename from hosts/idols/aquamarine/default.nix rename to hosts/idols_aquamarine/default.nix diff --git a/hosts/idols/aquamarine/home.nix b/hosts/idols_aquamarine/home.nix similarity index 100% rename from hosts/idols/aquamarine/home.nix rename to hosts/idols_aquamarine/home.nix diff --git a/hosts/idols/kana/default.nix b/hosts/idols_kana/default.nix similarity index 100% rename from hosts/idols/kana/default.nix rename to hosts/idols_kana/default.nix diff --git a/hosts/idols/kana/home.nix b/hosts/idols_kana/home.nix similarity index 100% rename from hosts/idols/kana/home.nix rename to hosts/idols_kana/home.nix diff --git a/hosts/idols/ruby/default.nix b/hosts/idols_ruby/default.nix similarity index 100% rename from hosts/idols/ruby/default.nix rename to hosts/idols_ruby/default.nix diff --git a/hosts/idols/ruby/home.nix b/hosts/idols_ruby/home.nix similarity index 100% rename from hosts/idols/ruby/home.nix rename to hosts/idols_ruby/home.nix diff --git a/hosts/rolling_girls/chiaya/default.nix b/hosts/rolling_girls_chiaya/default.nix similarity index 100% rename from hosts/rolling_girls/chiaya/default.nix rename to hosts/rolling_girls_chiaya/default.nix diff --git a/hosts/rolling_girls/nozomi/default.nix b/hosts/rolling_girls_nozomi/default.nix similarity index 100% rename from hosts/rolling_girls/nozomi/default.nix rename to hosts/rolling_girls_nozomi/default.nix diff --git a/hosts/rolling_girls/yukina/default.nix b/hosts/rolling_girls_yukina/default.nix similarity index 100% rename from hosts/rolling_girls/yukina/default.nix rename to hosts/rolling_girls_yukina/default.nix diff --git a/nixos-installer/README.md b/nixos-installer/README.md index 8ea7aace..847ad045 100644 --- a/nixos-installer/README.md +++ b/nixos-installer/README.md @@ -1,10 +1,10 @@ # Nix Environment Setup for Host: Idols - Ai -This flake prepares a Nix environment for setting my desktop [/hosts/idols/ai](/hosts/idols/ai/)(in main flake) up on a new machine. +This flake prepares a Nix environment for setting my desktop [/hosts/idols_ai](/hosts/idols_ai/)(in main flake) up on a new machine. Other docs: -- README for [/hosts/12kingdoms/shoukei](/hosts/12kingdoms/shoukei): [./README.shoukei.md](./README.shoukei.md) +- README for [/hosts/12kingdoms_shoukei](/hosts/12kingdoms_shoukei): [./README.shoukei.md](./README.shoukei.md) TODOs: @@ -184,14 +184,14 @@ Then, generate the NixOS configuration: nixos-generate-config --root /mnt # we need to update our filesystem configs in old hardware-configuration.nix according to the generated one. -cp /etc/nixos/hardware-configuration.nix ./nix-config/hosts/idols/ai/hardware-configuration-new.nix +cp /etc/nixos/hardware-configuration.nix ./nix-config/hosts/idols_ai/hardware-configuration-new.nix vim . ``` Then, Install NixOS: ```bash -cd ~/nix-config/hosts/idols/ai/nixos-installer +cd ~/nix-config/hosts/idols_ai/nixos-installer # run this command if you're retrying to run nixos-install rm -rf /mnt/etc @@ -220,7 +220,7 @@ mv /etc/ssh /persistent/etc/ # delte the generated configuration after editing rm -f /mnt/etc/nixos -rm ~/nix-config/hosts/idols/ai/hardware-configuration-new.nix +rm ~/nix-config/hosts/idols_ai/hardware-configuration-new.nix # NOTE: `cat shoukei.md | grep git-1 > git-1.sh` to generate this script # commit the changes after installing nixos successfully @@ -259,4 +259,4 @@ cd ~/nix-config just hypr ``` -Finally, to enable secure boot, follow the instructions in [lanzaboote - Quick Start](https://github.com/nix-community/lanzaboote/blob/master/docs/QUICK_START.md) and [nix-config/ai/secure-boot.nix](https://github.com/ryan4yin/nix-config/blob/main/hosts/idols/ai/secureboot.nix) +Finally, to enable secure boot, follow the instructions in [lanzaboote - Quick Start](https://github.com/nix-community/lanzaboote/blob/master/docs/QUICK_START.md) and [nix-config/ai/secure-boot.nix](https://github.com/ryan4yin/nix-config/blob/main/hosts/idols_ai/secureboot.nix) diff --git a/nixos-installer/README.shoukei.md b/nixos-installer/README.shoukei.md index 152fff5e..f2b15851 100755 --- a/nixos-installer/README.shoukei.md +++ b/nixos-installer/README.shoukei.md @@ -4,7 +4,7 @@ > https://github.com/NixOS/nixos-hardware/tree/master/apple/t2 -This flake prepares a Nix environment for setting my desktop [/hosts/12kingdoms/shoukei](/hosts/12kingdoms/shoukei)(in main flake) up on a new machine. +This flake prepares a Nix environment for setting my desktop [/hosts/12kingdoms_shoukei](/hosts/12kingdoms_shoukei)(in main flake) up on a new machine. ## Steps to Deploying @@ -17,7 +17,7 @@ First, create a USB install medium from Apple T2's NixOS installer image: https: ```bash sudo mkdir -p /lib -sudo tar -axvf ../hosts/12kingdoms/shoukei/brcm-firmware/firmware.tar.gz -C /lib/ +sudo tar -axvf ../hosts/12kingdoms_shoukei/brcm-firmware/firmware.tar.gz -C /lib/ sudo modprobe -r brcmfmac && sudo modprobe brcmfmac # check whether the wifi firmware is loaded @@ -164,14 +164,14 @@ Then, generate the NixOS configuration: nixos-generate-config --root /mnt # we need to update our filesystem configs in old hardware-configuration.nix according to the generated one. -cp /etc/nixos/hardware-configuration.nix ./nix-config/hosts/12kingdoms/shoukei/hardware-configuration-new.nix +cp /etc/nixos/hardware-configuration.nix ./nix-config/hosts/12kingdoms_shoukei/hardware-configuration-new.nix vim . ``` Then, Install NixOS: ```bash -cd ~/nix-config/hosts/12kingdoms/shoukei/nixos-installer/ +cd ~/nix-config/hosts/12kingdoms_shoukei/nixos-installer/ # run this command if you're retrying to run nixos-install rm -rf /mnt/etc @@ -201,7 +201,7 @@ mv /etc/ssh /persistent/etc/ # delte the generated configuration after editing rm -f /mnt/etc/nixos -rm ~/nix-config/hosts/idols/ai/hardware-configuration-new.nix +rm ~/nix-config/hosts/idols_ai/hardware-configuration-new.nix # NOTE: `cat shoukei.md | grep git-1 > git-1.sh` to generate this script # commit the changes after installing nixos successfully @@ -239,4 +239,4 @@ cd ~/nix-config just s-hypr ``` -Finally, to enable secure boot, follow the instructions in [lanzaboote - Quick Start](https://github.com/nix-community/lanzaboote/blob/master/docs/QUICK_START.md) and [nix-config/ai/secure-boot.nix](https://github.com/ryan4yin/nix-config/blob/main/hosts/idols/ai/secureboot.nix) +Finally, to enable secure boot, follow the instructions in [lanzaboote - Quick Start](https://github.com/nix-community/lanzaboote/blob/master/docs/QUICK_START.md) and [nix-config/ai/secure-boot.nix](https://github.com/ryan4yin/nix-config/blob/main/hosts/idols_ai/secureboot.nix) diff --git a/nixos-installer/flake.nix b/nixos-installer/flake.nix index fe7fa90c..3b1fe392 100644 --- a/nixos-installer/flake.nix +++ b/nixos-installer/flake.nix @@ -26,8 +26,8 @@ ../modules/nixos/base/user-group.nix ../modules/nixos/base/networking.nix - ../hosts/idols/ai/hardware-configuration.nix - ../hosts/idols/ai/impermanence.nix + ../hosts/idols_ai/hardware-configuration.nix + ../hosts/idols_ai/impermanence.nix ]; }; @@ -51,8 +51,8 @@ ../modules/nixos/base/user-group.nix ../modules/nixos/base/networking.nix - ../hosts/12kingdoms/shoukei/hardware-configuration.nix - ../hosts/12kingdoms/shoukei/impermanence.nix + ../hosts/12kingdoms_shoukei/hardware-configuration.nix + ../hosts/12kingdoms_shoukei/impermanence.nix ]; }; }; diff --git a/systems/vars.nix b/systems/vars.nix index c90f9e05..d5b71680 100644 --- a/systems/vars.nix +++ b/systems/vars.nix @@ -13,13 +13,13 @@ in { idol_ai_modules_i3 = { nixos-modules = [ - ../hosts/idols/ai + ../hosts/idols_ai {modules.desktop.xorg.enable = true;} ] ++ desktop_base_modules.nixos-modules; home-module.imports = [ - ../hosts/idols/ai/home.nix + ../hosts/idols_ai/home.nix {modules.desktop.i3.enable = true;} ] ++ desktop_base_modules.home-module.imports; @@ -28,13 +28,13 @@ in { idol_ai_modules_hyprland = { nixos-modules = [ - ../hosts/idols/ai + ../hosts/idols_ai {modules.desktop.wayland.enable = true;} ] ++ desktop_base_modules.nixos-modules; home-module.imports = [ - ../hosts/idols/ai/home.nix + ../hosts/idols_ai/home.nix {modules.desktop.hyprland.enable = true;} ] ++ desktop_base_modules.home-module.imports; @@ -43,12 +43,12 @@ in { # 星野 愛久愛海, Hoshino Akuamarin idol_aquamarine_modules = { nixos-modules = [ - ../hosts/idols/aquamarine + ../hosts/idols_aquamarine ../modules/nixos/server.nix ../modules/nixos/proxmox-hardware-configuration.nix ]; home-module.imports = [ - ../hosts/idols/aquamarine/home.nix + ../hosts/idols_aquamarine/home.nix ../home/linux/server.nix ]; }; @@ -57,12 +57,12 @@ in { # 星野 瑠美衣, Hoshino Rubii idol_ruby_modules = { nixos-modules = [ - ../hosts/idols/ruby + ../hosts/idols_ruby ../modules/nixos/server.nix ../modules/nixos/proxmox-hardware-configuration.nix ]; home-module.imports = [ - ../hosts/idols/ruby/home.nix + ../hosts/idols_ruby/home.nix ../home/linux/server.nix ]; }; @@ -71,12 +71,12 @@ in { # 有馬 かな, Arima Kana idol_kana_modules = { nixos-modules = [ - ../hosts/idols/kana + ../hosts/idols_kana ../modules/nixos/server.nix ../modules/nixos/proxmox-hardware-configuration.nix ]; home-module.imports = [ - ../hosts/idols/kana/home.nix + ../hosts/idols_kana/home.nix ../home/linux/server.nix ]; }; @@ -85,7 +85,7 @@ in { # 森友 望未, Moritomo Nozomi rolling_nozomi_modules = { nixos-modules = [ - ../hosts/rolling_girls/nozomi + ../hosts/rolling_girls_nozomi ../modules/nixos/server-riscv64.nix # cross-compilation this flake. @@ -98,7 +98,7 @@ in { # 小坂 結季奈, Kosaka Yukina rolling_yukina_modules = { nixos-modules = [ - ../hosts/rolling_girls/yukina + ../hosts/rolling_girls_yukina ../modules/nixos/server-riscv64.nix # cross-compilation this flake. @@ -111,7 +111,7 @@ in { # 大木 鈴, Ōki Suzu _12kingdoms_suzu_modules = { nixos-modules = [ - ../hosts/12kingdoms/suzu + ../hosts/12kingdoms_suzu ../modules/nixos/server-riscv64.nix # cross-compilation this flake. @@ -125,13 +125,13 @@ in { _12kingdoms_shoukei_modules_i3 = { nixos-modules = [ - ../hosts/12kingdoms/shoukei + ../hosts/12kingdoms_shoukei {modules.desktop.xorg.enable = true;} ] ++ desktop_base_modules.nixos-modules; home-module.imports = [ - ../hosts/12kingdoms/shoukei/home.nix + ../hosts/12kingdoms_shoukei/home.nix {modules.desktop.i3.enable = true;} ] ++ desktop_base_modules.home-module.imports; @@ -140,13 +140,13 @@ in { _12kingdoms_shoukei_modules_hyprland = { nixos-modules = [ - ../hosts/12kingdoms/shoukei + ../hosts/12kingdoms_shoukei {modules.desktop.wayland.enable = true;} ] ++ desktop_base_modules.nixos-modules; home-module.imports = [ - ../hosts/12kingdoms/shoukei/home.nix + ../hosts/12kingdoms_shoukei/home.nix {modules.desktop.hyprland.enable = true;} ] ++ desktop_base_modules.home-module.imports;