Compare commits
No commits in common. "6e88e2b33388bc72300ef8139da4922006a810f1" and "a16b49a394e2fd5df668c6f6d8cba98914fed7e0" have entirely different histories.
6e88e2b333
...
a16b49a394
@ -21,8 +21,8 @@ else
|
||||
fi
|
||||
|
||||
|
||||
export PS1="${green}"'\$'"${no_color} "
|
||||
export DIRENV_PS1="${red}"'\$'"${no_color} "
|
||||
export PS1="${green}\$${no_color} "
|
||||
export DIRENV_PS1="${red}\$${no_color} "
|
||||
if [ "${HOSTNAME}" != "crypt" ] && [ "${HOSTNAME}" != "tomb" ] || [ "${SSH_TTY}" != "" ]; then
|
||||
DIRENV_PS1="${DIRENV_PS1}${blue}${HOSTNAME} ${DIRENV_PS1}"
|
||||
PS1="${PS1}${blue}${HOSTNAME} ${PS1}"
|
||||
@ -64,10 +64,6 @@ log_bash_persistent_history()
|
||||
]]
|
||||
local date_part="${BASH_REMATCH[1]}"
|
||||
local command_part="${BASH_REMATCH[2]}"
|
||||
# Ensure file exists
|
||||
if ! [ -w "$(dirname ${PERSISTENT_HISTFILE})" ]; then
|
||||
mkdir -p $(dirname ${PERSISTENT_HISTFILE})
|
||||
fi
|
||||
if [ "$command_part" != "$PERSISTENT_HISTORY_LAST" ]
|
||||
then
|
||||
echo $date_part "|" "$rc" "|" "$command_part" >> "${PERSISTENT_HISTFILE}"
|
||||
|
||||
@ -35,20 +35,18 @@ nix_packages=(
|
||||
"kubernetes-helm"
|
||||
"rancher"
|
||||
|
||||
#"terraform"
|
||||
"opentofu"
|
||||
"terragrunt"
|
||||
)
|
||||
unstable_packages=(
|
||||
# CVE in NixOS stable version of vault
|
||||
"vault"
|
||||
|
||||
# Need unstable latest up to date terraform/terragrunt
|
||||
"terraform"
|
||||
"terragrunt"
|
||||
)
|
||||
|
||||
|
||||
mkdir -p ~/.config/nixpkgs/
|
||||
templated_insert="$(for nix_package in ${nix_packages[@]}; do echo " $nix_package"; echo; done)"
|
||||
templated_insert=${templated_insert}$(for unstable_package in ${unstable_packages[@]}; do echo; echo " unstablePkgs.$unstable_package"; done)
|
||||
templated_insert=$(for nix_package in ${nix_packages[@]}; do echo " $nix_package"; done)
|
||||
|
||||
|
||||
# Reference: https://discourse.nixos.org/t/nix-profile-in-combination-with-declarative-package-management/21228/9
|
||||
@ -57,11 +55,10 @@ cat << EOF > ~/.config/nixpkgs/flake.nix
|
||||
description = "A declarative system installation";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; # also possible: nixos-unstable
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, unstable }:
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
||||
|
||||
@ -72,7 +69,7 @@ cat << EOF > ~/.config/nixpkgs/flake.nix
|
||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
|
||||
# Nixpkgs instantiated for supported system types.
|
||||
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; config.allowUnfree = true; });
|
||||
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
|
||||
in {
|
||||
packages = forAllSystems (system:
|
||||
let
|
||||
@ -82,7 +79,6 @@ cat << EOF > ~/.config/nixpkgs/flake.nix
|
||||
myPackageCollection = # libs and clis
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.\${system}; # here we need just legacy packages
|
||||
unstablePkgs = import unstable { inherit system; config.allowUnfree = true; };
|
||||
in pkgs.buildEnv {
|
||||
name = "myPackages";
|
||||
paths = with pkgs; [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user