From fdedda3e069745fa46aedb842b6ae665618e3b8d Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Sun, 2 Jul 2023 21:25:49 +0200 Subject: [PATCH] update font and bash configuration --- nixos/components/gui/style.nix | 10 ++++++-- nixos/components/terminal/bash.nix | 38 ++++++++++++++++++++++++++++++ nixos/modules/default.nix | 4 ++-- nixos/modules/programs/browser.nix | 2 +- nixos/system/all/default.nix | 8 +++---- 5 files changed, 53 insertions(+), 9 deletions(-) create mode 100644 nixos/components/terminal/bash.nix diff --git a/nixos/components/gui/style.nix b/nixos/components/gui/style.nix index e28b0f9..d5adb0f 100644 --- a/nixos/components/gui/style.nix +++ b/nixos/components/gui/style.nix @@ -11,8 +11,14 @@ with lib; stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-light-medium.yaml"; stylix.fonts = { - serif = config.stylix.fonts.monospace; - sansSerif = config.stylix.fonts.monospace; + serif = { + package = pkgs.ubuntu_font_family; + name = "Ubuntu"; + }; + sansSerif = { + package = pkgs.ubuntu_font_family; + name = "Ubuntu"; + }; monospace = { package = pkgs.jetbrains-mono; name = "JetBrains Mono"; diff --git a/nixos/components/terminal/bash.nix b/nixos/components/terminal/bash.nix new file mode 100644 index 0000000..c7bc65d --- /dev/null +++ b/nixos/components/terminal/bash.nix @@ -0,0 +1,38 @@ +{ pkgs, config, lib, ... }: +with lib; +{ + options.components.terminal.bash.enable = mkOption { + type = lib.types.bool; + default = config.components.terminal.enable; + }; + + config = mkIf (config.components.terminal.bash.enable) { + + programs.bash = { + + enable = true; + enableCompletion = true; + syntaxHighlighting.enable = true; + + interactiveShellInit = "set -o vi"; + + + shellAliases = { + ls = "ls --color=tty"; + l = "ls -CFh"; + la = "ls -Ah"; + ll = "ls -lh"; + lt = "ls -lct --reverse"; + less = "less -S"; + top = "htop"; + version = "date '+%Y%m%d%H%M%S'"; + vclip = "xclip -selection clipboard"; + df = "df -h"; + timestamp = "date +%Y%m%d%H%M%S"; + nix-show-garbadge-roots = "ls -lh /nix/var/nix/gcroots/auto/"; + }; + + }; + + }; +} diff --git a/nixos/modules/default.nix b/nixos/modules/default.nix index 74d720b..0a36464 100644 --- a/nixos/modules/default.nix +++ b/nixos/modules/default.nix @@ -18,10 +18,10 @@ ./programs/curl-scripts.nix #./programs/easytag.nix #./programs/elm.nix - ./programs/espeak.nix + #./programs/espeak.nix #./programs/ffmpeg.nix #./programs/git.nix - ./programs/shell-bash.nix + #./programs/shell-bash.nix #./programs/shell-tools.nix #./programs/shell-zsh.nix #./programs/slack.nix diff --git a/nixos/modules/programs/browser.nix b/nixos/modules/programs/browser.nix index 50c71d2..affe83f 100644 --- a/nixos/modules/programs/browser.nix +++ b/nixos/modules/programs/browser.nix @@ -250,7 +250,7 @@ in users.users = flip mapAttrs cfg.configList (name: config: { home = config.home; - createHome = true; + createHome = false; initialPassword = "${name}-browser"; shell = pkgs.bashInteractive; isNormalUser = false; diff --git a/nixos/system/all/default.nix b/nixos/system/all/default.nix index 9c25ce9..74311b7 100644 --- a/nixos/system/all/default.nix +++ b/nixos/system/all/default.nix @@ -31,10 +31,10 @@ # Shell configuration # ------------------- - programs.custom = { - bash.enable = true; - #zsh.enable = true; - }; + #programs.custom = { + # bash.enable = true; + # #zsh.enable = true; + #}; # This value determines the NixOS release with which your system is to be # compatible, in order to avoid breaking some software such as database