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:
|
This is a **NixOS system configuration repository** that uses:
|
||||||
- **Nix flakes** for dependency management and reproducible builds
|
- **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`
|
- **Inventory-based** host generation from `inventory.nix`
|
||||||
- **External module support** for user and system configurations
|
- **External module support** for user and system configurations
|
||||||
- **Multiple hardware types**: desktops, laptops, Surface tablets, LXC containers, WSL
|
- **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
|
- **`templates/`**: Templates for external configurations
|
||||||
|
|
||||||
### Naming Conventions
|
### 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`)
|
- Hostnames: `{type}{number}` or `{type}-{name}` (e.g., `nix-laptop1`, `nix-surface-alpha`)
|
||||||
- Hardware types: Prefix with `nix-` (e.g., `nix-desktop`, `nix-laptop`)
|
- Hardware types: Prefix with `nix-` (e.g., `nix-desktop`, `nix-laptop`)
|
||||||
- Software types: Use descriptive names (`desktop`, `tablet-kiosk`, `headless`)
|
- 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
|
```nix
|
||||||
ugaif.host = {
|
athenix.host = {
|
||||||
filesystem.device = "/dev/sda"; # Boot disk
|
filesystem.device = "/dev/sda"; # Boot disk
|
||||||
filesystem.swapSize = "32G"; # Swap size
|
filesystem.swapSize = "32G"; # Swap size
|
||||||
buildMethods = [ "iso" ]; # Artifact types
|
buildMethods = [ "iso" ]; # Artifact types
|
||||||
@@ -50,9 +50,9 @@ ugaif.host = {
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
### Software Options (`ugaif.sw.*`)
|
### Software Options (`athenix.sw.*`)
|
||||||
```nix
|
```nix
|
||||||
ugaif.sw = {
|
athenix.sw = {
|
||||||
type = "desktop"; # System type
|
type = "desktop"; # System type
|
||||||
kioskUrl = "https://..."; # Kiosk browser URL
|
kioskUrl = "https://..."; # Kiosk browser URL
|
||||||
python.enable = true; # Python tools (pixi, uv)
|
python.enable = true; # Python tools (pixi, uv)
|
||||||
@@ -64,13 +64,13 @@ ugaif.sw = {
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
### User Options (`ugaif.users.*`)
|
### User Options (`athenix.users.*`)
|
||||||
```nix
|
```nix
|
||||||
ugaif.users = {
|
athenix.users = {
|
||||||
accounts = { ... }; # User definitions
|
accounts = { ... }; # User definitions
|
||||||
enabledUsers = [ "root" "engr-ugaif" ]; # Enabled users
|
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
|
## Development Workflow
|
||||||
@@ -90,8 +90,8 @@ ugaif.forUser = "username"; # Convenience: enable user + set WSL user
|
|||||||
### Common Tasks
|
### Common Tasks
|
||||||
|
|
||||||
#### Adding a New User
|
#### Adding a New User
|
||||||
1. Edit `users.nix` to add user definition under `ugaif.users.accounts`
|
1. Edit `users.nix` to add user definition under `athenix.users.accounts`
|
||||||
2. Enable user in `inventory.nix` via `ugaif.users.username.enable = true` or use `ugaif.forUser = "username"`
|
2. Enable user in `inventory.nix` via `athenix.users.username.enable = true` or use `athenix.forUser = "username"`
|
||||||
3. Test: `nix flake check`
|
3. Test: `nix flake check`
|
||||||
|
|
||||||
#### Adding a New Host
|
#### Adding a New Host
|
||||||
@@ -102,7 +102,7 @@ ugaif.forUser = "username"; # Convenience: enable user + set WSL user
|
|||||||
#### Modifying Software Configuration
|
#### Modifying Software Configuration
|
||||||
1. Edit appropriate file in `sw/` directory based on system type
|
1. Edit appropriate file in `sw/` directory based on system type
|
||||||
2. For system-wide changes: modify `sw/{type}/programs.nix`
|
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`
|
4. Test: `nix flake check`
|
||||||
|
|
||||||
#### Creating External Modules
|
#### Creating External Modules
|
||||||
@@ -114,7 +114,7 @@ ugaif.forUser = "username"; # Convenience: enable user + set WSL user
|
|||||||
## Important Constraints
|
## Important Constraints
|
||||||
|
|
||||||
### What NOT to Do
|
### 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** remove or modify working host configurations unless explicitly requested
|
||||||
- **Never** break existing functionality when adding new features
|
- **Never** break existing functionality when adding new features
|
||||||
- **Never** hardcode values that should be configurable
|
- **Never** hardcode values that should be configurable
|
||||||
@@ -122,7 +122,7 @@ ugaif.forUser = "username"; # Convenience: enable user + set WSL user
|
|||||||
|
|
||||||
### What to ALWAYS Do
|
### What to ALWAYS Do
|
||||||
- **Always** run `nix flake check` before finalizing changes
|
- **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** preserve existing comment styles and documentation
|
||||||
- **Always** test that configurations build successfully
|
- **Always** test that configurations build successfully
|
||||||
- **Always** consider impact on existing hosts when making changes
|
- **Always** consider impact on existing hosts when making changes
|
||||||
@@ -140,7 +140,7 @@ myuser.external = builtins.fetchGit {
|
|||||||
rev = "abc123..."; # Pin to specific commit
|
rev = "abc123..."; # Pin to specific commit
|
||||||
};
|
};
|
||||||
# The external user.nix file contains BOTH user account options
|
# 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
|
### System Configurations
|
||||||
@@ -184,7 +184,7 @@ nix flake show
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Artifact Types
|
### Artifact Types
|
||||||
Set via `ugaif.host.buildMethods`:
|
Set via `athenix.host.buildMethods`:
|
||||||
- `"iso"` - Installer ISO with auto-install
|
- `"iso"` - Installer ISO with auto-install
|
||||||
- `"live-iso"` - Live boot ISO without installer
|
- `"live-iso"` - Live boot ISO without installer
|
||||||
- `"lxc"` - LXC container tarball
|
- `"lxc"` - LXC container tarball
|
||||||
@@ -231,7 +231,7 @@ Set via `ugaif.host.buildMethods`:
|
|||||||
## Code Review Checklist
|
## Code Review Checklist
|
||||||
|
|
||||||
When reviewing or generating code:
|
When reviewing or generating code:
|
||||||
- [ ] Uses `ugaif.*` namespace for custom options
|
- [ ] Uses `athenix.*` namespace for custom options
|
||||||
- [ ] Runs `nix flake check` successfully
|
- [ ] Runs `nix flake check` successfully
|
||||||
- [ ] Follows existing code style and formatting
|
- [ ] Follows existing code style and formatting
|
||||||
- [ ] Preserves existing functionality
|
- [ ] 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)
|
[](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
|
- **[Quick Start](#quick-start)** - Get started in 5 minutes
|
||||||
- **[docs/INVENTORY.md](docs/INVENTORY.md)** - Configure hosts and fleet inventory
|
- **[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/USER_CONFIGURATION.md](docs/USER_CONFIGURATION.md)** - User account management
|
||||||
- **[docs/EXTERNAL_MODULES.md](docs/EXTERNAL_MODULES.md)** - External configuration modules
|
- **[docs/EXTERNAL_MODULES.md](docs/EXTERNAL_MODULES.md)** - External configuration modules
|
||||||
- **[docs/BUILDING.md](docs/BUILDING.md)** - Build ISOs and container images
|
- **[docs/BUILDING.md](docs/BUILDING.md)** - Build ISOs and container images
|
||||||
@@ -83,22 +83,22 @@ nixos-systems/
|
|||||||
|
|
||||||
## Configuration Overview
|
## 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:**
|
**Quick examples:**
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
# Host configuration
|
# Host configuration
|
||||||
ugaif.host.filesystem.device = "/dev/nvme0n1";
|
athenix.host.filesystem.device = "/dev/nvme0n1";
|
||||||
ugaif.host.filesystem.swapSize = "64G";
|
athenix.host.filesystem.swapSize = "64G";
|
||||||
|
|
||||||
# Software configuration
|
# Software configuration
|
||||||
ugaif.sw.type = "desktop"; # or "headless", "tablet-kiosk"
|
athenix.sw.type = "desktop"; # or "headless", "tablet-kiosk"
|
||||||
ugaif.sw.extraPackages = with pkgs; [ vim docker ];
|
athenix.sw.extraPackages = with pkgs; [ vim docker ];
|
||||||
|
|
||||||
# User management
|
# User management
|
||||||
ugaif.users.myuser.enable = true;
|
athenix.users.myuser.enable = true;
|
||||||
ugaif.forUser = "myuser"; # Convenience shortcut
|
athenix.forUser = "myuser"; # Convenience shortcut
|
||||||
```
|
```
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
@@ -134,7 +134,7 @@ myuser = {
|
|||||||
```nix
|
```nix
|
||||||
nix-laptop = {
|
nix-laptop = {
|
||||||
devices = 2;
|
devices = 2;
|
||||||
overrides.ugaif.users.myuser.enable = true;
|
overrides.athenix.users.myuser.enable = true;
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -153,8 +153,8 @@ nix-laptop = {
|
|||||||
# With configuration
|
# With configuration
|
||||||
nix-surface = {
|
nix-surface = {
|
||||||
devices = {
|
devices = {
|
||||||
"1".ugaif.sw.kioskUrl = "https://dashboard1.example.com";
|
"1".athenix.sw.kioskUrl = "https://dashboard1.example.com";
|
||||||
"2".ugaif.sw.kioskUrl = "https://dashboard2.example.com";
|
"2".athenix.sw.kioskUrl = "https://dashboard2.example.com";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -162,8 +162,8 @@ nix-surface = {
|
|||||||
nix-desktop = {
|
nix-desktop = {
|
||||||
devices = 3;
|
devices = 3;
|
||||||
overrides = {
|
overrides = {
|
||||||
ugaif.users.student.enable = true;
|
athenix.users.student.enable = true;
|
||||||
ugaif.sw.extraPackages = with pkgs; [ vim ];
|
athenix.sw.extraPackages = with pkgs; [ vim ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
@@ -180,7 +180,7 @@ myuser.external = builtins.fetchGit {
|
|||||||
url = "https://github.com/username/dotfiles";
|
url = "https://github.com/username/dotfiles";
|
||||||
rev = "abc123...";
|
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
|
# AND home-manager configuration
|
||||||
|
|
||||||
# In inventory.nix - External system config
|
# 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
|
- **`stateless-kiosk`** - Diskless PXE boot kiosks
|
||||||
- **`headless`** - Servers and containers (no GUI)
|
- **`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
|
## 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
|
3. After installation completes, remove the USB drive and reboot
|
||||||
4. Log in with the configured user credentials
|
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
|
## Live ISOs
|
||||||
|
|
||||||
@@ -224,7 +224,7 @@ ssh engr-ugaif@nix-builder df -h
|
|||||||
|
|
||||||
In `inventory.nix`:
|
In `inventory.nix`:
|
||||||
```nix
|
```nix
|
||||||
ugaif.sw.remoteBuild.enable = false;
|
athenix.sw.remoteBuild.enable = false;
|
||||||
```
|
```
|
||||||
|
|
||||||
### Out of Disk Space
|
### Out of Disk Space
|
||||||
|
|||||||
@@ -288,13 +288,13 @@ vim sw/headless/programs.nix
|
|||||||
|
|
||||||
### Packages for Specific Hosts
|
### Packages for Specific Hosts
|
||||||
|
|
||||||
Add to `ugaif.sw.extraPackages` in `inventory.nix`:
|
Add to `athenix.sw.extraPackages` in `inventory.nix`:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
nix-laptop = {
|
nix-laptop = {
|
||||||
devices = 2;
|
devices = 2;
|
||||||
overrides = {
|
overrides = {
|
||||||
ugaif.sw.extraPackages = with pkgs; [
|
athenix.sw.extraPackages = with pkgs; [
|
||||||
vim
|
vim
|
||||||
docker
|
docker
|
||||||
kubernetes-helm
|
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:
|
Python development tools are configured in `sw/python.nix` and can be controlled via:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
ugaif.sw.python.enable = true; # Default: enabled
|
athenix.sw.python.enable = true; # Default: enabled
|
||||||
```
|
```
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
@@ -388,7 +388,7 @@ ugaif.sw.python.enable = true; # Default: enabled
|
|||||||
- Run formatter before committing: `nix fmt`
|
- Run formatter before committing: `nix fmt`
|
||||||
- Follow existing code structure and conventions
|
- Follow existing code structure and conventions
|
||||||
- Add comments for complex logic
|
- Add comments for complex logic
|
||||||
- Use the `ugaif.*` namespace for all custom options
|
- Use the `athenix.*` namespace for all custom options
|
||||||
|
|
||||||
### Testing Workflow
|
### Testing Workflow
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ nix-lxc = {
|
|||||||
devices = {
|
devices = {
|
||||||
# Traditional inline configuration
|
# Traditional inline configuration
|
||||||
"local-server" = {
|
"local-server" = {
|
||||||
ugaif.users.admin.enable = true;
|
athenix.users.admin.enable = true;
|
||||||
services.nginx.enable = true;
|
services.nginx.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -66,9 +66,9 @@ server-config/
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Use ugaif namespace options
|
# Use athenix namespace options
|
||||||
ugaif.users.admin.enable = true;
|
athenix.users.admin.enable = true;
|
||||||
ugaif.sw.type = "headless";
|
athenix.sw.type = "headless";
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ External user modules provide home-manager configurations (dotfiles, packages, p
|
|||||||
### Usage in users.nix
|
### Usage in users.nix
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
ugaif.users = {
|
athenix.users = {
|
||||||
# External user module (dotfiles, home-manager, and user options)
|
# External user module (dotfiles, home-manager, and user options)
|
||||||
myuser = builtins.fetchGit {
|
myuser = builtins.fetchGit {
|
||||||
url = "https://github.com/username/dotfiles";
|
url = "https://github.com/username/dotfiles";
|
||||||
@@ -142,7 +142,7 @@ dotfiles/
|
|||||||
{ config, lib, pkgs, osConfig ? null, ... }:
|
{ config, lib, pkgs, osConfig ? null, ... }:
|
||||||
{
|
{
|
||||||
# ========== User Account Configuration ==========
|
# ========== User Account Configuration ==========
|
||||||
ugaif.users.myusername = {
|
athenix.users.myusername = {
|
||||||
description = "Your Full Name";
|
description = "Your Full Name";
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
hashedPassword = "!";
|
hashedPassword = "!";
|
||||||
@@ -157,7 +157,7 @@ dotfiles/
|
|||||||
vim
|
vim
|
||||||
git
|
git
|
||||||
htop
|
htop
|
||||||
] ++ lib.optional (osConfig.ugaif.sw.type or null == "desktop") firefox;
|
] ++ lib.optional (osConfig.athenix.sw.type or null == "desktop") firefox;
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -216,7 +216,7 @@ username = {
|
|||||||
useNvimPlugins = true; # Apply system nvim config (default: true)
|
useNvimPlugins = true; # Apply system nvim config (default: true)
|
||||||
|
|
||||||
# Enable on specific systems (see docs/INVENTORY.md)
|
# 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; }
|
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
|
### User Module Integration
|
||||||
|
|
||||||
@@ -346,7 +346,7 @@ External user modules are loaded in two contexts:
|
|||||||
**User options (NixOS module context):**
|
**User options (NixOS module context):**
|
||||||
```nix
|
```nix
|
||||||
import (externalPath + "/user.nix") { inherit inputs; }
|
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:**
|
**Home-manager configuration:**
|
||||||
@@ -375,7 +375,7 @@ nix-lxc = {
|
|||||||
};
|
};
|
||||||
overrides = {
|
overrides = {
|
||||||
# Apply to all devices, including external ones
|
# Apply to all devices, including external ones
|
||||||
ugaif.users.admin.enable = true;
|
athenix.users.admin.enable = true;
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -389,7 +389,7 @@ nix-lxc = {
|
|||||||
{ config, lib, pkgs, osConfig ? null, ... }:
|
{ config, lib, pkgs, osConfig ? null, ... }:
|
||||||
{
|
{
|
||||||
# User account options
|
# User account options
|
||||||
ugaif.users.myusername = {
|
athenix.users.myusername = {
|
||||||
description = "My Name";
|
description = "My Name";
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
hashedPassword = "!";
|
hashedPassword = "!";
|
||||||
@@ -418,7 +418,7 @@ dotfiles/
|
|||||||
{ config, lib, pkgs, osConfig ? null, ... }:
|
{ config, lib, pkgs, osConfig ? null, ... }:
|
||||||
{
|
{
|
||||||
# User account configuration
|
# User account configuration
|
||||||
ugaif.users.myusername = {
|
athenix.users.myusername = {
|
||||||
description = "My Full Name";
|
description = "My Full Name";
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
extraGroups = [ "wheel" "networkmanager" ];
|
extraGroups = [ "wheel" "networkmanager" ];
|
||||||
@@ -433,7 +433,7 @@ dotfiles/
|
|||||||
ripgrep
|
ripgrep
|
||||||
fd
|
fd
|
||||||
bat
|
bat
|
||||||
] ++ lib.optional (osConfig.ugaif.sw.type or null == "desktop") firefox;
|
] ++ lib.optional (osConfig.athenix.sw.type or null == "desktop") firefox;
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
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`)
|
- **Numeric suffixes**: no dash (e.g., `nix-laptop1`, `nix-laptop2`)
|
||||||
- **Non-numeric suffixes**: with dash (e.g., `nix-laptop-alpha`, `nix-laptop-beta`)
|
- **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
|
## Adding Hosts
|
||||||
|
|
||||||
@@ -37,8 +37,8 @@ nix-laptop = {
|
|||||||
devices = 5;
|
devices = 5;
|
||||||
overrides = {
|
overrides = {
|
||||||
# Applied to ALL nix-laptop hosts
|
# Applied to ALL nix-laptop hosts
|
||||||
ugaif.users.student.enable = true;
|
athenix.users.student.enable = true;
|
||||||
ugaif.sw.extraPackages = with pkgs; [ vim git ];
|
athenix.sw.extraPackages = with pkgs; [ vim git ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
@@ -48,9 +48,9 @@ nix-laptop = {
|
|||||||
```nix
|
```nix
|
||||||
nix-surface = {
|
nix-surface = {
|
||||||
devices = {
|
devices = {
|
||||||
"1".ugaif.sw.kioskUrl = "https://dashboard1.example.com";
|
"1".athenix.sw.kioskUrl = "https://dashboard1.example.com";
|
||||||
"2".ugaif.sw.kioskUrl = "https://dashboard2.example.com";
|
"2".athenix.sw.kioskUrl = "https://dashboard2.example.com";
|
||||||
"3".ugaif.sw.kioskUrl = "https://dashboard3.example.com";
|
"3".athenix.sw.kioskUrl = "https://dashboard3.example.com";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
@@ -62,12 +62,12 @@ nix-surface = {
|
|||||||
defaultCount = 2; # Creates nix-surface1, nix-surface2
|
defaultCount = 2; # Creates nix-surface1, nix-surface2
|
||||||
devices = {
|
devices = {
|
||||||
"special" = { # Creates nix-surface-special
|
"special" = { # Creates nix-surface-special
|
||||||
ugaif.sw.kioskUrl = "https://special-dashboard.example.com";
|
athenix.sw.kioskUrl = "https://special-dashboard.example.com";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
overrides = {
|
overrides = {
|
||||||
# Applied to all devices (including "special")
|
# 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)
|
### Direct Configuration (Recommended)
|
||||||
|
|
||||||
Use any NixOS or `ugaif.*` option:
|
Use any NixOS or `athenix.*` option:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
"1" = {
|
"1" = {
|
||||||
# UGAIF options
|
# Athenix options
|
||||||
ugaif.users.myuser.enable = true;
|
athenix.users.myuser.enable = true;
|
||||||
ugaif.host.filesystem.swapSize = "64G";
|
athenix.host.filesystem.swapSize = "64G";
|
||||||
ugaif.sw.extraPackages = with pkgs; [ docker ];
|
athenix.sw.extraPackages = with pkgs; [ docker ];
|
||||||
ugaif.sw.kioskUrl = "https://example.com";
|
athenix.sw.kioskUrl = "https://example.com";
|
||||||
|
|
||||||
# Standard NixOS options
|
# Standard NixOS options
|
||||||
networking.firewall.enable = false;
|
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):
|
Quick setup for single-user systems (especially WSL):
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
nix-wsl = {
|
nix-wsl = {
|
||||||
devices = {
|
devices = {
|
||||||
"alice".ugaif.forUser = "alice-username";
|
"alice".athenix.forUser = "alice-username";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
@@ -130,7 +130,7 @@ nix-lxc = {
|
|||||||
nix-laptop = {
|
nix-laptop = {
|
||||||
devices = 10; # Creates nix-laptop1 through nix-laptop10
|
devices = 10; # Creates nix-laptop1 through nix-laptop10
|
||||||
overrides = {
|
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)
|
defaultCount = 5; # nix-surface1 through nix-surface5 (default config)
|
||||||
devices = {
|
devices = {
|
||||||
"admin" = { # nix-surface-admin (special config)
|
"admin" = { # nix-surface-admin (special config)
|
||||||
ugaif.sw.type = "desktop"; # Full desktop instead of kiosk
|
athenix.sw.type = "desktop"; # Full desktop instead of kiosk
|
||||||
ugaif.users.admin.enable = true;
|
athenix.users.admin.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
overrides = {
|
overrides = {
|
||||||
ugaif.sw.type = "tablet-kiosk";
|
athenix.sw.type = "tablet-kiosk";
|
||||||
ugaif.sw.kioskUrl = "https://dashboard.factory.uga.edu";
|
athenix.sw.kioskUrl = "https://dashboard.factory.uga.edu";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
@@ -159,15 +159,15 @@ nix-surface = {
|
|||||||
nix-lxc = {
|
nix-lxc = {
|
||||||
devices = {
|
devices = {
|
||||||
"nix-builder" = {
|
"nix-builder" = {
|
||||||
ugaif.sw.type = "headless";
|
athenix.sw.type = "headless";
|
||||||
};
|
};
|
||||||
"webserver" = {
|
"webserver" = {
|
||||||
ugaif.sw.type = "headless";
|
athenix.sw.type = "headless";
|
||||||
services.nginx.enable = true;
|
services.nginx.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
overrides = {
|
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
|
||||||
nix-wsl = {
|
nix-wsl = {
|
||||||
devices = {
|
devices = {
|
||||||
"alice".ugaif.forUser = "alice-uga";
|
"alice".athenix.forUser = "alice-uga";
|
||||||
"bob".ugaif.forUser = "bob-uga";
|
"bob".athenix.forUser = "bob-uga";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
@@ -187,4 +187,4 @@ nix-wsl = {
|
|||||||
|
|
||||||
- [USER_CONFIGURATION.md](USER_CONFIGURATION.md) - User account management
|
- [USER_CONFIGURATION.md](USER_CONFIGURATION.md) - User account management
|
||||||
- [EXTERNAL_MODULES.md](EXTERNAL_MODULES.md) - External configuration modules
|
- [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
|
# 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
|
## Table of Contents
|
||||||
|
|
||||||
- [Host Configuration (`ugaif.host`)](#host-configuration-ugaifhost)
|
- [Host Configuration (`athenix.host`)](#host-configuration-athenixhost)
|
||||||
- [Software Configuration (`ugaif.sw`)](#software-configuration-ugaifsw)
|
- [Software Configuration (`athenix.sw`)](#software-configuration-athenixsw)
|
||||||
- [User Management (`ugaif.users`)](#user-management-ugaifusers)
|
- [User Management (`athenix.users`)](#user-management-athenixusers)
|
||||||
- [System Configuration (`ugaif.system`)](#system-configuration-ugaifsystem)
|
- [System Configuration (`athenix.system`)](#system-configuration-athenixsystem)
|
||||||
- [Convenience Options](#convenience-options)
|
- [Convenience Options](#convenience-options)
|
||||||
|
|
||||||
## Host Configuration (`ugaif.host`)
|
## Host Configuration (`athenix.host`)
|
||||||
|
|
||||||
Hardware and host-specific settings.
|
Hardware and host-specific settings.
|
||||||
|
|
||||||
### `ugaif.host.filesystem`
|
### `athenix.host.filesystem`
|
||||||
|
|
||||||
Disk and storage configuration.
|
Disk and storage configuration.
|
||||||
|
|
||||||
**Options:**
|
**Options:**
|
||||||
- `ugaif.host.filesystem.device` - Boot disk device (default: `/dev/sda`)
|
- `athenix.host.filesystem.device` - Boot disk device (default: `/dev/sda`)
|
||||||
- `ugaif.host.filesystem.swapSize` - Swap file size (default: `"32G"`)
|
- `athenix.host.filesystem.swapSize` - Swap file size (default: `"32G"`)
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```nix
|
```nix
|
||||||
ugaif.host.filesystem = {
|
athenix.host.filesystem = {
|
||||||
device = "/dev/nvme0n1";
|
device = "/dev/nvme0n1";
|
||||||
swapSize = "64G";
|
swapSize = "64G";
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
### `ugaif.host.buildMethods`
|
### `athenix.host.buildMethods`
|
||||||
|
|
||||||
List of supported build artifact types for this host.
|
List of supported build artifact types for this host.
|
||||||
|
|
||||||
@@ -42,10 +42,10 @@ List of supported build artifact types for this host.
|
|||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```nix
|
```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).
|
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:**
|
**Example:**
|
||||||
```nix
|
```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.
|
WSL-specific configuration options.
|
||||||
|
|
||||||
**Options:**
|
**Options:**
|
||||||
- `ugaif.host.wsl.user` - Default WSL user for this instance
|
- `athenix.host.wsl.user` - Default WSL user for this instance
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```nix
|
```nix
|
||||||
ugaif.host.wsl.user = "myusername";
|
athenix.host.wsl.user = "myusername";
|
||||||
```
|
```
|
||||||
|
|
||||||
## Software Configuration (`ugaif.sw`)
|
## Software Configuration (`athenix.sw`)
|
||||||
|
|
||||||
System software and application configuration.
|
System software and application configuration.
|
||||||
|
|
||||||
### `ugaif.sw.enable`
|
### `athenix.sw.enable`
|
||||||
|
|
||||||
Enable the software configuration module.
|
Enable the software configuration module.
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ Enable the software configuration module.
|
|||||||
|
|
||||||
**Default:** `true`
|
**Default:** `true`
|
||||||
|
|
||||||
### `ugaif.sw.type`
|
### `athenix.sw.type`
|
||||||
|
|
||||||
System type that determines the software profile.
|
System type that determines the software profile.
|
||||||
|
|
||||||
@@ -98,10 +98,10 @@ System type that determines the software profile.
|
|||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```nix
|
```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).
|
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:**
|
**Example:**
|
||||||
```nix
|
```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.
|
Python development tools configuration.
|
||||||
|
|
||||||
**Options:**
|
**Options:**
|
||||||
- `ugaif.sw.python.enable` - Enable Python tools (pixi, uv) (default: `true`)
|
- `athenix.sw.python.enable` - Enable Python tools (pixi, uv) (default: `true`)
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```nix
|
```nix
|
||||||
ugaif.sw.python.enable = true;
|
athenix.sw.python.enable = true;
|
||||||
```
|
```
|
||||||
|
|
||||||
### `ugaif.sw.remoteBuild`
|
### `athenix.sw.remoteBuild`
|
||||||
|
|
||||||
Remote build server configuration for offloading builds.
|
Remote build server configuration for offloading builds.
|
||||||
|
|
||||||
**Options:**
|
**Options:**
|
||||||
- `ugaif.sw.remoteBuild.enable` - Use remote builders (default: enabled on tablets)
|
- `athenix.sw.remoteBuild.enable` - Use remote builders (default: enabled on tablets)
|
||||||
- `ugaif.sw.remoteBuild.hosts` - List of build server hostnames
|
- `athenix.sw.remoteBuild.hosts` - List of build server hostnames
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```nix
|
```nix
|
||||||
ugaif.sw.remoteBuild = {
|
athenix.sw.remoteBuild = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hosts = [ "nix-builder" "nix-builder2" ];
|
hosts = [ "nix-builder" "nix-builder2" ];
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
### `ugaif.sw.extraPackages`
|
### `athenix.sw.extraPackages`
|
||||||
|
|
||||||
Additional system packages to install beyond the type defaults.
|
Additional system packages to install beyond the type defaults.
|
||||||
|
|
||||||
@@ -152,14 +152,14 @@ Additional system packages to install beyond the type defaults.
|
|||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```nix
|
```nix
|
||||||
ugaif.sw.extraPackages = with pkgs; [
|
athenix.sw.extraPackages = with pkgs; [
|
||||||
vim
|
vim
|
||||||
htop
|
htop
|
||||||
docker
|
docker
|
||||||
];
|
];
|
||||||
```
|
```
|
||||||
|
|
||||||
### `ugaif.sw.excludePackages`
|
### `athenix.sw.excludePackages`
|
||||||
|
|
||||||
Packages to exclude from the default list for this system type.
|
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:**
|
**Example:**
|
||||||
```nix
|
```nix
|
||||||
ugaif.sw.excludePackages = with pkgs; [
|
athenix.sw.excludePackages = with pkgs; [
|
||||||
firefox # Remove Firefox from default desktop packages
|
firefox # Remove Firefox from default desktop packages
|
||||||
];
|
];
|
||||||
```
|
```
|
||||||
|
|
||||||
## User Management (`ugaif.users`)
|
## User Management (`athenix.users`)
|
||||||
|
|
||||||
User account configuration and management.
|
User account configuration and management.
|
||||||
|
|
||||||
### `ugaif.users.<username>.enable`
|
### `athenix.users.<username>.enable`
|
||||||
|
|
||||||
Enable a specific user account on this system.
|
Enable a specific user account on this system.
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ Enable a specific user account on this system.
|
|||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```nix
|
```nix
|
||||||
ugaif.users = {
|
athenix.users = {
|
||||||
myuser.enable = true;
|
myuser.enable = true;
|
||||||
student.enable = true;
|
student.enable = true;
|
||||||
};
|
};
|
||||||
@@ -200,7 +200,7 @@ Each user in `users.nix` can be configured with:
|
|||||||
|
|
||||||
```nix
|
```nix
|
||||||
# Option 1: Define inline in users.nix
|
# Option 1: Define inline in users.nix
|
||||||
ugaif.users.myuser = {
|
athenix.users.myuser = {
|
||||||
description = "Full Name";
|
description = "Full Name";
|
||||||
isNormalUser = true; # Default: true
|
isNormalUser = true; # Default: true
|
||||||
extraGroups = [ "wheel" "docker" ]; # Additional groups
|
extraGroups = [ "wheel" "docker" ]; # Additional groups
|
||||||
@@ -214,30 +214,30 @@ ugaif.users.myuser = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Option 2: Use external configuration (recommended)
|
# Option 2: Use external configuration (recommended)
|
||||||
# The external user.nix can set ugaif.users.myuser options directly
|
# The external user.nix can set athenix.users.myuser options directly
|
||||||
ugaif.users.anotheruser.external = builtins.fetchGit {
|
athenix.users.anotheruser.external = builtins.fetchGit {
|
||||||
url = "https://github.com/username/dotfiles";
|
url = "https://github.com/username/dotfiles";
|
||||||
rev = "abc123...";
|
rev = "abc123...";
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
## System Configuration (`ugaif.system`)
|
## System Configuration (`athenix.system`)
|
||||||
|
|
||||||
System-wide settings and services.
|
System-wide settings and services.
|
||||||
|
|
||||||
### `ugaif.system.gc`
|
### `athenix.system.gc`
|
||||||
|
|
||||||
Automatic garbage collection configuration.
|
Automatic garbage collection configuration.
|
||||||
|
|
||||||
**Options:**
|
**Options:**
|
||||||
- `ugaif.system.gc.enable` - Enable automatic garbage collection (default: `true`)
|
- `athenix.system.gc.enable` - Enable automatic garbage collection (default: `true`)
|
||||||
- `ugaif.system.gc.frequency` - How often to run (default: `"weekly"`)
|
- `athenix.system.gc.frequency` - How often to run (default: `"weekly"`)
|
||||||
- `ugaif.system.gc.retentionDays` - Days to keep old generations (default: `30`)
|
- `athenix.system.gc.retentionDays` - Days to keep old generations (default: `30`)
|
||||||
- `ugaif.system.gc.optimise` - Optimize Nix store automatically (default: `true`)
|
- `athenix.system.gc.optimise` - Optimize Nix store automatically (default: `true`)
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```nix
|
```nix
|
||||||
ugaif.system.gc = {
|
athenix.system.gc = {
|
||||||
enable = true;
|
enable = true;
|
||||||
frequency = "daily";
|
frequency = "daily";
|
||||||
retentionDays = 14;
|
retentionDays = 14;
|
||||||
@@ -247,7 +247,7 @@ ugaif.system.gc = {
|
|||||||
|
|
||||||
## Convenience Options
|
## Convenience Options
|
||||||
|
|
||||||
### `ugaif.forUser`
|
### `athenix.forUser`
|
||||||
|
|
||||||
Quick setup option that enables a user account in one line.
|
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:**
|
**Example:**
|
||||||
```nix
|
```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:**
|
**Usage in inventory.nix:**
|
||||||
```nix
|
```nix
|
||||||
nix-wsl = {
|
nix-wsl = {
|
||||||
devices = {
|
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
|
### 1. Define User in users.nix
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
ugaif.users = {
|
athenix.users = {
|
||||||
# Option 1: Inline definition
|
# Option 1: Inline definition
|
||||||
myuser = {
|
myuser = {
|
||||||
description = "My Full Name";
|
description = "My Full Name";
|
||||||
@@ -53,20 +53,20 @@ In `inventory.nix`:
|
|||||||
```nix
|
```nix
|
||||||
nix-laptop = {
|
nix-laptop = {
|
||||||
devices = 2;
|
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
|
# Or for specific devices
|
||||||
nix-desktop = {
|
nix-desktop = {
|
||||||
devices = {
|
devices = {
|
||||||
"1".ugaif.users.myuser.enable = true;
|
"1".athenix.users.myuser.enable = true;
|
||||||
"2".ugaif.users.otheruser.enable = true;
|
"2".athenix.users.otheruser.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Or use convenience option
|
# Or use convenience option
|
||||||
nix-wsl = {
|
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 ==========
|
# ========== User Account Configuration ==========
|
||||||
# These options define the user account itself
|
# These options define the user account itself
|
||||||
ugaif.users.myuser = {
|
athenix.users.myuser = {
|
||||||
description = "My Full Name";
|
description = "My Full Name";
|
||||||
extraGroups = [ "wheel" "docker" ];
|
extraGroups = [ "wheel" "docker" ];
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
@@ -171,7 +171,7 @@ dotfiles/
|
|||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
vim
|
vim
|
||||||
ripgrep
|
ripgrep
|
||||||
] ++ lib.optional (osConfig.ugaif.sw.type or null == "desktop") firefox;
|
] ++ lib.optional (osConfig.athenix.sw.type or null == "desktop") firefox;
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -210,7 +210,7 @@ dotfiles/
|
|||||||
|
|
||||||
The `user.nix` module serves a dual purpose and is imported in **two contexts**:
|
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.
|
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 = {
|
nix-laptop = {
|
||||||
devices = 5;
|
devices = 5;
|
||||||
overrides = {
|
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
|
||||||
nix-desktop = {
|
nix-desktop = {
|
||||||
devices = {
|
devices = {
|
||||||
"1".ugaif.users.alice.enable = true;
|
"1".athenix.users.alice.enable = true;
|
||||||
"2".ugaif.users.bob.enable = true;
|
"2".athenix.users.bob.enable = true;
|
||||||
"3" = {
|
"3" = {
|
||||||
ugaif.users.alice.enable = true;
|
athenix.users.alice.enable = true;
|
||||||
ugaif.users.bob.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:
|
Quick setup for single-user systems:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
nix-wsl = {
|
nix-wsl = {
|
||||||
devices = {
|
devices = {
|
||||||
"alice".ugaif.forUser = "alice-user"; # Automatically enables alice-user
|
"alice".athenix.forUser = "alice-user"; # Automatically enables alice-user
|
||||||
"bob".ugaif.forUser = "bob-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
|
## Password Management
|
||||||
|
|
||||||
@@ -414,7 +414,7 @@ wsl-user = {
|
|||||||
Enable in inventory.nix:
|
Enable in inventory.nix:
|
||||||
```nix
|
```nix
|
||||||
nix-wsl = {
|
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:**
|
**Check if enabled on host:**
|
||||||
```bash
|
```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:**
|
**Check if user exists:**
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# Flake Entry Point
|
# Flake Entry Point
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# This file defines the inputs (dependencies) and outputs (configurations)
|
# 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.
|
# configurations into deployable systems.
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
|
|||||||
@@ -12,14 +12,14 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
options.ugaif = {
|
options.athenix = {
|
||||||
forUser = lib.mkOption {
|
forUser = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.str;
|
type = lib.types.nullOr lib.types.str;
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
Convenience option to configure a host for a specific user.
|
Convenience option to configure a host for a specific user.
|
||||||
Automatically enables the user (sets ugaif.users.username.enable = true).
|
Automatically enables the user (sets athenix.users.username.enable = true).
|
||||||
Value should be a username from ugaif.users.accounts.
|
Value should be a username from athenix.users.accounts.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -80,8 +80,8 @@
|
|||||||
|
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
# Enable forUser if specified
|
# Enable forUser if specified
|
||||||
(lib.mkIf (config.ugaif.forUser != null) {
|
(lib.mkIf (config.athenix.forUser != null) {
|
||||||
ugaif.users.${config.ugaif.forUser}.enable = true;
|
athenix.users.${config.athenix.forUser}.enable = true;
|
||||||
})
|
})
|
||||||
|
|
||||||
# Main configuration
|
# Main configuration
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk.main = {
|
disk.main = {
|
||||||
type = "disk";
|
type = "disk";
|
||||||
device = config.ugaif.host.filesystem.device;
|
device = config.athenix.host.filesystem.device;
|
||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
swap = {
|
swap = {
|
||||||
name = "swap";
|
name = "swap";
|
||||||
label = "swap";
|
label = "swap";
|
||||||
size = config.ugaif.host.filesystem.swapSize;
|
size = config.athenix.host.filesystem.swapSize;
|
||||||
content = {
|
content = {
|
||||||
type = "swap";
|
type = "swap";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -36,12 +36,12 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
# Automatic Garbage Collection
|
# Automatic Garbage Collection
|
||||||
nix.gc = lib.mkIf config.ugaif.system.gc.enable {
|
nix.gc = lib.mkIf config.athenix.system.gc.enable {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = config.ugaif.system.gc.frequency;
|
dates = config.athenix.system.gc.frequency;
|
||||||
options = "--delete-older-than ${toString config.ugaif.system.gc.retentionDays}d";
|
options = "--delete-older-than ${toString config.athenix.system.gc.retentionDays}d";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Optimize storage
|
# Optimize storage
|
||||||
nix.optimise.automatic = config.ugaif.system.gc.optimise;
|
nix.optimise.automatic = config.athenix.system.gc.optimise;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
# "my-hostname" = {
|
# "my-hostname" = {
|
||||||
# type = "nix-desktop"; # Host type module to use
|
# type = "nix-desktop"; # Host type module to use
|
||||||
# system = "x86_64-linux"; # Optional
|
# system = "x86_64-linux"; # Optional
|
||||||
# # ... any ugaif.* options or device-specific config
|
# # ... any athenix.* options or device-specific config
|
||||||
# };
|
# };
|
||||||
#
|
#
|
||||||
# "lab-prefix" = {
|
# "lab-prefix" = {
|
||||||
@@ -44,7 +44,7 @@ let
|
|||||||
# Load users.nix to find external user modules
|
# Load users.nix to find external user modules
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
usersData = import ../users.nix { inherit pkgs; };
|
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)
|
# 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
|
# 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;
|
if lib.isFunction importedModuleFunc then importedModuleFunc args else importedModuleFunc;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = lib.mkIf (config.ugaif.users.${name}.enable or false) importedModule;
|
config = lib.mkIf (config.athenix.users.${name}.enable or false) importedModule;
|
||||||
}
|
}
|
||||||
) userNixosModulePaths;
|
) userNixosModulePaths;
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ let
|
|||||||
externalPathModule =
|
externalPathModule =
|
||||||
if externalModulePath != null then import externalModulePath { inherit inputs; } else { };
|
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 =
|
overrideModule =
|
||||||
{ ... }:
|
{ ... }:
|
||||||
let
|
let
|
||||||
@@ -119,7 +119,7 @@ let
|
|||||||
"buildMethods"
|
"buildMethods"
|
||||||
];
|
];
|
||||||
specialConfig = lib.optionalAttrs (configOverrides ? buildMethods) {
|
specialConfig = lib.optionalAttrs (configOverrides ? buildMethods) {
|
||||||
ugaif.host.buildMethods = configOverrides.buildMethods;
|
athenix.host.buildMethods = configOverrides.buildMethods;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@@ -220,7 +220,7 @@ let
|
|||||||
lib.recursiveUpdate (lib.recursiveUpdate baseConfig overrides) deviceConfig;
|
lib.recursiveUpdate (lib.recursiveUpdate baseConfig overrides) deviceConfig;
|
||||||
|
|
||||||
# Check useHostPrefix from the merged config
|
# 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;
|
hostName = mkHostName prefix deviceKey usePrefix;
|
||||||
|
|
||||||
# If external module, also add a default.nix path for import
|
# If external module, also add a default.nix path for import
|
||||||
|
|||||||
@@ -38,15 +38,15 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
# ========== Filesystem Configuration ==========
|
# ========== Filesystem Configuration ==========
|
||||||
ugaif.host.filesystem.swapSize = lib.mkDefault "16G";
|
athenix.host.filesystem.swapSize = lib.mkDefault "16G";
|
||||||
ugaif.host.filesystem.device = lib.mkDefault "/dev/nvme0n1";
|
athenix.host.filesystem.device = lib.mkDefault "/dev/nvme0n1";
|
||||||
ugaif.host.buildMethods = lib.mkDefault [ "installer-iso" ];
|
athenix.host.buildMethods = lib.mkDefault [ "installer-iso" ];
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
|
||||||
# ========== Hardware Configuration ==========
|
# ========== Hardware Configuration ==========
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
# ========== Software Profile ==========
|
# ========== Software Profile ==========
|
||||||
ugaif.sw.enable = lib.mkDefault true;
|
athenix.sw.enable = lib.mkDefault true;
|
||||||
ugaif.sw.type = lib.mkDefault "desktop";
|
athenix.sw.type = lib.mkDefault "desktop";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,9 +39,9 @@
|
|||||||
|
|
||||||
# ========== Ephemeral Configuration ==========
|
# ========== Ephemeral Configuration ==========
|
||||||
# No persistent storage - everything runs from RAM
|
# No persistent storage - everything runs from RAM
|
||||||
ugaif.host.filesystem.swapSize = lib.mkForce "0G";
|
athenix.host.filesystem.swapSize = lib.mkForce "0G";
|
||||||
ugaif.host.filesystem.device = lib.mkForce "/dev/null"; # Dummy device
|
athenix.host.filesystem.device = lib.mkForce "/dev/null"; # Dummy device
|
||||||
ugaif.host.buildMethods = lib.mkDefault [
|
athenix.host.buildMethods = lib.mkDefault [
|
||||||
"iso" # Live ISO image
|
"iso" # Live ISO image
|
||||||
"ipxe" # Network boot
|
"ipxe" # Network boot
|
||||||
];
|
];
|
||||||
@@ -63,6 +63,6 @@
|
|||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
ugaif.sw.enable = lib.mkDefault true;
|
athenix.sw.enable = lib.mkDefault true;
|
||||||
ugaif.sw.type = lib.mkDefault "stateless-kiosk";
|
athenix.sw.type = lib.mkDefault "stateless-kiosk";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,9 +46,9 @@
|
|||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
# ========== Filesystem Configuration ==========
|
# ========== Filesystem Configuration ==========
|
||||||
ugaif.host.filesystem.device = lib.mkDefault "/dev/nvme0n1";
|
athenix.host.filesystem.device = lib.mkDefault "/dev/nvme0n1";
|
||||||
ugaif.host.filesystem.swapSize = lib.mkDefault "34G"; # Larger swap for hibernation
|
athenix.host.filesystem.swapSize = lib.mkDefault "34G"; # Larger swap for hibernation
|
||||||
ugaif.host.buildMethods = lib.mkDefault [ "installer-iso" ];
|
athenix.host.buildMethods = lib.mkDefault [ "installer-iso" ];
|
||||||
|
|
||||||
# ========== Power Management ==========
|
# ========== Power Management ==========
|
||||||
services.upower.enable = lib.mkDefault true;
|
services.upower.enable = lib.mkDefault true;
|
||||||
@@ -60,6 +60,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
ugaif.sw.enable = lib.mkDefault true;
|
athenix.sw.enable = lib.mkDefault true;
|
||||||
ugaif.sw.type = lib.mkDefault "desktop";
|
athenix.sw.type = lib.mkDefault "desktop";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,11 +52,11 @@
|
|||||||
|
|
||||||
# ========== System Configuration ==========
|
# ========== System Configuration ==========
|
||||||
system.stateVersion = "25.11";
|
system.stateVersion = "25.11";
|
||||||
ugaif.host.buildMethods = lib.mkDefault [
|
athenix.host.buildMethods = lib.mkDefault [
|
||||||
"lxc" # LXC container tarball
|
"lxc" # LXC container tarball
|
||||||
"proxmox" # Proxmox VMA archive
|
"proxmox" # Proxmox VMA archive
|
||||||
];
|
];
|
||||||
|
|
||||||
ugaif.sw.enable = lib.mkDefault true;
|
athenix.sw.enable = lib.mkDefault true;
|
||||||
ugaif.sw.type = lib.mkDefault "headless";
|
athenix.sw.type = lib.mkDefault "headless";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,15 +56,15 @@ in
|
|||||||
boot.kernelPackages = lib.mkForce refKernelPackages;
|
boot.kernelPackages = lib.mkForce refKernelPackages;
|
||||||
|
|
||||||
# ========== Filesystem Configuration ==========
|
# ========== Filesystem Configuration ==========
|
||||||
ugaif.host.filesystem.swapSize = lib.mkDefault "8G";
|
athenix.host.filesystem.swapSize = lib.mkDefault "8G";
|
||||||
ugaif.host.filesystem.device = lib.mkDefault "/dev/mmcblk0"; # eMMC storage # eMMC storage
|
athenix.host.filesystem.device = lib.mkDefault "/dev/mmcblk0"; # eMMC storage # eMMC storage
|
||||||
ugaif.host.buildMethods = lib.mkDefault [ "installer-iso" ];
|
athenix.host.buildMethods = lib.mkDefault [ "installer-iso" ];
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
|
||||||
# ========== Hardware Configuration ==========
|
# ========== Hardware Configuration ==========
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
# ========== Software Profile ==========
|
# ========== Software Profile ==========
|
||||||
ugaif.sw.enable = lib.mkDefault true;
|
athenix.sw.enable = lib.mkDefault true;
|
||||||
ugaif.sw.type = lib.mkDefault "tablet-kiosk"; # Touch-optimized kiosk mode
|
athenix.sw.type = lib.mkDefault "tablet-kiosk"; # Touch-optimized kiosk mode
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
# ========== Options ==========
|
# ========== Options ==========
|
||||||
options.ugaif.host.wsl.user = lib.mkOption {
|
options.athenix.host.wsl.user = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "engr-ugaif";
|
default = "engr-ugaif";
|
||||||
description = "The default user to log in as in WSL.";
|
description = "The default user to log in as in WSL.";
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
wsl.enable = true;
|
wsl.enable = true;
|
||||||
# Use forUser if set, otherwise fall back to wsl.user option
|
# Use forUser if set, otherwise fall back to wsl.user option
|
||||||
wsl.defaultUser =
|
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 ==========
|
# ========== Software Profile ==========
|
||||||
ugaif.sw.enable = lib.mkDefault true;
|
athenix.sw.enable = lib.mkDefault true;
|
||||||
ugaif.sw.type = lib.mkDefault "headless";
|
athenix.sw.type = lib.mkDefault "headless";
|
||||||
|
|
||||||
# ========== Remote Development ==========
|
# ========== Remote Development ==========
|
||||||
services.vscode-server.enable = true;
|
services.vscode-server.enable = true;
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
systemd.network.enable = lib.mkForce false;
|
systemd.network.enable = lib.mkForce false;
|
||||||
|
|
||||||
# Provide dummy values for required options from boot.nix
|
# Provide dummy values for required options from boot.nix
|
||||||
ugaif.host.filesystem.device = "/dev/null";
|
athenix.host.filesystem.device = "/dev/null";
|
||||||
ugaif.host.filesystem.swapSize = "0G";
|
athenix.host.filesystem.swapSize = "0G";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
let
|
let
|
||||||
# Load users.nix to get account definitions
|
# Load users.nix to get account definitions
|
||||||
usersData = import ../users.nix { inherit pkgs; };
|
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
|
# Helper: Resolve external module path from fetchGit/fetchTarball/path
|
||||||
resolveExternalPath =
|
resolveExternalPath =
|
||||||
@@ -35,7 +35,7 @@ let
|
|||||||
&& (builtins.isPath path || (builtins.isString path && lib.hasPrefix "/" path))
|
&& (builtins.isPath path || (builtins.isString path && lib.hasPrefix "/" path))
|
||||||
&& builtins.pathExists 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).
|
# First, build a cache of options per user from their external user.nix (if any).
|
||||||
externalUserModuleOptions = lib.genAttrs (lib.attrNames accounts) (
|
externalUserModuleOptions = lib.genAttrs (lib.attrNames accounts) (
|
||||||
name:
|
name:
|
||||||
@@ -53,10 +53,10 @@ let
|
|||||||
inherit lib pkgs;
|
inherit lib pkgs;
|
||||||
osConfig = null;
|
osConfig = null;
|
||||||
};
|
};
|
||||||
# Extract just the ugaif.users.<name> options
|
# Extract just the athenix.users.<name> options
|
||||||
ugaifUsers = evaluatedModule.ugaif.users or { };
|
athenixUsers = evaluatedModule.athenix.users or { };
|
||||||
in
|
in
|
||||||
ugaifUsers.${name} or { }
|
athenixUsers.${name} or { }
|
||||||
else
|
else
|
||||||
{ }
|
{ }
|
||||||
);
|
);
|
||||||
@@ -116,7 +116,7 @@ let
|
|||||||
- A fetchGit/fetchTarball result pointing to a repository
|
- A fetchGit/fetchTarball result pointing to a repository
|
||||||
|
|
||||||
The external module can contain:
|
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
|
- nixos.nix (optional): System-level NixOS configuration
|
||||||
|
|
||||||
Example: builtins.fetchGit { url = "https://github.com/user/dotfiles"; rev = "..."; }
|
Example: builtins.fetchGit { url = "https://github.com/user/dotfiles"; rev = "..."; }
|
||||||
@@ -157,7 +157,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
options.ugaif.users = lib.mkOption {
|
options.athenix.users = lib.mkOption {
|
||||||
type = lib.types.attrsOf userSubmodule;
|
type = lib.types.attrsOf userSubmodule;
|
||||||
default = { };
|
default = { };
|
||||||
description = "User accounts configuration. Set enable=true for users that should exist on this system.";
|
description = "User accounts configuration. Set enable=true for users that should exist on this system.";
|
||||||
@@ -166,7 +166,7 @@ in
|
|||||||
config = {
|
config = {
|
||||||
# Merge user definitions from users.nix with options from external user.nix modules
|
# Merge user definitions from users.nix with options from external user.nix modules
|
||||||
# External options take precedence over users.nix (which uses lib.mkDefault)
|
# External options take precedence over users.nix (which uses lib.mkDefault)
|
||||||
ugaif.users = lib.mapAttrs (
|
athenix.users = lib.mapAttrs (
|
||||||
name: user:
|
name: user:
|
||||||
user
|
user
|
||||||
// {
|
// {
|
||||||
@@ -180,7 +180,7 @@ in
|
|||||||
# Generate NixOS users
|
# Generate NixOS users
|
||||||
users.users =
|
users.users =
|
||||||
let
|
let
|
||||||
enabledAccounts = lib.filterAttrs (_: user: user.enable) config.ugaif.users;
|
enabledAccounts = lib.filterAttrs (_: user: user.enable) config.athenix.users;
|
||||||
in
|
in
|
||||||
lib.mapAttrs (
|
lib.mapAttrs (
|
||||||
name: user:
|
name: user:
|
||||||
@@ -209,7 +209,7 @@ in
|
|||||||
|
|
||||||
users =
|
users =
|
||||||
let
|
let
|
||||||
enabledAccounts = lib.filterAttrs (_: user: user.enable) config.ugaif.users;
|
enabledAccounts = lib.filterAttrs (_: user: user.enable) config.athenix.users;
|
||||||
in
|
in
|
||||||
lib.mapAttrs (
|
lib.mapAttrs (
|
||||||
name: user:
|
name: user:
|
||||||
@@ -220,13 +220,13 @@ in
|
|||||||
userNixPath = if externalPath != null then externalPath + "/user.nix" else null;
|
userNixPath = if externalPath != null then externalPath + "/user.nix" else null;
|
||||||
hasExternalUser = isValidPath userNixPath;
|
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 =
|
externalUserModule =
|
||||||
if hasExternalUser then
|
if hasExternalUser then
|
||||||
let
|
let
|
||||||
fullModule = import userNixPath { inherit inputs; };
|
fullModule = import userNixPath { inherit inputs; };
|
||||||
in
|
in
|
||||||
# Only pass through non-ugaif options to home-manager
|
# Only pass through non-athenix options to home-manager
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
@@ -244,7 +244,7 @@ in
|
|||||||
;
|
;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
lib.filterAttrs (attrName: _: attrName != "ugaif") evaluated
|
lib.filterAttrs (attrName: _: attrName != "athenix") evaluated
|
||||||
else
|
else
|
||||||
{ };
|
{ };
|
||||||
|
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ Add the host to `inventory.nix` with the `nix-lxc` type or ensure it has the app
|
|||||||
"my-container" = { };
|
"my-container" = { };
|
||||||
};
|
};
|
||||||
overrides = {
|
overrides = {
|
||||||
ugaif.host.useHostPrefix = false;
|
athenix.host.useHostPrefix = false;
|
||||||
ugaif.host.buildMethods = [ "lxc" ];
|
athenix.host.buildMethods = [ "lxc" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -291,7 +291,7 @@ nix eval .#nixosConfigurations.nix-builder.config.boot.isContainer
|
|||||||
# Should output: true
|
# Should output: true
|
||||||
|
|
||||||
# Check build methods
|
# Check build methods
|
||||||
nix eval .#nixosConfigurations.nix-builder.config.ugaif.host.buildMethods
|
nix eval .#nixosConfigurations.nix-builder.config.athenix.host.buildMethods
|
||||||
# Should include: "lxc"
|
# Should include: "lxc"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -386,7 +386,7 @@ Inside the container:
|
|||||||
The script works with any host in your `nixosConfigurations` that:
|
The script works with any host in your `nixosConfigurations` that:
|
||||||
|
|
||||||
1. Has `boot.isContainer = true`
|
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
|
3. Imports the Proxmox LXC module
|
||||||
|
|
||||||
Your `artifacts.nix` automatically exposes these as `lxc-<hostname>` packages.
|
Your `artifacts.nix` automatically exposes these as `lxc-<hostname>` packages.
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ let
|
|||||||
let
|
let
|
||||||
cfg = hosts.nixosConfigurations.${name};
|
cfg = hosts.nixosConfigurations.${name};
|
||||||
in
|
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}";
|
name = "installer-iso-${name}";
|
||||||
@@ -98,7 +98,7 @@ let
|
|||||||
let
|
let
|
||||||
cfg = hosts.nixosConfigurations.${name};
|
cfg = hosts.nixosConfigurations.${name};
|
||||||
in
|
in
|
||||||
if lib.elem "iso" cfg.config.ugaif.host.buildMethods then
|
if lib.elem "iso" cfg.config.athenix.host.buildMethods then
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
name = "iso-${name}";
|
name = "iso-${name}";
|
||||||
@@ -117,7 +117,7 @@ let
|
|||||||
let
|
let
|
||||||
cfg = hosts.nixosConfigurations.${name};
|
cfg = hosts.nixosConfigurations.${name};
|
||||||
in
|
in
|
||||||
if lib.elem "ipxe" cfg.config.ugaif.host.buildMethods then
|
if lib.elem "ipxe" cfg.config.athenix.host.buildMethods then
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
name = "ipxe-${name}";
|
name = "ipxe-${name}";
|
||||||
@@ -147,7 +147,7 @@ let
|
|||||||
let
|
let
|
||||||
cfg = hosts.nixosConfigurations.${name};
|
cfg = hosts.nixosConfigurations.${name};
|
||||||
in
|
in
|
||||||
if lib.elem "lxc" cfg.config.ugaif.host.buildMethods then
|
if lib.elem "lxc" cfg.config.athenix.host.buildMethods then
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
name = "lxc-${name}";
|
name = "lxc-${name}";
|
||||||
@@ -166,7 +166,7 @@ let
|
|||||||
let
|
let
|
||||||
cfg = hosts.nixosConfigurations.${name};
|
cfg = hosts.nixosConfigurations.${name};
|
||||||
in
|
in
|
||||||
if lib.elem "proxmox" cfg.config.ugaif.host.buildMethods then
|
if lib.elem "proxmox" cfg.config.athenix.host.buildMethods then
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
name = "proxmox-${name}";
|
name = "proxmox-${name}";
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
# # Neovim module (requires user parameter):
|
# # Neovim module (requires user parameter):
|
||||||
# home-manager.users.myuser.imports = [
|
# home-manager.users.myuser.imports = [
|
||||||
# (inputs.nixos-systems.homeManagerModules.nvim {
|
# (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
|
nix-ephemeral = import ../hosts/types/nix-ephemeral.nix { inherit inputs; }; # Diskless/RAM-only
|
||||||
|
|
||||||
# ========== Software Configuration Module ==========
|
# ========== Software Configuration Module ==========
|
||||||
# Main software module with all ugaif.sw options
|
# Main software module with all athenix.sw options
|
||||||
# Use ugaif.sw.type to select profile: "desktop", "tablet-kiosk", "headless", "stateless-kiosk"
|
# Use athenix.sw.type to select profile: "desktop", "tablet-kiosk", "headless", "stateless-kiosk"
|
||||||
# Use ugaif.sw.extraPackages to add additional packages
|
# Use athenix.sw.extraPackages to add additional packages
|
||||||
# Use ugaif.sw.kioskUrl to set kiosk mode URL
|
# Use athenix.sw.kioskUrl to set kiosk mode URL
|
||||||
sw = { inputs, ... }@args: (import ../sw/default.nix (args // { inherit inputs; }));
|
sw = { inputs, ... }@args: (import ../sw/default.nix (args // { inherit inputs; }));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
# Hostname generation rules:
|
# Hostname generation rules:
|
||||||
# - Numeric suffixes: no dash (e.g., "nix-surface1", "nix-surface2")
|
# - Numeric suffixes: no dash (e.g., "nix-surface1", "nix-surface2")
|
||||||
# - Non-numeric suffixes: add dash (e.g., "nix-surface-alpha", "nix-surface-beta")
|
# - 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:
|
# Format:
|
||||||
# "prefix" = {
|
# "prefix" = {
|
||||||
@@ -29,19 +29,19 @@
|
|||||||
# "1" = { ... }; # Creates: prefix1
|
# "1" = { ... }; # Creates: prefix1
|
||||||
# "alpha" = { ... }; # Creates: prefix-alpha
|
# "alpha" = { ... }; # Creates: prefix-alpha
|
||||||
# "custom" = { # Creates: custom (no prefix)
|
# "custom" = { # Creates: custom (no prefix)
|
||||||
# ugaif.host.useHostPrefix = false;
|
# athenix.host.useHostPrefix = false;
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
#
|
#
|
||||||
# # Common config for all devices in this group
|
# # Common config for all devices in this group
|
||||||
# overrides = {
|
# 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
|
# # ... any other config
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
#
|
#
|
||||||
# Convenience options:
|
# 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):
|
# External modules (instead of config):
|
||||||
# Device values can be either a config attrset OR a fetchGit/fetchurl call
|
# Device values can be either a config attrset OR a fetchGit/fetchurl call
|
||||||
@@ -56,10 +56,10 @@
|
|||||||
# };
|
# };
|
||||||
# "laptop" = {
|
# "laptop" = {
|
||||||
# devices = 5;
|
# 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" = {
|
# "wsl" = {
|
||||||
# devices."alice".ugaif.forUser = "alice123"; # Sets up for user alice123
|
# devices."alice".athenix.forUser = "alice123"; # Sets up for user alice123
|
||||||
# };
|
# };
|
||||||
# "external" = {
|
# "external" = {
|
||||||
# devices."remote" = builtins.fetchGit { # External module via Git
|
# devices."remote" = builtins.fetchGit { # External module via Git
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
# Both get hdh20267 user via overrides
|
# Both get hdh20267 user via overrides
|
||||||
nix-laptop = {
|
nix-laptop = {
|
||||||
devices = 2;
|
devices = 2;
|
||||||
overrides.ugaif.users.hdh20267.enable = true;
|
overrides.athenix.users.hdh20267.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# ========== Desktop ==========
|
# ========== Desktop ==========
|
||||||
@@ -85,10 +85,10 @@
|
|||||||
nix-surface = {
|
nix-surface = {
|
||||||
defaultCount = 3;
|
defaultCount = 3;
|
||||||
devices = {
|
devices = {
|
||||||
"1".ugaif.sw.kioskUrl = "https://google.com";
|
"1".athenix.sw.kioskUrl = "https://google.com";
|
||||||
};
|
};
|
||||||
overrides = {
|
overrides = {
|
||||||
ugaif.sw.kioskUrl = "https://yahoo.com";
|
athenix.sw.kioskUrl = "https://yahoo.com";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
devices = {
|
devices = {
|
||||||
"nix-builder" = {
|
"nix-builder" = {
|
||||||
# GitHub Actions self-hosted runner configuration
|
# GitHub Actions self-hosted runner configuration
|
||||||
ugaif.sw = {
|
athenix.sw = {
|
||||||
type = [
|
type = [
|
||||||
"headless"
|
"headless"
|
||||||
"builders"
|
"builders"
|
||||||
@@ -123,11 +123,11 @@
|
|||||||
};
|
};
|
||||||
"usda-dash" = builtins.fetchGit {
|
"usda-dash" = builtins.fetchGit {
|
||||||
url = "https://git.factory.uga.edu/MODEL/usda-dash-config.git";
|
url = "https://git.factory.uga.edu/MODEL/usda-dash-config.git";
|
||||||
rev = "c47ab8fe295ba38cf3baa8670812b23a09fb4d53";
|
rev = "98f19ed8f8a6fed29d0947604bc14b403547a10d";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
overrides = {
|
overrides = {
|
||||||
ugaif.host.useHostPrefix = false;
|
athenix.host.useHostPrefix = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
# Creates: nix-wsl-alireza
|
# Creates: nix-wsl-alireza
|
||||||
nix-wsl = {
|
nix-wsl = {
|
||||||
devices = {
|
devices = {
|
||||||
"alireza".ugaif.forUser = "sv22900";
|
"alireza".athenix.forUser = "sv22900";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.ugaif.sw;
|
cfg = config.athenix.sw;
|
||||||
basePackages = with pkgs; [
|
basePackages = with pkgs; [
|
||||||
# Build-related packages can be added here if needed
|
# Build-related packages can be added here if needed
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.ugaif.sw;
|
cfg = config.athenix.sw;
|
||||||
builderCfg = cfg.builders;
|
builderCfg = cfg.builders;
|
||||||
in
|
in
|
||||||
mkIf builderCfg.githubRunner.enable {
|
mkIf builderCfg.githubRunner.enable {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.ugaif.sw;
|
cfg = config.athenix.sw;
|
||||||
|
|
||||||
# Normalize type to always be a list
|
# Normalize type to always be a list
|
||||||
swTypes = if isList cfg.type then cfg.type else [ cfg.type ];
|
swTypes = if isList cfg.type then cfg.type else [ cfg.type ];
|
||||||
@@ -31,7 +31,7 @@ in
|
|||||||
./updater.nix
|
./updater.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
options.ugaif.sw = {
|
options.athenix.sw = {
|
||||||
enable = mkEnableOption "Standard Workstation Configuration";
|
enable = mkEnableOption "Standard Workstation Configuration";
|
||||||
|
|
||||||
type = mkOption {
|
type = mkOption {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.ugaif.sw;
|
cfg = config.athenix.sw;
|
||||||
basePackages = with pkgs; [
|
basePackages = with pkgs; [
|
||||||
tmux
|
tmux
|
||||||
man
|
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.displayManager.sddm.enable = true;
|
||||||
services.desktopManager.plasma6.enable = true;
|
services.desktopManager.plasma6.enable = true;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.ugaif.sw;
|
cfg = config.athenix.sw;
|
||||||
basePackages = with pkgs; [
|
basePackages = with pkgs; [
|
||||||
tmux
|
tmux
|
||||||
man
|
man
|
||||||
|
|||||||
@@ -15,10 +15,10 @@
|
|||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.ugaif.sw.python;
|
cfg = config.athenix.sw.python;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.ugaif.sw.python = {
|
options.athenix.sw.python = {
|
||||||
enable = mkEnableOption "Python development tools (pixi, uv)" // {
|
enable = mkEnableOption "Python development tools (pixi, uv)" // {
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.ugaif.sw;
|
cfg = config.athenix.sw;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.dconf = {
|
programs.dconf = {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.ugaif.sw;
|
cfg = config.athenix.sw;
|
||||||
basePackages = with pkgs; [
|
basePackages = with pkgs; [
|
||||||
libcamera
|
libcamera
|
||||||
chromium
|
chromium
|
||||||
|
|||||||
@@ -155,7 +155,7 @@
|
|||||||
--noerrdialogs \
|
--noerrdialogs \
|
||||||
--disable-session-crashed-bubble \
|
--disable-session-crashed-bubble \
|
||||||
--disable-infobars \
|
--disable-infobars \
|
||||||
${config.ugaif.sw.kioskUrl}
|
${config.athenix.sw.kioskUrl}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
options.ugaif.sw.remoteBuild = lib.mkOption {
|
options.athenix.sw.remoteBuild = lib.mkOption {
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
hosts = mkOption {
|
hosts = mkOption {
|
||||||
@@ -29,7 +29,7 @@ with lib;
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
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 = [
|
environment.systemPackages = [
|
||||||
(pkgs.writeShellScriptBin "update-system" ''
|
(pkgs.writeShellScriptBin "update-system" ''
|
||||||
@@ -69,11 +69,12 @@ with lib;
|
|||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart =
|
ExecStart =
|
||||||
let
|
let
|
||||||
hosts = config.ugaif.sw.remoteBuild.hosts;
|
hosts = config.athenix.sw.remoteBuild.hosts;
|
||||||
builders = lib.strings.concatMapStringsSep ";" (x: x) hosts;
|
builders = lib.strings.concatMapStringsSep ";" (x: x) hosts;
|
||||||
rebuildCmd = "${pkgs.nixos-rebuild}/bin/nixos-rebuild switch --refresh";
|
rebuildCmd = "${pkgs.nixos-rebuild}/bin/nixos-rebuild switch --refresh";
|
||||||
source = "--flake github:UGA-Innovation-Factory/nixos-systems";
|
source = "--flake git+https://git.factory.uga.edu/UGA-Innovation-Factory/athenix";
|
||||||
remoteBuildFlags = if config.ugaif.sw.remoteBuild.enable then ''--builders "${builders}"'' else "";
|
remoteBuildFlags =
|
||||||
|
if config.athenix.sw.remoteBuild.enable then ''--builders "${builders}"'' else "";
|
||||||
in
|
in
|
||||||
"${rebuildCmd} ${remoteBuildFlags} --print-build-logs ${source}#${config.networking.hostName}";
|
"${rebuildCmd} ${remoteBuildFlags} --print-build-logs ${source}#${config.networking.hostName}";
|
||||||
User = "root";
|
User = "root";
|
||||||
|
|||||||
@@ -94,6 +94,6 @@ Your `default.nix` must:
|
|||||||
|
|
||||||
External modules are automatically integrated into the nixos-systems build:
|
External modules are automatically integrated into the nixos-systems build:
|
||||||
- They receive the same flake inputs (nixpkgs, home-manager, etc.)
|
- 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 are merged with local overrides and base configuration
|
||||||
- They work with all build methods (ISO, LXC, Proxmox, etc.)
|
- They work with all build methods (ISO, LXC, Proxmox, etc.)
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
# Example: Configure services
|
# Example: Configure services
|
||||||
# services.openssh.enable = true;
|
# services.openssh.enable = true;
|
||||||
|
|
||||||
# Example: Use ugaif options if available from nixos-systems
|
# Example: Use athenix options if available from nixos-systems
|
||||||
# ugaif.users.myuser.enable = true;
|
# athenix.users.myuser.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ user-dotfiles-repo/
|
|||||||
└── vimrc
|
└── 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
|
## Usage
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ Copy the templates from this directory to your own Git repository:
|
|||||||
|
|
||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
ugaif.users = {
|
athenix.users = {
|
||||||
# Option 1: Define inline (without external module)
|
# Option 1: Define inline (without external module)
|
||||||
inlineuser = {
|
inlineuser = {
|
||||||
description = "My Name";
|
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)
|
# 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 {
|
myusername.external = builtins.fetchGit {
|
||||||
url = "https://github.com/username/dotfiles";
|
url = "https://github.com/username/dotfiles";
|
||||||
rev = "abc123def456..."; # Full commit hash for reproducibility
|
rev = "abc123def456..."; # Full commit hash for reproducibility
|
||||||
@@ -64,7 +64,7 @@ Enable the user in `inventory.nix`:
|
|||||||
"my-system" = {
|
"my-system" = {
|
||||||
devices = {
|
devices = {
|
||||||
"hostname" = {
|
"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**:
|
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
|
2. **Home-Manager Context**: Imported to configure the user environment with `home.*`, `programs.*`, and `services.*` options
|
||||||
|
|
||||||
**How it works:**
|
**How it works:**
|
||||||
- The same file is evaluated twice in different contexts
|
- 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
|
- Home-manager options are used when building the user's environment
|
||||||
- External module options override any defaults set in `users.nix`
|
- External module options override any defaults set in `users.nix`
|
||||||
- You can conditionally include packages/config based on system type using `osConfig`
|
- 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, ... }:
|
{ config, lib, pkgs, osConfig ? null, ... }:
|
||||||
{
|
{
|
||||||
# User account options
|
# User account options
|
||||||
ugaif.users.myuser = {
|
athenix.users.myuser = {
|
||||||
description = "My Name";
|
description = "My Name";
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
hashedPassword = "!";
|
hashedPassword = "!";
|
||||||
@@ -150,7 +150,7 @@ This file contains system-level NixOS configuration. Only needed for:
|
|||||||
{ inputs, ... }:
|
{ inputs, ... }:
|
||||||
{ config, lib, pkgs, osConfig ? null, ... }:
|
{ config, lib, pkgs, osConfig ? null, ... }:
|
||||||
{
|
{
|
||||||
ugaif.users.myuser = {
|
athenix.users.myuser = {
|
||||||
description = "My Name";
|
description = "My Name";
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
hashedPassword = "!";
|
hashedPassword = "!";
|
||||||
@@ -162,7 +162,7 @@ This file contains system-level NixOS configuration. Only needed for:
|
|||||||
ripgrep
|
ripgrep
|
||||||
fd
|
fd
|
||||||
bat
|
bat
|
||||||
] ++ lib.optional (osConfig.ugaif.sw.type or null == "desktop") firefox;
|
] ++ lib.optional (osConfig.athenix.sw.type or null == "desktop") firefox;
|
||||||
|
|
||||||
# Symlink dotfiles
|
# Symlink dotfiles
|
||||||
home.file.".bashrc".source = ./config/bashrc;
|
home.file.".bashrc".source = ./config/bashrc;
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
# User Configuration
|
# User Configuration
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# This file configures BOTH:
|
# 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.*)
|
# 2. Home-manager configuration (home.*, programs.*, services.*)
|
||||||
#
|
#
|
||||||
# The same file is imported in two contexts:
|
# 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
|
# - As a home-manager module for user environment configuration
|
||||||
#
|
#
|
||||||
# This module receives the same `inputs` flake inputs as the main
|
# This module receives the same `inputs` flake inputs as the main
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
# ========== User Account Configuration ==========
|
# ========== User Account Configuration ==========
|
||||||
# Replace "myusername" with your actual username
|
# Replace "myusername" with your actual username
|
||||||
|
|
||||||
ugaif.users.myusername = {
|
athenix.users.myusername = {
|
||||||
description = "Your Full Name";
|
description = "Your Full Name";
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
hashedPassword = "!"; # Locked password - use SSH keys only
|
hashedPassword = "!"; # Locked password - use SSH keys only
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Note: You don't need to set 'enable = true' - that's controlled
|
# 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 ==========
|
# ========== Home Manager Configuration ==========
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
fd
|
fd
|
||||||
bat
|
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
|
# Conditionally add packages based on system type
|
||||||
|
|
||||||
# ========== Programs ==========
|
# ========== Programs ==========
|
||||||
|
|||||||
10
users.nix
10
users.nix
@@ -5,7 +5,7 @@
|
|||||||
# ============================================================================
|
# ============================================================================
|
||||||
# This file defines the available user accounts. These accounts are NOT
|
# This file defines the available user accounts. These accounts are NOT
|
||||||
# enabled by default on all systems. They must be enabled via the
|
# 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
|
# Define the users here using the new option
|
||||||
# To generate a password hash, run: mkpasswd -m sha-512
|
# To generate a password hash, run: mkpasswd -m sha-512
|
||||||
@@ -17,16 +17,16 @@
|
|||||||
# external = /path/to/local/config;
|
# external = /path/to/local/config;
|
||||||
#
|
#
|
||||||
# External repositories should contain:
|
# 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
|
# - nixos.nix (optional): System-level NixOS configuration
|
||||||
#
|
#
|
||||||
# The user.nix file is imported in TWO contexts:
|
# 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)
|
# 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.
|
# 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.
|
# External module options take precedence over users.nix defaults.
|
||||||
ugaif.users = {
|
athenix.users = {
|
||||||
root = {
|
root = {
|
||||||
isNormalUser = false;
|
isNormalUser = false;
|
||||||
hashedPassword = "!";
|
hashedPassword = "!";
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
hdh20267 = {
|
hdh20267 = {
|
||||||
external = builtins.fetchGit {
|
external = builtins.fetchGit {
|
||||||
url = "https://git.factory.uga.edu/hdh20267/hdh20267-nix";
|
url = "https://git.factory.uga.edu/hdh20267/hdh20267-nix";
|
||||||
rev = "db96137bb4cb16acefcf59d58c9f848924f2ad43";
|
rev = "c538e0c0510045b58264627bb897fc499dc7c490";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
sv22900 = {
|
sv22900 = {
|
||||||
|
|||||||
Reference in New Issue
Block a user