options
This commit is contained in:
@@ -16,12 +16,11 @@
|
||||
lib = pkgs.lib;
|
||||
in
|
||||
{
|
||||
homeManagerModules.default = { config, pkgs, ... }: {
|
||||
homeManagerModules.default = { ... }: {
|
||||
imports = [
|
||||
./options.nix
|
||||
./home.nix
|
||||
./git.nix
|
||||
./shell.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
7
git.nix
7
git.nix
@@ -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";
|
||||
|
||||
36
home.nix
36
home.nix
@@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
12
options.nix
12
options.nix
@@ -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";
|
||||
};
|
||||
}
|
||||
|
||||
18
shell.nix
18
shell.nix
@@ -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";
|
||||
};
|
||||
Reference in New Issue
Block a user