Skip to content

Commit

Permalink
Fetched template changes (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
spietras authored Nov 5, 2023
1 parent 3e3b58d commit 8fe03b9
Show file tree
Hide file tree
Showing 32 changed files with 6,289 additions and 3,949 deletions.
3 changes: 2 additions & 1 deletion .copier-answers.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 0.1.3
_commit: 0.4.0
_src_path: gh:radio-aktywne/template-app-generic
accountname: radio-aktywne
appname: fusion
description: Audio streaming with Liquidsoap 🧼
docs: true
docsurl: https://radio-aktywne.github.io/app-fusion
envprefix: FUSION
imagename: apps/fusion
registry: true
releases: true
reponame: app-fusion
Expand Down
106 changes: 3 additions & 103 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,114 +1,14 @@
{
// The Compose file to use
"dockerComposeFile": "docker-compose.yaml",
// The service that will be used by all tools
"service": "dev",
// Where the source code is located in the container
"workspaceFolder": "/workspace",
// The user to be used by all tools
"remoteUser": "vscode",
// The user to be used by all other processes
"containerUser": "vscode",
// Override the default command to keep the container running
"overrideCommand": true,
// Extra features to install to the container
// Pin feature versions to ensure reproducibility
"features": {
// Install Nix
"ghcr.io/devcontainers/features/nix:1.1.3": {
// Pin version to ensure reproducibility
"version": "2.15.1",
// Multi-user mode is the best in this case
"multiUser": true,
// Enable experimental features
"extraNixConfig": "experimental-features = nix-command flakes"
},
// Install Direnv
"ghcr.io/devcontainers-contrib/features/gh-release:1.0.17": {
"repo": "direnv/direnv",
"binaryNames": "direnv",
// Pin version to ensure reproducibility
"version": "2.32.3"
},
// Install Starship
"ghcr.io/devcontainers-contrib/features/starship:1.0.6": {
// Pin version to ensure reproducibility
"version": "1.14.2"
},
// Enable using Docker from within the container
"ghcr.io/devcontainers/features/docker-in-docker:2.2.0": {
// Pin Engine version to ensure reproducibility
"version": "20.10.25",
// Use the Moby engine instead of Docker CE
"moby": true,
// Use Docker Compose v2
"dockerDashComposeVersion": "v2",
// Enable BuildKit
"installDockerBuildx": true
}
},
// Run a command when the container is created
"onCreateCommand": "./.devcontainer/setup.sh",
// Run a command when the content is updated
"updateContentCommand": "./.devcontainer/update.sh",
"image": "ghcr.io/radio-aktywne/devcontainers/app-generic:latest",
// Tool-specific settings
"customizations": {
// VS Code settings
"vscode": {
// Extensions to install
"extensions": [
// Direnv
"mkhl.direnv",
// Task
"task.vscode-task",
// Trunk
"Trunk.io",
// Ignore files
"Syler.ignore",
// Nix
"jnoortheen.nix-ide",
// Improved Markdown preview
"bierner.github-markdown-preview",
// SVG preview
"jock.svg",
// Liquidsoap syntax highlighting
"vittee.liquidsoap",
// GitLens
"eamodio.gitlens",
// GitHub Copilot
"GitHub.copilot"
],
// Settings to override
"settings": {
// Don't forward ports automatically
"remote.autoForwardPorts": false,
// Set Trunk as the default formatter
"editor.defaultFormatter": "trunk.io",
// Enable GitHub Copilot for all languages
// For some reason, wildcard alone is not enough
"github.copilot.enable": {
"*": true,
"plaintext": true,
"markdown": true,
"scminput": true
},
// Use LSP for Nix
"nix.enableLanguageServer": true,
// Use nil as the language server
"nix.serverPath": "nil",
"nix.serverSettings": {
"nil": {
"formatting": {
// Use 'nix fmt' for formatting
"command": ["nix", "fmt", "--", "-"]
}
}
},
// Use Nix IDE instead of Trunk for Nix files
"[nix]": {
"editor.defaultFormatter": "jnoortheen.nix-ide"
}
}
"vittee.liquidsoap"
]
}
}
}
36 changes: 0 additions & 36 deletions .devcontainer/docker-compose.yaml

This file was deleted.

38 changes: 0 additions & 38 deletions .devcontainer/setup.sh

This file was deleted.

8 changes: 0 additions & 8 deletions .devcontainer/update.sh

This file was deleted.

2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#Task
/.task
/Taskfile.yaml
/Taskfile.yml

# Misc
.DS_Store
Expand Down
4 changes: 2 additions & 2 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash

# reload when these files change
watch_file ./*.nix flake.lock
watch_file ./flake.lock ./*.nix

# activate the default development shell in the current shell
# --accept-flake-config will accept the nix configuration from the flake without prompting
eval "$(nix print-dev-env . --accept-flake-config)" || true
eval "$(nix print-dev-env path:. --accept-flake-config)" || true
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Take only files in src into account for language stats
# Mark everything as vendored
* linguist-vendored
# Treat docs as documentation
docs/** -linguist-vendored linguist-documentation
# Unmark files in src, so that they are included in language stats
src/** -linguist-vendored
25 changes: 12 additions & 13 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,21 @@ concurrency:
push:
branches:
- main
# Run only if there are changes in docs/ or workflow file
# Run only on changes to relevant files
paths:
- ".github/workflows/docs.yaml"
- "docs/**"
- "copier.yaml"
- "*.nix"
- "flake.lock"
- "*.nix"
- "Taskfile.dist.yaml"
- ".github/workflows/docs.yaml"

jobs:
build:
name: Build docs
# Pin version of Ubuntu to avoid breaking changes
runs-on: ubuntu-22.04
# Use reasonable timeout to avoid stuck workflows
timeout-minutes: 5
timeout-minutes: 10
env:
NIX_CACHE_DIR: /home/runner/.nixcache
permissions:
Expand All @@ -40,23 +39,23 @@ jobs:
pages: write
steps:
- name: Checkout code
uses: actions/checkout@v3.5.2
uses: actions/checkout@v4.1.0
- name: Setup Nix cache
uses: actions/[email protected].1
uses: actions/[email protected].2
id: cache-nix
with:
path: ${{ env.NIX_CACHE_DIR }}
key: docs-nix
- name: Setup docs modules cache
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
path: docs/node_modules
key: docs-modules
- name: Install Nix
uses: cachix/install-nix-action@v21
uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ github.token }}
install_url: https://releases.nixos.org/nix/nix-2.15.1/install
install_url: https://releases.nixos.org/nix/nix-2.18.0/install
# See: https://github.com/cachix/install-nix-action/issues/56
- name: Import Nix store cache
if: steps.cache-nix.outputs.cache-hit == 'true'
Expand All @@ -80,7 +79,7 @@ jobs:
- name: Setup Pages
uses: actions/[email protected]
- name: Upload artifact
uses: actions/upload-pages-artifact@v1.0.8
uses: actions/upload-pages-artifact@v2.0.0
with:
path: docs/build
# See: https://github.com/cachix/install-nix-action/issues/56
Expand All @@ -101,7 +100,7 @@ jobs:
# Pin version of Ubuntu to avoid breaking changes
runs-on: ubuntu-22.04
# Use reasonable timeout to avoid stuck workflows
timeout-minutes: 5
timeout-minutes: 10
# Use Pages environment
environment:
name: github-pages
Expand All @@ -114,4 +113,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/[email protected].1
uses: actions/[email protected].4
20 changes: 10 additions & 10 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,46 @@ name: Image
push:
branches:
- main
# Run only on changes to files relevant to the image
# Run only on changes to relevant files
paths:
- ".github/workflows/image.yaml"
- "scripts/**"
- "src/**"
- ".dockerignore"
- "Dockerfile"
- "*.nix"
- "flake.lock"
- ".github/workflows/image.yaml"
- "*.nix"
# Run also on pull requests to main branch
pull_request:
branches:
- main
# Run only on changes to files relevant to the image
# Run only on changes to relevant files
paths:
- ".github/workflows/image.yaml"
- "scripts/**"
- "src/**"
- ".dockerignore"
- "Dockerfile"
- "*.nix"
- "flake.lock"
- ".github/workflows/image.yaml"
- "*.nix"

jobs:
image:
name: Build Docker image
# Pin version of Ubuntu to avoid breaking changes
runs-on: ubuntu-22.04
# Use reasonable timeout to avoid stuck workflows
timeout-minutes: 20
timeout-minutes: 30
permissions:
# Needed to checkout code
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v3.5.2
uses: actions/checkout@v4.1.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.7.0
uses: docker/setup-buildx-action@v3.0.0
- name: Build Docker image
uses: docker/build-push-action@v4.1.1
uses: docker/build-push-action@v5.0.0
with:
context: .
# Don't save image
Expand Down
Loading

0 comments on commit 8fe03b9

Please sign in to comment.