diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 0000000..90f7018 --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,47 @@ +name: Build NixOS (on demand) + +on: + workflow_dispatch: + schedule: + - cron: 0 0 * * * + +# concurrency: +# group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.host }} +# cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: ./.github/actions/clean-disk + + - uses: DeterminateSystems/nix-installer-action@v12 + with: + extra-conf: | + accept-flake-config = true + + - uses: DeterminateSystems/magic-nix-cache-action@v7 + + - uses: cachix/cachix-action@v15 + with: + name: daylin + authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" + + - name: Update nix flake + run: + nix flake update >> $GITHUB_STEP_SUMMARY + + - name: Build + run: | + nix run . \ + -- \ + build --minimal \ + --host "othalan" \ + --flake . \ + --verbose \ + --debug \ + -- \ + --print-build-logs diff --git a/lib/default.nix b/lib/default.nix index a98dcd4..36ef9c6 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,6 +1,5 @@ -inputs: +inputs@{ nixpkgs, self, ... }: let - inherit (inputs) nixpkgs self; lib = nixpkgs.lib.extend (import ./extended.nix); inherit (builtins) mapAttrs readDir listToAttrs; @@ -11,8 +10,7 @@ let #supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]; supportedSystems = [ "x86_64-linux" ]; forAllSystems = f: genAttrs supportedSystems (system: f (import nixpkgs { inherit system; })); -in -{ + oizysFlake = { nixosModules = listToAttrs (findModulesList ../modules); nixosConfigurations = mapAttrs (name: _: mkSystem name) (readDir ../hosts); @@ -38,4 +36,7 @@ in ); formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style); }; +in +{ + inherit oizysFlake; } diff --git a/modules/languages/zig.nix b/modules/languages/zig.nix index 6848411..e833bca 100644 --- a/modules/languages/zig.nix +++ b/modules/languages/zig.nix @@ -8,7 +8,7 @@ let inherit (lib) mkIfIn; cfg = config.oizys.languages; - zig = inputs.zig2nix.outputs.packages.${pkgs.system}.zig.default.bin; + zig = inputs.zig2nix.outputs.packages.${pkgs.system}.zig.master.bin; zls = inputs.zls.outputs.packages.${pkgs.system}.default.overrideAttrs { nativeBuildInputs = [ zig ]; };