Swap default login shell for bash
Add readline variables to configure bash, add ~/.inputrc to rsync-local-config.sh
This commit is contained in:
parent
ca6997fb9a
commit
e16ea740c9
19
flake.nix
19
flake.nix
|
@ -73,7 +73,7 @@
|
|||
system ? "x86_64-linux",
|
||||
username ? "pixelifytica",
|
||||
hostName ? "Atlas",
|
||||
loginShell ? "zsh",
|
||||
loginShell ? "bash",
|
||||
...
|
||||
}: [
|
||||
home-manager.nixosModules.home-manager
|
||||
|
@ -89,7 +89,7 @@
|
|||
networking = {inherit hostName;};
|
||||
nix.settings.trusted-users = [username];
|
||||
services.greetd.settings.initial_session.user = username;
|
||||
programs.${loginShell}.enable = true;
|
||||
programs.${loginShell} = lib.mkIf (loginShell != "bash") {enable = true;};
|
||||
users.users.${username} = {
|
||||
shell = pkgs.${loginShell};
|
||||
group = "users";
|
||||
|
@ -137,53 +137,48 @@
|
|||
system = "x86_64-linux";
|
||||
username = "pixelifytica";
|
||||
hostName = "Legion";
|
||||
loginShell = "zsh";
|
||||
in
|
||||
nixpkgs.lib.nixosSystem {
|
||||
specialArgs = defaultSpecialArgs {inherit system;};
|
||||
modules = defaultModules {inherit system username hostName loginShell;};
|
||||
modules = defaultModules {inherit system username hostName;};
|
||||
};
|
||||
## Personal
|
||||
Northstar = let
|
||||
system = "x86_64-linux";
|
||||
username = "pixelifytica";
|
||||
hostName = "Northstar";
|
||||
loginShell = "zsh";
|
||||
in
|
||||
nixpkgs.lib.nixosSystem {
|
||||
specialArgs = defaultSpecialArgs {inherit system;};
|
||||
modules = defaultModules {inherit system username hostName loginShell;};
|
||||
modules = defaultModules {inherit system username hostName;};
|
||||
};
|
||||
Vanguard = let
|
||||
system = "x86_64-linux";
|
||||
username = "pixelifytica";
|
||||
hostName = "Vanguard";
|
||||
loginShell = "zsh";
|
||||
in
|
||||
nixpkgs.lib.nixosSystem {
|
||||
specialArgs = defaultSpecialArgs {inherit system;};
|
||||
modules = defaultModules {inherit system username hostName loginShell;};
|
||||
modules = defaultModules {inherit system username hostName;};
|
||||
};
|
||||
## Work
|
||||
Tone = let
|
||||
system = "x86_64-linux";
|
||||
username = "elitherl";
|
||||
hostName = "Tone";
|
||||
loginShell = "zsh";
|
||||
in
|
||||
nixpkgs.lib.nixosSystem {
|
||||
specialArgs = defaultSpecialArgs {inherit system;};
|
||||
modules = defaultModules {inherit system username hostName loginShell;};
|
||||
modules = defaultModules {inherit system username hostName;};
|
||||
};
|
||||
Scorch = let
|
||||
system = "x86_64-linux";
|
||||
username = "elitherl";
|
||||
hostName = "Scorch";
|
||||
loginShell = "zsh";
|
||||
in
|
||||
nixpkgs.lib.nixosSystem {
|
||||
specialArgs = defaultSpecialArgs {inherit system;};
|
||||
modules = defaultModules {inherit system username hostName loginShell;};
|
||||
modules = defaultModules {inherit system username hostName;};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
HOSTS=("$@")
|
||||
# Config files
|
||||
for TARGET in bat starship.toml; do
|
||||
SOURCE="$HOME/.config/$TARGET"
|
||||
for TARGET in ".inputrc" ".config/bat/" ".config/starship.toml"; do
|
||||
SOURCE="$HOME/$TARGET"
|
||||
echo "--- $SOURCE ---"
|
||||
TMP_TARGET=/tmp/rsync-local-config
|
||||
TMP_SOURCE=$TMP_TARGET
|
||||
|
@ -16,7 +16,7 @@ for TARGET in bat starship.toml; do
|
|||
rsync -avzL --exclude=".git*" --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r "$SOURCE" $TMP_TARGET
|
||||
sh -c "$NIX_REPLACE"
|
||||
for HOST in "${HOSTS[@]}"; do
|
||||
rsync -avzL --delete --exclude=".git*" $TMP_SOURCE "$HOST:.config/$TARGET"
|
||||
rsync -avzL --delete --exclude=".git*" $TMP_SOURCE "$HOST:$TARGET"
|
||||
done
|
||||
rm -rf $TMP_SOURCE
|
||||
fi
|
||||
|
|
|
@ -13,7 +13,10 @@
|
|||
du-dust
|
||||
];
|
||||
programs = {
|
||||
bash.enable = true;
|
||||
bash = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
};
|
||||
bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
|
@ -39,6 +42,23 @@
|
|||
fileWidgetCommand = "${pkgs.fd}/bin/fd --type f";
|
||||
};
|
||||
jq.enable = true;
|
||||
readline = {
|
||||
enable = true;
|
||||
variables = {
|
||||
bell-style = "visible";
|
||||
blink-matching-paren = "On";
|
||||
colored-completion-prefix = "On";
|
||||
colored-stats = "On";
|
||||
completion-ignore-case = "On";
|
||||
completion-map-case = "On";
|
||||
editing-mode = "emacs";
|
||||
expand-tilde = "On";
|
||||
horizontal-scroll-mode = "On";
|
||||
mark-directories = "On";
|
||||
mark-symlinked-directories = "On";
|
||||
visible-stats = "On";
|
||||
};
|
||||
};
|
||||
ripgrep.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue