From b1ad71cd35a7c55f7e61fd5981dbdcbfd49f1805 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 27 Mar 2023 13:36:56 +0200 Subject: [PATCH 1/5] cachix: remove unused binary caches --- flake.nix | 6 +----- profiles/cachix/nix-community.nix | 10 ---------- profiles/cachix/nrdxp.nix | 10 ---------- 3 files changed, 1 insertion(+), 25 deletions(-) delete mode 100644 profiles/cachix/nix-community.nix delete mode 100644 profiles/cachix/nrdxp.nix diff --git a/flake.nix b/flake.nix index bd494148..a9a49f7d 100644 --- a/flake.nix +++ b/flake.nix @@ -2,8 +2,6 @@ description = "A highly structured configuration database."; nixConfig.extra-experimental-features = "nix-command flakes"; - nixConfig.extra-substituters = "https://nix-dram.cachix.org https://dram.cachix.org https://nrdxp.cachix.org https://nix-community.cachix.org"; - nixConfig.extra-trusted-public-keys = "nix-dram.cachix.org-1:CKjZ0L1ZiqH3kzYAZRt8tg8vewAx5yj8Du/+iR8Efpg= dram.cachix.org-1:baoy1SXpwYdKbqdTbfKGTKauDDeDlHhUpC+QuuILEMY= nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="; inputs = { # Track channels with commits tested and built by hydra @@ -99,9 +97,7 @@ imports = [(digga.lib.importHosts ./hosts)]; hosts = { - /* - set host specific properties here - */ + # Set host-specific properties here bootstrap = { modules = [ digga.nixosModules.bootstrapIso diff --git a/profiles/cachix/nix-community.nix b/profiles/cachix/nix-community.nix deleted file mode 100644 index 3c957fcd..00000000 --- a/profiles/cachix/nix-community.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - nix.settings = { - substituters = [ - "https://nix-community.cachix.org" - ]; - trusted-public-keys = [ - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; - }; -} diff --git a/profiles/cachix/nrdxp.nix b/profiles/cachix/nrdxp.nix deleted file mode 100644 index ddced9c3..00000000 --- a/profiles/cachix/nrdxp.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - nix.settings = { - substituters = [ - "https://nrdxp.cachix.org" - ]; - trusted-public-keys = [ - "nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4=" - ]; - }; -} From 972e3f1569c6c84c7445c997e189ebe127141649 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 27 Mar 2023 18:03:28 +0200 Subject: [PATCH 2/5] cachix: default binary cache is nixos.org, no need to specify it explicitly (results in double entry in nix.conf) Also force our nix.extraOptions because digga tries real hard to put their binary caches there: https://github.com/divnix/digga/blob/0595ae70cdb5ccf1ab031199fe98551c4b378bd9/modules/nix-config.nix#L19-L23 --- modules/core/nix.nix | 2 +- profiles/cachix/default.nix | 13 ------------- profiles/full-install/default.nix | 2 -- profiles/pub-solar-iso/default.nix | 1 - 4 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 profiles/cachix/default.nix diff --git a/modules/core/nix.nix b/modules/core/nix.nix index 711304ba..325e20c3 100644 --- a/modules/core/nix.nix +++ b/modules/core/nix.nix @@ -21,7 +21,7 @@ system-features = ["nixos-test" "benchmark" "big-parallel" "kvm"]; }; # Generally useful nix option defaults - extraOptions = '' + extraOptions = lib.mkForce '' min-free = 536870912 keep-outputs = true keep-derivations = true diff --git a/profiles/cachix/default.nix b/profiles/cachix/default.nix deleted file mode 100644 index 9b810da7..00000000 --- a/profiles/cachix/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ - pkgs, - lib, - ... -}: let - folder = ./.; - toImport = name: value: folder + ("/" + name); - filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key && key != "default.nix"; - imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder)); -in { - inherit imports; - nix.settings.substituters = ["https://cache.nixos.org/"]; -} diff --git a/profiles/full-install/default.nix b/profiles/full-install/default.nix index d3c03da7..d9b07733 100644 --- a/profiles/full-install/default.nix +++ b/profiles/full-install/default.nix @@ -7,8 +7,6 @@ }: let inherit (lib) fileContents; in { - imports = [../cachix]; - config = { pub-solar.audio.mopidy.enable = true; pub-solar.audio.bluetooth.enable = true; diff --git a/profiles/pub-solar-iso/default.nix b/profiles/pub-solar-iso/default.nix index 2b3669c5..fa973283 100644 --- a/profiles/pub-solar-iso/default.nix +++ b/profiles/pub-solar-iso/default.nix @@ -7,7 +7,6 @@ }: let inherit (lib) fileContents; in { - imports = [../cachix]; config = { pub-solar.graphical.wayland.software-renderer.enable = true; pub-solar.sway.terminal = "foot"; From 52c2ca9f13b93d7e71925bdf229b80cd8f9fc474 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 27 Mar 2023 18:53:54 +0200 Subject: [PATCH 3/5] nix.conf: add back required experimental features --- modules/core/nix.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/core/nix.nix b/modules/core/nix.nix index 325e20c3..87182a6e 100644 --- a/modules/core/nix.nix +++ b/modules/core/nix.nix @@ -22,6 +22,7 @@ }; # Generally useful nix option defaults extraOptions = lib.mkForce '' + experimental-features = flakes nix-command min-free = 536870912 keep-outputs = true keep-derivations = true From 3bdc4b1f3989711267e5c6346ad6c0e5dbc02314 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 28 Mar 2023 14:00:07 +0200 Subject: [PATCH 4/5] ci: cleanup unused directories --- .drone/setup_ssh.sh | 11 ---- .drone/upstream-branch.sh | 12 ---- .github/ISSUE_TEMPLATE/bug_report.md | 38 ----------- .github/ISSUE_TEMPLATE/community_request.md | 22 ------- .github/ISSUE_TEMPLATE/feature_request.md | 24 ------- .github/ISSUE_TEMPLATE/upstream_notice.md | 16 ----- .github/workflows/check.yml | 29 --------- .github/workflows/mdbook_docs.yml | 27 -------- .github/workflows/release.yml | 71 --------------------- 9 files changed, 250 deletions(-) delete mode 100755 .drone/setup_ssh.sh delete mode 100755 .drone/upstream-branch.sh delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .github/ISSUE_TEMPLATE/community_request.md delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 .github/ISSUE_TEMPLATE/upstream_notice.md delete mode 100644 .github/workflows/check.yml delete mode 100644 .github/workflows/mdbook_docs.yml delete mode 100644 .github/workflows/release.yml diff --git a/.drone/setup_ssh.sh b/.drone/setup_ssh.sh deleted file mode 100755 index f4a1bbd4..00000000 --- a/.drone/setup_ssh.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env sh - -set -e - -# Setup ssh inside container -mkdir -p ~/.ssh -echo "$GITEA_SSH_KEY" > ~/.ssh/id_rsa -echo "[git.b12f.io]:2222 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ4uaREL7acSSCNAX+voDYl1Kj7JipP62fR5x1UyGP9u" >> ~/.ssh/known_hosts -echo "Host git.b12f.io" >> ~/.ssh/config -echo " Port 2222" >> ~/.ssh/config -chmod -R 600 ~/.ssh diff --git a/.drone/upstream-branch.sh b/.drone/upstream-branch.sh deleted file mode 100755 index a53ad4bb..00000000 --- a/.drone/upstream-branch.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env sh - -set -e -set -u - -LOCAL="$DRONE_BRANCH" -[ "$LOCAL" = "main" ] && UPSTREAM=origin/devos || UPSTREAM=origin/main - -git fetch --all -git checkout "$LOCAL" -git merge "$UPSTREAM" -git push origin "$LOCAL" diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 1040ee63..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug report -about: Create a report to help improve -title: '' -labels: 'bug' -assignees: '' - ---- - -Your issue may already be reported! -Please search on the [issue tracker](../) before creating one. - -## Expected Behavior - - - -## Current Behavior - - -## Possible Solution - - - -## Steps to Reproduce - - -1. -2. -3. -4. - -## Context - - - -## Your Environment - - diff --git a/.github/ISSUE_TEMPLATE/community_request.md b/.github/ISSUE_TEMPLATE/community_request.md deleted file mode 100644 index c55a3faf..00000000 --- a/.github/ISSUE_TEMPLATE/community_request.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -name: Commuity Request -about: inspire contribution to the `community` branch -title: '' -labels: 'community' -assignees: '' - ---- - -Your issue may already be reported! -Please search on the [issue tracker](../) before creating one. - -## Ideas - - - - - - -## Requests - - diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 327943c0..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Feature request -about: Suggest an idea -title: '' -labels: 'enhancement' -assignees: '' - ---- - -Your issue may already be reported! -Please search on the [issue tracker](../) before creating one. - -## Would your feature fix an existing issue? - - -## Describe the solution you'd like - - -## Describe alternatives you've considered - - -## Additional context - - diff --git a/.github/ISSUE_TEMPLATE/upstream_notice.md b/.github/ISSUE_TEMPLATE/upstream_notice.md deleted file mode 100644 index 4ada54e3..00000000 --- a/.github/ISSUE_TEMPLATE/upstream_notice.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -name: Upstream notice (Issues or Changes) -about: Create an upstream notice to help our research -title: '[ ]: ' -labels: 'upstream' -assignees: '' - ---- - -## Link - - - -## Context - diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml deleted file mode 100644 index 756aa2bf..00000000 --- a/.github/workflows/check.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: "Check & Cachix" -on: - push: - branches: - - main - - trying - - staging -jobs: - check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2.3.4 - - uses: cachix/install-nix-action@v13 - with: - install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20210415_76980a1/install - extra_nix_config: | - experimental-features = nix-command flakes - system-features = nixos-test benchmark big-parallel kvm recursive-nix - substituters = https://nrdxp.cachix.org https://nix-community.cachix.org https://cache.nixos.org - trusted-public-keys = nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= - - uses: cachix/cachix-action@v10 - with: - name: nrdxp - signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - - run: nix -Lv flake check - - run: nix -Lv build ".#nixosConfigurations.NixOS.config.system.build.toplevel" - - run: nix -Lv develop -c echo OK - - run: nix -Lv develop --command bud --help diff --git a/.github/workflows/mdbook_docs.yml b/.github/workflows/mdbook_docs.yml deleted file mode 100644 index 5faf9c28..00000000 --- a/.github/workflows/mdbook_docs.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Deploy Docs to GitHub Pages - -on: - push: - branches: - - main - -jobs: - deploy: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - - name: Setup mdBook - uses: peaceiris/actions-mdbook@v1 - with: - mdbook-version: 'latest' - - - run: mdbook build doc - - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_branch: gh-pages - publish_dir: ./doc/book - cname: devos.divnix.com diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 8cabd128..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Release - -on: - push: - tags: - - v* - -jobs: - changelog: - name: Update Changelog - runs-on: ubuntu-latest - steps: - - name: Get version from tag - env: - GITHUB_REF: ${{ github.ref }} - run: | - export CURRENT_VERSION=${GITHUB_TAG/refs\/tags\/v/} - echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV - - name: Checkout code - uses: actions/checkout@v2 - with: - ref: main - - name: Update Changelog - uses: heinrichreimer/github-changelog-generator-action@v2.1.1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - issues: false - issuesWoLabels: false - pullRequests: true - prWoLabels: true - addSections: '{"documentation":{"prefix":"**Documentation:**","labels":["documentation"]}}' - - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Update Changelog for tag ${{ env.CURRENT_VERSION }} - file_pattern: CHANGELOG.md - - release_notes: - name: Create Release Notes - runs-on: ubuntu-latest - needs: changelog - steps: - - name: Get version from tag - env: - GITHUB_REF: ${{ github.ref }} - run: | - export CURRENT_VERSION=${GITHUB_TAG/refs\/tags\/v/} - echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV - - - name: Checkout code - uses: actions/checkout@v2 - with: - ref: main - - - name: Get Changelog Entry - id: changelog_reader - uses: mindsers/changelog-reader-action@v1 - with: - version: ${{ env.CURRENT_VERSION }} - path: ./CHANGELOG.md - - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - body: ${{ steps.changelog_reader.outputs.log_entry }} - draft: false - prerelease: false From 3ea141d445f5b3cf0acc7beff6623737d62eb1d6 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 28 Mar 2023 14:03:41 +0200 Subject: [PATCH 5/5] cachix: remove unused binary caches from drone runner --- modules/docker-ci-runner/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/docker-ci-runner/default.nix b/modules/docker-ci-runner/default.nix index 11998fd9..4863d970 100644 --- a/modules/docker-ci-runner/default.nix +++ b/modules/docker-ci-runner/default.nix @@ -23,7 +23,7 @@ let export nix_user_config_file="/home/build/.local/share/nix/trusted-settings.json" mkdir -p $(dirname \\$nix_user_config_file) - echo '{"extra-experimental-features":{"nix-command flakes":true},"extra-substituters":{"https://nix-dram.cachix.org https://dram.cachix.org https://nrdxp.cachix.org https://nix-community.cachix.org":true},"extra-trusted-public-keys":{"nix-dram.cachix.org-1:CKjZ0L1ZiqH3kzYAZRt8tg8vewAx5yj8Du/+iR8Efpg= dram.cachix.org-1:baoy1SXpwYdKbqdTbfKGTKauDDeDlHhUpC+QuuILEMY= nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=":true}}' > \\$nix_user_config_file + echo '{"extra-experimental-features":{"nix-command flakes":true}}' > \\$nix_user_config_file chown -R build /home/build/ curl -L https://github.com/drone-runners/drone-runner-exec/releases/latest/download/drone_runner_exec_linux_amd64.tar.gz | tar xz