feat: remove x86_64-darwin, add new nixos host on macbook pro m2

This commit is contained in:
Ryan Yin
2025-07-12 16:51:48 +08:00
parent 77a792710a
commit db82d2d8c5
38 changed files with 308 additions and 387 deletions

View File

@@ -0,0 +1,57 @@
{
# NOTE: the args not used in this file CAN NOT be removed!
# because haumea pass argument lazily,
# and these arguments are used in the functions like `mylib.nixosSystem`, `mylib.colmenaSystem`, etc.
inputs,
lib,
myvars,
mylib,
system,
genSpecialArgs,
...
} @ args: let
# Shoukei (祥瓊, Shōkei)
name = "shoukei";
base-modules = {
nixos-modules = map mylib.relativeToRoot [
# common
"secrets/nixos.nix"
"modules/nixos/desktop.nix"
# host specific
"hosts/12kingdoms-${name}"
];
home-modules = map mylib.relativeToRoot [
# common
"home/linux/gui.nix"
# host specific
"hosts/12kingdoms-${name}/home.nix"
];
};
modules-hyprland = {
nixos-modules =
[
{
modules.desktop.wayland.enable = true;
modules.secrets.desktop.enable = true;
modules.secrets.preservation.enable = true;
}
]
++ base-modules.nixos-modules;
home-modules =
[
{modules.desktop.hyprland.enable = true;}
]
++ base-modules.home-modules;
};
in {
nixosConfigurations = {
# host with hyprland compositor
"${name}-hyprland" = mylib.nixosSystem (modules-hyprland // args);
};
# generate iso image for hosts with desktop environment
packages = {
"${name}-hyprland" = inputs.self.nixosConfigurations."${name}-hyprland".config.formats.iso;
};
}