haios/systems/default.nix

78 lines
2 KiB
Nix
Raw Permalink Normal View History

2025-02-17 16:48:14 +02:00
{
lib,
self,
inputs,
...
}: let
inherit (lib.lists) optionals concatLists;
# profiles module, these are sensible defaults for given hardware sets
# or meta profiles that are used to configure the system based on the requirements of the given machine
profilesPath = ../modules/profiles; # the base directory for the types module
# hardware profiles
laptop = profilesPath + /laptop; # for laptop type configurations
desktop = profilesPath + /desktop; # for desktop type configurations
server = profilesPath + /server; # for server type configurations
# meta profiles
graphical = profilesPath + /graphical; # for systems that have a graphical interface
headless = profilesPath + /headless; # for headless systems
in {
imports = [inputs.easy-hosts.flakeModule];
config.easy-hosts = {
shared.specialArgs = {
inherit (inputs.haipkgs) haiLib;
};
perClass = class: {
modules = concatLists [
[
# import the class module, this contains the common configurations between all systems of the same class
"${self}/modules/${class}/default.nix"
]
(optionals (class != "iso") [
# import the home module, which is users for configuring users via home-manager
2025-02-17 22:41:50 +02:00
"${self}/home/default.nix"
2025-02-17 16:48:14 +02:00
# import the base module, this contains the common configurations between all systems
"${self}/modules/base/default.nix"
])
];
};
# This is the list of system configuration
#
# the defaults consists of the following:
# arch = "x86_64";
# class = "nixos";
# deployable = false;
# modules = [ ];
# specialArgs = { };
hosts = {
nyx = {
modules = [
desktop
graphical
];
};
2025-02-17 20:56:10 +02:00
ptocheia = {
modules = [
laptop
graphical
];
};
2025-02-17 22:41:50 +02:00
theia = {
deployable = true;
modules = [
server
headless
];
};
2025-02-17 16:48:14 +02:00
};
};
}