feat: Rename project to 'Athenix'
This commit is contained in:
committed by
Hunter Halloran
parent
d97ece898c
commit
d205211c7d
@@ -12,14 +12,14 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.ugaif = {
|
||||
options.athenix = {
|
||||
forUser = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Convenience option to configure a host for a specific user.
|
||||
Automatically enables the user (sets ugaif.users.username.enable = true).
|
||||
Value should be a username from ugaif.users.accounts.
|
||||
Automatically enables the user (sets athenix.users.username.enable = true).
|
||||
Value should be a username from athenix.users.accounts.
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -80,8 +80,8 @@
|
||||
|
||||
config = lib.mkMerge [
|
||||
# Enable forUser if specified
|
||||
(lib.mkIf (config.ugaif.forUser != null) {
|
||||
ugaif.users.${config.ugaif.forUser}.enable = true;
|
||||
(lib.mkIf (config.athenix.forUser != null) {
|
||||
athenix.users.${config.athenix.forUser}.enable = true;
|
||||
})
|
||||
|
||||
# Main configuration
|
||||
@@ -92,7 +92,7 @@
|
||||
disko.devices = {
|
||||
disk.main = {
|
||||
type = "disk";
|
||||
device = config.ugaif.host.filesystem.device;
|
||||
device = config.athenix.host.filesystem.device;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
@@ -118,7 +118,7 @@
|
||||
swap = {
|
||||
name = "swap";
|
||||
label = "swap";
|
||||
size = config.ugaif.host.filesystem.swapSize;
|
||||
size = config.athenix.host.filesystem.swapSize;
|
||||
content = {
|
||||
type = "swap";
|
||||
};
|
||||
|
||||
@@ -36,12 +36,12 @@
|
||||
];
|
||||
|
||||
# Automatic Garbage Collection
|
||||
nix.gc = lib.mkIf config.ugaif.system.gc.enable {
|
||||
nix.gc = lib.mkIf config.athenix.system.gc.enable {
|
||||
automatic = true;
|
||||
dates = config.ugaif.system.gc.frequency;
|
||||
options = "--delete-older-than ${toString config.ugaif.system.gc.retentionDays}d";
|
||||
dates = config.athenix.system.gc.frequency;
|
||||
options = "--delete-older-than ${toString config.athenix.system.gc.retentionDays}d";
|
||||
};
|
||||
|
||||
# Optimize storage
|
||||
nix.optimise.automatic = config.ugaif.system.gc.optimise;
|
||||
nix.optimise.automatic = config.athenix.system.gc.optimise;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
# "my-hostname" = {
|
||||
# type = "nix-desktop"; # Host type module to use
|
||||
# system = "x86_64-linux"; # Optional
|
||||
# # ... any ugaif.* options or device-specific config
|
||||
# # ... any athenix.* options or device-specific config
|
||||
# };
|
||||
#
|
||||
# "lab-prefix" = {
|
||||
@@ -44,7 +44,7 @@ let
|
||||
# Load users.nix to find external user modules
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
usersData = import ../users.nix { inherit pkgs; };
|
||||
accounts = usersData.ugaif.users or { };
|
||||
accounts = usersData.athenix.users or { };
|
||||
|
||||
# Build a map of user names to their nixos module paths (if they exist)
|
||||
# We'll use this to conditionally import modules based on user.enable
|
||||
@@ -90,7 +90,7 @@ let
|
||||
if lib.isFunction importedModuleFunc then importedModuleFunc args else importedModuleFunc;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf (config.ugaif.users.${name}.enable or false) importedModule;
|
||||
config = lib.mkIf (config.athenix.users.${name}.enable or false) importedModule;
|
||||
}
|
||||
) userNixosModulePaths;
|
||||
|
||||
@@ -106,7 +106,7 @@ let
|
||||
externalPathModule =
|
||||
if externalModulePath != null then import externalModulePath { inherit inputs; } else { };
|
||||
|
||||
# Config override module - translate special keys to ugaif options
|
||||
# Config override module - translate special keys to athenix options
|
||||
overrideModule =
|
||||
{ ... }:
|
||||
let
|
||||
@@ -119,7 +119,7 @@ let
|
||||
"buildMethods"
|
||||
];
|
||||
specialConfig = lib.optionalAttrs (configOverrides ? buildMethods) {
|
||||
ugaif.host.buildMethods = configOverrides.buildMethods;
|
||||
athenix.host.buildMethods = configOverrides.buildMethods;
|
||||
};
|
||||
in
|
||||
{
|
||||
@@ -220,7 +220,7 @@ let
|
||||
lib.recursiveUpdate (lib.recursiveUpdate baseConfig overrides) deviceConfig;
|
||||
|
||||
# Check useHostPrefix from the merged config
|
||||
usePrefix = mergedConfig.ugaif.host.useHostPrefix or true;
|
||||
usePrefix = mergedConfig.athenix.host.useHostPrefix or true;
|
||||
hostName = mkHostName prefix deviceKey usePrefix;
|
||||
|
||||
# If external module, also add a default.nix path for import
|
||||
|
||||
@@ -38,15 +38,15 @@
|
||||
];
|
||||
|
||||
# ========== Filesystem Configuration ==========
|
||||
ugaif.host.filesystem.swapSize = lib.mkDefault "16G";
|
||||
ugaif.host.filesystem.device = lib.mkDefault "/dev/nvme0n1";
|
||||
ugaif.host.buildMethods = lib.mkDefault [ "installer-iso" ];
|
||||
athenix.host.filesystem.swapSize = lib.mkDefault "16G";
|
||||
athenix.host.filesystem.device = lib.mkDefault "/dev/nvme0n1";
|
||||
athenix.host.buildMethods = lib.mkDefault [ "installer-iso" ];
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
# ========== Hardware Configuration ==========
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
# ========== Software Profile ==========
|
||||
ugaif.sw.enable = lib.mkDefault true;
|
||||
ugaif.sw.type = lib.mkDefault "desktop";
|
||||
athenix.sw.enable = lib.mkDefault true;
|
||||
athenix.sw.type = lib.mkDefault "desktop";
|
||||
}
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
|
||||
# ========== Ephemeral Configuration ==========
|
||||
# No persistent storage - everything runs from RAM
|
||||
ugaif.host.filesystem.swapSize = lib.mkForce "0G";
|
||||
ugaif.host.filesystem.device = lib.mkForce "/dev/null"; # Dummy device
|
||||
ugaif.host.buildMethods = lib.mkDefault [
|
||||
athenix.host.filesystem.swapSize = lib.mkForce "0G";
|
||||
athenix.host.filesystem.device = lib.mkForce "/dev/null"; # Dummy device
|
||||
athenix.host.buildMethods = lib.mkDefault [
|
||||
"iso" # Live ISO image
|
||||
"ipxe" # Network boot
|
||||
];
|
||||
@@ -63,6 +63,6 @@
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
ugaif.sw.enable = lib.mkDefault true;
|
||||
ugaif.sw.type = lib.mkDefault "stateless-kiosk";
|
||||
athenix.sw.enable = lib.mkDefault true;
|
||||
athenix.sw.type = lib.mkDefault "stateless-kiosk";
|
||||
}
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
# ========== Filesystem Configuration ==========
|
||||
ugaif.host.filesystem.device = lib.mkDefault "/dev/nvme0n1";
|
||||
ugaif.host.filesystem.swapSize = lib.mkDefault "34G"; # Larger swap for hibernation
|
||||
ugaif.host.buildMethods = lib.mkDefault [ "installer-iso" ];
|
||||
athenix.host.filesystem.device = lib.mkDefault "/dev/nvme0n1";
|
||||
athenix.host.filesystem.swapSize = lib.mkDefault "34G"; # Larger swap for hibernation
|
||||
athenix.host.buildMethods = lib.mkDefault [ "installer-iso" ];
|
||||
|
||||
# ========== Power Management ==========
|
||||
services.upower.enable = lib.mkDefault true;
|
||||
@@ -60,6 +60,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
ugaif.sw.enable = lib.mkDefault true;
|
||||
ugaif.sw.type = lib.mkDefault "desktop";
|
||||
athenix.sw.enable = lib.mkDefault true;
|
||||
athenix.sw.type = lib.mkDefault "desktop";
|
||||
}
|
||||
|
||||
@@ -52,11 +52,11 @@
|
||||
|
||||
# ========== System Configuration ==========
|
||||
system.stateVersion = "25.11";
|
||||
ugaif.host.buildMethods = lib.mkDefault [
|
||||
athenix.host.buildMethods = lib.mkDefault [
|
||||
"lxc" # LXC container tarball
|
||||
"proxmox" # Proxmox VMA archive
|
||||
];
|
||||
|
||||
ugaif.sw.enable = lib.mkDefault true;
|
||||
ugaif.sw.type = lib.mkDefault "headless";
|
||||
athenix.sw.enable = lib.mkDefault true;
|
||||
athenix.sw.type = lib.mkDefault "headless";
|
||||
}
|
||||
|
||||
@@ -56,15 +56,15 @@ in
|
||||
boot.kernelPackages = lib.mkForce refKernelPackages;
|
||||
|
||||
# ========== Filesystem Configuration ==========
|
||||
ugaif.host.filesystem.swapSize = lib.mkDefault "8G";
|
||||
ugaif.host.filesystem.device = lib.mkDefault "/dev/mmcblk0"; # eMMC storage # eMMC storage
|
||||
ugaif.host.buildMethods = lib.mkDefault [ "installer-iso" ];
|
||||
athenix.host.filesystem.swapSize = lib.mkDefault "8G";
|
||||
athenix.host.filesystem.device = lib.mkDefault "/dev/mmcblk0"; # eMMC storage # eMMC storage
|
||||
athenix.host.buildMethods = lib.mkDefault [ "installer-iso" ];
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
# ========== Hardware Configuration ==========
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
# ========== Software Profile ==========
|
||||
ugaif.sw.enable = lib.mkDefault true;
|
||||
ugaif.sw.type = lib.mkDefault "tablet-kiosk"; # Touch-optimized kiosk mode
|
||||
athenix.sw.enable = lib.mkDefault true;
|
||||
athenix.sw.type = lib.mkDefault "tablet-kiosk"; # Touch-optimized kiosk mode
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
];
|
||||
|
||||
# ========== Options ==========
|
||||
options.ugaif.host.wsl.user = lib.mkOption {
|
||||
options.athenix.host.wsl.user = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "engr-ugaif";
|
||||
description = "The default user to log in as in WSL.";
|
||||
@@ -29,11 +29,11 @@
|
||||
wsl.enable = true;
|
||||
# Use forUser if set, otherwise fall back to wsl.user option
|
||||
wsl.defaultUser =
|
||||
if config.ugaif.forUser != null then config.ugaif.forUser else config.ugaif.host.wsl.user;
|
||||
if config.athenix.forUser != null then config.athenix.forUser else config.athenix.host.wsl.user;
|
||||
|
||||
# ========== Software Profile ==========
|
||||
ugaif.sw.enable = lib.mkDefault true;
|
||||
ugaif.sw.type = lib.mkDefault "headless";
|
||||
athenix.sw.enable = lib.mkDefault true;
|
||||
athenix.sw.type = lib.mkDefault "headless";
|
||||
|
||||
# ========== Remote Development ==========
|
||||
services.vscode-server.enable = true;
|
||||
@@ -48,7 +48,7 @@
|
||||
systemd.network.enable = lib.mkForce false;
|
||||
|
||||
# Provide dummy values for required options from boot.nix
|
||||
ugaif.host.filesystem.device = "/dev/null";
|
||||
ugaif.host.filesystem.swapSize = "0G";
|
||||
athenix.host.filesystem.device = "/dev/null";
|
||||
athenix.host.filesystem.swapSize = "0G";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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
|
||||
{ };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user