feat: Rename project to 'Athenix'
This commit is contained in:
committed by
Hunter Halloran
parent
d97ece898c
commit
d205211c7d
38
.github/copilot-instructions.md
vendored
38
.github/copilot-instructions.md
vendored
@@ -6,7 +6,7 @@ This repository manages NixOS configurations for the UGA Innovation Factory's fl
|
||||
|
||||
This is a **NixOS system configuration repository** that uses:
|
||||
- **Nix flakes** for dependency management and reproducible builds
|
||||
- **Custom namespace** (`ugaif.*`) for all Innovation Factory-specific options
|
||||
- **Custom namespace** (`athenix.*`) for all Innovation Factory-specific options
|
||||
- **Inventory-based** host generation from `inventory.nix`
|
||||
- **External module support** for user and system configurations
|
||||
- **Multiple hardware types**: desktops, laptops, Surface tablets, LXC containers, WSL
|
||||
@@ -30,18 +30,18 @@ This is a **NixOS system configuration repository** that uses:
|
||||
- **`templates/`**: Templates for external configurations
|
||||
|
||||
### Naming Conventions
|
||||
- Module options: Use `ugaif.*` namespace for all custom options
|
||||
- Module options: Use `athenix.*` namespace for all custom options
|
||||
- Hostnames: `{type}{number}` or `{type}-{name}` (e.g., `nix-laptop1`, `nix-surface-alpha`)
|
||||
- Hardware types: Prefix with `nix-` (e.g., `nix-desktop`, `nix-laptop`)
|
||||
- Software types: Use descriptive names (`desktop`, `tablet-kiosk`, `headless`)
|
||||
|
||||
## Custom Namespace (`ugaif`)
|
||||
## Custom Namespace (`athenix`)
|
||||
|
||||
All Innovation Factory-specific options MUST use the `ugaif` namespace:
|
||||
All Innovation Factory-specific options MUST use the `athenix` namespace:
|
||||
|
||||
### Host Options (`ugaif.host.*`)
|
||||
### Host Options (`athenix.host.*`)
|
||||
```nix
|
||||
ugaif.host = {
|
||||
athenix.host = {
|
||||
filesystem.device = "/dev/sda"; # Boot disk
|
||||
filesystem.swapSize = "32G"; # Swap size
|
||||
buildMethods = [ "iso" ]; # Artifact types
|
||||
@@ -50,9 +50,9 @@ ugaif.host = {
|
||||
};
|
||||
```
|
||||
|
||||
### Software Options (`ugaif.sw.*`)
|
||||
### Software Options (`athenix.sw.*`)
|
||||
```nix
|
||||
ugaif.sw = {
|
||||
athenix.sw = {
|
||||
type = "desktop"; # System type
|
||||
kioskUrl = "https://..."; # Kiosk browser URL
|
||||
python.enable = true; # Python tools (pixi, uv)
|
||||
@@ -64,13 +64,13 @@ ugaif.sw = {
|
||||
};
|
||||
```
|
||||
|
||||
### User Options (`ugaif.users.*`)
|
||||
### User Options (`athenix.users.*`)
|
||||
```nix
|
||||
ugaif.users = {
|
||||
athenix.users = {
|
||||
accounts = { ... }; # User definitions
|
||||
enabledUsers = [ "root" "engr-ugaif" ]; # Enabled users
|
||||
};
|
||||
ugaif.forUser = "username"; # Convenience: enable user + set WSL user
|
||||
athenix.forUser = "username"; # Convenience: enable user + set WSL user
|
||||
```
|
||||
|
||||
## Development Workflow
|
||||
@@ -90,8 +90,8 @@ ugaif.forUser = "username"; # Convenience: enable user + set WSL user
|
||||
### Common Tasks
|
||||
|
||||
#### Adding a New User
|
||||
1. Edit `users.nix` to add user definition under `ugaif.users.accounts`
|
||||
2. Enable user in `inventory.nix` via `ugaif.users.username.enable = true` or use `ugaif.forUser = "username"`
|
||||
1. Edit `users.nix` to add user definition under `athenix.users.accounts`
|
||||
2. Enable user in `inventory.nix` via `athenix.users.username.enable = true` or use `athenix.forUser = "username"`
|
||||
3. Test: `nix flake check`
|
||||
|
||||
#### Adding a New Host
|
||||
@@ -102,7 +102,7 @@ ugaif.forUser = "username"; # Convenience: enable user + set WSL user
|
||||
#### Modifying Software Configuration
|
||||
1. Edit appropriate file in `sw/` directory based on system type
|
||||
2. For system-wide changes: modify `sw/{type}/programs.nix`
|
||||
3. For specific hosts: use `ugaif.sw.extraPackages` in `inventory.nix`
|
||||
3. For specific hosts: use `athenix.sw.extraPackages` in `inventory.nix`
|
||||
4. Test: `nix flake check`
|
||||
|
||||
#### Creating External Modules
|
||||
@@ -114,7 +114,7 @@ ugaif.forUser = "username"; # Convenience: enable user + set WSL user
|
||||
## Important Constraints
|
||||
|
||||
### What NOT to Do
|
||||
- **Never** use options outside the `ugaif` namespace for Innovation Factory-specific functionality
|
||||
- **Never** use options outside the `athenix` namespace for Innovation Factory-specific functionality
|
||||
- **Never** remove or modify working host configurations unless explicitly requested
|
||||
- **Never** break existing functionality when adding new features
|
||||
- **Never** hardcode values that should be configurable
|
||||
@@ -122,7 +122,7 @@ ugaif.forUser = "username"; # Convenience: enable user + set WSL user
|
||||
|
||||
### What to ALWAYS Do
|
||||
- **Always** run `nix flake check` before finalizing changes
|
||||
- **Always** use the `ugaif.*` namespace for custom options
|
||||
- **Always** use the `athenix.*` namespace for custom options
|
||||
- **Always** preserve existing comment styles and documentation
|
||||
- **Always** test that configurations build successfully
|
||||
- **Always** consider impact on existing hosts when making changes
|
||||
@@ -140,7 +140,7 @@ myuser.external = builtins.fetchGit {
|
||||
rev = "abc123..."; # Pin to specific commit
|
||||
};
|
||||
# The external user.nix file contains BOTH user account options
|
||||
# (ugaif.users.myuser) AND home-manager configuration
|
||||
# (athenix.users.myuser) AND home-manager configuration
|
||||
```
|
||||
|
||||
### System Configurations
|
||||
@@ -184,7 +184,7 @@ nix flake show
|
||||
```
|
||||
|
||||
### Artifact Types
|
||||
Set via `ugaif.host.buildMethods`:
|
||||
Set via `athenix.host.buildMethods`:
|
||||
- `"iso"` - Installer ISO with auto-install
|
||||
- `"live-iso"` - Live boot ISO without installer
|
||||
- `"lxc"` - LXC container tarball
|
||||
@@ -231,7 +231,7 @@ Set via `ugaif.host.buildMethods`:
|
||||
## Code Review Checklist
|
||||
|
||||
When reviewing or generating code:
|
||||
- [ ] Uses `ugaif.*` namespace for custom options
|
||||
- [ ] Uses `athenix.*` namespace for custom options
|
||||
- [ ] Runs `nix flake check` successfully
|
||||
- [ ] Follows existing code style and formatting
|
||||
- [ ] Preserves existing functionality
|
||||
|
||||
32
README.md
32
README.md
@@ -1,4 +1,4 @@
|
||||
# UGA Innovation Factory - NixOS Systems
|
||||
# UGA Innovation Factory - Athenix
|
||||
|
||||
[](https://github.com/UGA-Innovation-Factory/nixos-systems/actions/workflows/ci.yml)
|
||||
|
||||
@@ -8,7 +8,7 @@ This repository contains the NixOS configuration for the Innovation Factory's fl
|
||||
|
||||
- **[Quick Start](#quick-start)** - Get started in 5 minutes
|
||||
- **[docs/INVENTORY.md](docs/INVENTORY.md)** - Configure hosts and fleet inventory
|
||||
- **[docs/NAMESPACE.md](docs/NAMESPACE.md)** - Configuration options reference (`ugaif.*`)
|
||||
- **[docs/NAMESPACE.md](docs/NAMESPACE.md)** - Configuration options reference (`athenix.*`)
|
||||
- **[docs/USER_CONFIGURATION.md](docs/USER_CONFIGURATION.md)** - User account management
|
||||
- **[docs/EXTERNAL_MODULES.md](docs/EXTERNAL_MODULES.md)** - External configuration modules
|
||||
- **[docs/BUILDING.md](docs/BUILDING.md)** - Build ISOs and container images
|
||||
@@ -83,22 +83,22 @@ nixos-systems/
|
||||
|
||||
## Configuration Overview
|
||||
|
||||
All Innovation Factory options use the `ugaif.*` namespace. See **[docs/NAMESPACE.md](docs/NAMESPACE.md)** for complete reference.
|
||||
All Innovation Factory options use the `athenix.*` namespace. See **[docs/NAMESPACE.md](docs/NAMESPACE.md)** for complete reference.
|
||||
|
||||
**Quick examples:**
|
||||
|
||||
```nix
|
||||
# Host configuration
|
||||
ugaif.host.filesystem.device = "/dev/nvme0n1";
|
||||
ugaif.host.filesystem.swapSize = "64G";
|
||||
athenix.host.filesystem.device = "/dev/nvme0n1";
|
||||
athenix.host.filesystem.swapSize = "64G";
|
||||
|
||||
# Software configuration
|
||||
ugaif.sw.type = "desktop"; # or "headless", "tablet-kiosk"
|
||||
ugaif.sw.extraPackages = with pkgs; [ vim docker ];
|
||||
athenix.sw.type = "desktop"; # or "headless", "tablet-kiosk"
|
||||
athenix.sw.extraPackages = with pkgs; [ vim docker ];
|
||||
|
||||
# User management
|
||||
ugaif.users.myuser.enable = true;
|
||||
ugaif.forUser = "myuser"; # Convenience shortcut
|
||||
athenix.users.myuser.enable = true;
|
||||
athenix.forUser = "myuser"; # Convenience shortcut
|
||||
```
|
||||
|
||||
## Prerequisites
|
||||
@@ -134,7 +134,7 @@ myuser = {
|
||||
```nix
|
||||
nix-laptop = {
|
||||
devices = 2;
|
||||
overrides.ugaif.users.myuser.enable = true;
|
||||
overrides.athenix.users.myuser.enable = true;
|
||||
};
|
||||
```
|
||||
|
||||
@@ -153,8 +153,8 @@ nix-laptop = {
|
||||
# With configuration
|
||||
nix-surface = {
|
||||
devices = {
|
||||
"1".ugaif.sw.kioskUrl = "https://dashboard1.example.com";
|
||||
"2".ugaif.sw.kioskUrl = "https://dashboard2.example.com";
|
||||
"1".athenix.sw.kioskUrl = "https://dashboard1.example.com";
|
||||
"2".athenix.sw.kioskUrl = "https://dashboard2.example.com";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -162,8 +162,8 @@ nix-surface = {
|
||||
nix-desktop = {
|
||||
devices = 3;
|
||||
overrides = {
|
||||
ugaif.users.student.enable = true;
|
||||
ugaif.sw.extraPackages = with pkgs; [ vim ];
|
||||
athenix.users.student.enable = true;
|
||||
athenix.sw.extraPackages = with pkgs; [ vim ];
|
||||
};
|
||||
};
|
||||
```
|
||||
@@ -180,7 +180,7 @@ myuser.external = builtins.fetchGit {
|
||||
url = "https://github.com/username/dotfiles";
|
||||
rev = "abc123...";
|
||||
};
|
||||
# The external user.nix file contains both ugaif.users.myuser options
|
||||
# The external user.nix file contains both athenix.users.myuser options
|
||||
# AND home-manager configuration
|
||||
|
||||
# In inventory.nix - External system config
|
||||
@@ -225,7 +225,7 @@ nix flake show github:UGA-Innovation-Factory/nixos-systems
|
||||
- **`stateless-kiosk`** - Diskless PXE boot kiosks
|
||||
- **`headless`** - Servers and containers (no GUI)
|
||||
|
||||
Set via `ugaif.sw.type` option. See [docs/NAMESPACE.md](docs/NAMESPACE.md) for all options.
|
||||
Set via `athenix.sw.type` option. See [docs/NAMESPACE.md](docs/NAMESPACE.md) for all options.
|
||||
|
||||
## Development
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ nix build github:UGA-Innovation-Factory/nixos-systems#installer-iso-nix-laptop1
|
||||
3. After installation completes, remove the USB drive and reboot
|
||||
4. Log in with the configured user credentials
|
||||
|
||||
**Note:** The installer will **erase all data** on the target disk specified in `ugaif.host.filesystem.device`.
|
||||
**Note:** The installer will **erase all data** on the target disk specified in `athenix.host.filesystem.device`.
|
||||
|
||||
## Live ISOs
|
||||
|
||||
@@ -224,7 +224,7 @@ ssh engr-ugaif@nix-builder df -h
|
||||
|
||||
In `inventory.nix`:
|
||||
```nix
|
||||
ugaif.sw.remoteBuild.enable = false;
|
||||
athenix.sw.remoteBuild.enable = false;
|
||||
```
|
||||
|
||||
### Out of Disk Space
|
||||
|
||||
@@ -288,13 +288,13 @@ vim sw/headless/programs.nix
|
||||
|
||||
### Packages for Specific Hosts
|
||||
|
||||
Add to `ugaif.sw.extraPackages` in `inventory.nix`:
|
||||
Add to `athenix.sw.extraPackages` in `inventory.nix`:
|
||||
|
||||
```nix
|
||||
nix-laptop = {
|
||||
devices = 2;
|
||||
overrides = {
|
||||
ugaif.sw.extraPackages = with pkgs; [
|
||||
athenix.sw.extraPackages = with pkgs; [
|
||||
vim
|
||||
docker
|
||||
kubernetes-helm
|
||||
@@ -378,7 +378,7 @@ uv pip install -r requirements.txt
|
||||
Python development tools are configured in `sw/python.nix` and can be controlled via:
|
||||
|
||||
```nix
|
||||
ugaif.sw.python.enable = true; # Default: enabled
|
||||
athenix.sw.python.enable = true; # Default: enabled
|
||||
```
|
||||
|
||||
## Contributing
|
||||
@@ -388,7 +388,7 @@ ugaif.sw.python.enable = true; # Default: enabled
|
||||
- Run formatter before committing: `nix fmt`
|
||||
- Follow existing code structure and conventions
|
||||
- Add comments for complex logic
|
||||
- Use the `ugaif.*` namespace for all custom options
|
||||
- Use the `athenix.*` namespace for all custom options
|
||||
|
||||
### Testing Workflow
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ nix-lxc = {
|
||||
devices = {
|
||||
# Traditional inline configuration
|
||||
"local-server" = {
|
||||
ugaif.users.admin.enable = true;
|
||||
athenix.users.admin.enable = true;
|
||||
services.nginx.enable = true;
|
||||
};
|
||||
|
||||
@@ -66,9 +66,9 @@ server-config/
|
||||
};
|
||||
};
|
||||
|
||||
# Use ugaif namespace options
|
||||
ugaif.users.admin.enable = true;
|
||||
ugaif.sw.type = "headless";
|
||||
# Use athenix namespace options
|
||||
athenix.users.admin.enable = true;
|
||||
athenix.sw.type = "headless";
|
||||
}
|
||||
```
|
||||
|
||||
@@ -108,7 +108,7 @@ External user modules provide home-manager configurations (dotfiles, packages, p
|
||||
### Usage in users.nix
|
||||
|
||||
```nix
|
||||
ugaif.users = {
|
||||
athenix.users = {
|
||||
# External user module (dotfiles, home-manager, and user options)
|
||||
myuser = builtins.fetchGit {
|
||||
url = "https://github.com/username/dotfiles";
|
||||
@@ -142,7 +142,7 @@ dotfiles/
|
||||
{ config, lib, pkgs, osConfig ? null, ... }:
|
||||
{
|
||||
# ========== User Account Configuration ==========
|
||||
ugaif.users.myusername = {
|
||||
athenix.users.myusername = {
|
||||
description = "Your Full Name";
|
||||
shell = pkgs.zsh;
|
||||
hashedPassword = "!";
|
||||
@@ -157,7 +157,7 @@ dotfiles/
|
||||
vim
|
||||
git
|
||||
htop
|
||||
] ++ lib.optional (osConfig.ugaif.sw.type or null == "desktop") firefox;
|
||||
] ++ lib.optional (osConfig.athenix.sw.type or null == "desktop") firefox;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
@@ -216,7 +216,7 @@ username = {
|
||||
useNvimPlugins = true; # Apply system nvim config (default: true)
|
||||
|
||||
# Enable on specific systems (see docs/INVENTORY.md)
|
||||
enable = false; # Set in inventory.nix via ugaif.users.username.enable
|
||||
enable = false; # Set in inventory.nix via athenix.users.username.enable
|
||||
};
|
||||
```
|
||||
|
||||
@@ -337,7 +337,7 @@ External system modules are imported and merged into the NixOS configuration:
|
||||
import externalModulePath { inherit inputs; }
|
||||
```
|
||||
|
||||
They can use all standard NixOS options plus `ugaif.*` namespace options.
|
||||
They can use all standard NixOS options plus `athenix.*` namespace options.
|
||||
|
||||
### User Module Integration
|
||||
|
||||
@@ -346,7 +346,7 @@ External user modules are loaded in two contexts:
|
||||
**User options (NixOS module context):**
|
||||
```nix
|
||||
import (externalPath + "/user.nix") { inherit inputs; }
|
||||
# Evaluated as NixOS module to extract ugaif.users.<username> options
|
||||
# Evaluated as NixOS module to extract athenix.users.<username> options
|
||||
```
|
||||
|
||||
**Home-manager configuration:**
|
||||
@@ -375,7 +375,7 @@ nix-lxc = {
|
||||
};
|
||||
overrides = {
|
||||
# Apply to all devices, including external ones
|
||||
ugaif.users.admin.enable = true;
|
||||
athenix.users.admin.enable = true;
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
};
|
||||
};
|
||||
@@ -389,7 +389,7 @@ nix-lxc = {
|
||||
{ config, lib, pkgs, osConfig ? null, ... }:
|
||||
{
|
||||
# User account options
|
||||
ugaif.users.myusername = {
|
||||
athenix.users.myusername = {
|
||||
description = "My Name";
|
||||
shell = pkgs.zsh;
|
||||
hashedPassword = "!";
|
||||
@@ -418,7 +418,7 @@ dotfiles/
|
||||
{ config, lib, pkgs, osConfig ? null, ... }:
|
||||
{
|
||||
# User account configuration
|
||||
ugaif.users.myusername = {
|
||||
athenix.users.myusername = {
|
||||
description = "My Full Name";
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
@@ -433,7 +433,7 @@ dotfiles/
|
||||
ripgrep
|
||||
fd
|
||||
bat
|
||||
] ++ lib.optional (osConfig.ugaif.sw.type or null == "desktop") firefox;
|
||||
] ++ lib.optional (osConfig.athenix.sw.type or null == "desktop") firefox;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
@@ -18,7 +18,7 @@ The `inventory.nix` file defines all hosts in the fleet using a flexible system.
|
||||
|
||||
- **Numeric suffixes**: no dash (e.g., `nix-laptop1`, `nix-laptop2`)
|
||||
- **Non-numeric suffixes**: with dash (e.g., `nix-laptop-alpha`, `nix-laptop-beta`)
|
||||
- **Custom hostnames**: Set `ugaif.host.useHostPrefix = false` to use suffix as full hostname
|
||||
- **Custom hostnames**: Set `athenix.host.useHostPrefix = false` to use suffix as full hostname
|
||||
|
||||
## Adding Hosts
|
||||
|
||||
@@ -37,8 +37,8 @@ nix-laptop = {
|
||||
devices = 5;
|
||||
overrides = {
|
||||
# Applied to ALL nix-laptop hosts
|
||||
ugaif.users.student.enable = true;
|
||||
ugaif.sw.extraPackages = with pkgs; [ vim git ];
|
||||
athenix.users.student.enable = true;
|
||||
athenix.sw.extraPackages = with pkgs; [ vim git ];
|
||||
};
|
||||
};
|
||||
```
|
||||
@@ -48,9 +48,9 @@ nix-laptop = {
|
||||
```nix
|
||||
nix-surface = {
|
||||
devices = {
|
||||
"1".ugaif.sw.kioskUrl = "https://dashboard1.example.com";
|
||||
"2".ugaif.sw.kioskUrl = "https://dashboard2.example.com";
|
||||
"3".ugaif.sw.kioskUrl = "https://dashboard3.example.com";
|
||||
"1".athenix.sw.kioskUrl = "https://dashboard1.example.com";
|
||||
"2".athenix.sw.kioskUrl = "https://dashboard2.example.com";
|
||||
"3".athenix.sw.kioskUrl = "https://dashboard3.example.com";
|
||||
};
|
||||
};
|
||||
```
|
||||
@@ -62,12 +62,12 @@ nix-surface = {
|
||||
defaultCount = 2; # Creates nix-surface1, nix-surface2
|
||||
devices = {
|
||||
"special" = { # Creates nix-surface-special
|
||||
ugaif.sw.kioskUrl = "https://special-dashboard.example.com";
|
||||
athenix.sw.kioskUrl = "https://special-dashboard.example.com";
|
||||
};
|
||||
};
|
||||
overrides = {
|
||||
# Applied to all devices (including "special")
|
||||
ugaif.sw.kioskUrl = "https://default-dashboard.example.com";
|
||||
athenix.sw.kioskUrl = "https://default-dashboard.example.com";
|
||||
};
|
||||
};
|
||||
```
|
||||
@@ -76,15 +76,15 @@ nix-surface = {
|
||||
|
||||
### Direct Configuration (Recommended)
|
||||
|
||||
Use any NixOS or `ugaif.*` option:
|
||||
Use any NixOS or `athenix.*` option:
|
||||
|
||||
```nix
|
||||
"1" = {
|
||||
# UGAIF options
|
||||
ugaif.users.myuser.enable = true;
|
||||
ugaif.host.filesystem.swapSize = "64G";
|
||||
ugaif.sw.extraPackages = with pkgs; [ docker ];
|
||||
ugaif.sw.kioskUrl = "https://example.com";
|
||||
# Athenix options
|
||||
athenix.users.myuser.enable = true;
|
||||
athenix.host.filesystem.swapSize = "64G";
|
||||
athenix.sw.extraPackages = with pkgs; [ docker ];
|
||||
athenix.sw.kioskUrl = "https://example.com";
|
||||
|
||||
# Standard NixOS options
|
||||
networking.firewall.enable = false;
|
||||
@@ -93,14 +93,14 @@ Use any NixOS or `ugaif.*` option:
|
||||
};
|
||||
```
|
||||
|
||||
### Convenience: `ugaif.forUser`
|
||||
### Convenience: `athenix.forUser`
|
||||
|
||||
Quick setup for single-user systems (especially WSL):
|
||||
|
||||
```nix
|
||||
nix-wsl = {
|
||||
devices = {
|
||||
"alice".ugaif.forUser = "alice-username";
|
||||
"alice".athenix.forUser = "alice-username";
|
||||
};
|
||||
};
|
||||
```
|
||||
@@ -130,7 +130,7 @@ nix-lxc = {
|
||||
nix-laptop = {
|
||||
devices = 10; # Creates nix-laptop1 through nix-laptop10
|
||||
overrides = {
|
||||
ugaif.users.student.enable = true;
|
||||
athenix.users.student.enable = true;
|
||||
};
|
||||
};
|
||||
```
|
||||
@@ -142,13 +142,13 @@ nix-surface = {
|
||||
defaultCount = 5; # nix-surface1 through nix-surface5 (default config)
|
||||
devices = {
|
||||
"admin" = { # nix-surface-admin (special config)
|
||||
ugaif.sw.type = "desktop"; # Full desktop instead of kiosk
|
||||
ugaif.users.admin.enable = true;
|
||||
athenix.sw.type = "desktop"; # Full desktop instead of kiosk
|
||||
athenix.users.admin.enable = true;
|
||||
};
|
||||
};
|
||||
overrides = {
|
||||
ugaif.sw.type = "tablet-kiosk";
|
||||
ugaif.sw.kioskUrl = "https://dashboard.factory.uga.edu";
|
||||
athenix.sw.type = "tablet-kiosk";
|
||||
athenix.sw.kioskUrl = "https://dashboard.factory.uga.edu";
|
||||
};
|
||||
};
|
||||
```
|
||||
@@ -159,15 +159,15 @@ nix-surface = {
|
||||
nix-lxc = {
|
||||
devices = {
|
||||
"nix-builder" = {
|
||||
ugaif.sw.type = "headless";
|
||||
athenix.sw.type = "headless";
|
||||
};
|
||||
"webserver" = {
|
||||
ugaif.sw.type = "headless";
|
||||
athenix.sw.type = "headless";
|
||||
services.nginx.enable = true;
|
||||
};
|
||||
};
|
||||
overrides = {
|
||||
ugaif.host.useHostPrefix = false; # Use exact device key as hostname
|
||||
athenix.host.useHostPrefix = false; # Use exact device key as hostname
|
||||
};
|
||||
};
|
||||
```
|
||||
@@ -177,8 +177,8 @@ nix-lxc = {
|
||||
```nix
|
||||
nix-wsl = {
|
||||
devices = {
|
||||
"alice".ugaif.forUser = "alice-uga";
|
||||
"bob".ugaif.forUser = "bob-uga";
|
||||
"alice".athenix.forUser = "alice-uga";
|
||||
"bob".athenix.forUser = "bob-uga";
|
||||
};
|
||||
};
|
||||
```
|
||||
@@ -187,4 +187,4 @@ nix-wsl = {
|
||||
|
||||
- [USER_CONFIGURATION.md](USER_CONFIGURATION.md) - User account management
|
||||
- [EXTERNAL_MODULES.md](EXTERNAL_MODULES.md) - External configuration modules
|
||||
- [Configuration Namespace Reference](NAMESPACE.md) - All `ugaif.*` options
|
||||
- [Configuration Namespace Reference](NAMESPACE.md) - All `athenix.*` options
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
# Configuration Namespace Reference
|
||||
|
||||
All UGA Innovation Factory-specific options are under the `ugaif` namespace to avoid conflicts with standard NixOS options.
|
||||
All UGA Innovation Factory-specific options are under the `athenix` namespace to avoid conflicts with standard NixOS options.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Host Configuration (`ugaif.host`)](#host-configuration-ugaifhost)
|
||||
- [Software Configuration (`ugaif.sw`)](#software-configuration-ugaifsw)
|
||||
- [User Management (`ugaif.users`)](#user-management-ugaifusers)
|
||||
- [System Configuration (`ugaif.system`)](#system-configuration-ugaifsystem)
|
||||
- [Host Configuration (`athenix.host`)](#host-configuration-athenixhost)
|
||||
- [Software Configuration (`athenix.sw`)](#software-configuration-athenixsw)
|
||||
- [User Management (`athenix.users`)](#user-management-athenixusers)
|
||||
- [System Configuration (`athenix.system`)](#system-configuration-athenixsystem)
|
||||
- [Convenience Options](#convenience-options)
|
||||
|
||||
## Host Configuration (`ugaif.host`)
|
||||
## Host Configuration (`athenix.host`)
|
||||
|
||||
Hardware and host-specific settings.
|
||||
|
||||
### `ugaif.host.filesystem`
|
||||
### `athenix.host.filesystem`
|
||||
|
||||
Disk and storage configuration.
|
||||
|
||||
**Options:**
|
||||
- `ugaif.host.filesystem.device` - Boot disk device (default: `/dev/sda`)
|
||||
- `ugaif.host.filesystem.swapSize` - Swap file size (default: `"32G"`)
|
||||
- `athenix.host.filesystem.device` - Boot disk device (default: `/dev/sda`)
|
||||
- `athenix.host.filesystem.swapSize` - Swap file size (default: `"32G"`)
|
||||
|
||||
**Example:**
|
||||
```nix
|
||||
ugaif.host.filesystem = {
|
||||
athenix.host.filesystem = {
|
||||
device = "/dev/nvme0n1";
|
||||
swapSize = "64G";
|
||||
};
|
||||
```
|
||||
|
||||
### `ugaif.host.buildMethods`
|
||||
### `athenix.host.buildMethods`
|
||||
|
||||
List of supported build artifact types for this host.
|
||||
|
||||
@@ -42,10 +42,10 @@ List of supported build artifact types for this host.
|
||||
|
||||
**Example:**
|
||||
```nix
|
||||
ugaif.host.buildMethods = [ "lxc" "proxmox" ];
|
||||
athenix.host.buildMethods = [ "lxc" "proxmox" ];
|
||||
```
|
||||
|
||||
### `ugaif.host.useHostPrefix`
|
||||
### `athenix.host.useHostPrefix`
|
||||
|
||||
Whether to prepend the host type prefix to the hostname (used in inventory generation).
|
||||
|
||||
@@ -55,26 +55,26 @@ Whether to prepend the host type prefix to the hostname (used in inventory gener
|
||||
|
||||
**Example:**
|
||||
```nix
|
||||
ugaif.host.useHostPrefix = false; # "builder" instead of "nix-lxc-builder"
|
||||
athenix.host.useHostPrefix = false; # "builder" instead of "nix-lxc-builder"
|
||||
```
|
||||
|
||||
### `ugaif.host.wsl`
|
||||
### `athenix.host.wsl`
|
||||
|
||||
WSL-specific configuration options.
|
||||
|
||||
**Options:**
|
||||
- `ugaif.host.wsl.user` - Default WSL user for this instance
|
||||
- `athenix.host.wsl.user` - Default WSL user for this instance
|
||||
|
||||
**Example:**
|
||||
```nix
|
||||
ugaif.host.wsl.user = "myusername";
|
||||
athenix.host.wsl.user = "myusername";
|
||||
```
|
||||
|
||||
## Software Configuration (`ugaif.sw`)
|
||||
## Software Configuration (`athenix.sw`)
|
||||
|
||||
System software and application configuration.
|
||||
|
||||
### `ugaif.sw.enable`
|
||||
### `athenix.sw.enable`
|
||||
|
||||
Enable the software configuration module.
|
||||
|
||||
@@ -82,7 +82,7 @@ Enable the software configuration module.
|
||||
|
||||
**Default:** `true`
|
||||
|
||||
### `ugaif.sw.type`
|
||||
### `athenix.sw.type`
|
||||
|
||||
System type that determines the software profile.
|
||||
|
||||
@@ -98,10 +98,10 @@ System type that determines the software profile.
|
||||
|
||||
**Example:**
|
||||
```nix
|
||||
ugaif.sw.type = "headless";
|
||||
athenix.sw.type = "headless";
|
||||
```
|
||||
|
||||
### `ugaif.sw.kioskUrl`
|
||||
### `athenix.sw.kioskUrl`
|
||||
|
||||
URL to display in kiosk mode browsers (for `tablet-kiosk` and `stateless-kiosk` types).
|
||||
|
||||
@@ -111,38 +111,38 @@ URL to display in kiosk mode browsers (for `tablet-kiosk` and `stateless-kiosk`
|
||||
|
||||
**Example:**
|
||||
```nix
|
||||
ugaif.sw.kioskUrl = "https://dashboard.example.com";
|
||||
athenix.sw.kioskUrl = "https://dashboard.example.com";
|
||||
```
|
||||
|
||||
### `ugaif.sw.python`
|
||||
### `athenix.sw.python`
|
||||
|
||||
Python development tools configuration.
|
||||
|
||||
**Options:**
|
||||
- `ugaif.sw.python.enable` - Enable Python tools (pixi, uv) (default: `true`)
|
||||
- `athenix.sw.python.enable` - Enable Python tools (pixi, uv) (default: `true`)
|
||||
|
||||
**Example:**
|
||||
```nix
|
||||
ugaif.sw.python.enable = true;
|
||||
athenix.sw.python.enable = true;
|
||||
```
|
||||
|
||||
### `ugaif.sw.remoteBuild`
|
||||
### `athenix.sw.remoteBuild`
|
||||
|
||||
Remote build server configuration for offloading builds.
|
||||
|
||||
**Options:**
|
||||
- `ugaif.sw.remoteBuild.enable` - Use remote builders (default: enabled on tablets)
|
||||
- `ugaif.sw.remoteBuild.hosts` - List of build server hostnames
|
||||
- `athenix.sw.remoteBuild.enable` - Use remote builders (default: enabled on tablets)
|
||||
- `athenix.sw.remoteBuild.hosts` - List of build server hostnames
|
||||
|
||||
**Example:**
|
||||
```nix
|
||||
ugaif.sw.remoteBuild = {
|
||||
athenix.sw.remoteBuild = {
|
||||
enable = true;
|
||||
hosts = [ "nix-builder" "nix-builder2" ];
|
||||
};
|
||||
```
|
||||
|
||||
### `ugaif.sw.extraPackages`
|
||||
### `athenix.sw.extraPackages`
|
||||
|
||||
Additional system packages to install beyond the type defaults.
|
||||
|
||||
@@ -152,14 +152,14 @@ Additional system packages to install beyond the type defaults.
|
||||
|
||||
**Example:**
|
||||
```nix
|
||||
ugaif.sw.extraPackages = with pkgs; [
|
||||
athenix.sw.extraPackages = with pkgs; [
|
||||
vim
|
||||
htop
|
||||
docker
|
||||
];
|
||||
```
|
||||
|
||||
### `ugaif.sw.excludePackages`
|
||||
### `athenix.sw.excludePackages`
|
||||
|
||||
Packages to exclude from the default list for this system type.
|
||||
|
||||
@@ -169,16 +169,16 @@ Packages to exclude from the default list for this system type.
|
||||
|
||||
**Example:**
|
||||
```nix
|
||||
ugaif.sw.excludePackages = with pkgs; [
|
||||
athenix.sw.excludePackages = with pkgs; [
|
||||
firefox # Remove Firefox from default desktop packages
|
||||
];
|
||||
```
|
||||
|
||||
## User Management (`ugaif.users`)
|
||||
## User Management (`athenix.users`)
|
||||
|
||||
User account configuration and management.
|
||||
|
||||
### `ugaif.users.<username>.enable`
|
||||
### `athenix.users.<username>.enable`
|
||||
|
||||
Enable a specific user account on this system.
|
||||
|
||||
@@ -188,7 +188,7 @@ Enable a specific user account on this system.
|
||||
|
||||
**Example:**
|
||||
```nix
|
||||
ugaif.users = {
|
||||
athenix.users = {
|
||||
myuser.enable = true;
|
||||
student.enable = true;
|
||||
};
|
||||
@@ -200,7 +200,7 @@ Each user in `users.nix` can be configured with:
|
||||
|
||||
```nix
|
||||
# Option 1: Define inline in users.nix
|
||||
ugaif.users.myuser = {
|
||||
athenix.users.myuser = {
|
||||
description = "Full Name";
|
||||
isNormalUser = true; # Default: true
|
||||
extraGroups = [ "wheel" "docker" ]; # Additional groups
|
||||
@@ -214,30 +214,30 @@ ugaif.users.myuser = {
|
||||
};
|
||||
|
||||
# Option 2: Use external configuration (recommended)
|
||||
# The external user.nix can set ugaif.users.myuser options directly
|
||||
ugaif.users.anotheruser.external = builtins.fetchGit {
|
||||
# The external user.nix can set athenix.users.myuser options directly
|
||||
athenix.users.anotheruser.external = builtins.fetchGit {
|
||||
url = "https://github.com/username/dotfiles";
|
||||
rev = "abc123...";
|
||||
};
|
||||
```
|
||||
|
||||
## System Configuration (`ugaif.system`)
|
||||
## System Configuration (`athenix.system`)
|
||||
|
||||
System-wide settings and services.
|
||||
|
||||
### `ugaif.system.gc`
|
||||
### `athenix.system.gc`
|
||||
|
||||
Automatic garbage collection configuration.
|
||||
|
||||
**Options:**
|
||||
- `ugaif.system.gc.enable` - Enable automatic garbage collection (default: `true`)
|
||||
- `ugaif.system.gc.frequency` - How often to run (default: `"weekly"`)
|
||||
- `ugaif.system.gc.retentionDays` - Days to keep old generations (default: `30`)
|
||||
- `ugaif.system.gc.optimise` - Optimize Nix store automatically (default: `true`)
|
||||
- `athenix.system.gc.enable` - Enable automatic garbage collection (default: `true`)
|
||||
- `athenix.system.gc.frequency` - How often to run (default: `"weekly"`)
|
||||
- `athenix.system.gc.retentionDays` - Days to keep old generations (default: `30`)
|
||||
- `athenix.system.gc.optimise` - Optimize Nix store automatically (default: `true`)
|
||||
|
||||
**Example:**
|
||||
```nix
|
||||
ugaif.system.gc = {
|
||||
athenix.system.gc = {
|
||||
enable = true;
|
||||
frequency = "daily";
|
||||
retentionDays = 14;
|
||||
@@ -247,7 +247,7 @@ ugaif.system.gc = {
|
||||
|
||||
## Convenience Options
|
||||
|
||||
### `ugaif.forUser`
|
||||
### `athenix.forUser`
|
||||
|
||||
Quick setup option that enables a user account in one line.
|
||||
|
||||
@@ -257,14 +257,14 @@ Quick setup option that enables a user account in one line.
|
||||
|
||||
**Example:**
|
||||
```nix
|
||||
ugaif.forUser = "myusername"; # Equivalent to ugaif.users.myusername.enable = true
|
||||
athenix.forUser = "myusername"; # Equivalent to athenix.users.myusername.enable = true
|
||||
```
|
||||
|
||||
**Usage in inventory.nix:**
|
||||
```nix
|
||||
nix-wsl = {
|
||||
devices = {
|
||||
"alice".ugaif.forUser = "alice-uga";
|
||||
"alice".athenix.forUser = "alice-uga";
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
@@ -26,7 +26,7 @@ Users are defined in `users.nix` but are **not enabled by default** on all syste
|
||||
### 1. Define User in users.nix
|
||||
|
||||
```nix
|
||||
ugaif.users = {
|
||||
athenix.users = {
|
||||
# Option 1: Inline definition
|
||||
myuser = {
|
||||
description = "My Full Name";
|
||||
@@ -53,20 +53,20 @@ In `inventory.nix`:
|
||||
```nix
|
||||
nix-laptop = {
|
||||
devices = 2;
|
||||
overrides.ugaif.users.myuser.enable = true; # Enables on all nix-laptop hosts
|
||||
overrides.athenix.users.myuser.enable = true; # Enables on all nix-laptop hosts
|
||||
};
|
||||
|
||||
# Or for specific devices
|
||||
nix-desktop = {
|
||||
devices = {
|
||||
"1".ugaif.users.myuser.enable = true;
|
||||
"2".ugaif.users.otheruser.enable = true;
|
||||
"1".athenix.users.myuser.enable = true;
|
||||
"2".athenix.users.otheruser.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Or use convenience option
|
||||
nix-wsl = {
|
||||
devices."alice".ugaif.forUser = "alice-user"; # Automatically enables user
|
||||
devices."alice".athenix.forUser = "alice-user"; # Automatically enables user
|
||||
};
|
||||
```
|
||||
|
||||
@@ -153,7 +153,7 @@ dotfiles/
|
||||
{
|
||||
# ========== User Account Configuration ==========
|
||||
# These options define the user account itself
|
||||
ugaif.users.myuser = {
|
||||
athenix.users.myuser = {
|
||||
description = "My Full Name";
|
||||
extraGroups = [ "wheel" "docker" ];
|
||||
shell = pkgs.zsh;
|
||||
@@ -171,7 +171,7 @@ dotfiles/
|
||||
home.packages = with pkgs; [
|
||||
vim
|
||||
ripgrep
|
||||
] ++ lib.optional (osConfig.ugaif.sw.type or null == "desktop") firefox;
|
||||
] ++ lib.optional (osConfig.athenix.sw.type or null == "desktop") firefox;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
@@ -210,7 +210,7 @@ dotfiles/
|
||||
|
||||
The `user.nix` module serves a dual purpose and is imported in **two contexts**:
|
||||
|
||||
1. **NixOS Module Context (User Options)**: The module is imported as a NixOS module where `ugaif.users.<username>` options are read to define the user account (description, shell, groups, SSH keys, etc.). These options override any defaults set in `users.nix`.
|
||||
1. **NixOS Module Context (User Options)**: The module is imported as a NixOS module where `athenix.users.<username>` options are read to define the user account (description, shell, groups, SSH keys, etc.). These options override any defaults set in `users.nix`.
|
||||
|
||||
2. **Home-Manager Context**: The same module is imported into home-manager where `home.*`, `programs.*`, and `services.*` options configure the user's environment, packages, and dotfiles.
|
||||
|
||||
@@ -251,7 +251,7 @@ Users must be explicitly enabled on each host in `inventory.nix`.
|
||||
nix-laptop = {
|
||||
devices = 5;
|
||||
overrides = {
|
||||
ugaif.users.student.enable = true; # All 5 laptops get this user
|
||||
athenix.users.student.enable = true; # All 5 laptops get this user
|
||||
};
|
||||
};
|
||||
```
|
||||
@@ -261,30 +261,30 @@ nix-laptop = {
|
||||
```nix
|
||||
nix-desktop = {
|
||||
devices = {
|
||||
"1".ugaif.users.alice.enable = true;
|
||||
"2".ugaif.users.bob.enable = true;
|
||||
"1".athenix.users.alice.enable = true;
|
||||
"2".athenix.users.bob.enable = true;
|
||||
"3" = {
|
||||
ugaif.users.alice.enable = true;
|
||||
ugaif.users.bob.enable = true;
|
||||
athenix.users.alice.enable = true;
|
||||
athenix.users.bob.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
### Method 3: Convenience Option (ugaif.forUser)
|
||||
### Method 3: Convenience Option (athenix.forUser)
|
||||
|
||||
Quick setup for single-user systems:
|
||||
|
||||
```nix
|
||||
nix-wsl = {
|
||||
devices = {
|
||||
"alice".ugaif.forUser = "alice-user"; # Automatically enables alice-user
|
||||
"bob".ugaif.forUser = "bob-user";
|
||||
"alice".athenix.forUser = "alice-user"; # Automatically enables alice-user
|
||||
"bob".athenix.forUser = "bob-user";
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
This is equivalent to `ugaif.users.alice-user.enable = true`.
|
||||
This is equivalent to `athenix.users.alice-user.enable = true`.
|
||||
|
||||
## Password Management
|
||||
|
||||
@@ -414,7 +414,7 @@ wsl-user = {
|
||||
Enable in inventory.nix:
|
||||
```nix
|
||||
nix-wsl = {
|
||||
devices."my-wsl".ugaif.forUser = "wsl-user";
|
||||
devices."my-wsl".athenix.forUser = "wsl-user";
|
||||
};
|
||||
```
|
||||
|
||||
@@ -464,7 +464,7 @@ Disable if you want to configure Neovim yourself.
|
||||
|
||||
**Check if enabled on host:**
|
||||
```bash
|
||||
nix eval .#nixosConfigurations.nix-laptop1.config.ugaif.users.myuser.enable
|
||||
nix eval .#nixosConfigurations.nix-laptop1.config.athenix.users.myuser.enable
|
||||
```
|
||||
|
||||
**Check if user exists:**
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Flake Entry Point
|
||||
# ============================================================================
|
||||
# This file defines the inputs (dependencies) and outputs (configurations)
|
||||
# for the NixOS systems. It ties together the hardware, software, and user
|
||||
# for Athenix. It ties together the hardware, software, and user
|
||||
# configurations into deployable systems.
|
||||
|
||||
inputs = {
|
||||
|
||||
@@ -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
|
||||
{ };
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@ Add the host to `inventory.nix` with the `nix-lxc` type or ensure it has the app
|
||||
"my-container" = { };
|
||||
};
|
||||
overrides = {
|
||||
ugaif.host.useHostPrefix = false;
|
||||
ugaif.host.buildMethods = [ "lxc" ];
|
||||
athenix.host.useHostPrefix = false;
|
||||
athenix.host.buildMethods = [ "lxc" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -291,7 +291,7 @@ nix eval .#nixosConfigurations.nix-builder.config.boot.isContainer
|
||||
# Should output: true
|
||||
|
||||
# Check build methods
|
||||
nix eval .#nixosConfigurations.nix-builder.config.ugaif.host.buildMethods
|
||||
nix eval .#nixosConfigurations.nix-builder.config.athenix.host.buildMethods
|
||||
# Should include: "lxc"
|
||||
```
|
||||
|
||||
@@ -386,7 +386,7 @@ Inside the container:
|
||||
The script works with any host in your `nixosConfigurations` that:
|
||||
|
||||
1. Has `boot.isContainer = true`
|
||||
2. Has `"lxc"` in `ugaif.host.buildMethods`
|
||||
2. Has `"lxc"` in `athenix.host.buildMethods`
|
||||
3. Imports the Proxmox LXC module
|
||||
|
||||
Your `artifacts.nix` automatically exposes these as `lxc-<hostname>` packages.
|
||||
|
||||
@@ -79,7 +79,7 @@ let
|
||||
let
|
||||
cfg = hosts.nixosConfigurations.${name};
|
||||
in
|
||||
if lib.elem "installer-iso" cfg.config.ugaif.host.buildMethods then
|
||||
if lib.elem "installer-iso" cfg.config.athenix.host.buildMethods then
|
||||
[
|
||||
{
|
||||
name = "installer-iso-${name}";
|
||||
@@ -98,7 +98,7 @@ let
|
||||
let
|
||||
cfg = hosts.nixosConfigurations.${name};
|
||||
in
|
||||
if lib.elem "iso" cfg.config.ugaif.host.buildMethods then
|
||||
if lib.elem "iso" cfg.config.athenix.host.buildMethods then
|
||||
[
|
||||
{
|
||||
name = "iso-${name}";
|
||||
@@ -117,7 +117,7 @@ let
|
||||
let
|
||||
cfg = hosts.nixosConfigurations.${name};
|
||||
in
|
||||
if lib.elem "ipxe" cfg.config.ugaif.host.buildMethods then
|
||||
if lib.elem "ipxe" cfg.config.athenix.host.buildMethods then
|
||||
[
|
||||
{
|
||||
name = "ipxe-${name}";
|
||||
@@ -147,7 +147,7 @@ let
|
||||
let
|
||||
cfg = hosts.nixosConfigurations.${name};
|
||||
in
|
||||
if lib.elem "lxc" cfg.config.ugaif.host.buildMethods then
|
||||
if lib.elem "lxc" cfg.config.athenix.host.buildMethods then
|
||||
[
|
||||
{
|
||||
name = "lxc-${name}";
|
||||
@@ -166,7 +166,7 @@ let
|
||||
let
|
||||
cfg = hosts.nixosConfigurations.${name};
|
||||
in
|
||||
if lib.elem "proxmox" cfg.config.ugaif.host.buildMethods then
|
||||
if lib.elem "proxmox" cfg.config.athenix.host.buildMethods then
|
||||
[
|
||||
{
|
||||
name = "proxmox-${name}";
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
# # Neovim module (requires user parameter):
|
||||
# home-manager.users.myuser.imports = [
|
||||
# (inputs.nixos-systems.homeManagerModules.nvim {
|
||||
# user = config.ugaif.users.accounts.myuser;
|
||||
# user = config.athenix.users.accounts.myuser;
|
||||
# })
|
||||
# ];
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
nix-ephemeral = import ../hosts/types/nix-ephemeral.nix { inherit inputs; }; # Diskless/RAM-only
|
||||
|
||||
# ========== Software Configuration Module ==========
|
||||
# Main software module with all ugaif.sw options
|
||||
# Use ugaif.sw.type to select profile: "desktop", "tablet-kiosk", "headless", "stateless-kiosk"
|
||||
# Use ugaif.sw.extraPackages to add additional packages
|
||||
# Use ugaif.sw.kioskUrl to set kiosk mode URL
|
||||
# Main software module with all athenix.sw options
|
||||
# Use athenix.sw.type to select profile: "desktop", "tablet-kiosk", "headless", "stateless-kiosk"
|
||||
# Use athenix.sw.extraPackages to add additional packages
|
||||
# Use athenix.sw.kioskUrl to set kiosk mode URL
|
||||
sw = { inputs, ... }@args: (import ../sw/default.nix (args // { inherit inputs; }));
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# Hostname generation rules:
|
||||
# - Numeric suffixes: no dash (e.g., "nix-surface1", "nix-surface2")
|
||||
# - Non-numeric suffixes: add dash (e.g., "nix-surface-alpha", "nix-surface-beta")
|
||||
# - Set ugaif.host.useHostPrefix = false to use suffix as full hostname
|
||||
# - Set athenix.host.useHostPrefix = false to use suffix as full hostname
|
||||
#
|
||||
# Format:
|
||||
# "prefix" = {
|
||||
@@ -29,19 +29,19 @@
|
||||
# "1" = { ... }; # Creates: prefix1
|
||||
# "alpha" = { ... }; # Creates: prefix-alpha
|
||||
# "custom" = { # Creates: custom (no prefix)
|
||||
# ugaif.host.useHostPrefix = false;
|
||||
# athenix.host.useHostPrefix = false;
|
||||
# };
|
||||
# };
|
||||
#
|
||||
# # Common config for all devices in this group
|
||||
# overrides = {
|
||||
# ugaif.users.user1.enable = true; # Applied to all devices in this group
|
||||
# athenix.users.user1.enable = true; # Applied to all devices in this group
|
||||
# # ... any other config
|
||||
# };
|
||||
# };
|
||||
#
|
||||
# Convenience options:
|
||||
# ugaif.forUser = "username"; # Automatically enables user (sets ugaif.users.username.enable = true)
|
||||
# athenix.forUser = "username"; # Automatically enables user (sets athenix.users.username.enable = true)
|
||||
#
|
||||
# External modules (instead of config):
|
||||
# Device values can be either a config attrset OR a fetchGit/fetchurl call
|
||||
@@ -56,10 +56,10 @@
|
||||
# };
|
||||
# "laptop" = {
|
||||
# devices = 5;
|
||||
# overrides.ugaif.users.student.enable = true; # All 5 laptops get this user
|
||||
# overrides.athenix.users.student.enable = true; # All 5 laptops get this user
|
||||
# };
|
||||
# "wsl" = {
|
||||
# devices."alice".ugaif.forUser = "alice123"; # Sets up for user alice123
|
||||
# devices."alice".athenix.forUser = "alice123"; # Sets up for user alice123
|
||||
# };
|
||||
# "external" = {
|
||||
# devices."remote" = builtins.fetchGit { # External module via Git
|
||||
@@ -71,7 +71,7 @@
|
||||
# Both get hdh20267 user via overrides
|
||||
nix-laptop = {
|
||||
devices = 2;
|
||||
overrides.ugaif.users.hdh20267.enable = true;
|
||||
overrides.athenix.users.hdh20267.enable = true;
|
||||
};
|
||||
|
||||
# ========== Desktop ==========
|
||||
@@ -85,10 +85,10 @@
|
||||
nix-surface = {
|
||||
defaultCount = 3;
|
||||
devices = {
|
||||
"1".ugaif.sw.kioskUrl = "https://google.com";
|
||||
"1".athenix.sw.kioskUrl = "https://google.com";
|
||||
};
|
||||
overrides = {
|
||||
ugaif.sw.kioskUrl = "https://yahoo.com";
|
||||
athenix.sw.kioskUrl = "https://yahoo.com";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
devices = {
|
||||
"nix-builder" = {
|
||||
# GitHub Actions self-hosted runner configuration
|
||||
ugaif.sw = {
|
||||
athenix.sw = {
|
||||
type = [
|
||||
"headless"
|
||||
"builders"
|
||||
@@ -123,11 +123,11 @@
|
||||
};
|
||||
"usda-dash" = builtins.fetchGit {
|
||||
url = "https://git.factory.uga.edu/MODEL/usda-dash-config.git";
|
||||
rev = "c47ab8fe295ba38cf3baa8670812b23a09fb4d53";
|
||||
rev = "98f19ed8f8a6fed29d0947604bc14b403547a10d";
|
||||
};
|
||||
};
|
||||
overrides = {
|
||||
ugaif.host.useHostPrefix = false;
|
||||
athenix.host.useHostPrefix = false;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
# Creates: nix-wsl-alireza
|
||||
nix-wsl = {
|
||||
devices = {
|
||||
"alireza".ugaif.forUser = "sv22900";
|
||||
"alireza".athenix.forUser = "sv22900";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.ugaif.sw;
|
||||
cfg = config.athenix.sw;
|
||||
basePackages = with pkgs; [
|
||||
# Build-related packages can be added here if needed
|
||||
];
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.ugaif.sw;
|
||||
cfg = config.athenix.sw;
|
||||
builderCfg = cfg.builders;
|
||||
in
|
||||
mkIf builderCfg.githubRunner.enable {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.ugaif.sw;
|
||||
cfg = config.athenix.sw;
|
||||
|
||||
# Normalize type to always be a list
|
||||
swTypes = if isList cfg.type then cfg.type else [ cfg.type ];
|
||||
@@ -31,7 +31,7 @@ in
|
||||
./updater.nix
|
||||
];
|
||||
|
||||
options.ugaif.sw = {
|
||||
options.athenix.sw = {
|
||||
enable = mkEnableOption "Standard Workstation Configuration";
|
||||
|
||||
type = mkOption {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.ugaif.sw;
|
||||
cfg = config.athenix.sw;
|
||||
basePackages = with pkgs; [
|
||||
tmux
|
||||
man
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
}:
|
||||
|
||||
{
|
||||
ugaif.sw.python.enable = lib.mkDefault true;
|
||||
athenix.sw.python.enable = lib.mkDefault true;
|
||||
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.ugaif.sw;
|
||||
cfg = config.athenix.sw;
|
||||
basePackages = with pkgs; [
|
||||
tmux
|
||||
man
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.ugaif.sw.python;
|
||||
cfg = config.athenix.sw.python;
|
||||
in
|
||||
{
|
||||
options.ugaif.sw.python = {
|
||||
options.athenix.sw.python = {
|
||||
enable = mkEnableOption "Python development tools (pixi, uv)" // {
|
||||
default = true;
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.ugaif.sw;
|
||||
cfg = config.athenix.sw;
|
||||
in
|
||||
{
|
||||
programs.dconf = {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.ugaif.sw;
|
||||
cfg = config.athenix.sw;
|
||||
basePackages = with pkgs; [
|
||||
libcamera
|
||||
chromium
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
--noerrdialogs \
|
||||
--disable-session-crashed-bubble \
|
||||
--disable-infobars \
|
||||
${config.ugaif.sw.kioskUrl}
|
||||
${config.athenix.sw.kioskUrl}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
with lib;
|
||||
|
||||
{
|
||||
options.ugaif.sw.remoteBuild = lib.mkOption {
|
||||
options.athenix.sw.remoteBuild = lib.mkOption {
|
||||
type = types.submodule {
|
||||
options = {
|
||||
hosts = mkOption {
|
||||
@@ -29,7 +29,7 @@ with lib;
|
||||
};
|
||||
|
||||
config = {
|
||||
ugaif.sw.remoteBuild.enable = lib.mkDefault (config.ugaif.sw.type == "tablet-kiosk");
|
||||
athenix.sw.remoteBuild.enable = lib.mkDefault (config.athenix.sw.type == "tablet-kiosk");
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writeShellScriptBin "update-system" ''
|
||||
@@ -69,11 +69,12 @@ with lib;
|
||||
Type = "oneshot";
|
||||
ExecStart =
|
||||
let
|
||||
hosts = config.ugaif.sw.remoteBuild.hosts;
|
||||
hosts = config.athenix.sw.remoteBuild.hosts;
|
||||
builders = lib.strings.concatMapStringsSep ";" (x: x) hosts;
|
||||
rebuildCmd = "${pkgs.nixos-rebuild}/bin/nixos-rebuild switch --refresh";
|
||||
source = "--flake github:UGA-Innovation-Factory/nixos-systems";
|
||||
remoteBuildFlags = if config.ugaif.sw.remoteBuild.enable then ''--builders "${builders}"'' else "";
|
||||
source = "--flake git+https://git.factory.uga.edu/UGA-Innovation-Factory/athenix";
|
||||
remoteBuildFlags =
|
||||
if config.athenix.sw.remoteBuild.enable then ''--builders "${builders}"'' else "";
|
||||
in
|
||||
"${rebuildCmd} ${remoteBuildFlags} --print-build-logs ${source}#${config.networking.hostName}";
|
||||
User = "root";
|
||||
|
||||
@@ -94,6 +94,6 @@ Your `default.nix` must:
|
||||
|
||||
External modules are automatically integrated into the nixos-systems build:
|
||||
- They receive the same flake inputs (nixpkgs, home-manager, etc.)
|
||||
- They can use ugaif.* options if defined in the host type
|
||||
- They can use athenix.* options if defined in the host type
|
||||
- They are merged with local overrides and base configuration
|
||||
- They work with all build methods (ISO, LXC, Proxmox, etc.)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
# Example: Configure services
|
||||
# services.openssh.enable = true;
|
||||
|
||||
# Example: Use ugaif options if available from nixos-systems
|
||||
# ugaif.users.myuser.enable = true;
|
||||
# Example: Use athenix options if available from nixos-systems
|
||||
# athenix.users.myuser.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ user-dotfiles-repo/
|
||||
└── vimrc
|
||||
```
|
||||
|
||||
**Note:** The `user.nix` file is required for a functional user module. It should contain both `ugaif.users.<username>` options and home-manager configuration.
|
||||
**Note:** The `user.nix` file is required for a functional user module. It should contain both `athenix.users.<username>` options and home-manager configuration.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -32,7 +32,7 @@ Copy the templates from this directory to your own Git repository:
|
||||
|
||||
```nix
|
||||
{
|
||||
ugaif.users = {
|
||||
athenix.users = {
|
||||
# Option 1: Define inline (without external module)
|
||||
inlineuser = {
|
||||
description = "My Name";
|
||||
@@ -42,7 +42,7 @@ Copy the templates from this directory to your own Git repository:
|
||||
};
|
||||
|
||||
# Option 2: Use external module (recommended for personal configs)
|
||||
# The external user.nix will set ugaif.users.myusername options
|
||||
# The external user.nix will set athenix.users.myusername options
|
||||
myusername.external = builtins.fetchGit {
|
||||
url = "https://github.com/username/dotfiles";
|
||||
rev = "abc123def456..."; # Full commit hash for reproducibility
|
||||
@@ -64,7 +64,7 @@ Enable the user in `inventory.nix`:
|
||||
"my-system" = {
|
||||
devices = {
|
||||
"hostname" = {
|
||||
ugaif.users.myusername.enable = true;
|
||||
athenix.users.myusername.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -77,12 +77,12 @@ Enable the user in `inventory.nix`:
|
||||
|
||||
This file serves a dual purpose and is imported in **two contexts**:
|
||||
|
||||
1. **NixOS Module Context**: Imported to read `ugaif.users.<username>` options that define the user account (description, shell, groups, SSH keys, etc.)
|
||||
1. **NixOS Module Context**: Imported to read `athenix.users.<username>` options that define the user account (description, shell, groups, SSH keys, etc.)
|
||||
2. **Home-Manager Context**: Imported to configure the user environment with `home.*`, `programs.*`, and `services.*` options
|
||||
|
||||
**How it works:**
|
||||
- The same file is evaluated twice in different contexts
|
||||
- User account options (`ugaif.users.<username>`) are read during NixOS evaluation
|
||||
- User account options (`athenix.users.<username>`) are read during NixOS evaluation
|
||||
- Home-manager options are used when building the user's environment
|
||||
- External module options override any defaults set in `users.nix`
|
||||
- You can conditionally include packages/config based on system type using `osConfig`
|
||||
@@ -118,7 +118,7 @@ This file contains system-level NixOS configuration. Only needed for:
|
||||
{ config, lib, pkgs, osConfig ? null, ... }:
|
||||
{
|
||||
# User account options
|
||||
ugaif.users.myuser = {
|
||||
athenix.users.myuser = {
|
||||
description = "My Name";
|
||||
shell = pkgs.zsh;
|
||||
hashedPassword = "!";
|
||||
@@ -150,7 +150,7 @@ This file contains system-level NixOS configuration. Only needed for:
|
||||
{ inputs, ... }:
|
||||
{ config, lib, pkgs, osConfig ? null, ... }:
|
||||
{
|
||||
ugaif.users.myuser = {
|
||||
athenix.users.myuser = {
|
||||
description = "My Name";
|
||||
shell = pkgs.zsh;
|
||||
hashedPassword = "!";
|
||||
@@ -162,7 +162,7 @@ This file contains system-level NixOS configuration. Only needed for:
|
||||
ripgrep
|
||||
fd
|
||||
bat
|
||||
] ++ lib.optional (osConfig.ugaif.sw.type or null == "desktop") firefox;
|
||||
] ++ lib.optional (osConfig.athenix.sw.type or null == "desktop") firefox;
|
||||
|
||||
# Symlink dotfiles
|
||||
home.file.".bashrc".source = ./config/bashrc;
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
# User Configuration
|
||||
# ============================================================================
|
||||
# This file configures BOTH:
|
||||
# 1. User account options (ugaif.users.<username>)
|
||||
# 1. User account options (athenix.users.<username>)
|
||||
# 2. Home-manager configuration (home.*, programs.*, services.*)
|
||||
#
|
||||
# The same file is imported in two contexts:
|
||||
# - As a NixOS module to read ugaif.users.<username> options
|
||||
# - As a NixOS module to read athenix.users.<username> options
|
||||
# - As a home-manager module for user environment configuration
|
||||
#
|
||||
# This module receives the same `inputs` flake inputs as the main
|
||||
@@ -26,7 +26,7 @@
|
||||
# ========== User Account Configuration ==========
|
||||
# Replace "myusername" with your actual username
|
||||
|
||||
ugaif.users.myusername = {
|
||||
athenix.users.myusername = {
|
||||
description = "Your Full Name";
|
||||
shell = pkgs.zsh;
|
||||
hashedPassword = "!"; # Locked password - use SSH keys only
|
||||
@@ -47,7 +47,7 @@
|
||||
};
|
||||
|
||||
# Note: You don't need to set 'enable = true' - that's controlled
|
||||
# per-host in inventory.nix via ugaif.users.myusername.enable
|
||||
# per-host in inventory.nix via athenix.users.myusername.enable
|
||||
|
||||
# ========== Home Manager Configuration ==========
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
fd
|
||||
bat
|
||||
]
|
||||
++ lib.optional (osConfig.ugaif.sw.type or null == "desktop") firefox;
|
||||
++ lib.optional (osConfig.athenix.sw.type or null == "desktop") firefox;
|
||||
# Conditionally add packages based on system type
|
||||
|
||||
# ========== Programs ==========
|
||||
|
||||
10
users.nix
10
users.nix
@@ -5,7 +5,7 @@
|
||||
# ============================================================================
|
||||
# This file defines the available user accounts. These accounts are NOT
|
||||
# enabled by default on all systems. They must be enabled via the
|
||||
# 'ugaif.users.enabledUsers' option in inventory.nix or system flakes.
|
||||
# 'athenix.users.enabledUsers' option in inventory.nix or system flakes.
|
||||
|
||||
# Define the users here using the new option
|
||||
# To generate a password hash, run: mkpasswd -m sha-512
|
||||
@@ -17,16 +17,16 @@
|
||||
# external = /path/to/local/config;
|
||||
#
|
||||
# External repositories should contain:
|
||||
# - user.nix (required): Defines ugaif.users.<name> options AND home-manager config
|
||||
# - user.nix (required): Defines athenix.users.<name> options AND home-manager config
|
||||
# - nixos.nix (optional): System-level NixOS configuration
|
||||
#
|
||||
# The user.nix file is imported in TWO contexts:
|
||||
# 1. As a NixOS module to read ugaif.users.<name> options (account settings)
|
||||
# 1. As a NixOS module to read athenix.users.<name> options (account settings)
|
||||
# 2. As a home-manager module for home.*, programs.*, services.* (user environment)
|
||||
#
|
||||
# User options can be set in users.nix OR in the external module's user.nix.
|
||||
# External module options take precedence over users.nix defaults.
|
||||
ugaif.users = {
|
||||
athenix.users = {
|
||||
root = {
|
||||
isNormalUser = false;
|
||||
hashedPassword = "!";
|
||||
@@ -49,7 +49,7 @@
|
||||
hdh20267 = {
|
||||
external = builtins.fetchGit {
|
||||
url = "https://git.factory.uga.edu/hdh20267/hdh20267-nix";
|
||||
rev = "db96137bb4cb16acefcf59d58c9f848924f2ad43";
|
||||
rev = "c538e0c0510045b58264627bb897fc499dc7c490";
|
||||
};
|
||||
};
|
||||
sv22900 = {
|
||||
|
||||
Reference in New Issue
Block a user