From bf4148dab0ccad4cb0b85cf65c714f5a4bdca554 Mon Sep 17 00:00:00 2001 From: Evan Reichard Date: Mon, 22 Sep 2025 19:05:18 -0400 Subject: [PATCH] split bash from ghostty --- .../evanreichard@lin-va-terminal/default.nix | 34 +--------- .../programs/graphical/ghostty/default.nix | 62 ++---------------- .../programs/terminal/bash/config/.gitignore | 3 + .../bash}/config/fastfetch.jsonc | 0 .../home/programs/terminal/bash/default.nix | 65 +++++++++++++++++++ modules/nixos/services/sunshine/default.nix | 20 ++++++ .../x86_64-linux/lin-va-terminal/default.nix | 20 +----- 7 files changed, 97 insertions(+), 107 deletions(-) create mode 100755 modules/home/programs/terminal/bash/config/.gitignore rename modules/home/programs/{graphical/ghostty => terminal/bash}/config/fastfetch.jsonc (100%) create mode 100755 modules/home/programs/terminal/bash/default.nix create mode 100644 modules/nixos/services/sunshine/default.nix diff --git a/homes/x86_64-linux/evanreichard@lin-va-terminal/default.nix b/homes/x86_64-linux/evanreichard@lin-va-terminal/default.nix index 2a7c7f5..22de194 100755 --- a/homes/x86_64-linux/evanreichard@lin-va-terminal/default.nix +++ b/homes/x86_64-linux/evanreichard@lin-va-terminal/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, config, namespace, ... }: +{ lib, config, namespace, ... }: let inherit (lib.${namespace}) enabled; in @@ -13,23 +13,11 @@ in services = { ssh-agent = enabled; - fusuma = enabled; - swww = enabled; }; programs = { - graphical = { - wms.hyprland = enabled; - ghostty = enabled; - ghidra = enabled; - browsers.firefox = { - enable = true; - gpuAcceleration = true; - hardwareDecoding = true; - }; - }; - terminal = { + bash = enabled; btop = enabled; direnv = enabled; git = enabled; @@ -39,24 +27,6 @@ in }; }; - dconf = { - settings = { - "org/gnome/desktop/interface" = { - color-scheme = "prefer-dark"; - cursor-theme = "catppuccin-macchiato-mauve-cursors"; - cursor-size = 24; - }; - }; - }; - - - home.pointerCursor = { - gtk.enable = true; - name = "catppuccin-macchiato-mauve-cursors"; - package = pkgs.catppuccin-cursors.macchiatoMauve; - size = 24; - }; - # SQLite Configuration home.file.".sqliterc".text = '' .headers on diff --git a/modules/home/programs/graphical/ghostty/default.nix b/modules/home/programs/graphical/ghostty/default.nix index 0408970..f33dca3 100755 --- a/modules/home/programs/graphical/ghostty/default.nix +++ b/modules/home/programs/graphical/ghostty/default.nix @@ -10,68 +10,14 @@ in }; config = mkIf cfg.enable { - programs.bash = { - enable = true; - shellAliases = { - grep = "grep --color"; - ssh = "TERM=xterm-256color ssh"; - flush_dns = "sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder"; - hs = "kubectl exec -n headscale $(kubectl get pod -n headscale -o name) -- headscale"; - }; - profileExtra = '' - # Source Nix daemon - # if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then - # . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' - # fi + # Enable Bash + ${namespace}.programs.terminal.bash.enable = true; - SHELL="$BASH" - PATH=~/.bin:$PATH - bind "set show-mode-in-prompt on" - - set -o vi || true - VISUAL=vim - EDITOR="$VISUAL" - - fastfetch - eval "$(thefuck --alias)" - ''; - }; - - programs.powerline-go = { - enable = true; - settings = { - git-mode = "compact"; - theme = "gruvbox"; - }; - modules = [ - "host" - "cwd" - "git" - "docker" - "venv" - ]; - }; - - programs.readline = { - enable = true; - extraConfig = '' - # Approximate VIM Dracula Colors - set vi-ins-mode-string \1\e[01;38;5;23;48;5;231m\2 I \1\e[38;5;231;48;5;238m\2\1\e[0m\2 - set vi-cmd-mode-string \1\e[01;38;5;22;48;5;148m\2 C \1\e[38;5;148;48;5;238m\2\1\e[0m\2 - ''; - }; - - home.packages = with pkgs; [ - thefuck - fastfetch - bashInteractive - nerd-fonts.meslo-lg - ] ++ optionals isLinux [ - # Pending Darwin @ https://github.com/NixOS/nixpkgs/pull/369788 + # Pending Darwin @ https://github.com/NixOS/nixpkgs/pull/369788 + home.packages = with pkgs; optionals isLinux [ ghostty ]; - home.file.".config/fastfetch/config.jsonc".text = builtins.readFile ./config/fastfetch.jsonc; home.file.".config/ghostty/config".text = let bashPath = "${pkgs.bashInteractive}/bin/bash"; diff --git a/modules/home/programs/terminal/bash/config/.gitignore b/modules/home/programs/terminal/bash/config/.gitignore new file mode 100755 index 0000000..3e64c44 --- /dev/null +++ b/modules/home/programs/terminal/bash/config/.gitignore @@ -0,0 +1,3 @@ +_scratch +.direnv +.envrc diff --git a/modules/home/programs/graphical/ghostty/config/fastfetch.jsonc b/modules/home/programs/terminal/bash/config/fastfetch.jsonc similarity index 100% rename from modules/home/programs/graphical/ghostty/config/fastfetch.jsonc rename to modules/home/programs/terminal/bash/config/fastfetch.jsonc diff --git a/modules/home/programs/terminal/bash/default.nix b/modules/home/programs/terminal/bash/default.nix new file mode 100755 index 0000000..ec8ba6d --- /dev/null +++ b/modules/home/programs/terminal/bash/default.nix @@ -0,0 +1,65 @@ +{ pkgs, lib, config, namespace, ... }: +let + inherit (lib) mkIf; + cfg = config.${namespace}.programs.terminal.bash; +in +{ + options.${namespace}.programs.terminal.bash = { + enable = lib.mkEnableOption "bash"; + }; + + config = mkIf cfg.enable { + programs.bash = { + enable = true; + shellAliases = { + grep = "grep --color"; + ssh = "TERM=xterm-256color ssh"; + }; + profileExtra = '' + SHELL="$BASH" + PATH=~/.bin:$PATH + bind "set show-mode-in-prompt on" + + set -o vi || true + VISUAL=vim + EDITOR="$VISUAL" + + fastfetch + eval "$(thefuck --alias)" + ''; + }; + + programs.powerline-go = { + enable = true; + settings = { + git-mode = "compact"; + theme = "gruvbox"; + }; + modules = [ + "host" + "cwd" + "git" + "docker" + "venv" + ]; + }; + + programs.readline = { + enable = true; + extraConfig = '' + # Approximate VIM Dracula Colors + set vi-ins-mode-string \1\e[01;38;5;23;48;5;231m\2 I \1\e[38;5;231;48;5;238m\2\1\e[0m\2 + set vi-cmd-mode-string \1\e[01;38;5;22;48;5;148m\2 C \1\e[38;5;148;48;5;238m\2\1\e[0m\2 + ''; + }; + + home.packages = with pkgs; [ + thefuck + fastfetch + bashInteractive + nerd-fonts.meslo-lg + ]; + + home.file.".config/fastfetch/config.jsonc".text = builtins.readFile ./config/fastfetch.jsonc; + }; +} diff --git a/modules/nixos/services/sunshine/default.nix b/modules/nixos/services/sunshine/default.nix new file mode 100644 index 0000000..c8d7235 --- /dev/null +++ b/modules/nixos/services/sunshine/default.nix @@ -0,0 +1,20 @@ +{ config, lib, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + inherit (lib.${namespace}) mkBoolOpt; + + cfg = config.${namespace}.services.sunshine; +in +{ + options.${namespace}.services.sunshine = { + enable = mkEnableOption "enable sunshine service"; + openFirewall = mkBoolOpt true "open firewall"; + }; + + config = mkIf cfg.enable { + services.sunshine = { + enable = true; + openFirewall = cfg.openFirewall; + }; + }; +} diff --git a/systems/x86_64-linux/lin-va-terminal/default.nix b/systems/x86_64-linux/lin-va-terminal/default.nix index 1e528d1..aa2b74f 100755 --- a/systems/x86_64-linux/lin-va-terminal/default.nix +++ b/systems/x86_64-linux/lin-va-terminal/default.nix @@ -1,4 +1,4 @@ -{ namespace, lib, ... }: +{ namespace, pkgs, lib, ... }: let inherit (lib.${namespace}) enabled; in @@ -24,34 +24,20 @@ in enable = true; useStatic = { interface = "enX0"; - address = "10.0.50.240"; + address = "10.0.50.30"; defaultGateway = "10.0.50.254"; nameservers = [ "10.0.50.254" ]; }; }; }; - hardware = { - opengl = { - enable = true; - enable32Bit = true; - enableIntel = true; - }; - }; - services = { + openssh = enabled; avahi = enabled; - ydotool = enabled; }; virtualisation = { podman = enabled; }; - - programs = { - graphical = { - wms.hyprland = enabled; - }; - }; }; }