split zsh config out of home-manager.nix monolith
This commit is contained in:
2
modules/universal/env/default.nix
vendored
2
modules/universal/env/default.nix
vendored
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./home-manager.nix
|
./home-manager
|
||||||
./home-packages.nix
|
./home-packages.nix
|
||||||
./system-packages.nix
|
./system-packages.nix
|
||||||
];
|
];
|
||||||
|
@@ -20,6 +20,10 @@ let
|
|||||||
feeds = import ./feeds.nix { inherit lib; };
|
feeds = import ./feeds.nix { inherit lib; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
./zsh.nix
|
||||||
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
# packages to deploy to the user's home
|
# packages to deploy to the user's home
|
||||||
sane.home-manager.extraPackages = mkOption {
|
sane.home-manager.extraPackages = mkOption {
|
||||||
@@ -45,12 +49,12 @@ in
|
|||||||
config = {
|
config = {
|
||||||
sops.secrets."aerc_accounts" = {
|
sops.secrets."aerc_accounts" = {
|
||||||
owner = config.users.users.colin.name;
|
owner = config.users.users.colin.name;
|
||||||
sopsFile = ../../../secrets/universal/aerc_accounts.conf;
|
sopsFile = ../../../../secrets/universal/aerc_accounts.conf;
|
||||||
format = "binary";
|
format = "binary";
|
||||||
};
|
};
|
||||||
sops.secrets."sublime_music_config" = {
|
sops.secrets."sublime_music_config" = {
|
||||||
owner = config.users.users.colin.name;
|
owner = config.users.users.colin.name;
|
||||||
sopsFile = ../../../secrets/universal/sublime_music_config.json.bin;
|
sopsFile = ../../../../secrets/universal/sublime_music_config.json.bin;
|
||||||
format = "binary";
|
format = "binary";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -91,7 +95,7 @@ in
|
|||||||
initKeyring = {
|
initKeyring = {
|
||||||
after = ["writeBoundary"];
|
after = ["writeBoundary"];
|
||||||
before = [];
|
before = [];
|
||||||
data = "${../../../scripts/init-keyring}";
|
data = "${../../../../scripts/init-keyring}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -259,51 +263,6 @@ in
|
|||||||
programs = {
|
programs = {
|
||||||
home-manager.enable = true; # this lets home-manager manage dot-files in user dirs, i think
|
home-manager.enable = true; # this lets home-manager manage dot-files in user dirs, i think
|
||||||
|
|
||||||
zsh = {
|
|
||||||
enable = true;
|
|
||||||
enableSyntaxHighlighting = true;
|
|
||||||
enableVteIntegration = true;
|
|
||||||
history.ignorePatterns = [ "rm *" ];
|
|
||||||
# history.path = TODO
|
|
||||||
dotDir = ".config/zsh";
|
|
||||||
|
|
||||||
initExtraBeforeCompInit = ''
|
|
||||||
# p10k instant prompt
|
|
||||||
# run p10k configure to configure, but it can't write out its file :-(
|
|
||||||
POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true
|
|
||||||
'';
|
|
||||||
initExtra = ''
|
|
||||||
# zmv is a way to do rich moves/renames, with pattern matching/substitution.
|
|
||||||
# see for an example: <https://filipe.kiss.ink/zmv-zsh-rename/>
|
|
||||||
autoload -Uz zmv
|
|
||||||
|
|
||||||
function nd() {
|
|
||||||
mkdir -p "$1";
|
|
||||||
pushd "$1";
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
|
|
||||||
# prezto = oh-my-zsh fork; controls prompt, auto-completion, etc.
|
|
||||||
# see: https://github.com/sorin-ionescu/prezto
|
|
||||||
prezto = {
|
|
||||||
enable = true;
|
|
||||||
pmodules = [
|
|
||||||
"environment"
|
|
||||||
"terminal"
|
|
||||||
"editor"
|
|
||||||
"history"
|
|
||||||
"directory"
|
|
||||||
"spectrum"
|
|
||||||
"utility"
|
|
||||||
"completion"
|
|
||||||
"prompt"
|
|
||||||
"git"
|
|
||||||
];
|
|
||||||
prompt = {
|
|
||||||
theme = "powerlevel10k";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
kitty = {
|
kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -516,13 +475,6 @@ in
|
|||||||
# "command not found" will cause the command to be searched in nixpkgs
|
# "command not found" will cause the command to be searched in nixpkgs
|
||||||
nix-index.enable = true;
|
nix-index.enable = true;
|
||||||
} // cfg.programs;
|
} // cfg.programs;
|
||||||
|
|
||||||
home.shellAliases = {
|
|
||||||
":q" = "exit";
|
|
||||||
# common typos
|
|
||||||
"cd.." = "cd ..";
|
|
||||||
"cd../" = "cd ../";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
55
modules/universal/env/home-manager/zsh.nix
vendored
Normal file
55
modules/universal/env/home-manager/zsh.nix
vendored
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
home-manager.users.colin.programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
enableSyntaxHighlighting = true;
|
||||||
|
enableVteIntegration = true;
|
||||||
|
history.ignorePatterns = [ "rm *" ];
|
||||||
|
# history.path = TODO
|
||||||
|
dotDir = ".config/zsh";
|
||||||
|
|
||||||
|
initExtraBeforeCompInit = ''
|
||||||
|
# p10k instant prompt
|
||||||
|
# run p10k configure to configure, but it can't write out its file :-(
|
||||||
|
POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true
|
||||||
|
'';
|
||||||
|
initExtra = ''
|
||||||
|
# zmv is a way to do rich moves/renames, with pattern matching/substitution.
|
||||||
|
# see for an example: <https://filipe.kiss.ink/zmv-zsh-rename/>
|
||||||
|
autoload -Uz zmv
|
||||||
|
|
||||||
|
function nd() {
|
||||||
|
mkdir -p "$1";
|
||||||
|
pushd "$1";
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
# prezto = oh-my-zsh fork; controls prompt, auto-completion, etc.
|
||||||
|
# see: https://github.com/sorin-ionescu/prezto
|
||||||
|
prezto = {
|
||||||
|
enable = true;
|
||||||
|
pmodules = [
|
||||||
|
"environment"
|
||||||
|
"terminal"
|
||||||
|
"editor"
|
||||||
|
"history"
|
||||||
|
"directory"
|
||||||
|
"spectrum"
|
||||||
|
"utility"
|
||||||
|
"completion"
|
||||||
|
"prompt"
|
||||||
|
"git"
|
||||||
|
];
|
||||||
|
prompt = {
|
||||||
|
theme = "powerlevel10k";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.colin.home.shellAliases = {
|
||||||
|
":q" = "exit";
|
||||||
|
# common typos
|
||||||
|
"cd.." = "cd ..";
|
||||||
|
"cd../" = "cd ../";
|
||||||
|
};
|
||||||
|
}
|
Reference in New Issue
Block a user