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:
Geir Okkenhaug Jerstad 2025-07-07 13:29:04 +02:00
parent f323e3b909
commit ef4b4b7736
39 changed files with 825 additions and 11 deletions

View file

@ -0,0 +1,2 @@
// Placeholder for Niri configuration
// This will contain the migrated Niri window manager configuration

View file

@ -0,0 +1,2 @@
# Placeholder for desktop theme configuration
# This will contain desktop theme and appearance settings

View file

@ -0,0 +1,4 @@
{
"_comment": "Placeholder for Waybar configuration",
"_note": "This will contain the migrated Waybar configuration"
}

View file

@ -0,0 +1,3 @@
# Placeholder for Emacs init.el
# This will contain the migrated Emacs configuration
# from dotfiles/geir/emacs-config/init-nix.el

View file

@ -0,0 +1,2 @@
;; Placeholder for Emacs claude-code module
;; This will contain the migrated claude-code configuration

View file

@ -0,0 +1,2 @@
;; Placeholder for Emacs completion module
;; This will contain the migrated completion configuration

View file

@ -0,0 +1,2 @@
;; Placeholder for Emacs development module
;; This will contain the migrated development configuration

View file

@ -0,0 +1,2 @@
;; Placeholder for Emacs elisp development module
;; This will contain the migrated elisp development configuration

View file

@ -0,0 +1,2 @@
;; Placeholder for Emacs navigation module
;; This will contain the migrated navigation configuration

View file

@ -0,0 +1,2 @@
;; Placeholder for Emacs UI module
;; This will contain the migrated UI configuration

View file

@ -0,0 +1,2 @@
# Placeholder for shell aliases
# This will contain shared shell aliases

View file

@ -0,0 +1,2 @@
# Placeholder for zsh configuration
# This will contain shell-specific configurations that need to be deployed as dotfiles

View file

@ -0,0 +1,10 @@
# Shared desktop environment module
# Contains common desktop configurations and services
{ config, lib, pkgs, ... }:
{
# Shared desktop environment configuration
# Common desktop applications, services, and integrations
# Desktop-specific environment variables
}

View file

@ -0,0 +1,10 @@
# Wayland-specific desktop configurations
# Contains Wayland window manager and compositor configurations
{ config, lib, pkgs, ... }:
{
# Wayland-specific desktop configuration
# Window manager configurations (Niri, Sway, etc.)
# Wayland-specific tools and services
}

View file

@ -0,0 +1,10 @@
# Shared development environment module
# Contains common development tools and configurations
{ config, lib, pkgs, ... }:
{
# Shared development environment configuration
# Common development tools, language servers, formatters
# Development-specific environment variables
}

View file

@ -0,0 +1,10 @@
# Language-specific development configurations
# Contains language servers, tools, and environment setup
{ config, lib, pkgs, ... }:
{
# Language-specific development tools
# LSP servers, formatters, linters for different languages
# Language-specific environment variables and configurations
}

View file

@ -0,0 +1,12 @@
# Shared Emacs module for Home Manager
# Contains common Emacs functionality that can be shared across users
{ config, lib, pkgs, ... }:
{
# Shared Emacs configuration that can be imported by users
# Contains package sets, profile definitions, and common configurations
# This will contain the migrated packageSets from the current emacs.nix
# and shared Emacs functionality
}

View file

@ -0,0 +1,11 @@
# Emacs Nix integration module
# Contains Nix tool integration and environment variable configuration
{ config, lib, pkgs, ... }:
{
# Nix tool integration for Emacs
# Environment variables for Nix-provided tools
# LSP server configurations
# Formatter integrations
}

View file

@ -0,0 +1,12 @@
# Emacs profile definitions for Home Manager
# Contains the profile-based package selection logic
{ config, lib, pkgs, ... }:
{
# Profile-based Emacs package configurations
# This will contain the migrated packageSets logic from current emacs.nix
# Profiles: essential, minimal, development, workstation
# Package selection based on profile type
}

View 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";
};
}

View 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
}

View 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
}

View 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
}

View 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
};
}

View 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.
};
}

View 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
];
}

View 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
];
}

View 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
}

View 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
}

View 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";
};
}