feat: defaults write com.apple.menuextra.clock #858
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Test" | |
on: | |
pull_request: | |
push: | |
jobs: | |
tests: | |
runs-on: macos-12 | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: cachix/install-nix-action@v17 | |
- run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-22.05-darwin -I darwin=. -A tests | |
- run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-22.05-darwin -I darwin=. -A manpages | |
- run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-22.05-darwin -I darwin=. -A examples.simple | |
install: | |
runs-on: macos-12 | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: cachix/install-nix-action@v17 | |
- run: | | |
nix-channel --add https://nixos.org/channels/nixpkgs-22.05-darwin nixpkgs | |
nix-channel --update | |
- run: | | |
export NIX_PATH=$HOME/.nix-defexpr/channels | |
nix-shell -A installer | |
nix-shell -A installer.check | |
- run: | | |
. /etc/static/bashrc | |
darwin-rebuild switch -I darwin=. | |
- run: | | |
export NIX_PATH=$HOME/.nix-defexpr/channels | |
nix-shell -A uninstaller | |
nix-shell -A uninstaller.check | |
- name: Debugging tmate session | |
if: ${{ failure() }} | |
uses: mxschmitt/action-tmate@v3 | |
timeout-minutes: 15 | |
with: | |
limit-access-to-actor: true | |
install-flake: | |
runs-on: macos-12 | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: cachix/install-nix-action@v17 | |
with: | |
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.10.0pre20220808_73fde9e/install | |
extra_nix_config: | | |
experimental-features = nix-command flakes | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- run: | | |
nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs | |
nix-channel --update | |
- run: | | |
export NIX_PATH=$HOME/.nix-defexpr/channels | |
nix-shell -A installer | |
- run: | | |
nix build ./modules/examples#darwinConfigurations.simple.system --override-input darwin . | |
- run: | | |
./result/sw/bin/darwin-rebuild switch --flake ./modules/examples#simple --override-input darwin . | |
- run: | | |
. /etc/static/bashrc | |
darwin-rebuild build --flake ./modules/examples#simple --override-input darwin . | |
- name: Test git submodules | |
run: | | |
. /etc/static/bashrc | |
mkdir -p /tmp/{test-nix-darwin-submodules,example-submodule} | |
pushd /tmp/example-submodule | |
echo '"hello"' > hello.nix | |
git init | |
git add . | |
git commit -m "add a submodule we will import" | |
popd | |
cp -a ./modules/examples/. /tmp/test-nix-darwin-submodules | |
pushd /tmp/test-nix-darwin-submodules | |
/usr/bin/sed -i.bak \ | |
'\#modules = \[#s#darwin.darwinModules.simple#./simple.nix#' \ | |
./flake.nix | |
/usr/bin/sed -i.bak \ | |
's#pkgs.vim#pkgs."${import ./submodule-test/hello.nix}"#' \ | |
./simple.nix | |
git init | |
git add flake.nix simple.nix | |
git \ | |
-c protocol.file.allow=always \ | |
submodule add /tmp/example-submodule submodule-test | |
popd | |
# Should fail | |
darwin-rebuild build \ | |
--flake /tmp/test-nix-darwin-submodules#simple \ | |
--override-input darwin . \ | |
&& { | |
printf 'succeeded while expecting failure due to submodule\n' >/dev/stderr | |
exit 1 | |
} | |
# Should also fail | |
darwin-rebuild build \ | |
--flake /tmp/test-nix-darwin-submodules?submodules=0#simple \ | |
--override-input darwin . \ | |
&& { | |
printf 'succeeded while expecting failure due to submodule\n' >/dev/stderr | |
exit 1 | |
} | |
# Should succeed | |
darwin-rebuild build \ | |
--flake /tmp/test-nix-darwin-submodules?submodules=1#simple \ | |
--override-input darwin . | |
# Should also succeed | |
darwin-rebuild build \ | |
--flake git+file:///tmp/test-nix-darwin-submodules?submodules=1#simple \ | |
--override-input darwin . |