Skip to content

Commit

Permalink
Merge pull request #92 from holochain/bump-nix
Browse files Browse the repository at this point in the history
feat: introduce nixpkgsNix, set nix version to 2.20; chore: bump nix-darwin and fix darwin deploy script
  • Loading branch information
steveej committed May 17, 2024
2 parents 3795e42 + 0fb1507 commit ab15426
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 14 deletions.
31 changes: 24 additions & 7 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
inputs = {
nixpkgs.follows = "nixpkgs-23-11";
nixpkgs-23-11 = {url = "github:nixos/nixpkgs/nixos-23.11";};
nixpkgsNix = {url = "github:nixos/nixpkgs/nixos-unstable";};
nixpkgsGithubActionRunners = {url = "github:nixos/nixpkgs/nixos-unstable";};
nixpkgsUnstable = {url = "github:nixos/nixpkgs/nixos-unstable";};
nixpkgsMaster = {url = "github:nixos/nixpkgs/master";};
Expand All @@ -26,7 +27,7 @@
darwin.inputs.nixpkgs.follows = "nixpkgs";

# home manager
home-manager.url = "github:nix-community/home-manager/release-23.05";
home-manager.url = "github:nix-community/home-manager/release-23.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";

# secret management
Expand Down
10 changes: 5 additions & 5 deletions modules/flake-parts/apps.deploy-/darwin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
])}:$PATH"
set -x
rsync -r --delete ${self}/ ${deployUser}@${hostName}:/tmp/deploy-flake
rsync -r --delete ${self}/ ${deployUser}@${hostName}:/private/tmp/deploy-flake
ssh ${deployUser}@${hostName} /nix/var/nix/profiles/default/bin/nix \
--extra-experimental-features '"flakes nix-command"' \
build \
-o /tmp/next-system \
/tmp/deploy-flake#darwinConfigurations.'"${attrName}"'.system
-o /private/tmp/next-system \
/private/tmp/deploy-flake#darwinConfigurations.'"${attrName}"'.system
ssh ${deployUser}@${hostName} /tmp/next-system/sw/bin/darwin-rebuild \
ssh ${deployUser}@${hostName} /private/tmp/next-system/sw/bin/darwin-rebuild \
-j4 \
"''${1:-switch}" --flake /tmp/deploy-flake#'"${attrName}"'
"''${1:-switch}" --flake /private/tmp/deploy-flake#'"${attrName}"'
'';

mkDarwinDeployApp = attrName: config:
Expand Down
3 changes: 2 additions & 1 deletion modules/nixos/shared.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
inputs,
config,
pkgs,
lib,
Expand All @@ -16,7 +17,7 @@
# ]
;

nix.package = lib.mkDefault pkgs.nixVersions.nix_2_18;
nix.package = lib.mkDefault inputs.nixpkgsNix.legacyPackages.${pkgs.stdenv.system}.nixVersions.nix_2_20;

nix.settings.extra-platforms =
lib.mkIf pkgs.stdenv.isDarwin ["x86_64-darwin" "aarch64-darwin"];
Expand Down

0 comments on commit ab15426

Please sign in to comment.