From ed7ebb0802d0e0d4360d74cbac347a90fa7e0f87 Mon Sep 17 00:00:00 2001 From: ryan4yin Date: Sun, 7 May 2023 16:46:59 +0800 Subject: [PATCH] fix: starship with bash, vscode --- home/hyprland/hypr-conf/waybar/config | 2 +- home/programs/browsers.nix | 36 ++++++++++++++------------- home/programs/common.nix | 4 ++- home/shell/default.nix | 5 ++++ home/shell/starship.nix | 2 -- 5 files changed, 28 insertions(+), 21 deletions(-) diff --git a/home/hyprland/hypr-conf/waybar/config b/home/hyprland/hypr-conf/waybar/config index 316a2199..52dc7766 100644 --- a/home/hyprland/hypr-conf/waybar/config +++ b/home/hyprland/hypr-conf/waybar/config @@ -118,7 +118,7 @@ // waybar-cpu "cpu": { "interval": 5, - "format": " LOAD: {usage}%", + "format": " LOAD: {usage}%", }, // waybar-custom "custom/menu": { diff --git a/home/programs/browsers.nix b/home/programs/browsers.nix index aa5b2bea..45a0bbf8 100644 --- a/home/programs/browsers.nix +++ b/home/programs/browsers.nix @@ -3,23 +3,25 @@ nixpkgs-stable, config, ... -}: { - home.packages = - let - pkgs-stable = import nixpkgs-stable { - system = pkgs.system; - config.allowUnfree = true; - }; - in - with pkgs-stable; [ - firefox-wayland +}: let + pkgs-stable = import nixpkgs-stable { + system = pkgs.system; + config.allowUnfree = true; +}; + in { + home.packages = with pkgs-stable; [ + firefox-wayland - # chrome wayland support was broken on nixos-unstable branch, so fallback to stable branch for now - # https://github.com/swaywm/sway/issues/7562 - google-chrome - vscode - ]; + # chrome wayland support was broken on nixos-unstable branch, so fallback to stable branch for now + # https://github.com/swaywm/sway/issues/7562 + google-chrome + ]; - # programs = { - # }; + programs.vscode = { + enable = true; + package = pkgs-stable.vscode; # use the stable version + + # let vscode sync and update its configuration & extensions across devices, using github account. + # userSettings = {}; + }; } diff --git a/home/programs/common.nix b/home/programs/common.nix index dd26ade9..7db70592 100644 --- a/home/programs/common.nix +++ b/home/programs/common.nix @@ -116,8 +116,10 @@ exa.enable = true; # A modern replacement for ‘ls’ jq.enable = true; # A lightweight and flexible command-line JSON processor ssh.enable = true; - aria2.enable = true; + aria2.enable = true; # a + # skim provides a single executable: sk. + # Basically anywhere you would want to use grep, try sk instead. skim = { enable = true; enableZshIntegration = true; diff --git a/home/shell/default.nix b/home/shell/default.nix index 81d1f2cd..068e2d61 100644 --- a/home/shell/default.nix +++ b/home/shell/default.nix @@ -10,6 +10,11 @@ in { ./terminals.nix ]; + programs.bash = { + enable = true; + enableCompletion = true; + }; + # add environment variables # 注意不要用 home.sessionVariables 或 home.xxx.sessionVariables,这俩参数没用 systemd.user.sessionVariables = { diff --git a/home/shell/starship.nix b/home/shell/starship.nix index 9f758a93..9fa9a629 100644 --- a/home/shell/starship.nix +++ b/home/shell/starship.nix @@ -1,6 +1,4 @@ {config, ...}: { - systemd.user.sessionVariables.STARSHIP_CACHE = "${config.xdg.cacheHome}/starship"; - programs.starship = { enable = true; settings = {