feat: add Home Manager refactoring plan and initial structure
- Add comprehensive Home Manager refactoring plan document - Create initial Home Manager directory structure with user configs - Add modular Emacs configuration for Home Manager integration - Update system configurations for Home Manager compatibility - Preserve existing functionality while preparing for migration 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
f323e3b909
commit
ef4b4b7736
39 changed files with 825 additions and 11 deletions
38
home-manager/users/geir/home.nix
Normal file
38
home-manager/users/geir/home.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
# Main home configuration for user 'geir'
|
||||
# This is the entry point for all user-specific Home Manager configuration
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./profiles/development.nix
|
||||
./programs/emacs.nix
|
||||
./programs/zsh.nix
|
||||
./programs/git.nix
|
||||
./programs/development.nix
|
||||
./services/emacs-daemon.nix
|
||||
./services/desktop.nix
|
||||
];
|
||||
|
||||
# Home Manager needs a bit of information about you and the paths it should manage
|
||||
home.username = "geir";
|
||||
home.homeDirectory = "/home/geir";
|
||||
|
||||
# This value determines the Home Manager release that your configuration is compatible with
|
||||
home.stateVersion = "25.05";
|
||||
|
||||
# Let Home Manager install and manage itself
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
# User-specific packages will be defined in profiles and programs
|
||||
home.packages = with pkgs; [
|
||||
# Essential user packages will be moved here from system configuration
|
||||
];
|
||||
|
||||
# User-specific environment variables
|
||||
home.sessionVariables = {
|
||||
EDITOR = "emacs";
|
||||
BROWSER = "firefox";
|
||||
TERMINAL = "kitty";
|
||||
};
|
||||
}
|
19
home-manager/users/geir/profiles/development.nix
Normal file
19
home-manager/users/geir/profiles/development.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Development profile configuration for geir
|
||||
# Contains development-specific packages and configurations
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Development-specific packages
|
||||
home.packages = with pkgs; [
|
||||
# Development tools
|
||||
# Will be migrated from current user configuration
|
||||
];
|
||||
|
||||
# Development-specific environment variables
|
||||
home.sessionVariables = {
|
||||
# Development environment variables
|
||||
};
|
||||
|
||||
# Development-specific services and configurations
|
||||
}
|
13
home-manager/users/geir/profiles/minimal.nix
Normal file
13
home-manager/users/geir/profiles/minimal.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Minimal profile configuration for geir
|
||||
# Contains only essential packages for lightweight setups
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Minimal essential packages
|
||||
home.packages = with pkgs; [
|
||||
# Only essential tools
|
||||
];
|
||||
|
||||
# Minimal configurations
|
||||
}
|
14
home-manager/users/geir/profiles/workstation.nix
Normal file
14
home-manager/users/geir/profiles/workstation.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Workstation profile configuration for geir
|
||||
# Contains full workstation packages and configurations for powerful machines
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Workstation-specific packages
|
||||
home.packages = with pkgs; [
|
||||
# Full workstation packages
|
||||
# Creative tools, media applications, etc.
|
||||
];
|
||||
|
||||
# Workstation-specific configurations
|
||||
}
|
21
home-manager/users/geir/programs/development.nix
Normal file
21
home-manager/users/geir/programs/development.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Development tools and environment configuration
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Development packages
|
||||
home.packages = with pkgs; [
|
||||
# Development tools will be migrated here
|
||||
# neovim, vscode, nodejs, etc.
|
||||
];
|
||||
|
||||
# Development tool configurations
|
||||
programs = {
|
||||
# Individual development tool configurations
|
||||
};
|
||||
|
||||
# Development environment variables
|
||||
home.sessionVariables = {
|
||||
# Development-specific environment variables
|
||||
};
|
||||
}
|
26
home-manager/users/geir/programs/emacs.nix
Normal file
26
home-manager/users/geir/programs/emacs.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Emacs configuration for Home Manager
|
||||
# Migrated from modules/development/emacs.nix with Home Manager integration
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Emacs program configuration
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
# package will be configured based on profile
|
||||
# extraPackages will be migrated from current profile system
|
||||
};
|
||||
|
||||
# Emacs configuration files deployment
|
||||
xdg.configFile = {
|
||||
# Emacs configuration files will be deployed here
|
||||
# "emacs/init.el".source = ...;
|
||||
# "emacs/modules/ui.el".source = ...;
|
||||
};
|
||||
|
||||
# Emacs-specific environment variables
|
||||
home.sessionVariables = {
|
||||
# Nix tool integration variables
|
||||
# RG_PATH, FD_PATH, etc.
|
||||
};
|
||||
}
|
22
home-manager/users/geir/programs/git.nix
Normal file
22
home-manager/users/geir/programs/git.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Git configuration for Home Manager
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Geir Okkenhaug Jerstad";
|
||||
userEmail = "geokkjer@gmail.com";
|
||||
|
||||
# Git configuration
|
||||
extraConfig = {
|
||||
# Git settings will be configured here
|
||||
};
|
||||
};
|
||||
|
||||
# Git-related packages
|
||||
home.packages = with pkgs; [
|
||||
git-credential-manager
|
||||
# Other git tools
|
||||
];
|
||||
}
|
34
home-manager/users/geir/programs/zsh.nix
Normal file
34
home-manager/users/geir/programs/zsh.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Zsh configuration for Home Manager
|
||||
# Migrated from current zsh configuration in user modules
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
|
||||
# History configuration
|
||||
history = {
|
||||
size = 10000;
|
||||
path = "$HOME/.histfile";
|
||||
};
|
||||
|
||||
# Shell aliases
|
||||
shellAliases = {
|
||||
# User-specific aliases will be migrated here
|
||||
};
|
||||
|
||||
# Interactive shell initialization
|
||||
initExtra = ''
|
||||
# Shell initialization code will be migrated here
|
||||
'';
|
||||
};
|
||||
|
||||
# Shell-related packages
|
||||
home.packages = with pkgs; [
|
||||
starship
|
||||
zoxide
|
||||
direnv
|
||||
# Other shell enhancement tools
|
||||
];
|
||||
}
|
14
home-manager/users/geir/services/desktop.nix
Normal file
14
home-manager/users/geir/services/desktop.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Desktop services configuration for Home Manager
|
||||
# User-level desktop services and integrations
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Desktop services
|
||||
services = {
|
||||
# User-level desktop services will be configured here
|
||||
# Examples: clipboards, notifications, etc.
|
||||
};
|
||||
|
||||
# Desktop-specific configurations
|
||||
}
|
14
home-manager/users/geir/services/emacs-daemon.nix
Normal file
14
home-manager/users/geir/services/emacs-daemon.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Emacs daemon service configuration for Home Manager
|
||||
# Migrated from system-level emacs service
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.emacs = {
|
||||
enable = true;
|
||||
# package will be set from emacs program configuration
|
||||
# Additional daemon-specific configuration
|
||||
};
|
||||
|
||||
# User-level systemd service customization if needed
|
||||
}
|
42
home-manager/users/sma/home.nix
Normal file
42
home-manager/users/sma/home.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
# Main home configuration for user 'sma' (admin user)
|
||||
# Minimal configuration for system administration tasks
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the paths it should manage
|
||||
home.username = "sma";
|
||||
home.homeDirectory = "/home/sma";
|
||||
|
||||
# This value determines the Home Manager release that your configuration is compatible with
|
||||
home.stateVersion = "25.05";
|
||||
|
||||
# Let Home Manager install and manage itself
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
# Admin-specific packages
|
||||
home.packages = with pkgs; [
|
||||
# System administration tools
|
||||
];
|
||||
|
||||
# Basic shell configuration
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
history = {
|
||||
size = 5000;
|
||||
path = "$HOME/.histfile";
|
||||
};
|
||||
};
|
||||
|
||||
# Basic git configuration
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "System Admin";
|
||||
userEmail = "admin@example.com";
|
||||
};
|
||||
|
||||
# Admin-specific environment variables
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nano";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue