profiles: Introduce core, server and workstation profiles

This commit is contained in:
SebastianStork 2026-02-03 21:09:06 +01:00
parent 1c0f293c3d
commit 100f02a2d8
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
15 changed files with 94 additions and 163 deletions

View file

@ -11,8 +11,9 @@ let
specialArgs = { inherit inputs self; };
modules = [
{ networking = { inherit hostName; }; }
"${self}/hosts/common.nix"
"${self}/hosts/${hostName}"
"${self}/hosts/${hostName}/default.nix"
"${self}/hosts/${hostName}/hardware.nix"
"${self}/hosts/${hostName}/disko.nix"
"${self}/users/seb"
]
++ lib.optional (lib.pathExists "${self}/users/seb/@${hostName}") "${self}/users/seb/@${hostName}";

12
flake-parts/profiles.nix Normal file
View file

@ -0,0 +1,12 @@
{ self, lib, ... }:
{
flake.nixosModules =
"${self}/profiles"
|> builtins.readDir
|> lib.attrNames
|> lib.map (name: {
name = "profile-${name |> lib.removeSuffix ".nix"}";
value = "${self}/profiles/${name}";
})
|> lib.listToAttrs;
}