From 4403dce4d42284205a39a501c137fabe76d7e972 Mon Sep 17 00:00:00 2001 From: PedroRegisPOAR Date: Tue, 12 Dec 2023 14:21:17 -0300 Subject: [PATCH] Remove: follows do flake-utils e urls do ix.io, e adiciona nix fmt (#17) * Remove follows do flake-utils e nix fmt * Remove urls do ix.io --- .github/workflows/push.yml | 12 ++++++++++-- .github/workflows/tests.yml | 12 ++++++++++-- flake.nix | 4 +++- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 390fbc2..9450be7 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -18,9 +18,17 @@ jobs: - name: Instala nix single user run: | - wget -qO- http://ix.io/4Cj0 | sh \ - && . "$HOME"/."$(basename $SHELL)"rc \ + BASE_URL='https://raw.githubusercontent.com/ES-Nix/get-nix/' \ + && SHA256=87fa0f1dbfdd28a1f99b39d5bd4dcc39de97bc64 \ + && NIX_RELEASE_VERSION='2.10.2' \ + && curl -fsSL "${BASE_URL}""$SHA256"/get-nix.sh | sh -s -- ${NIX_RELEASE_VERSION} \ + && . "$HOME"/.nix-profile/etc/profile.d/nix.sh \ + && . ~/."$(basename $SHELL)"rc \ + && export TMPDIR=/tmp \ && nix flake --version \ + && nix registry pin nixpkgs github:NixOS/nixpkgs/ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b \ + && curl -fsSL https://raw.githubusercontent.com/ES-Nix/get-nix/"$SHA256"/install_direnv_and_nix_direnv.sh | sh \ + && . ~/."$(basename $SHELL)"rc \ && direnv --version echo "$HOME"/.nix-profile/bin >> $GITHUB_PATH diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4ea0d17..5898446 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,9 +20,17 @@ jobs: - name: Instala nix single user run: | - wget -qO- http://ix.io/4Cj0 | sh \ - && . "$HOME"/."$(basename $SHELL)"rc \ + BASE_URL='https://raw.githubusercontent.com/ES-Nix/get-nix/' \ + && SHA256=87fa0f1dbfdd28a1f99b39d5bd4dcc39de97bc64 \ + && NIX_RELEASE_VERSION='2.10.2' \ + && curl -fsSL "${BASE_URL}""$SHA256"/get-nix.sh | sh -s -- ${NIX_RELEASE_VERSION} \ + && . "$HOME"/.nix-profile/etc/profile.d/nix.sh \ + && . ~/."$(basename $SHELL)"rc \ + && export TMPDIR=/tmp \ && nix flake --version \ + && nix registry pin nixpkgs github:NixOS/nixpkgs/ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b \ + && curl -fsSL https://raw.githubusercontent.com/ES-Nix/get-nix/"$SHA256"/install_direnv_and_nix_direnv.sh | sh \ + && . ~/."$(basename $SHELL)"rc \ && direnv --version echo "$HOME"/.nix-profile/bin >> $GITHUB_PATH diff --git a/flake.nix b/flake.nix index 8184606..7132a2e 100644 --- a/flake.nix +++ b/flake.nix @@ -8,7 +8,6 @@ podman-rootless.url = "github:ES-Nix/podman-rootless/from-nixpkgs"; podman-rootless.inputs.nixpkgs.follows = "nixpkgs"; - flake-utils.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = attrs@{ @@ -31,6 +30,9 @@ in { + # nix fmt + formatter = pkgsAllowUnfree.nixpkgs-fmt; + devShells.default = pkgsAllowUnfree.mkShell { buildInputs = with pkgsAllowUnfree; [ bashInteractive