diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3358b0a..d78fc11 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,6 @@ jobs: steps: - uses: actions/checkout@v3 - uses: cachix/install-nix-action@v22 - - run: nix build .#ci - # TODO: Fix issue running darwin-rebuild - # - run: ./result/sw/bin/darwin-rebuild switch --flake . + - run: nix build .#darwinConfigurations.ci.system + # FIXME: error: Directory /run does not exist, aborting activation + # - run: ./result/sw/bin/darwin-rebuild switch --flake .#ci diff --git a/bin/switch b/bin/switch index e5c1125..0f86e46 100755 --- a/bin/switch +++ b/bin/switch @@ -1,2 +1,2 @@ #!/usr/bin/env bash -./result/sw/bin/darwin-rebuild switch --flake . +./result/sw/bin/darwin-rebuild switch --flake .#work diff --git a/flake.lock b/flake.lock index 0441cac..29df78e 100644 --- a/flake.lock +++ b/flake.lock @@ -44,11 +44,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1688422948, - "narHash": "sha256-D5Le0gJgaB5fT9qKZ5jBmnBvdZJTOBr1cyeWsRiWZXc=", + "lastModified": 1688577390, + "narHash": "sha256-cTejScdjuNUw0QPAsyb1jBjw0TImzk0QSBGqfr1UOUg=", "owner": "cachix", "repo": "devenv", - "rev": "6f761f07c5f53d5cc4a139db3f41a7f4a0821ffa", + "rev": "ed538b703ec07b54409944f530d5dc32c4b85150", "type": "github" }, "original": { @@ -138,11 +138,11 @@ ] }, "locked": { - "lastModified": 1688467264, - "narHash": "sha256-AUQP1WtmBb36bRc41p5ieTwq6Y8pgiKurbdrsPeP3fg=", + "lastModified": 1688552611, + "narHash": "sha256-pV/1/AU1l5CNFeKmdJ1jofcaKHhtKAbxY4gazeCyoSo=", "owner": "nix-community", "repo": "home-manager", - "rev": "b406b8d1bc90f6cd3e120d189b3e929f17ca4aea", + "rev": "b23c7501f7e0a001486c9a5555a6c53ac7b08e85", "type": "github" }, "original": { @@ -241,11 +241,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1688465017, - "narHash": "sha256-xzFcCnzPOgQaX7Acprfqo+tqHJ2UKWC38pXrcqvdXHU=", + "lastModified": 1688556768, + "narHash": "sha256-mhd6g0iJGjEfOr3+6mZZOclUveeNr64OwxdbNtLc8mY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0d5682acc109add20f70440269587a1b169cc2fe", + "rev": "27bd67e55fe09f9d68c77ff151c3e44c4f81f7de", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index d4c72dc..08a7e51 100644 --- a/flake.nix +++ b/flake.nix @@ -34,39 +34,34 @@ } ]; }; - darwinConfigurations = { - "ec-2022-127-lp-sestrella" = mkDarwinSystem "aarch64-darwin"; - "ghactions" = mkDarwinSystem "x86_64-darwin"; - }; in { - inherit darwinConfigurations; - } // flake-utils.lib.eachDefaultSystem (system: - let - pkgs = nixpkgs.legacyPackages.${system}; - in - { - devShells.default = devenv.lib.mkShell { - inherit inputs pkgs; - modules = [ - ({ pkgs, ... }: { - packages = [ - pkgs.gitleaks - ]; - - pre-commit.hooks = { - luacheck.enable = true; - nixpkgs-fmt.enable = true; - stylua.enable = true; - yamllint.enable = true; - }; - }) - ]; - }; + darwinConfigurations = { + ci = mkDarwinSystem "x86_64-darwin"; + work = mkDarwinSystem "aarch64-darwin"; + }; + } // flake-utils.lib.eachSystem [ "aarch64-darwin" "x86_64-darwin" ] + (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + devShells.default = devenv.lib.mkShell { + inherit inputs pkgs; + modules = [ + ({ pkgs, ... }: { + packages = [ + pkgs.gitleaks + ]; - packages = { - ci = darwinConfigurations."ghactions".system; - default = darwinConfigurations."ec-2022-127-lp-sestrella".system; - }; - }); + pre-commit.hooks = { + luacheck.enable = true; + nixpkgs-fmt.enable = true; + stylua.enable = true; + yamllint.enable = true; + }; + }) + ]; + }; + }); } diff --git a/home.nix b/home.nix index 23d96e7..a5968ad 100644 --- a/home.nix +++ b/home.nix @@ -25,7 +25,6 @@ pkgs.aws-vault pkgs.awscli2 pkgs.btop - pkgs.circleci-cli pkgs.jq pkgs.nix-prefetch-git pkgs.pstree @@ -33,6 +32,7 @@ pkgs.tree pkgs.watch pkgs.wget + pkgs.yq ]; programs.autojump.enable = true;