mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
flake: add template with basic flake config
This commit is contained in:
parent
7c16d31383
commit
fc955520dd
3 changed files with 13 additions and 6 deletions
14
.github/workflows/test.yml
vendored
14
.github/workflows/test.yml
vendored
|
@ -133,14 +133,14 @@ jobs:
|
|||
nix-shell -A installer.check
|
||||
- name: Build simple flake configuration
|
||||
run: |
|
||||
nix build ./modules/examples#darwinConfigurations.simple.system --override-input darwin .
|
||||
nix build ./modules/examples/flake#darwinConfigurations.simple.system --override-input darwin .
|
||||
- name: Activate derivation of simple flake build
|
||||
run: |
|
||||
./result/sw/bin/darwin-rebuild switch --flake ./modules/examples#simple --override-input darwin .
|
||||
./result/sw/bin/darwin-rebuild switch --flake ./modules/examples/flake#simple --override-input darwin .
|
||||
- name: Rebuild and activate simple flake, but this time using nix-darwins flake interface
|
||||
run: |
|
||||
. /etc/static/bashrc
|
||||
darwin-rebuild build --flake ./modules/examples#simple --override-input darwin .
|
||||
darwin-rebuild build --flake ./modules/examples/flake#simple --override-input darwin .
|
||||
- name: Test git submodules
|
||||
run: |
|
||||
. /etc/static/bashrc
|
||||
|
@ -155,6 +155,7 @@ jobs:
|
|||
popd
|
||||
|
||||
cp -a ./modules/examples/. /tmp/test-nix-darwin-submodules
|
||||
cp -a ./modules/examples/flake/flake.nix /tmp/test-nix-darwin-submodules
|
||||
|
||||
pushd /tmp/test-nix-darwin-submodules
|
||||
/usr/bin/sed -i.bak \
|
||||
|
@ -214,14 +215,14 @@ jobs:
|
|||
nix-shell -A installer.check
|
||||
- name: Build simple flake configuration
|
||||
run: |
|
||||
nix build ./modules/examples#darwinConfigurations.simple.system --override-input darwin .
|
||||
nix build ./modules/examples/flake#darwinConfigurations.simple.system --override-input darwin .
|
||||
- name: Activate derivation of simple flake build
|
||||
run: |
|
||||
./result/sw/bin/darwin-rebuild switch --flake ./modules/examples#simple --override-input darwin .
|
||||
./result/sw/bin/darwin-rebuild switch --flake ./modules/examples/flake#simple --override-input darwin .
|
||||
- name: Rebuild and activate simple flake, but this time using nix-darwins flake interface
|
||||
run: |
|
||||
. /etc/static/bashrc
|
||||
darwin-rebuild build --flake ./modules/examples#simple --override-input darwin .
|
||||
darwin-rebuild build --flake ./modules/examples/flake#simple --override-input darwin .
|
||||
- name: Test git submodules
|
||||
run: |
|
||||
. /etc/static/bashrc
|
||||
|
@ -236,6 +237,7 @@ jobs:
|
|||
popd
|
||||
|
||||
cp -a ./modules/examples/. /tmp/test-nix-darwin-submodules
|
||||
cp -a ./modules/examples/flake/flake.nix /tmp/test-nix-darwin-submodules
|
||||
|
||||
pushd /tmp/test-nix-darwin-submodules
|
||||
/usr/bin/sed -i.bak \
|
||||
|
|
|
@ -25,6 +25,11 @@
|
|||
darwinModules.ofborg = ./modules/examples/ofborg.nix;
|
||||
darwinModules.simple = ./modules/examples/simple.nix;
|
||||
|
||||
templates.default = {
|
||||
path = ./modules/examples/flake;
|
||||
description = "nix flake init -t nix-darwin";
|
||||
};
|
||||
|
||||
checks.x86_64-darwin.simple = (self.lib.darwinSystem {
|
||||
system = "x86_64-darwin";
|
||||
modules = [ self.darwinModules.simple ];
|
||||
|
|
Loading…
Reference in a new issue