This commit is contained in:
John Lancaster
2025-06-30 22:45:04 -05:00
parent c954124c13
commit 57d59a9dea
5 changed files with 53 additions and 23 deletions

View File

@@ -16,12 +16,11 @@
lib = pkgs.lib;
in
{
homeManagerModules.default = { config, pkgs, ... }: {
homeManagerModules.default = { ... }: {
imports = [
./options.nix
./home.nix
./git.nix
./shell.nix
];
};
};

View File

@@ -3,12 +3,15 @@
programs.git = lib.mkMerge [
{
enable = true;
extraConfig.credential.helper = "store --file ~/.git-credentials";
extraConfig = {
credential.helper = "store --file ~/.git-credentials";
init.defaultBranch = "main";
push.autoSetupRemote = true;
};
}
(lib.mkIf (config.profile == "personal") {
userName = "John Lancaster";
userEmail = "32917998+jsl12@users.noreply.github.com";
})
(lib.mkIf (config.profile == "work") {
userName = "John Lancaster";

View File

@@ -86,5 +86,39 @@
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# programs.ssh.enable = true;
programs.zsh = lib.mkIf config.shell {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
oh-my-zsh = {
enable = true;
theme = "risto";
plugins = [
"sudo"
"dotenv"
"git"
"ssh"
"ssh-agent"
];
};
shellAliases.ls = "${pkgs.eza}/bin/eza -lgos type --no-time";
};
programs.ssh = lib.mkIf config.ssh {
enable = true;
extraConfig = ''
SetEnv TERM="xterm-256color"
'';
matchBlocks = lib.mkIf (config.profile == "personal") {
"panoptes" = {
hostname = "192.168.1.107";
user = "panoptes";
};
"pve5070" = {
hostname = "192.168.1.130";
user = "root";
};
};
};
}

View File

@@ -11,4 +11,16 @@
default = "personal";
description = "Profile type for the Home Manager configuration.";
};
options.shell = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Whether to enable all the zsh stuff";
};
options.ssh = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Whether to enable SSH configuration";
};
}

View File

@@ -1,18 +0,0 @@
{ lib, pkgs, ... }:
{
home.shell.enableZshIntegration = true;
programs.zsh = {
enable = true;
oh-my-zsh = {
enable = true;
theme = "risto";
plugins = [
"sudo"
"dotenv"
"git"
"ssh"
"ssh-agent"
];
};
shellAliases.ls = "${pkgs.eza}/bin/eza -lgos type --no-time";
};