Improve bash handling

This commit is contained in:
Root 2021-01-14 15:43:22 -08:00
parent 7486922c1d
commit d0973c9448
2 changed files with 50 additions and 31 deletions

View File

@ -16,19 +16,14 @@ in {
hardware.bluetooth.enable = false;
imports = [
../defaults.nix
../hardware-configuration.nix
];
imports = [ ../defaults.nix ../hardware-configuration.nix ];
fudo.common = {
profile = "server";
site = "seattle";
};
fudo.slynk = {
enable = true;
};
fudo.slynk = { enable = true; };
networking = {
hostName = hostname;
@ -56,37 +51,31 @@ in {
extif0 = {
useDHCP = false;
macAddress = "02:50:f6:52:9f:9d";
ipv4.addresses = [
{
address = host-internal-ip;
prefixLength = 22;
}
# {
# address = "10.0.10.2";
# prefixLength = 24;
# }
];
ipv4.addresses = [{
address = host-internal-ip;
prefixLength = 22;
}
# {
# address = "10.0.10.2";
# prefixLength = 24;
# }
];
};
storageif0 = {
useDHCP = false;
macAddress = "02:65:d7:00:7d:1b";
ipv4.addresses = [
{
address = host-storage-ip;
prefixLength = 24;
}
];
ipv4.addresses = [{
address = host-storage-ip;
prefixLength = 24;
}];
};
};
};
services = {
ipfs = {
enable = true;
apiAddress = "/ip4/${host-internal-ip}/tcp/5001";
autoMount = true;
enableGC = true;
};
fudo.ipfs = {
enable = true;
users = [ "niten" ];
api-address = "/ip4/${host-internal-ip}/tcp/5001";
};
}

View File

@ -6,12 +6,34 @@ let
in {
programs = {
bash = {
enable = true;
shellAliases = {
".." = "cd ..";
"..." = "cd ../..";
la = "ls -a";
ll = "ls -l";
lla = "ls -la";
rm = "rm --one-file-system --preserve-root";
};
extraInit = ''
case $TERM in
screen|xterm*|rxvt*)
shopt -s checkwinsize
;;
*)
export LS_OPTIONS=""
;;
esac
'';
};
git = {
enable = true;
userName = name;
userEmail = email;
};
};
xresources.properties = {
@ -51,5 +73,13 @@ in {
'';
};
};
sessionVariables = {
EDITOR = "emacsclient -t";
ALTERNATE_EDITOR = "";
# Don't put duplicates or whitespace in bash history
HISTCONTROL = "ignoredups:ignorespace";
};
};
}