Skip to content

Commit

Permalink
ci: Set up Editorconfig and ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
soupglasses committed Jun 5, 2022
1 parent 4ae91f4 commit 950542b
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 4 deletions.
7 changes: 6 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space

[*.{nix,yml,yaml}]
[*.{yml,yaml}]
indent_size = 2

[*.nix]
# We deal with indendation trough nixpkgs-fmt as its much
# more intelligent.
indent_size = unset

[*.py]
indent_size = 4

Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
pull_request:
push:
branches: [main]

jobs:
Spelling:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v17
- uses: codespell-project/codespell-problem-matcher@v1
- name: Check Spelling
run: nix run nixpkgs#codespell .

Nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v17
- name: Check Formatting
run: nix run nixpkgs#nixpkgs-fmt -- --check .

Checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v17
- name: Run Checks
run: nix flake check --no-build

EditorConfig:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: greut/eclint-action@v0
4 changes: 2 additions & 2 deletions common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
time.timeZone = "Etc/UTC";

# NOTE: If you attempt to change the default password
# below, there is a bug where it may corrupt the /etc/shadow
# below, there is a bug where it may corrupt the /etc/shadow
# file. See : https://github.com/NixOS/nixpkgs/issues/99433
# WORKAROUND: Enable mutableUsers, remove the root password
# WORKAROUND: Enable mutableUsers, remove the root password
# entry while logged in as root. Use `pwck -q` to fix any issues.
# Then attempt to disable mutableUsers when deploying the new
# password.
Expand Down
2 changes: 1 addition & 1 deletion hosts/nona/modules/jellyfin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
useACMEHost = "watch.byte.surf";
forceSSL = true;

# From: https://jellyfin.org/docs/general/networking/nginx.html
# From: https://jellyfin.org/docs/general/networking/nginx.html
locations = {
"= /".extraConfig = ''
return 302 https://$host/web/;
Expand Down

0 comments on commit 950542b

Please sign in to comment.