From 636f39e9d520aac9c7001183d7012136abda63b3 Mon Sep 17 00:00:00 2001 From: lulusilly Date: Sun, 31 Aug 2025 22:46:42 -0400 Subject: [PATCH] Started work on home-manager directory configs --- .config/home-manager/common.nix | 0 .config/home-manager/flake.nix | 28 ++++++ .config/home-manager/mecca/home.nix | 128 ++++++++++++++++++++++++++++ 3 files changed, 156 insertions(+) create mode 100644 .config/home-manager/common.nix create mode 100644 .config/home-manager/flake.nix create mode 100644 .config/home-manager/mecca/home.nix diff --git a/.config/home-manager/common.nix b/.config/home-manager/common.nix new file mode 100644 index 0000000..e69de29 diff --git a/.config/home-manager/flake.nix b/.config/home-manager/flake.nix new file mode 100644 index 0000000..61607c2 --- /dev/null +++ b/.config/home-manager/flake.nix @@ -0,0 +1,28 @@ +{ + description = "Home Manager multi-machine flake"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + home-manager.url = "github:nix-community/home-manager"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = { self, nixpkgs, home-manager, ... }: let + # Get system type (Linux or MacOS, x86_64 or ARM) + system = builtins.currentSystem; + pkgs = import nixpkgs { inherit system; }; + + # Get current machine hostname + hostname = builtins.getEnv "HOSTNAME"; + in { + homeConfigurations = { + "${hostname}" = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + modules = [ + ./common.nix + ./${hostname}/home.nix + ]; + } + }; + } +} diff --git a/.config/home-manager/mecca/home.nix b/.config/home-manager/mecca/home.nix new file mode 100644 index 0000000..f9ce0bf --- /dev/null +++ b/.config/home-manager/mecca/home.nix @@ -0,0 +1,128 @@ +{ config, pkgs, ... }: + +{ + home.username = "lunita"; + home.homeDirectory = "/home/lunita"; + + home.stateVersion = "25.05"; + + programs.zsh = { + enable = true; + syntaxHighlighting.enable = true; + + shellAliases = { + c = "clear"; + nf = "neofetch"; + hmc = "nvim ~/.config/home-manager/home.nix"; + hmb = "home-manager build switch"; + fkc = "sudo nvim ~/.config/nixos/flake.nix"; + nxr = "sudo nixos-rebuild switch --flake ~/.config/nixos#${config.home.sessionVariables.HOSTNAME}"; + v = "nvim"; + d = "cd ~/Documents"; + D = "cd ~/Downloads"; + }; + + initContent = '' + # '~' => goto base of user home directory + alias ~='cd ~' + # Vim keybinds + bindkey -v + # Preferred editor for local and remote sessions + if [[ -n $SSH_CONNECTION ]]; then + export EDITOR='vim' + else + export EDITOR='nvim' + fi + # Set TERM for Ghostty ssh workaround + if [[ "$TERM_PROGRAM" == "ghostty" ]]; then + export TERM=xterm-256color + fi + ''; + + history.size = 10000; + + oh-my-zsh = { + enable = true; + plugins = [ "git" ]; + theme = "lambda"; + }; + }; + + programs.git = { + enable = true; + userName = "lulusilly"; + userEmail = "lunita@puppygirl.onl"; + aliases = { + ci = "commit"; + co = "checkout"; + s = "status"; + }; + }; + + programs.waybar = { + enable = true; + package = pkgs.waybar; + + # Define the Waybar style.css content here + style = '' + * { + font-family: "JetBrainsMono Nerd Font", monospace; + font-size: 13px; + } + + #window { + /* Example: style the window module */ + background-color: #333333; + color: #ffffff; + border-radius: 8px; + padding: 0 10px; + } + ''; + + # Define the Waybar config content here (JSON format) + settings = { + mainBar = { + layer = "top"; + position = "top"; + modules-left = [ "hyprland/workspaces" "hyprland/window" ]; + modules-center = [ "clock" ]; + modules-right = [ "network" "pulseaudio" "battery" ]; + }; + }; + }; + + nixpkgs.config.allowUnfree = true; + home.packages = with pkgs; [ + tree # Nice file tree views w/permissions + neofetch # Muh epic r1ce!!! + btop # Resource manager + stow # For dotfiles deployment. May use home.file in future + imagemagick # For converting images into other fmts + sxiv # Minimal image viewer + mpv # Video player + zathura # PDF/CBZ/EPUB/DJVU reader + tmux # Tride and true terminal multiplexer + obsidian # For epic note taking (really just mediocre journaling) + keepassxc # Secure password manager + syncthing # Self explanatory + ]; + + home.file = { + # # Building this configuration will create a copy of 'dotfiles/screenrc' in + # # the Nix store. Activating the configuration will then make '~/.screenrc' a + # # symlink to the Nix store copy. + # ".screenrc".source = dotfiles/screenrc; + + # # You can also set the file content immediately. + # ".gradle/gradle.properties".text = '' + # org.gradle.console=verbose + # org.gradle.daemon.idletimeout=3600000 + # ''; + }; + + home.sessionVariables = { + EDITOR = "nvim"; + HOSTNAME = builtins.getEnv "HOSTNAME"; + }; + programs.home-manager.enable = true; +}