chore: Resolve comment https://github.com/UGA-Innovation-Factory/nixos-systems/pull/7#discussion_r2628646450
This commit is contained in:
@@ -15,8 +15,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
# Load users.nix to get account definitions
|
# Load users.nix to get account definitions
|
||||||
pkgs' = pkgs;
|
usersData = import ../users.nix { inherit pkgs; };
|
||||||
usersData = import ../users.nix { pkgs = pkgs'; };
|
|
||||||
accounts = usersData.ugaif.users or { };
|
accounts = usersData.ugaif.users or { };
|
||||||
|
|
||||||
# Helper: Resolve external module path from fetchGit/fetchTarball/path
|
# Helper: Resolve external module path from fetchGit/fetchTarball/path
|
||||||
@@ -246,7 +245,7 @@ in
|
|||||||
;
|
;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
lib.filterAttrs (name: _: name != "ugaif") evaluated
|
lib.filterAttrs (attrName: _: attrName != "ugaif") evaluated
|
||||||
else
|
else
|
||||||
{ };
|
{ };
|
||||||
|
|
||||||
|
|||||||
@@ -189,8 +189,7 @@ This file contains system-level NixOS configuration. Only needed for:
|
|||||||
|
|
||||||
External user modules:
|
External user modules:
|
||||||
- Receive the same flake inputs as nixos-systems
|
- Receive the same flake inputs as nixos-systems
|
||||||
- Can set user options via user.nix (description, shell, extraGroups, etc.)
|
- Can set user options via user.nix (description, shell, home-manager, etc.)
|
||||||
- Can use all home-manager options via home.nix
|
|
||||||
- Optionally provide system-level configuration (nixos.nix)
|
- Optionally provide system-level configuration (nixos.nix)
|
||||||
- System zsh theme applied if `useZshTheme = true` (default)
|
- System zsh theme applied if `useZshTheme = true` (default)
|
||||||
- System nvim config applied if `useNvimPlugins = true` (default)
|
- System nvim config applied if `useNvimPlugins = true` (default)
|
||||||
@@ -198,7 +197,7 @@ External user modules:
|
|||||||
|
|
||||||
## Development Workflow
|
## Development Workflow
|
||||||
|
|
||||||
1. Create your user config repository with `user.nix`, `home.nix`, and/or `nixos.nix`
|
1. Create your user config repository with `user.nix` and/or `nixos.nix`
|
||||||
2. Set user options in user.nix OR in the main users.nix
|
2. Set user options in user.nix OR in the main users.nix
|
||||||
3. Test locally: `external = /path/to/local/repo;`
|
3. Test locally: `external = /path/to/local/repo;`
|
||||||
4. Build: `nix build .#nixosConfigurations.hostname.config.system.build.toplevel`
|
4. Build: `nix build .#nixosConfigurations.hostname.config.system.build.toplevel`
|
||||||
|
|||||||
@@ -1,100 +0,0 @@
|
|||||||
{ inputs, ... }:
|
|
||||||
|
|
||||||
# ============================================================================
|
|
||||||
# User Home Manager Configuration Template (Optional)
|
|
||||||
# ============================================================================
|
|
||||||
# This file provides home-manager configuration for a user.
|
|
||||||
# It will be imported into the NixOS system's home-manager configuration.
|
|
||||||
#
|
|
||||||
# This file is optional - if not present, no home-manager configuration
|
|
||||||
# will be loaded from this external module.
|
|
||||||
#
|
|
||||||
# Usage in users.nix:
|
|
||||||
# myusername = {
|
|
||||||
# # Set user options here OR in the external module's user.nix
|
|
||||||
# description = "My Name";
|
|
||||||
# shell = pkgs.zsh;
|
|
||||||
# extraGroups = [ "wheel" "networkmanager" ];
|
|
||||||
#
|
|
||||||
# external = builtins.fetchGit {
|
|
||||||
# url = "https://github.com/username/dotfiles";
|
|
||||||
# rev = "commit-hash";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
#
|
|
||||||
# Or use user.nix in your external module to set user options.
|
|
||||||
#
|
|
||||||
# This module receives the same `inputs` flake inputs as the main
|
|
||||||
# nixos-systems configuration (nixpkgs, home-manager, etc.).
|
|
||||||
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
osConfig, # Access to the OS-level config
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
# ========== Home Manager Configuration ==========
|
|
||||||
|
|
||||||
# User identity (required)
|
|
||||||
home.username = lib.mkDefault config.home.username; # Set by system
|
|
||||||
home.homeDirectory = lib.mkDefault config.home.homeDirectory; # Set by system
|
|
||||||
home.stateVersion = lib.mkDefault "25.11";
|
|
||||||
|
|
||||||
# ========== Packages ==========
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
# Add your preferred packages here
|
|
||||||
# htop
|
|
||||||
# ripgrep
|
|
||||||
# fd
|
|
||||||
# bat
|
|
||||||
];
|
|
||||||
|
|
||||||
# ========== Programs ==========
|
|
||||||
|
|
||||||
# Git configuration
|
|
||||||
programs.git = {
|
|
||||||
enable = true;
|
|
||||||
userName = "Your Name";
|
|
||||||
userEmail = "your.email@example.com";
|
|
||||||
extraConfig = {
|
|
||||||
init.defaultBranch = "main";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Zsh configuration
|
|
||||||
programs.zsh = {
|
|
||||||
enable = true;
|
|
||||||
# System theme is applied automatically if useZshTheme = true in users.nix
|
|
||||||
# Add your custom zsh config here
|
|
||||||
};
|
|
||||||
|
|
||||||
# Neovim configuration
|
|
||||||
# programs.neovim = {
|
|
||||||
# enable = true;
|
|
||||||
# # System nvim config is applied automatically if useNvimPlugins = true
|
|
||||||
# # Add your custom neovim config here
|
|
||||||
# };
|
|
||||||
|
|
||||||
# ========== Shell Environment ==========
|
|
||||||
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "vim";
|
|
||||||
# Add your custom environment variables
|
|
||||||
};
|
|
||||||
|
|
||||||
# ========== Dotfiles ==========
|
|
||||||
|
|
||||||
# You can manage dotfiles with home.file
|
|
||||||
# home.file.".bashrc".source = ./dotfiles/bashrc;
|
|
||||||
# home.file.".vimrc".source = ./dotfiles/vimrc;
|
|
||||||
|
|
||||||
# Or use programs.* options for better integration
|
|
||||||
|
|
||||||
# ========== XDG Configuration ==========
|
|
||||||
|
|
||||||
xdg.enable = true;
|
|
||||||
# xdg.configFile."app/config.conf".source = ./config/app.conf;
|
|
||||||
}
|
|
||||||
@@ -12,7 +12,8 @@
|
|||||||
# - Installing system packages that require root
|
# - Installing system packages that require root
|
||||||
#
|
#
|
||||||
# Note: User options (description, shell, extraGroups, etc.) should be set
|
# Note: User options (description, shell, extraGroups, etc.) should be set
|
||||||
# in the main users.nix file, not here.
|
# in your external module's user.nix or in the main users.nix file, not in
|
||||||
|
# this nixos.nix.
|
||||||
#
|
#
|
||||||
# This module receives the same `inputs` flake inputs as the main
|
# This module receives the same `inputs` flake inputs as the main
|
||||||
# nixos-systems configuration.
|
# nixos-systems configuration.
|
||||||
|
|||||||
@@ -8,8 +8,9 @@
|
|||||||
# 2. Home-manager configuration (home.*, programs.*, services.*) when imported
|
# 2. Home-manager configuration (home.*, programs.*, services.*) when imported
|
||||||
# into home-manager
|
# into home-manager
|
||||||
#
|
#
|
||||||
# This file is optional - if not present, these options should be set
|
# This file is optional - if not present, the system will use the defaults
|
||||||
# directly in the main users.nix file.
|
# from the main users.nix file. Use this file to override or extend those
|
||||||
|
# default user and home-manager options for this user.
|
||||||
#
|
#
|
||||||
# This module receives the same `inputs` flake inputs as the main
|
# This module receives the same `inputs` flake inputs as the main
|
||||||
# nixos-systems configuration (nixpkgs, home-manager, etc.).
|
# nixos-systems configuration (nixpkgs, home-manager, etc.).
|
||||||
|
|||||||
Reference in New Issue
Block a user