From 3ee52ab988b6fe8787caed31b764a2b0ecdaa475 Mon Sep 17 00:00:00 2001 From: willemml Date: Fri, 10 Nov 2023 09:57:47 -0800 Subject: [PATCH] Fixes command-not-found conflict on NixOS --- common/system.nix | 2 +- home/darwin/default.nix | 2 ++ home/programs/default.nix | 2 -- nixos/profiles/common.nix | 43 -------------------------------------- nixos/profiles/default.nix | 2 -- 5 files changed, 3 insertions(+), 48 deletions(-) delete mode 100644 nixos/profiles/common.nix diff --git a/common/system.nix b/common/system.nix index 1e6631b..31b3c2c 100644 --- a/common/system.nix +++ b/common/system.nix @@ -24,7 +24,7 @@ settings.trusted-users = ["root" "willem"]; }; - programs.nix-index.enable = false; + programs.command-not-found.enable = false; programs.bash.enableCompletion = true; programs.bash.interactiveShellInit = '' diff --git a/home/darwin/default.nix b/home/darwin/default.nix index 41a96ab..318f9d4 100644 --- a/home/darwin/default.nix +++ b/home/darwin/default.nix @@ -16,6 +16,8 @@ home.homeDirectory = "/Users/willem"; + programs.command-not-found.enable = true; + home.file.".gnupg/gpg-agent.conf" = { text = '' pinentry-program "${pkgs.pinentry-touchid}/bin/pinentry-touchid" diff --git a/home/programs/default.nix b/home/programs/default.nix index 6b79cca..d22df72 100644 --- a/home/programs/default.nix +++ b/home/programs/default.nix @@ -12,8 +12,6 @@ programs = { bash.enableCompletion = true; - command-not-found.enable = true; - direnv = { enable = true; enableBashIntegration = true; diff --git a/nixos/profiles/common.nix b/nixos/profiles/common.nix deleted file mode 100644 index c0ba83d..0000000 --- a/nixos/profiles/common.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ - pkgs, - lib, - ... -}: { - environment.pathsToLink = ["/share/zsh"]; - environment.shells = [pkgs.bashInteractive pkgs.zsh]; - environment.systemPackages = [pkgs.coreutils pkgs.git]; - environment.variables.LANG = "en_US.UTF-8"; - environment.variables.LANGUAGE = "en_US.UTF-8"; - environment.variables.LC_ALL = "en_US.UTF-8"; - environment.variables.LC_CTYPE = "en_US.UTF-8"; - environment.variables.SHELL = "${pkgs.zsh}/bin/zsh"; - - nix = { - package = pkgs.nix; - settings.experimental-features = ["nix-command" "flakes" "repl-flake"]; - settings.trusted-users = ["root" "willem"]; - }; - - programs.nix-index.enable = false; - - programs.bash.enableCompletion = true; - programs.bash.interactiveShellInit = '' - export PS1=$'\n'"\e[0mbash: \e[34;1m\w"$'\n'"\e[32m\\$\e[0m " - ''; - - documentation.enable = true; - documentation.man.enable = true; - - programs.zsh.enable = true; - programs.zsh.shellInit = lib.mkDefault "zsh-newuser-install() { :; }"; - programs.zsh.enableBashCompletion = true; - programs.zsh.promptInit = lib.mkDefault '' - autoload -U promptinit && promptinit - export PROMPT=$'\n'"%B%F{cyan}%m:%F{blue}%~"$'\n'"%F{green}%(!.#.$) %f%b" - export RPROMPT="%B%F{red}%*%f%b" - ''; - - time.timeZone = "America/Vancouver"; - - users.users.willem.shell = pkgs.zsh; -} diff --git a/nixos/profiles/default.nix b/nixos/profiles/default.nix index 3b5ad36..f23e504 100644 --- a/nixos/profiles/default.nix +++ b/nixos/profiles/default.nix @@ -16,8 +16,6 @@ i18n.defaultLocale = "en_US.UTF-8"; - programs.command-not-found.enable = true; - programs.zsh.loginShellInit = '' reexec() { unset __NIX_OS_SET_ENVIRONMENT_DONE