generated from divnix/digga
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b6c87fd
commit 9c0c33d
Showing
16 changed files
with
145 additions
and
235 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: "Check and Deploy" | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check-and-deploy: | ||
runs-on: [self-hosted, linux, X64] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
- name: Format check | ||
run: nix run nixpkgs#nixpkgs-fmt -- . --check | ||
- name: Check | ||
run: nix flake check --verbose --print-build-logs | ||
- name: Push cache | ||
run: | | ||
for host in portal x200s; do | ||
nix build ".#nixosConfigurations.portal.config.system.build.toplevel" --json | \ | ||
nix run nixpkgs#jq -- ".[].outputs.out" --raw-output | \ | ||
nix run nixpkgs#cachix -- push linyinfeng | ||
done | ||
env: | ||
CACHIX_SIGNING_KEY: ${{ secrets.CACHIX_SIGNING_KEY }} | ||
- name: Install SSH key | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
uses: shimataro/ssh-key-action@develop | ||
with: | ||
key: ${{ secrets.SSH_KEY }} | ||
name: id_rsa | ||
known_hosts: ${{ secrets.KNOWN_HOSTS }} | ||
- name: Deploy | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
run: | | ||
for host in portal x200s; do | ||
nix develop --command deploy --skip-checks ".#$host" | ||
done |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(import ./.).ciNix |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,3 @@ | ||
let | ||
inherit (default.inputs.nixos) lib; | ||
|
||
default = (import ./lib/compat).defaultNix; | ||
|
||
ciSystems = [ | ||
"aarch64-linux" | ||
"i686-linux" | ||
"x86_64-linux" | ||
]; | ||
|
||
filterSystems = lib.filterAttrs | ||
(system: _: lib.elem system ciSystems); | ||
|
||
recurseIntoAttrsRecursive = lib.mapAttrs (_: v: | ||
if lib.isAttrs v | ||
then recurseIntoAttrsRecursive (lib.recurseIntoAttrs v) | ||
else v | ||
); | ||
|
||
systemOutputs = lib.filterAttrs | ||
(name: set: lib.isAttrs set | ||
&& lib.any | ||
(system: set ? ${system} && name != "legacyPackages") | ||
ciSystems | ||
) | ||
default.outputs; | ||
|
||
ciDrvs = lib.mapAttrs (_: system: filterSystems system) systemOutputs; | ||
in | ||
(recurseIntoAttrsRecursive ciDrvs) // { shell = import ./shell.nix; } | ||
if builtins ? getFlake | ||
then builtins.getFlake (toString ./.) | ||
else (import ./lib/compat).defaultNix |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.