colmena override bash->fish maintain posix compliance, and began make wishlist.nix flake

This commit is contained in:
Emile Clark-Boman 2025-02-13 14:47:33 +10:00
parent d39ba5da80
commit 20d938a506
5 changed files with 220 additions and 41 deletions

View file

@ -20,10 +20,16 @@ in {
#../modules/server/fail2ban.nix
];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nix.settings = {
# make wheel group trusted users allows my "ae" user
# to import packages not signed by a trusted key
# (aka super duper easier to remote deploy)
trusted-users = ["root" "@wheel"];
experimental-features = [
"nix-command"
"flakes"
];
};
time.timeZone = "Australia/Brisbane";
@ -70,6 +76,9 @@ in {
};
};
# grant passwordless sudo to wheel group
security.sudo.wheelNeedsPassword = false;
users = {
defaultUserShell = pkgs.bash;
@ -150,6 +159,17 @@ in {
];
programs = {
fish.enable = true;
bash = {
interactiveShellInit = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
};
system.stateVersion = "24.11"; # DO NOT MODIFY