feat: Rename project to 'Athenix'

This commit is contained in:
UGA Innovation Factory
2025-12-18 12:07:25 -05:00
committed by Hunter Halloran
parent d97ece898c
commit d205211c7d
39 changed files with 278 additions and 277 deletions

View File

@@ -16,7 +16,7 @@
let
# Load users.nix to get account definitions
usersData = import ../users.nix { inherit pkgs; };
accounts = usersData.ugaif.users or { };
accounts = usersData.athenix.users or { };
# Helper: Resolve external module path from fetchGit/fetchTarball/path
resolveExternalPath =
@@ -35,7 +35,7 @@ let
&& (builtins.isPath path || (builtins.isString path && lib.hasPrefix "/" path))
&& builtins.pathExists path;
# Extract ugaif.users options from external user.nix modules
# Extract athenix.users options from external user.nix modules
# First, build a cache of options per user from their external user.nix (if any).
externalUserModuleOptions = lib.genAttrs (lib.attrNames accounts) (
name:
@@ -53,10 +53,10 @@ let
inherit lib pkgs;
osConfig = null;
};
# Extract just the ugaif.users.<name> options
ugaifUsers = evaluatedModule.ugaif.users or { };
# Extract just the athenix.users.<name> options
athenixUsers = evaluatedModule.athenix.users or { };
in
ugaifUsers.${name} or { }
athenixUsers.${name} or { }
else
{ }
);
@@ -116,7 +116,7 @@ let
- A fetchGit/fetchTarball result pointing to a repository
The external module can contain:
- user.nix (optional): Sets ugaif.users.<name> options AND home-manager config
- user.nix (optional): Sets athenix.users.<name> options AND home-manager config
- nixos.nix (optional): System-level NixOS configuration
Example: builtins.fetchGit { url = "https://github.com/user/dotfiles"; rev = "..."; }
@@ -157,7 +157,7 @@ let
in
{
options.ugaif.users = lib.mkOption {
options.athenix.users = lib.mkOption {
type = lib.types.attrsOf userSubmodule;
default = { };
description = "User accounts configuration. Set enable=true for users that should exist on this system.";
@@ -166,7 +166,7 @@ in
config = {
# Merge user definitions from users.nix with options from external user.nix modules
# External options take precedence over users.nix (which uses lib.mkDefault)
ugaif.users = lib.mapAttrs (
athenix.users = lib.mapAttrs (
name: user:
user
// {
@@ -180,7 +180,7 @@ in
# Generate NixOS users
users.users =
let
enabledAccounts = lib.filterAttrs (_: user: user.enable) config.ugaif.users;
enabledAccounts = lib.filterAttrs (_: user: user.enable) config.athenix.users;
in
lib.mapAttrs (
name: user:
@@ -209,7 +209,7 @@ in
users =
let
enabledAccounts = lib.filterAttrs (_: user: user.enable) config.ugaif.users;
enabledAccounts = lib.filterAttrs (_: user: user.enable) config.athenix.users;
in
lib.mapAttrs (
name: user:
@@ -220,13 +220,13 @@ in
userNixPath = if externalPath != null then externalPath + "/user.nix" else null;
hasExternalUser = isValidPath userNixPath;
# Import external user.nix for home-manager (filter out ugaif.* options)
# Import external user.nix for home-manager (filter out athenix.* options)
externalUserModule =
if hasExternalUser then
let
fullModule = import userNixPath { inherit inputs; };
in
# Only pass through non-ugaif options to home-manager
# Only pass through non-athenix options to home-manager
{
config,
lib,
@@ -244,7 +244,7 @@ in
;
};
in
lib.filterAttrs (attrName: _: attrName != "ugaif") evaluated
lib.filterAttrs (attrName: _: attrName != "athenix") evaluated
else
{ };