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
2
home-manager/dotfiles/desktop/niri.kdl
Normal file
2
home-manager/dotfiles/desktop/niri.kdl
Normal file
|
@ -0,0 +1,2 @@
|
|||
// Placeholder for Niri configuration
|
||||
// This will contain the migrated Niri window manager configuration
|
2
home-manager/dotfiles/desktop/theme.conf
Normal file
2
home-manager/dotfiles/desktop/theme.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Placeholder for desktop theme configuration
|
||||
# This will contain desktop theme and appearance settings
|
4
home-manager/dotfiles/desktop/waybar.json
Normal file
4
home-manager/dotfiles/desktop/waybar.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"_comment": "Placeholder for Waybar configuration",
|
||||
"_note": "This will contain the migrated Waybar configuration"
|
||||
}
|
3
home-manager/dotfiles/emacs/init.el
Normal file
3
home-manager/dotfiles/emacs/init.el
Normal 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
|
2
home-manager/dotfiles/emacs/modules/claude-code.el
Normal file
2
home-manager/dotfiles/emacs/modules/claude-code.el
Normal file
|
@ -0,0 +1,2 @@
|
|||
;; Placeholder for Emacs claude-code module
|
||||
;; This will contain the migrated claude-code configuration
|
2
home-manager/dotfiles/emacs/modules/completion.el
Normal file
2
home-manager/dotfiles/emacs/modules/completion.el
Normal file
|
@ -0,0 +1,2 @@
|
|||
;; Placeholder for Emacs completion module
|
||||
;; This will contain the migrated completion configuration
|
2
home-manager/dotfiles/emacs/modules/development.el
Normal file
2
home-manager/dotfiles/emacs/modules/development.el
Normal file
|
@ -0,0 +1,2 @@
|
|||
;; Placeholder for Emacs development module
|
||||
;; This will contain the migrated development configuration
|
2
home-manager/dotfiles/emacs/modules/elisp-development.el
Normal file
2
home-manager/dotfiles/emacs/modules/elisp-development.el
Normal file
|
@ -0,0 +1,2 @@
|
|||
;; Placeholder for Emacs elisp development module
|
||||
;; This will contain the migrated elisp development configuration
|
2
home-manager/dotfiles/emacs/modules/navigation.el
Normal file
2
home-manager/dotfiles/emacs/modules/navigation.el
Normal file
|
@ -0,0 +1,2 @@
|
|||
;; Placeholder for Emacs navigation module
|
||||
;; This will contain the migrated navigation configuration
|
2
home-manager/dotfiles/emacs/modules/ui.el
Normal file
2
home-manager/dotfiles/emacs/modules/ui.el
Normal file
|
@ -0,0 +1,2 @@
|
|||
;; Placeholder for Emacs UI module
|
||||
;; This will contain the migrated UI configuration
|
2
home-manager/dotfiles/shell/aliases
Normal file
2
home-manager/dotfiles/shell/aliases
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Placeholder for shell aliases
|
||||
# This will contain shared shell aliases
|
2
home-manager/dotfiles/shell/zshrc
Normal file
2
home-manager/dotfiles/shell/zshrc
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Placeholder for zsh configuration
|
||||
# This will contain shell-specific configurations that need to be deployed as dotfiles
|
10
home-manager/modules/desktop/default.nix
Normal file
10
home-manager/modules/desktop/default.nix
Normal 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
|
||||
}
|
10
home-manager/modules/desktop/wayland.nix
Normal file
10
home-manager/modules/desktop/wayland.nix
Normal 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
|
||||
}
|
10
home-manager/modules/development/default.nix
Normal file
10
home-manager/modules/development/default.nix
Normal 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
|
||||
}
|
10
home-manager/modules/development/languages.nix
Normal file
10
home-manager/modules/development/languages.nix
Normal 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
|
||||
}
|
12
home-manager/modules/emacs/default.nix
Normal file
12
home-manager/modules/emacs/default.nix
Normal 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
|
||||
}
|
11
home-manager/modules/emacs/nix-integration.nix
Normal file
11
home-manager/modules/emacs/nix-integration.nix
Normal 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
|
||||
}
|
12
home-manager/modules/emacs/profiles.nix
Normal file
12
home-manager/modules/emacs/profiles.nix
Normal 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
|
||||
}
|
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