Skip to content

Commit 9f51e37

Browse files
committed
Merge remote-tracking branch 'upstream/master' into fork-fix-launchd-calendar-interval
2 parents 72d647c + ffc0118 commit 9f51e37

File tree

135 files changed

+2512
-1075
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+2512
-1075
lines changed

.github/workflows/test.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55

66
env:
7-
CURRENT_STABLE_CHANNEL: nixpkgs-23.05-darwin
7+
CURRENT_STABLE_CHANNEL: nixpkgs-23.11-darwin
88

99
jobs:
1010
test-stable:
@@ -13,9 +13,9 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v3
1515
- name: Install nix corresponding to latest stable channel
16-
uses: cachix/install-nix-action@v22
16+
uses: cachix/install-nix-action@v23
1717
with:
18-
install_url: https://github.com/nix-community/nix-unstable-installer/releases/download/nix-2.10.0pre20220822_7c3ab57/install
18+
install_url: https://releases.nixos.org/nix/nix-2.13.6/install
1919
- run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A tests
2020
- run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A manpages
2121
- run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A examples.simple
@@ -26,7 +26,7 @@ jobs:
2626
steps:
2727
- uses: actions/checkout@v3
2828
- name: Install nix from current unstable channel
29-
uses: cachix/install-nix-action@v22
29+
uses: cachix/install-nix-action@v23
3030
- run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A tests
3131
- run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A manpages
3232
- run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A examples.simple
@@ -37,9 +37,9 @@ jobs:
3737
steps:
3838
- uses: actions/checkout@v3
3939
- name: Install nix corresponding to latest stable channel
40-
uses: cachix/install-nix-action@v22
40+
uses: cachix/install-nix-action@v23
4141
with:
42-
install_url: https://github.com/nix-community/nix-unstable-installer/releases/download/nix-2.10.0pre20220822_7c3ab57/install
42+
install_url: https://releases.nixos.org/nix/nix-2.13.6/install
4343
nix_path: nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }}
4444
- name: Install ${{ env.CURRENT_STABLE_CHANNEL }} channel
4545
run: |
@@ -82,7 +82,7 @@ jobs:
8282
steps:
8383
- uses: actions/checkout@v3
8484
- name: Install nix from current unstable channel
85-
uses: cachix/install-nix-action@v22
85+
uses: cachix/install-nix-action@v23
8686
with:
8787
nix_path: nixpkgs=channel:nixpkgs-unstable
8888
- name: Install nixpkgs-unstable channel
@@ -126,9 +126,9 @@ jobs:
126126
steps:
127127
- uses: actions/checkout@v3
128128
- name: Install nix version corresponding to latest stable channel
129-
uses: cachix/install-nix-action@v22
129+
uses: cachix/install-nix-action@v23
130130
with:
131-
install_url: https://github.com/nix-community/nix-unstable-installer/releases/download/nix-2.10.0pre20220822_7c3ab57/install
131+
install_url: https://releases.nixos.org/nix/nix-2.13.6/install
132132
- name: Install nix-darwin
133133
run: |
134134
mkdir -p ~/.config/nix-darwin
@@ -209,7 +209,7 @@ jobs:
209209
steps:
210210
- uses: actions/checkout@v3
211211
- name: Install nix from current unstable channel
212-
uses: cachix/install-nix-action@v22
212+
uses: cachix/install-nix-action@v23
213213
- name: Install nix-darwin
214214
run: |
215215
mkdir -p ~/.config/nix-darwin

.github/workflows/update-manual.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
- name: Build manual
2323
run: |
24-
nix-build ./release.nix -I nixpkgs=channel:nixpkgs-23.05-darwin -I darwin=. -A manualHTML
24+
nix-build ./release.nix -I nixpkgs=channel:nixpkgs-23.11-darwin -I darwin=. -A manualHTML
2525
2626
- name: Push update to manual
2727
run: |

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ nix-darwin is built up around [Nixpkgs](https://github.com/NixOS/nixpkgs), quite
1313

1414
To install nix-darwin, a working installation of [Nix](https://github.com/NixOS/nix#installation) is required.
1515

16-
> NOTE: Using `darwin-installer` is no longer necessary on flake based systems.
16+
If you wish to use nix-darwin with flakes, please refer to the [flakes](#flakes) section.
1717

1818
```bash
1919
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
@@ -69,10 +69,9 @@ Configuration lives in `~/.nixpkgs/darwin-configuration.nix`. Check out
6969
}
7070
```
7171

72-
## Flakes (experimental)
72+
## Flakes
7373

74-
There is also preliminary support for building your configuration using a [flake](https://nixos.wiki/wiki/Flakes). This
75-
is mostly based on the flake support that was added to NixOS.
74+
nix-darwin aims for both non-flake and flake configurations to be well supported despite flakes being an experimental feature in Nix.
7675

7776
### Step 1. Creating `flake.nix`
7877

@@ -86,11 +85,10 @@ If you don't have an existing `configuration.nix`, you can run the following com
8685
mkdir -p ~/.config/nix-darwin
8786
cd ~/.config/nix-darwin
8887
nix flake init -t nix-darwin
88+
sed -i '' "s/simple/$(scutil --get LocalHostName)/" flake.nix
8989
```
9090

91-
Make sure to replace all occurrences of `simple` with your short hostname which you can find by running `hostname -s`.
92-
93-
> NOTE: Make sure to change `nixpkgs.hostPlatform` to `aarch64-darwin` if you are using Apple Silicon.
91+
Make sure to change `nixpkgs.hostPlatform` to `aarch64-darwin` if you are using Apple Silicon.
9492

9593
</details>
9694

@@ -105,8 +103,8 @@ Add the following to `flake.nix` in the same folder as `configuration.nix`:
105103
description = "John's darwin system";
106104
107105
inputs = {
108-
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-23.05-darwin";
109-
nix-darwin.url = "github:LnL7/nix-darwin/master";
106+
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-23.11-darwin";
107+
nix-darwin.url = "github:LnL7/nix-darwin";
110108
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
111109
};
112110
@@ -118,9 +116,9 @@ Add the following to `flake.nix` in the same folder as `configuration.nix`:
118116
}
119117
```
120118

121-
Make sure to replace `Johns-MacBook` with your short hostname which you can find by running `hostname -s`.
119+
Make sure to replace `Johns-MacBook` with your hostname which you can find by running `scutil --get LocalHostName`.
122120

123-
> NOTE: Make sure to set `nixpkgs.hostPlatform` in your `configuration.nix` to either `x86_64-darwin` (Intel) or `aarch64-darwin` (Apple Silicon).
121+
Make sure to set `nixpkgs.hostPlatform` in your `configuration.nix` to either `x86_64-darwin` (Intel) or `aarch64-darwin` (Apple Silicon).
124122

125123
</details>
126124

@@ -174,7 +172,7 @@ export NIX_PATH=darwin=$HOME/.nix-defexpr/darwin:darwin-config=$HOME/.nixpkgs/da
174172
cp ~/.nix-defexpr/darwin/modules/examples/simple.nix ~/.nixpkgs/darwin-configuration.nix
175173

176174
# you can also use this to rebootstrap nix-darwin in case
177-
# darwin-rebuild is to old to activate the system.
175+
# darwin-rebuild is too old to activate the system.
178176
$(nix-build '<darwin>' -A system --no-out-link)/sw/bin/darwin-rebuild build
179177
$(nix-build '<darwin>' -A system --no-out-link)/sw/bin/darwin-rebuild switch
180178

default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ let
1616
};
1717
};
1818

19-
# The source code of this repo needed by the [un]installers.
19+
# The source code of this repo needed by the installer.
2020
nix-darwin = lib.cleanSource (
2121
lib.cleanSourceWith {
2222
# We explicitly specify a name here otherwise `cleanSource` will use the
@@ -30,5 +30,5 @@ in
3030

3131
eval // {
3232
installer = pkgs.callPackage ./pkgs/darwin-installer { inherit nix-darwin; };
33-
uninstaller = pkgs.callPackage ./pkgs/darwin-uninstaller { inherit nix-darwin; };
33+
uninstaller = pkgs.callPackage ./pkgs/darwin-uninstaller { };
3434
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Generated by https://github.com/DeterminateSystems/nix-installer.
2+
# See `/nix/nix-installer --version` for the version details.
3+
4+
build-users-group = nixbld
5+
experimental-features = nix-command flakes repl-flake
6+
bash-prompt-prefix = (nix:$name)\040
7+
max-jobs = auto
8+
extra-nix-path = nixpkgs=flake:nixpkgs
9+
upgrade-nix-store-path-url = https://install.determinate.systems/nix-upgrade/stable/universal
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Generated by https://github.com/DeterminateSystems/nix-installer.
2+
# See `/nix/nix-installer --version` for the version details.
3+
4+
build-users-group = nixbld
5+
experimental-features = nix-command flakes repl-flake
6+
bash-prompt-prefix = (nix:$name)\040
7+
max-jobs = auto
8+
extra-nix-path = nixpkgs=flake:nixpkgs
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# List of acceptable shells for chpass(1).
2+
# Ftpd will not allow users to connect who are not using
3+
# one of these shells.
4+
5+
/bin/bash
6+
/bin/csh
7+
/bin/dash
8+
/bin/ksh
9+
/bin/sh
10+
/bin/tcsh
11+
/bin/zsh
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Generated by https://github.com/DeterminateSystems/nix-installer, version 0.14.0.
2+
build-users-group = nixbld
3+
experimental-features = nix-command flakes repl-flake
4+
bash-prompt-prefix = (nix:$name)\040
5+
max-jobs = auto
6+
extra-nix-path = nixpkgs=flake:nixpkgs
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
# Set up Nix only on SSH connections
3+
# See: https://github.com/DeterminateSystems/nix-installer/pull/714
4+
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ] && [ -n "${SSH_CONNECTION}" ] && [ "${SHLVL}" -eq 1 ]; then
5+
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
6+
fi
7+
# End Nix

doc/manual/default.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ in rec {
7171
mkdir -p $dst
7272
7373
cp $styles/style.css $dst
74-
cp $styles/overrides.css $dst
7574
cp -r ${pkgs.documentation-highlighter} $dst/highlightjs
7675
7776
substitute ${./manual.md} manual.md \
@@ -86,7 +85,6 @@ in rec {
8685
--revision ${lib.escapeShellArg revision} \
8786
--generator "nixos-render-docs ${lib.version}" \
8887
--stylesheet style.css \
89-
--stylesheet overrides.css \
9088
--stylesheet highlightjs/mono-blue.css \
9189
--script ./highlightjs/highlight.pack.js \
9290
--script ./highlightjs/loader.js \

0 commit comments

Comments
 (0)