From 7f8a8e0f49f4acb5d45ca6834dbb277d7bf0a443 Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Wed, 11 Mar 2026 00:40:01 -0500 Subject: [PATCH] started break out of zsh --- modules/home-manager/profiles/shell-tools.nix | 2 +- modules/home-manager/programs/zsh.nix | 80 +++++++++++-------- modules/hosts/janus.nix | 1 + modules/hosts/john-pc-ubuntu.nix | 2 +- modules/users/john.nix | 19 +---- 5 files changed, 51 insertions(+), 53 deletions(-) diff --git a/modules/home-manager/profiles/shell-tools.nix b/modules/home-manager/profiles/shell-tools.nix index 1c7c710..a8a56d4 100644 --- a/modules/home-manager/profiles/shell-tools.nix +++ b/modules/home-manager/profiles/shell-tools.nix @@ -10,7 +10,7 @@ imports = with inputs.self.modules.homeManager; [ bash - zsh + # zsh # Tools eza diff --git a/modules/home-manager/programs/zsh.nix b/modules/home-manager/programs/zsh.nix index ec9133a..6c7ad1c 100644 --- a/modules/home-manager/programs/zsh.nix +++ b/modules/home-manager/programs/zsh.nix @@ -1,39 +1,53 @@ +{ inputs, ... }: +let + username = "john"; +in { - flake.modules.homeManager.zsh = { pkgs, config, ... }: - { - programs.zsh = { - enable = true; - package = pkgs.zsh; - enableCompletion = true; - autosuggestion.enable = true; - # syntaxHighlighting.enable = true; - initContent = "HOST=$(hostname -s)"; - dotDir = "${config.xdg.configHome}/zsh"; - history = { - append = true; - ignoreAllDups = true; - ignorePatterns = [ - "history" - "ls" - "eza" - "clear" - ]; - save = 1000; - size = 1000; - share = true; - }; - oh-my-zsh = { + flake.modules = { + nixos.zsh = { pkgs, ... }: { + users.users."${username}".shell = pkgs.zsh; + programs.zsh.enable = true; + home-manager.sharedModules = [ + inputs.self.modules.homeManager.zsh + ]; + }; + + homeManager.zsh = { pkgs, config, ... }: { + programs.zsh = { enable = true; - # theme = "risto"; - theme = "agnoster"; - plugins = [ - "sudo" - "dotenv" - "git" - "ssh" - "ssh-agent" - ]; + package = pkgs.zsh; + enableCompletion = true; + autosuggestion.enable = true; + # syntaxHighlighting.enable = true; + initContent = "HOST=$(hostname -s)"; + dotDir = "${config.xdg.configHome}/zsh"; + history = { + append = true; + ignoreAllDups = true; + ignorePatterns = [ + "history" + "ls" + "eza" + "clear" + ]; + save = 1000; + size = 1000; + share = true; + }; + oh-my-zsh = { + enable = true; + # theme = "risto"; + theme = "agnoster"; + plugins = [ + "sudo" + "dotenv" + "git" + "ssh" + "ssh-agent" + ]; + }; }; }; }; + } \ No newline at end of file diff --git a/modules/hosts/janus.nix b/modules/hosts/janus.nix index 5ccce04..9ce05a5 100644 --- a/modules/hosts/janus.nix +++ b/modules/hosts/janus.nix @@ -7,6 +7,7 @@ in flake.nixosConfigurations."${hostname}" = inputs.nixpkgs.lib.nixosSystem { modules = [ inputs.self.modules.nixos.lxc + inputs.self.modules.nixos.zsh inputs.home-manager.nixosModules.home-manager inputs.self.modules.nixos."${username}" # inputs.self.modules.nixos.step-ca diff --git a/modules/hosts/john-pc-ubuntu.nix b/modules/hosts/john-pc-ubuntu.nix index 2725cdc..7604b92 100644 --- a/modules/hosts/john-pc-ubuntu.nix +++ b/modules/hosts/john-pc-ubuntu.nix @@ -5,8 +5,8 @@ in { flake.modules.homeManager."${hostname}" = { pkgs, config, ... }: { imports = with inputs.self.modules.homeManager; [ - # base rebuild + zsh john desktop docker diff --git a/modules/users/john.nix b/modules/users/john.nix index 1c2ed50..78f31d5 100644 --- a/modules/users/john.nix +++ b/modules/users/john.nix @@ -28,6 +28,7 @@ in }; }; + # This gets imported by the user factory: homeManager."${username}" = { home.stateVersion = "25.11"; xdg.enable = true; @@ -42,22 +43,4 @@ in } ]; }; - - # This is the base homeConfiguration for the john user that will be used if no other - flake.homeConfigurations."${username}" = inputs.home-manager.lib.homeManagerConfiguration { - pkgs = import inputs.nixpkgs { system = "x86_64-linux"; }; - modules = [ - inputs.self.modules.homeManager.base - inputs.self.modules.homeManager."${username}" - - # Include another inline module to set the options created through the jsl-home modules - { - docker.enable = false; - ssh.matchSets = { - certs = true; - homelab = true; - }; - } - ]; - }; }