From a0190a324c041d97bc4d142811b9a31a494242a4 Mon Sep 17 00:00:00 2001 From: Thilo Hohlt Date: Sun, 27 Oct 2024 00:22:56 +0200 Subject: [PATCH 1/6] Update deploy.yml --- .github/workflows/deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b78769a..70cce7c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,7 +10,8 @@ jobs: deploy: runs-on: ubuntu-latest if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' }} - environment: ${{ github.event.workflow_run.head_branch == 'devel' && 'qs' || 'prod' }} + environment: + name: ${{ github.event.workflow_run.head_branch == 'devel' && 'qs' || 'prod' }} steps: - uses: actions/checkout@v4 From bef4d1766368b01e2e0df26a5b4a388d409125ed Mon Sep 17 00:00:00 2001 From: Thilo Hohlt Date: Sun, 27 Oct 2024 00:46:28 +0200 Subject: [PATCH 2/6] Update deploy.yml --- .github/workflows/deploy.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 70cce7c..239f825 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,11 +7,19 @@ on: branches: [ devel, main ] jobs: - deploy: + environment-check: runs-on: ubuntu-latest if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' }} + outputs: + env_name: ${{ github.event.workflow_run.head_branch == 'devel' && 'qs' || 'prod' }} + steps: + - run: echo "Determining environment..." + + deploy: + needs: environment-check + runs-on: ubuntu-latest environment: - name: ${{ github.event.workflow_run.head_branch == 'devel' && 'qs' || 'prod' }} + name: ${{ needs.environment-check.outputs.env_name }} steps: - uses: actions/checkout@v4 From dd718efceb4b26bb8dec818e66ee209a12cb77c5 Mon Sep 17 00:00:00 2001 From: Thilo Hohlt Date: Sun, 27 Oct 2024 01:33:26 +0200 Subject: [PATCH 3/6] Update deploy.yml --- .github/workflows/deploy.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 239f825..db58da3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,7 +13,10 @@ jobs: outputs: env_name: ${{ github.event.workflow_run.head_branch == 'devel' && 'qs' || 'prod' }} steps: - - run: echo "Determining environment..." + - name: Determine and print environment + run: | + echo "Determining environment..." + echo "Environment name: ${{ github.event.workflow_run.head_branch == 'devel' && 'qs' || 'prod' }}" deploy: needs: environment-check From dd34e1b0e0d9bfc47f23e0a9529b0ff901b6632e Mon Sep 17 00:00:00 2001 From: Thilo Hohlt Date: Sun, 27 Oct 2024 01:50:05 +0200 Subject: [PATCH 4/6] Update deploy.yml --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index db58da3..eb48135 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -38,7 +38,7 @@ jobs: uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SSH_KEY }} - known_hosts: ${{ vars.KNOWN_HOSTS }} + known_hosts: ${{ secrets.KNOWN_HOSTS }} - name: Deploy to demo server run: | From b055f2fb7428577936f2c6533c4a59e5eed205fd Mon Sep 17 00:00:00 2001 From: thiloho <123883702+thiloho@users.noreply.github.com> Date: Sun, 8 Dec 2024 17:46:41 +0000 Subject: [PATCH 5/6] Set prod server hardware configuration --- nix/deploy/prod/hardware-configuration.nix | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 nix/deploy/prod/hardware-configuration.nix diff --git a/nix/deploy/prod/hardware-configuration.nix b/nix/deploy/prod/hardware-configuration.nix new file mode 100644 index 0000000..2ded190 --- /dev/null +++ b/nix/deploy/prod/hardware-configuration.nix @@ -0,0 +1,39 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_scsi" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/ee176add-b854-4434-94f9-59ba519bbdc1"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/A692-993B"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/d54c93ba-e644-47a9-974d-ed825b88ab8b"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; +} From e8bf6f8cd688198f0d14dc0e4b25533eea1dcd9e Mon Sep 17 00:00:00 2001 From: Thilo Hohlt Date: Sun, 8 Dec 2024 18:59:56 +0100 Subject: [PATCH 6/6] Update default.nix --- nix/deploy/prod/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/nix/deploy/prod/default.nix b/nix/deploy/prod/default.nix index 51f0565..0ac3906 100644 --- a/nix/deploy/prod/default.nix +++ b/nix/deploy/prod/default.nix @@ -8,7 +8,6 @@ networking.hostName = "archtika-demo"; - /* services.archtika = { enable = true; package = localArchtikaPackage; @@ -22,5 +21,4 @@ maxUserWebsites = 2; }; }; - */ }