chore: various cleanup

This commit is contained in:
winston 2024-09-08 02:22:54 +02:00
parent 6b1a7c8428
commit 0ae9142723
Signed by: winston
GPG key ID: 3786770EDBC2B481
6 changed files with 20 additions and 76 deletions

View file

@ -1,6 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
for file in .github/workflows/*.dhall; do
nix shell nixpkgs#dhall-yaml -c dhall-to-yaml-ng --file "$file" >"${file%.dhall}.yml"
done

View file

@ -1,32 +0,0 @@
let GithubActions =
https://github.com/regadas/github-actions-dhall/raw/master/package.dhall
sha256:9c1ae46a1d56f1c22dbc9006cbb3e569806e75d02fded38fa102935b34980395
let NIX_CONFIG = "accept-flake-config = true"
let check =
GithubActions.Job::{
, runs-on = GithubActions.RunsOn.Type.ubuntu-latest
, steps =
[ GithubActions.Step::{ uses = Some "actions/checkout@v4.1.7" }
, GithubActions.Step::{
, uses = Some "DeterminateSystems/flake-checker-action@v8"
}
, GithubActions.Step::{
, uses = Some "DeterminateSystems/nix-installer-action@v13"
}
, GithubActions.Step::{
, uses = Some "DeterminateSystems/magic-nix-cache-action@v7"
}
, GithubActions.Step::{ run = Some "nix flake check --show-trace" }
]
}
in GithubActions.Workflow::{
, name = "check"
, on = GithubActions.On::{
, push = Some GithubActions.Push::{ paths = Some [ "**.nix", "**.lock" ] }
}
, env = Some (toMap { NIX_CONFIG })
, jobs = toMap { check }
}

View file

@ -1,17 +1,23 @@
env:
NIX_CONFIG: "accept-flake-config = true"
jobs:
check:
"runs-on": "ubuntu-latest"
steps:
- uses: "actions/checkout@v4.1.7"
- uses: "DeterminateSystems/flake-checker-action@v8"
- uses: "DeterminateSystems/nix-installer-action@v13"
- uses: "DeterminateSystems/magic-nix-cache-action@v7"
- run: "nix flake check --show-trace"
name: check
'on':
on:
push:
paths:
- "**.nix"
- "**.lock"
env:
NIX_CONFIG: "accept-flake-config = true"
jobs:
check:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4.1.7"
- uses: "DeterminateSystems/flake-checker-action@v8"
- uses: "DeterminateSystems/nix-installer-action@v13"
- uses: "DeterminateSystems/magic-nix-cache-action@v7"
- run: nix flake check --show-trace

View file

@ -50,6 +50,3 @@ clean:
sudo nix-env --profile /nix/var/nix/profiles/system --delete-generations old
nix-collect-garbage -d
nix store optimise
fetch:
@./scripts/fetch.sh

View file

@ -1,26 +1,11 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
"docker:pinDigests",
":pinDevDependencies",
"config:best-practices",
"schedule:weekly",
":automergeAll"
],
"nix": {
"enabled": true
},
"customManagers": [
{
"customType": "regex",
"fileMatch": [
"(^|/)(workflow-templates|\\.(?:github|gitea|forgejo)/(?:workflows|actions))/.+\\.dhall$",
"(^|/)action\\.dhall$"
],
"matchStrings": [
"GithubActions\\.Step::{[\\s,]*uses\\s?=\\s?Some\\s?\"(?<depName>.+)@(?<currentValue>.+)\""
],
"datasourceTemplate": "github-tags"
}
]
}

View file

@ -1,6 +0,0 @@
#!/usr/bin/env nix
#!nix shell nixpkgs#onefetch nixpkgs#scc --command bash
# shellcheck shell=bash
set -euo pipefail
onefetch --true-color never --no-bots -d lines-of-code
scc --no-cocomo .