mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-16 13:28:16 +00:00
flake: use nix-darwin
instead of darwin
This commit is contained in:
parent
eb22022ba8
commit
4511c29a72
2 changed files with 8 additions and 8 deletions
|
@ -106,8 +106,8 @@ Add the following to `flake.nix` in the same folder as `configuration.nix`:
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-23.05-darwin";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-23.05-darwin";
|
||||||
darwin.url = "github:LnL7/nix-darwin/master";
|
nix-darwin.url = "github:LnL7/nix-darwin/master";
|
||||||
darwin.inputs.nixpkgs.follows = "nixpkgs";
|
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, darwin, nixpkgs }: {
|
outputs = inputs@{ self, darwin, nixpkgs }: {
|
||||||
|
@ -147,7 +147,7 @@ accessible as an argument `inputs`, similar to `pkgs` and `lib`, inside the conf
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
# in flake.nix
|
# in flake.nix
|
||||||
darwin.lib.darwinSystem {
|
nix-darwin.lib.darwinSystem {
|
||||||
modules = [ ./configuration.nix ];
|
modules = [ ./configuration.nix ];
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ darwin.lib.darwinSystem {
|
||||||
```nix
|
```nix
|
||||||
# in configuration.nix
|
# in configuration.nix
|
||||||
{ pkgs, lib, inputs }:
|
{ pkgs, lib, inputs }:
|
||||||
# inputs.self, inputs.darwin, and inputs.nixpkgs can be accessed here
|
# inputs.self, inputs.nix-darwin, and inputs.nixpkgs can be accessed here
|
||||||
```
|
```
|
||||||
|
|
||||||
## Manual Install
|
## Manual Install
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
darwin.url = "github:LnL7/nix-darwin";
|
nix-darwin.url = "github:LnL7/nix-darwin";
|
||||||
darwin.inputs.nixpkgs.follows = "nixpkgs";
|
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, darwin, nixpkgs }:
|
outputs = inputs@{ self, nix-darwin, nixpkgs }:
|
||||||
let
|
let
|
||||||
configuration = { pkgs, ... }: {
|
configuration = { pkgs, ... }: {
|
||||||
# List packages installed in system profile. To search by name, run:
|
# List packages installed in system profile. To search by name, run:
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
{
|
{
|
||||||
# Build darwin flake using:
|
# Build darwin flake using:
|
||||||
# $ darwin-rebuild build --flake .#simple
|
# $ darwin-rebuild build --flake .#simple
|
||||||
darwinConfigurations."simple" = darwin.lib.darwinSystem {
|
darwinConfigurations."simple" = nix-darwin.lib.darwinSystem {
|
||||||
modules = [ configuration ];
|
modules = [ configuration ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue