Update flakes to support 24.05 and unstable branches
This commit is contained in:
parent
0165d9bad2
commit
1019f48597
@ -35,18 +35,20 @@ nix_packages=(
|
|||||||
"kubernetes-helm"
|
"kubernetes-helm"
|
||||||
"rancher"
|
"rancher"
|
||||||
|
|
||||||
#"terraform"
|
|
||||||
"opentofu"
|
|
||||||
"terragrunt"
|
|
||||||
)
|
)
|
||||||
unstable_packages=(
|
unstable_packages=(
|
||||||
# CVE in NixOS stable version of vault
|
# CVE in NixOS stable version of vault
|
||||||
"vault"
|
"vault"
|
||||||
|
|
||||||
|
# Need unstable latest up to date terraform/terragrunt
|
||||||
|
"terraform"
|
||||||
|
"terragrunt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
mkdir -p ~/.config/nixpkgs/
|
mkdir -p ~/.config/nixpkgs/
|
||||||
templated_insert=$(for nix_package in ${nix_packages[@]}; do echo " $nix_package"; done)
|
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)
|
||||||
|
|
||||||
|
|
||||||
# Reference: https://discourse.nixos.org/t/nix-profile-in-combination-with-declarative-package-management/21228/9
|
# Reference: https://discourse.nixos.org/t/nix-profile-in-combination-with-declarative-package-management/21228/9
|
||||||
@ -55,10 +57,11 @@ cat << EOF > ~/.config/nixpkgs/flake.nix
|
|||||||
description = "A declarative system installation";
|
description = "A declarative system installation";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; # also possible: nixos-unstable
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||||
|
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs }:
|
outputs = { self, nixpkgs, unstable }:
|
||||||
let
|
let
|
||||||
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
||||||
|
|
||||||
@ -69,7 +72,7 @@ cat << EOF > ~/.config/nixpkgs/flake.nix
|
|||||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
|
|
||||||
# Nixpkgs instantiated for supported system types.
|
# Nixpkgs instantiated for supported system types.
|
||||||
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
|
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; config.allowUnfree = true; });
|
||||||
in {
|
in {
|
||||||
packages = forAllSystems (system:
|
packages = forAllSystems (system:
|
||||||
let
|
let
|
||||||
@ -79,6 +82,7 @@ cat << EOF > ~/.config/nixpkgs/flake.nix
|
|||||||
myPackageCollection = # libs and clis
|
myPackageCollection = # libs and clis
|
||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.\${system}; # here we need just legacy packages
|
pkgs = nixpkgs.legacyPackages.\${system}; # here we need just legacy packages
|
||||||
|
unstablePkgs = import unstable { inherit system; config.allowUnfree = true; };
|
||||||
in pkgs.buildEnv {
|
in pkgs.buildEnv {
|
||||||
name = "myPackages";
|
name = "myPackages";
|
||||||
paths = with pkgs; [
|
paths = with pkgs; [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user