--- kind: pipeline type: exec name: Build all hosts platform: os: linux arch: amd64 clone: depth: 1 steps: - name: Show flake info commands: - nix --experimental-features "nix-command flakes" flake show - nix --experimental-features "nix-command flakes" flake metadata - nix --experimental-features "nix-command flakes" flake check - name: Run flake checks commands: - nix --experimental-features "nix-command flakes" flake check --show-trace - name: Build lisa commands: - nix build -v '.#nixosConfigurations.lisa.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" # - name: Build arm-server # commands: # - nix build -v '.#nixosConfigurations.arm-server.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - name: Build newton commands: - nix build -v '.#nixosConfigurations.newton.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - name: Build macintosh commands: - nix build -v '.#nixosConfigurations.macintosh.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" trigger: branch: - main event: - push - pull_request --- kind: pipeline type: exec name: Build flake apps platform: os: linux arch: amd64 clone: depth: 1 steps: # - name: Build darknet # commands: # - nix build .#darknet trigger: branch: - main event: - push --- kind: pipeline type: exec name: build flake update platform: os: linux arch: amd64 clone: depth: 1 steps: - name: flake update commands: - nix --experimental-features "nix-command flakes" flake update --inputs-from nixpkgs - name: Show git diff commands: - git diff - name: Show flake info commands: - nix --experimental-features "nix-command flakes" flake show - nix --experimental-features "nix-command flakes" flake metadata - nix --experimental-features "nix-command flakes" flake check - name: Run flake checks commands: - nix --experimental-features "nix-command flakes" flake check --show-trace - name: Build lisa commands: - nix build -v '.#nixosConfigurations.lisa.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - mv result lisa-new # - name: Build arm-server # commands: # - nix build -v '.#nixosConfigurations.arm-server.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" # - mv result arm-server-new - name: Build newton commands: - nix build -v '.#nixosConfigurations.newton.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - mv result newton-new - name: Build macintosh commands: - nix build -v '.#nixosConfigurations.macintosh.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - mv result macintosh-new # - name: Build darknet # commands: # - nix build .#darknet - name: Print report commands: - echo "newton:" && nix store diff-closures $(readlink -f aida-old) $(readlink -f aida-new) # - echo "arm-server:" && nix store diff-closures $(readlink -f arm-server-old) $(readlink -f arm-server-new) - echo "deke:" && nix store diff-closures $(readlink -f deke-old) $(readlink -f deke-new) - echo "enoch:" && nix store diff-closures $(readlink -f enoch-old) $(readlink -f enoch-new) - echo "flint:" && nix store diff-closures $(readlink -f flint-old) $(readlink -f flint-new) - echo "kora:" && nix store diff-closures $(readlink -f kora-old) $(readlink -f kora-new) - echo "simmons:" && nix store diff-closures $(readlink -f simmons-old) $(readlink -f simmons-new) - echo "snowflake:" && nix store diff-closures $(readlink -f snowflake-old) $(readlink -f snowflake-new) - echo "the-hub:" && nix store diff-closures $(readlink -f the-hub-old) $(readlink -f the-hub-new) - echo "the-bus:" && nix store diff-closures $(readlink -f the-bus-old) $(readlink -f the-bus-new) - echo "water-on-fire:" && nix store diff-closures $(readlink -f water-on-fire-old) $(readlink -f water-on-fire-new) trigger: branch: - main event: - pull_request - cron --- kind: pipeline name: push flake update type: docker steps: - name: Update flake.lock image: nixpkgs/nix-flakes commands: - nix flake update --inputs-from nixpkgs - nix flake show - nix flake metadata - nix flake check - nix flake check --show-trace environment: NIX_PATH: nixpkgs=channel:nixos-unstable - name: Push updated flake.lock image: appleboy/drone-git-push settings: branch: update-flake remote: git@github.com:MayNiklas/nixos.git force: true commit: true force: true commit_message: "❄️ Update flake.lock" ssh_key: from_secret: deploy_key - name: notify on failure image: drillster/drone-email settings: username: apikey from: from_secret: email_from host: from_secret: email_host password: from_secret: email_password when: status: - failure trigger: branch: - main event: - cron