jsl-zsh working as a login shell
This commit is contained in:
@@ -5,7 +5,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.modules.nixos.janus-ca =
|
flake.modules.nixos.janus-ca =
|
||||||
{ config, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.janus-ca;
|
cfg = config.janus-ca;
|
||||||
johnHome = lib.attrByPath [ "users" "users" username "home" ] "/home/${username}" config;
|
johnHome = lib.attrByPath [ "users" "users" username "home" ] "/home/${username}" config;
|
||||||
@@ -58,7 +58,7 @@ in
|
|||||||
nixos.docker
|
nixos.docker
|
||||||
nixos.login-text
|
nixos.login-text
|
||||||
nixos.mtls
|
nixos.mtls
|
||||||
{
|
({ lib, pkgs, ... }: {
|
||||||
networking.hostName = hostname;
|
networking.hostName = hostname;
|
||||||
sops.defaultSopsFile = ../../../keys/secrets.yaml;
|
sops.defaultSopsFile = ../../../keys/secrets.yaml;
|
||||||
step-ssh-host = {
|
step-ssh-host = {
|
||||||
@@ -77,6 +77,12 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
users.users."${username}" = {
|
||||||
|
shell = lib.mkForce (
|
||||||
|
lib.getExe inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.jsl-zsh
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
# users.users."${username}".openssh.authorizedKeys.keys = [
|
# users.users."${username}".openssh.authorizedKeys.keys = [
|
||||||
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMOkGLo4N/L3RYvaIZ1FmePlxa1HK0fMciZxKtRhN58F root@janus"
|
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMOkGLo4N/L3RYvaIZ1FmePlxa1HK0fMciZxKtRhN58F root@janus"
|
||||||
# ];
|
# ];
|
||||||
@@ -87,7 +93,7 @@ in
|
|||||||
];
|
];
|
||||||
docker.enable = true;
|
docker.enable = true;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
+21
-15
@@ -79,6 +79,19 @@ in
|
|||||||
ignorePatterns = [
|
ignorePatterns = [
|
||||||
"ls" "eza" "history" "clear"
|
"ls" "eza" "history" "clear"
|
||||||
];
|
];
|
||||||
|
integrationPackages = with pkgs; [
|
||||||
|
fzf
|
||||||
|
zoxide
|
||||||
|
self'.packages.starship
|
||||||
|
];
|
||||||
|
extraToolPackages = with pkgs; [
|
||||||
|
lazygit
|
||||||
|
lazydocker
|
||||||
|
devenv
|
||||||
|
self'.packages.shell-tools
|
||||||
|
self'.packages.neovim-min
|
||||||
|
];
|
||||||
|
loginBootstrapPath = lib.makeBinPath (integrationPackages ++ extraToolPackages);
|
||||||
aliasStr = lib.concatStringsSep "\n" (
|
aliasStr = lib.concatStringsSep "\n" (
|
||||||
lib.mapAttrsToList (k: v: "alias -- ${lib.escapeShellArg k}=${lib.escapeShellArg v}") {
|
lib.mapAttrsToList (k: v: "alias -- ${lib.escapeShellArg k}=${lib.escapeShellArg v}") {
|
||||||
ls = "eza";
|
ls = "eza";
|
||||||
@@ -116,18 +129,17 @@ in
|
|||||||
ignoreAllDups = true;
|
ignoreAllDups = true;
|
||||||
ignoreSpace = true;
|
ignoreSpace = true;
|
||||||
};
|
};
|
||||||
integrations = {
|
|
||||||
fzf.enable = true;
|
|
||||||
starship = {
|
|
||||||
enable = true;
|
|
||||||
package = self'.packages.starship;
|
|
||||||
};
|
|
||||||
zoxide.enable = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
extraRC = ''
|
extraRC = ''
|
||||||
${homeEndKeyBindings}
|
${homeEndKeyBindings}
|
||||||
|
|
||||||
|
# Login shells may reset PATH before integrations run.
|
||||||
|
export PATH=${lib.escapeShellArg loginBootstrapPath}:$PATH
|
||||||
|
|
||||||
|
source <(fzf --zsh)
|
||||||
|
eval "$(zoxide init zsh)"
|
||||||
|
eval "$(starship init zsh)"
|
||||||
|
|
||||||
HISTFILE=$HOME/.config/zsh/.zsh_history
|
HISTFILE=$HOME/.config/zsh/.zsh_history
|
||||||
SAVEHIST=${toString historySize}
|
SAVEHIST=${toString historySize}
|
||||||
HISTORY_IGNORE=${lib.escapeShellArg "(${lib.concatStringsSep "|" ignorePatterns})"}
|
HISTORY_IGNORE=${lib.escapeShellArg "(${lib.concatStringsSep "|" ignorePatterns})"}
|
||||||
@@ -137,13 +149,7 @@ in
|
|||||||
|
|
||||||
eval "$(devenv hook zsh)"
|
eval "$(devenv hook zsh)"
|
||||||
'';
|
'';
|
||||||
extraPackages = with pkgs; [
|
extraPackages = extraToolPackages;
|
||||||
lazygit
|
|
||||||
lazydocker
|
|
||||||
devenv
|
|
||||||
self'.packages.shell-tools
|
|
||||||
self'.packages.neovim-min
|
|
||||||
];
|
|
||||||
}).wrapper;
|
}).wrapper;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ self, inputs, lib, ... }:
|
{ self, inputs, ... }:
|
||||||
let
|
let
|
||||||
username = "john";
|
username = "john";
|
||||||
baseUserModules = self.factory.user {
|
baseUserModules = self.factory.user {
|
||||||
@@ -20,7 +20,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
flake.modules = {
|
flake.modules = {
|
||||||
nixos."${username}" = { ... }: {
|
nixos."${username}" = { config, pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
baseUserModules.nixos."${username}"
|
baseUserModules.nixos."${username}"
|
||||||
];
|
];
|
||||||
@@ -38,9 +38,6 @@ in
|
|||||||
inputs.self.modules.homeManager.ssh
|
inputs.self.modules.homeManager.ssh
|
||||||
inputs.self.modules.homeManager.git
|
inputs.self.modules.homeManager.git
|
||||||
];
|
];
|
||||||
# home.packages = [
|
|
||||||
# inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.shell-tools
|
|
||||||
# ];
|
|
||||||
xdg.enable = true;
|
xdg.enable = true;
|
||||||
programs.git.settings.user.name = name;
|
programs.git.settings.user.name = name;
|
||||||
programs.git.settings.user.email = email;
|
programs.git.settings.user.email = email;
|
||||||
|
|||||||
Reference in New Issue
Block a user