refactor(nixos): simplify configurations.nix and lib

This commit refactors configurations.nix and lib/default.nix by removing the
extractConfigurations function and related code from lib/default.nix,
and moving the NixOS system building logic directly into configurations.nix.
It also changes the structure of hosts in manifest.nix to use a
hosts.nixos attribute.
This commit is contained in:
Mohammad Rafiq 2025-07-07 06:41:53 +08:00
parent 99f984a523
commit f7873d54d3
No known key found for this signature in database
3 changed files with 32 additions and 59 deletions

View file

@ -1,3 +1,4 @@
let
testCfg =
{ hostName, ... }:
@ -21,8 +22,8 @@ in
shell = "fish";
pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILdsZyY3gu8IGB8MzMnLdh+ClDxQQ2RYG9rkeetIKq8n rafiq";
};
hosts = {
"nixos/nemesis" = {
hosts.nixos = {
nemesis = {
machine = {
platform = "amd";
gpu = "nvidia";
@ -38,7 +39,7 @@ in
};
extraCfg = testCfg;
};
"nixos/apollo" = {
apollo = {
machine = {
platform = "intel";
root.drive = "/dev/disk/by-id/nvme-eui.002538d221b47b01";