summaryrefslogtreecommitdiff
path: root/hosts/common.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/common.nix')
-rw-r--r--hosts/common.nix96
1 files changed, 64 insertions, 32 deletions
diff --git a/hosts/common.nix b/hosts/common.nix
index 45bdfb6..5d3e05c 100644
--- a/hosts/common.nix
+++ b/hosts/common.nix
@@ -97,22 +97,8 @@
nixpkgs = {
config = {
allowUnfree = true;
- doCheckByDefault = false;
# doInstallCheckByDefault = false;
};
- overlays = [
- (final: prev: {
- stdenv = prev.stdenv // {
- mkDerivation = args:
- prev.stdenv.mkDerivation
- (args
- // {
- doCheck = false;
- # doInstallCheck = false;
- });
- };
- })
- ];
};
# nix.registry.${user}.flake = inputs.self;
# nix.registry.nixpkgs.flake = inputs.nixpkgs;
@@ -149,23 +135,24 @@
security.rtkit.enable = true;
security.polkit.enable = true;
- fonts.fontconfig = {
- enable = true;
- antialias = true;
- hinting = {
- enable = true;
- style = "slight";
- };
- subpixel = {
- rgba = "rgb";
- lcdfilter = "default";
- };
- };
+ # fonts.fontconfig = {
+ # enable = true;
+ # antialias = true;
+ # hinting = {
+ # enable = true;
+ # style = "slight";
+ # };
+ # subpixel = {
+ # rgba = "rgb";
+ # lcdfilter = "default";
+ # };
+ # };
fonts.fontDir.enable = true;
fonts.packages = with pkgs; [
ioskeley-input
- nerd-fonts.symbols-only
+ ioskeley-mono.normal-NF
+ # nerd-fonts.symbols-only
# nerd-fonts.jetbrains-mono
# ioskeley-mono
# maple-mono.NF
@@ -173,11 +160,57 @@
fonts.fontconfig.defaultFonts.monospace = [
"IosevkaInput"
- "JetBrainsMono Nerd Font"
+ # "JetBrainsMono Nerd Font"
"Symbols Nerd Font"
];
- programs.zsh.enable = true;
+ programs.bash = {
+ enable = true;
+ interactiveShellInit = ''
+ # --- History Configuration ---
+ # HISTSIZE: Number of lines to keep in memory
+ # HISTFILESIZE: Number of lines to keep in the file
+ export HISTSIZE=5000
+ export HISTFILESIZE=5000
+ export HISTFILE="$HOME/.bash_history"
+
+ # Append to history file rather than overwriting
+ shopt -s histappend
+
+ # Ignore commands starting with space
+ export HISTCONTROL=ignorespace:erasedups
+
+ # --- Completion Configuration ---
+ # Bash completion is usually handled by the 'bash-completion' package
+ # Ensure it is enabled in your nixos config: programs.bash.completion.enable = true;
+ bind "set completion-ignore-case on"
+ bind "set show-all-if-ambiguous on"
+
+ # Correct way to enable menu-complete:
+ # bind '"\t": menu-complete'
+ bind '"\e[Z": menu-complete-backward'
+
+ bind "set show-all-if-ambiguous on"
+ '';
+ promptInit = ''
+ if [ "$TERM" != "dumb" ] || [ -n "$INSIDE_EMACS" ]; then
+ # Removed the '1;' prefix to disable bold
+ PROMPT_COLOR="31m"
+ ((UID)) && PROMPT_COLOR="32m"
+
+ # Removed \n (newline) and [ ] brackets
+ if [ -n "$INSIDE_EMACS" ]; then
+ PS1="\[\033[$PROMPT_COLOR\]\u@\h:\w\\$\[\033[0m\] "
+ else
+ PS1="\[\033[$PROMPT_COLOR\]\[\e]0;\u@\h: \w\a\]\u@\h:\w\\$\[\033[0m\] "
+ fi
+
+ if test "$TERM" = "xterm"; then
+ PS1="\[\033]2;\h:\u:\w\007\]$PS1"
+ fi
+ fi
+ '';
+ };
programs.nano.enable = false;
programs.gnupg.agent = {
enable = true;
@@ -187,7 +220,8 @@
sops = {
defaultSopsFile = ../secrets/secrets.yaml;
- age.keyFile = "/home/bee/.config/sops/age/keys.txt";
+ defaultSopsFormat = "yaml";
+ age.keyFile = "/home/${user}/.config/sops/age/keys.txt";
secrets.gpg_private_key = {
owner = user;
mode = "0400";
@@ -197,8 +231,6 @@
systemd.services.import-gpg-key = {
description = "Import GPG key from sops secret";
wantedBy = [ "multi-user.target" ];
- after = [ "sops-nix.service" ];
- wants = [ "sops-nix.service" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;