mirror of
https://github.com/larstvei/nix-config.git
synced 2025-06-30 21:50:13 +00:00
Add a linux-builder and a rosetta-builder
This allows for compiling for x86_64 linux on macOS.
This commit is contained in:
parent
fa035f2f49
commit
9de0d57860
59
flake.lock
59
flake.lock
@ -131,6 +131,64 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-rosetta-builder": {
|
||||
"inputs": {
|
||||
"nixos-generators": "nixos-generators",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1745249216,
|
||||
"narHash": "sha256-bNuaIdGrs8LfintWymo9KQTILwVxsw5T6zdfxZY6K0g=",
|
||||
"owner": "cpick",
|
||||
"repo": "nix-rosetta-builder",
|
||||
"rev": "5cf6aa1f3f2fbb70443d33b5ef7779b7c7063392",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cpick",
|
||||
"repo": "nix-rosetta-builder",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixlib": {
|
||||
"locked": {
|
||||
"lastModified": 1736643958,
|
||||
"narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-generators": {
|
||||
"inputs": {
|
||||
"nixlib": "nixlib",
|
||||
"nixpkgs": [
|
||||
"nix-rosetta-builder",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737057290,
|
||||
"narHash": "sha256-3Pe0yKlCc7EOeq1X/aJVDH0CtNL+tIBm49vpepwL1MQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"rev": "d002ce9b6e7eb467cd1c6bb9aef9c35d191b5453",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1744932701,
|
||||
@ -200,6 +258,7 @@
|
||||
"darwin": "darwin",
|
||||
"emacs-larstvei": "emacs-larstvei",
|
||||
"home-manager": "home-manager",
|
||||
"nix-rosetta-builder": "nix-rosetta-builder",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
}
|
||||
},
|
||||
|
11
flake.nix
11
flake.nix
@ -13,11 +13,15 @@
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-rosetta-builder = {
|
||||
url = "github:cpick/nix-rosetta-builder";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
emacs-larstvei.url = "github:larstvei/emacs-flake";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ darwin, home-manager, ... }@inputs:
|
||||
{ darwin, home-manager, nix-rosetta-builder, ... }@inputs:
|
||||
{
|
||||
darwinConfigurations."larstvei-macbookpro" = darwin.lib.darwinSystem {
|
||||
system = "aarch64-darwin";
|
||||
@ -26,6 +30,11 @@
|
||||
./modules/core.nix
|
||||
./modules/macos.nix
|
||||
|
||||
nix-rosetta-builder.darwinModules.default
|
||||
{
|
||||
nix-rosetta-builder.onDemand = true;
|
||||
}
|
||||
|
||||
home-manager.darwinModules.default
|
||||
{
|
||||
home-manager = {
|
||||
|
@ -3,6 +3,9 @@
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
|
||||
|
||||
linux-builder.enable = true;
|
||||
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
|
Loading…
Reference in New Issue
Block a user