From 83e9a001db75d37742612958c27407294c527fab Mon Sep 17 00:00:00 2001 From: Emile Clark-Boman Date: Sat, 31 Jan 2026 08:37:39 +1000 Subject: [PATCH] hyrule use bashistrans.nix --- hosts/hyrule/default.nix | 29 ++--------------------------- hosts/modules/bashistrans.nix | 32 ++++++++++++++++++-------------- 2 files changed, 20 insertions(+), 41 deletions(-) diff --git a/hosts/hyrule/default.nix b/hosts/hyrule/default.nix index 72cf59f..c87d1ba 100755 --- a/hosts/hyrule/default.nix +++ b/hosts/hyrule/default.nix @@ -1,8 +1,6 @@ { pkgs, pkgs-unstable, - inputs, - lib, ... }: let home-manager = builtins.fetchTarball { @@ -20,6 +18,7 @@ in { #../modules/server/nginx.nix #../modules/server/ssh.nix #../modules/server/fail2ban.nix + ../modules/bashistrans.nix ]; nix.settings = { @@ -33,15 +32,6 @@ in { ]; }; - # nixpkgs.config.allowUnfreePredicate = let - # whitelist = map lib.getName [ - # "minecraft-server" - # pkgs.minecraft-server - # pkgs-unstable.minecraft-server - # ]; - # in - # pkg: builtins.elem (lib.getName pkg) whitelist; - time.timeZone = "Australia/Brisbane"; i18n.defaultLocale = "en_US.UTF-8"; @@ -480,6 +470,7 @@ in { }; }; }; + security = { # accept Lets Encrypt's security policy (for nginx) acme = { @@ -507,21 +498,5 @@ in { helix ]; - programs = { - fish.enable = true; - - bash = { - completion.enable = true; - - 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 } diff --git a/hosts/modules/bashistrans.nix b/hosts/modules/bashistrans.nix index d3b285c..e9d74ae 100644 --- a/hosts/modules/bashistrans.nix +++ b/hosts/modules/bashistrans.nix @@ -2,22 +2,26 @@ # I want to use fish as my login shell but it always goes terrible # cause it isn't POSIX compliant, so instead Bash is my login and # will just exec fish (^-^) - programs.bash = { - blesh.enable = false; # ble.sh replacement for GNU readline - completion.enable = true; + programs = { + fish.enable = true; - interactiveShellInit = '' - # help bash transition into a beautiful fish! - if [[ -z $CRY_BASH_IS_TRANS ]] - then - if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] + bash = { + blesh.enable = false; # ble.sh replacement for GNU readline + completion.enable = true; + + interactiveShellInit = '' + # help bash transition into a beautiful fish! + if [[ -z $CRY_BASH_IS_TRANS ]] then - shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION="" - exec ${pkgs.fish}/bin/fish $LOGIN_OPTION + 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 fi - fi - # bash is trans now! (no more transitioning required) - export CRY_BASH_IS_TRANS=true - ''; + # bash is trans now! (no more transitioning required) + export CRY_BASH_IS_TRANS=true + ''; + }; }; }