added enable options to termina modules.

This commit is contained in:
Gabe Venberg 2024-05-29 15:18:13 -05:00
parent 6f0e167087
commit 3eee4e105d
16 changed files with 358 additions and 298 deletions

View file

@ -4,10 +4,13 @@
lib, lib,
... ...
}: { }: {
options.user.btop.enable = lib.mkEnableOption "enable btop";
config = lib.mkIf config.user.btop.enable {
programs.btop = { programs.btop = {
enable = true; enable = true;
settings = { settings = {
vim_keys = true; vim_keys = true;
}; };
}; };
};
} }

View file

@ -0,0 +1,22 @@
{
config,
pkgs,
lib,
...
}: {
imports=[
./nushell
./zellij
./btop.nix
./direnv.nix
./git.nix
./gpg.nix
./irssi.nix
./pass.nix
./ssh-agent.nix
./starship.nix
./tiny-irc.nix
./voice.nix
./zsh.nix
];
}

View file

@ -4,8 +4,11 @@
lib, lib,
... ...
}: { }: {
options.user.direnv.enable = lib.mkEnableOption "enable direnv";
config= lib.mkIf config.user.direnv.enable{
programs.direnv = { programs.direnv = {
enable = true; enable = true;
nix-direnv.enable = true; nix-direnv.enable = true;
}; };
};
} }

View file

@ -6,6 +6,7 @@
}: { }: {
options = { options = {
user.git = { user.git = {
enable= lib.mkEnableOption "enable git";
workProfile = { workProfile = {
enable = lib.mkEnableOption "git work profile"; enable = lib.mkEnableOption "git work profile";
email = lib.mkOption { email = lib.mkOption {
@ -26,7 +27,7 @@
}; };
}; };
config = { config = lib.mkIf config.user.git.enable {
programs.git = { programs.git = {
enable = true; enable = true;
aliases = { aliases = {

View file

@ -4,6 +4,8 @@
lib, lib,
... ...
}: { }: {
options.user.gpg.enable = lib.mkEnableOption "enable gpg";
config = lib.mkIf config.user.gpg.enable {
programs.gpg.enable = true; programs.gpg.enable = true;
services.gpg-agent = { services.gpg-agent = {
@ -11,4 +13,5 @@
enableSshSupport = true; enableSshSupport = true;
pinentryPackage = lib.mkDefault pkgs.pinentry-tty; pinentryPackage = lib.mkDefault pkgs.pinentry-tty;
}; };
};
} }

View file

@ -4,6 +4,8 @@
lib, lib,
... ...
}: { }: {
options.user.irssi.enable = lib.mkEnableOption "enable irssi";
config = lib.mkIf config.user.irssi.enable {
programs.irssi = { programs.irssi = {
enable = true; enable = true;
networks = { networks = {
@ -35,4 +37,5 @@
}; };
}; };
}; };
};
} }

View file

@ -1,30 +1,36 @@
{ {
config, config,
lib,
pkgs, pkgs,
... ...
}: { }: {
options.user.nushell.enable = lib.mkEnableOption "enable nushell";
config = lib.mkIf config.user.nushell.enable {
home.file = {
".config/nushell/completions".source = ./completions;
};
programs = {
#sessionVariables, sessionPath and shellAliases are not applied to nushell. #sessionVariables, sessionPath and shellAliases are not applied to nushell.
programs.nushell = { nushell = {
enable = true; enable = true;
configFile.source = ./config.nu; configFile.source = ./config.nu;
envFile.source = ./env.nu; envFile.source = ./env.nu;
}; };
home.file = { yazi.enableNushellIntegration = true;
".config/nushell/completions".source = ./completions; zoxide.enableNushellIntegration = true;
}; starship.enableNushellIntegration = true;
eza.enableNushellIntegration = true;
programs.yazi.enableNushellIntegration = true; carapace = {
programs.zoxide.enableNushellIntegration = true;
programs.starship.enableNushellIntegration = true;
programs.carapace = {
enable = true; enable = true;
enableNushellIntegration = true; enableNushellIntegration = true;
}; };
programs.direnv.enableNushellIntegration = true; direnv.enableNushellIntegration = true;
services.gpg-agent.enableNushellIntegration = true; };
services = {
services.pueue = { gpg-agent.enableNushellIntegration = true;
pueue = {
enable = true; enable = true;
settings = { settings = {
daemon = { daemon = {
@ -32,4 +38,6 @@
}; };
}; };
}; };
};
};
} }

View file

@ -4,6 +4,8 @@
lib, lib,
... ...
}: { }: {
options.user.pass.enable = lib.mkEnableOption "enable pass password manager";
config = lib.mkIf config.user.pass.enable {
programs.password-store = { programs.password-store = {
enable = true; enable = true;
settings = { settings = {
@ -14,4 +16,5 @@
programs.nushell.extraEnv = '' programs.nushell.extraEnv = ''
$env.PASSWORD_STORE_DIR = ($env.HOME | path join "keys" "password-store") $env.PASSWORD_STORE_DIR = ($env.HOME | path join "keys" "password-store")
''; '';
};
} }

View file

@ -4,8 +4,11 @@
lib, lib,
... ...
}: { }: {
options.user.ssh-agent.enable = lib.mkEnableOption "enable ssh-agent";
config = lib.mkIf config.user.ssh-agent.enable {
services.ssh-agent.enable = true; services.ssh-agent.enable = true;
programs.nushell.extraEnv = '' programs.nushell.extraEnv = ''
$env.SSH_AUTH_SOCK = $"($env.XDG_RUNTIME_DIR)/ssh-agent" $env.SSH_AUTH_SOCK = $"($env.XDG_RUNTIME_DIR)/ssh-agent"
''; '';
};
} }

View file

@ -4,6 +4,8 @@
lib, lib,
... ...
}: { }: {
options.user.starship.enable = lib.mkEnableOption "enable starship prompt";
config = lib.mkIf config.user.starship.enable {
programs.starship = { programs.starship = {
enable = true; enable = true;
settings = { settings = {
@ -106,4 +108,5 @@
character.disabled = false; character.disabled = false;
}; };
}; };
};
} }

View file

@ -4,6 +4,8 @@
lib, lib,
... ...
}: { }: {
options.user.tiny.enable=lib.mkEnableOption "enable tiny irc client";
config=lib.mkIf config.user.tiny.enable {
programs.tiny = { programs.tiny = {
enable = true; enable = true;
settings = { settings = {
@ -31,9 +33,6 @@
]; ];
sasl = { sasl = {
username = "toric"; username = "toric";
# password = {
# command = "pass show libera";
# };
pem = "${config.home.homeDirectory}/keys/certs/irc.pem"; pem = "${config.home.homeDirectory}/keys/certs/irc.pem";
}; };
} }
@ -47,4 +46,4 @@
}; };
}; };
}; };
} };}

View file

@ -4,13 +4,9 @@
lib, lib,
... ...
}: { }: {
options = { options.user.enable-speech = lib.mkEnableOption "espeak";
user.enable-speech = lib.mkEnableOption "espeak";
};
config = config = lib.mkIf config.user.enable-speech {
lib.mkIf config.user.enable-speech
{
home.shellAliases = { home.shellAliases = {
say = "espeak -p 10 -s 150 -a 200"; say = "espeak -p 10 -s 150 -a 200";
}; };

View file

@ -1,10 +1,14 @@
{ {
config, config,
lib,
pkgs, pkgs,
... ...
}: { }: {
options.user.zellij.enable = lib.mkEnableOption "enable zellij";
config = lib.mkIf config.user.zellij.enable {
programs.zellij.enable = true; programs.zellij.enable = true;
home.file = { home.file = {
".config/zellij/config.kdl".source = ./config.kdl; ".config/zellij/config.kdl".source = ./config.kdl;
}; };
};
} }

View file

@ -4,18 +4,18 @@
lib, lib,
... ...
}: { }: {
programs.starship.enableZshIntegration = true; options.user.zsh.enable = lib.mkEnableOption "enable zsh";
programs.fzf.enableZshIntegration = true; config = lib.mkIf config.user.zsh.enable {
programs.zoxide.enableZshIntegration = true; programs = {
programs.yazi.enableZshIntegration = true; starship.enableZshIntegration = true;
programs.direnv.enableZshIntegration = true; fzf.enableZshIntegration = true;
programs.kitty.shellIntegration.enableZshIntegration = true; zoxide.enableZshIntegration = true;
services.gpg-agent.enableZshIntegration = true; yazi.enableZshIntegration = true;
programs.carapace.enableZshIntegration = false; eza.enableZshIntegration = true;
home.packages = with pkgs; [ direnv.enableZshIntegration = true;
curl kitty.shellIntegration.enableZshIntegration = true;
]; carapace.enableZshIntegration = false;
programs.zsh = { zsh = {
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;
initExtra = lib.mkMerge [ initExtra = lib.mkMerge [
@ -101,4 +101,10 @@
]; ];
}; };
}; };
};
services.gpg-agent.enableZshIntegration = true;
home.packages = with pkgs; [
curl
];
};
} }

View file

@ -5,16 +5,18 @@
... ...
}: { }: {
imports = [ imports = [
../../modules/home-manager/terminal/zsh.nix ../../modules/home-manager/terminal
../../modules/home-manager/terminal/git.nix
../../modules/home-manager/terminal/zellij
../../modules/home-manager/terminal/ssh-agent.nix
../../modules/home-manager/terminal/direnv.nix
../../modules/home-manager/terminal/btop.nix
../../modules/home-manager/nvim ../../modules/home-manager/nvim
]; ];
user.nvim.enable = true; user = {
btop.enable = true;
direnv.enable = true;
git.enable = true;
ssh-agent.enable = true;
zsh.enable = true;
nvim.enable = true;
};
home.packages = with pkgs; [ home.packages = with pkgs; [
sshfs sshfs
@ -44,6 +46,7 @@
programs = { programs = {
yazi.enable = true; yazi.enable = true;
fzf.enable = true; fzf.enable = true;
eza.enable = true;
ripgrep.enable = true; ripgrep.enable = true;
bat.enable = true; bat.enable = true;
man.enable = true; man.enable = true;

View file

@ -11,10 +11,15 @@
../../modules/home-manager/terminal/tiny-irc.nix ../../modules/home-manager/terminal/tiny-irc.nix
]; ];
user.nvim = { user = {
nushell.enable = true;
starship.enable = true;
tiny.enable = true;
nvim = {
enable-lsp = true; enable-lsp = true;
enable-treesitter = true; enable-treesitter = true;
}; };
};
home.packages = with pkgs; [ home.packages = with pkgs; [
tre-command tre-command
@ -22,11 +27,6 @@
hyperfine hyperfine
]; ];
home.sessionVariables = {
PIPENV_VENV_IN_PROJECT = 1;
POETRY_VIRTUALENVS_IN_PROJECT = 1;
};
programs = { programs = {
zoxide.enable = true; zoxide.enable = true;
tealdeer.enable = true; tealdeer.enable = true;