Skip to content

Commit

Permalink
Merge pull request #35 from jwillikers/deadnix
Browse files Browse the repository at this point in the history
Enable more pre-commit checks, fix broken links, and improve Nix support
  • Loading branch information
jwillikers authored Oct 10, 2024
2 parents 7734e6e + f0acbaf commit 47f9a45
Show file tree
Hide file tree
Showing 47 changed files with 186 additions and 102 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bundler-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Update Gem lock file
run: nix develop --command bundle update
- name: Update the hashes in the gemset.nix file
run: nix develop --command bundix
run: nix develop --command bundix --lock
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flake-lock-updater.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Flake ❄️ Lock 🔒️ Updater ✨
"on":
schedule:
# Pi o'clock
- cron: '3 14 * * 1,5'
- cron: "3 14 * * 1,5"
workflow_dispatch:

jobs:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/link-checker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check URLs with Lychee

"on":
pull_request:
branches: [main]
push:
branches: [main]
schedule:
# Run once a month on the 14th.
- cron: "0 0 14 * *"
workflow_dispatch:

jobs:
link-checker:
runs-on: ubuntu-latest
steps:
- name: Restore lychee cache
uses: actions/cache@v4
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v14
- uses: DeterminateSystems/magic-nix-cache-action@v8
# todo Cache bundler stuff?
- name: Build with Jekyll
run: nix build
- name: Convert the README files to html
run: nix develop --command asciidoctor {CODE_OF_CONDUCT,LICENSE,README}.adoc
- name: Run lychee on the generated site
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: nix develop --command lychee --cache --no-progress --verbose result/srv/ ./*.html
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,11 @@ result

# git-hooks.nix
/.pre-commit-config.yaml

# lychee
.lycheecache

# Asciidoctor
CODE_OF_CONDUCT.html
LICENSE.html
README.html
2 changes: 0 additions & 2 deletions .ignore

This file was deleted.

14 changes: 8 additions & 6 deletions .justfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
default: serve

alias c := check

check: build
yamllint .
asciidoctor {CODE_OF_CONDUCT,LICENSE,README}.adoc
lychee --cache _site/ *.html

alias f := format
alias fmt := format

format:
treefmt

alias l := lint

lint:
yamllint .

alias b := build

build:
Expand All @@ -34,5 +36,5 @@ update: && build test
nu update-nixos-release.nu
nix flake update
bundle update
bundix
bundix --lock
nu update-nix-direnv.nu
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"bbenoist.nix",
"thenuprojectcontributors.vscode-nushell-lang",
"nefrob.vscode-just-syntax",
"tekumara.typos-vscode"
"tekumara.typos-vscode",
"jnoortheen.nix-ide"
]
}
10 changes: 6 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"files.associations": {
"*.html": "liquid"
},
"asciidoc.antora.enableAntoraSupport": false,
"cSpell.words": [
"accountsservices",
"adoc",
Expand Down Expand Up @@ -282,5 +280,9 @@
"zstd",
"ZSYS"
],
"asciidoc.antora.enableAntoraSupport": false
"files.associations": {
"*.html": "liquid"
},
"nix.enableLanguageServer": true,
"nix.serverPath": "nil"
}
2 changes: 2 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ extends: default
rules:
document-start: disable
line-length: disable
comments:
min-spaces-from-content: 1
8 changes: 4 additions & 4 deletions CODE_OF_CONDUCT.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ Violating these terms may lead to a permanent ban.

== Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct/.

Community Impact Guidelines were inspired by https://github.com/mozilla/diversity[Mozilla's code of conduct enforcement ladder].
Community Impact Guidelines were inspired by https://github.com/mozilla/inclusion[Mozilla's code of conduct enforcement ladder].

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq.
Translations are available at https://www.contributor-covenant.org/translations.
For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq/.
Translations are available at https://www.contributor-covenant.org/translations/.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ group :jekyll_plugins do
gem 'jekyll-include-cache'
end

gem "webrick", "~> 1.7"
gem "webrick"
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ DEPENDENCIES
kramdown (>= 2.3.0)
minimal-mistakes-jekyll
rouge
webrick (~> 1.7)
webrick

BUNDLED WITH
2.5.16
2.5.9
6 changes: 3 additions & 3 deletions LICENSE.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= GNU General Public License

_Version 3, 29 June 2007_
_Copyright © 2007 Free Software Foundation, Inc. &lt;<http://fsf.org/>&gt;_
_Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>_

Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
Expand Down Expand Up @@ -584,11 +584,11 @@ for a GUI interface, you would use an “about box”.
You should also get your employer (if you work as a programmer) or school, if any, to
sign a “copyright disclaimer” for the program, if necessary. For more
information on this, and how to apply and follow the GNU GPL, see
&lt;<http://www.gnu.org/licenses/>&gt;.
<http://www.gnu.org/licenses/>.

The GNU General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may consider it
more useful to permit linking proprietary applications with the library. If this is
what you want to do, use the GNU Lesser General Public License instead of this
License. But first, please read
&lt;<http://www.gnu.org/philosophy/why-not-lgpl.html>&gt;.
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Several of these projects are enumerated below.
* https://jekyllrb.com/[Jekyll]
* https://github.com/asciidoctor/jekyll-asciidoc[jekyll-asciidoc]
* https://mmistakes.github.io/minimal-mistakes/[Minimal Mistakes]
* https://rouge.jneen.net/[Rouge]
* https://rouge.jneen.net[Rouge]
* https://www.ruby-lang.org/en/[Ruby]

== Code of Conduct
Expand Down
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ name: >-
Jordan Williams <br /> <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">
<img alt="Creative Commons License" style="border-width:0"
src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" />
</a> <br /> <span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/Text"
property="dct:title" rel="dct:type">JWillikers</span> by
</a> <br /> <span "dct:title" rel="dct:type">JWillikers</span> by
<a xmlns:cc="http://creativecommons.org/ns#" href="https://jwillikers.com"
property="cc:attributionName" rel="cc:attributionURL">Jordan Williams</a>
is licensed under a
Expand Down Expand Up @@ -174,6 +173,7 @@ exclude:
- Gemfile.lock
- gemset.nix
- Rakefile
- result/
- vendor/bundle/
- vendor/cache/
- vendor/gems/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:page-layout:
:page-category: Data Storage
:page-tags: [automount, Btrfs, Cryptsetup, elementary, encryption, GIO, Linux, mount, systemd, Ubuntu, udev, udevil, udisks2]
:Bash: https://www.gnu.org/software/bash/[Bash]
:Bash: https://tiswww.case.edu/php/chet/bash/bashtop.html[Bash]
:Btrfs: https://btrfs.wiki.kernel.org/index.php/Main_Page[Btrfs]
:Cryptsetup: https://gitlab.com/cryptsetup/cryptsetup[Cryptsetup]
:elementary-OS: https://elementary.io/[elementary OS]
Expand Down
2 changes: 1 addition & 1 deletion _drafts/Backup User Snapper Snapshots.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
:page-category: Data Storage
:page-tags: [backups, Btrbk, Btrfs, elementary, Linux, snap-sync, Snapper, snapshots, Ubuntu]
:arch-wiki-snapper-change-frequencies: https://wiki.archlinux.org/index.php/snapper#Change_snapshot_and_cleanup_frequencies[Change snapshot and cleanup frequencies]
:bash: https://www.gnu.org/software/bash/[Bash]
:bash: https://tiswww.case.edu/php/chet/bash/bashtop.html[Bash]
:btrbk: https://github.com/digint/btrbk[Btrbk]
:btrfs: https://btrfs.wiki.kernel.org/index.php/Main_Page[Btrfs]
:btrfs-maintenance-toolbox: https://github.com/kdave/btrfsmaintenance[Btrfs maintenance toolbox]
Expand Down
6 changes: 3 additions & 3 deletions _pages/about.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ If you haven't figured it out yet, I'm big proponent of open-source software whe
I enjoy collaborating with other developers to improve open-source software for everyone.

* Desktop Linux, namely https://ubuntu.com/download/desktop[Ubuntu] and https://www.gnome.org/[GNOME]
* Open-hardware mobile devices (and relevant software), such as the https://www.pine64.org/pinebook-pro/[Pinebook Pro], https://www.pine64.org/pinephone/[PinePhone], and https://www.pine64.org/pinetab/[PineTab] developed by https://www.pine64.org/[Pine64]
* Open-hardware mobile devices (and relevant software), such as the https://pine64.org/devices/pinebook_pro/[Pinebook Pro], https://www.pine64.org/pinephone/[PinePhone], and https://pine64.org/devices/pinetab/[PineTab] developed by https://www.pine64.org/[Pine64]
* Safe, simple, and easy-to-use programming languages like https://www.rust-lang.org/[Rust] and https://golang.org/[Go]
* https://www.openbsd.org/[OpenBSD]
* https://www.freebsd.org/[FreeBSD]
Expand Down Expand Up @@ -103,7 +103,7 @@ Operating Systems::
Languages::
* https://asciidoctor.org/[Asciidoctor]
* https://www.gnu.org/software/gawk/manual/gawk.html[awk]
* https://www.gnu.org/software/bash/[Bash]
* https://tiswww.case.edu/php/chet/bash/bashtop.html[Bash]
* http://www.open-std.org/jtc1/sc22/wg14/[C]
* https://isocpp.org/[{cpp}] (Standards including 98, 11, 14, 17, 20)
* https://fishshell.com/[fish]
Expand Down Expand Up @@ -211,7 +211,7 @@ System Utilities::
* https://www.sudo.ws/[Sudo]

Filesystems::
* https://openzfs.org/wiki/Main_Pag[OpenZFS]
* https://openzfs.org/wiki/Main_Page[OpenZFS]

Services::
* https://nextcloud.com/[Nextcloud]
Expand Down
4 changes: 2 additions & 2 deletions _posts/2020-03-28-DNSSEC With Unbound.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Using this http://www.lonecpluspluscoder.com/2020/01/16/building-an-openbsd-wire

== Unbound Configuration

Use the https://man.openbsd.org/ftp.1[ftp] command to download the https://wiki.archlinux.org/index.php/unbound#Root_hints[Root Hints].
Use the https://man.openbsd.org/ftp.1[ftp] command to download the https://wiki.archlinux.org/title/unbound#Root_hints[Root Hints].

[,sh]
----
Expand Down Expand Up @@ -69,7 +69,7 @@ rcctl restart unbound

Verify that DNSSEC is working with the https://man.openbsd.org/OpenBSD-6.6/dig[dig] command from a computer using your unbound server.
This website, `jwillikers.com`, has DNSSEC enabled and so makes for a good address to test.
Cloudflare provides a nice write-up about using dig to verify DNSSEC https://support.cloudflare.com/hc/en-us/articles/360021111972-Troubleshooting-DNSSEC#TroubleshootingDNSSEC-DNSSECinPracticewithDig[here].
Cloudflare provides a nice write-up about using dig to verify DNSSEC https://developers.cloudflare.com/dns/dnssec/troubleshooting/#TroubleshootingDNSSEC-DNSSECinPracticewithDig[here].

[,sh]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SmartMonTools is even cross-platform and available in package repositories every
== Tutorial

This tutorial describes the steps required to setup automated hard disk health checks and email notifications using SmartMonTools 7.1 on Ubuntu 20.04.
If you're configuring a desktop like me or otherwise configuring a system which doesn't have a https://en.wikipedia.org/wiki/Message_transfer_agent[MTA (Mail Transport Agent)] or https://en.wikipedia.org/wiki/Email_client[MUA (Mail User Agent)] setup already and wish to send emails externally, I recommend following my tutorial on setting up an <<opensmtpd_ubuntu#,OpenSMTPD Relay on Ubuntu>>.
If you're configuring a desktop like me or otherwise configuring a system which doesn't have a https://en.wikipedia.org/wiki/Message_transfer_agent[MTA (Mail Transport Agent)] or https://en.wikipedia.org/wiki/Email_client[MUA (Mail User Agent)] setup already and wish to send emails externally, I recommend following my tutorial on setting up an <<opensmtpd-ubuntu#,OpenSMTPD Relay on Ubuntu>>.
Emails sent straight from a willy-nilly desktop user account to an online email provider are unlikely to be accepted.
With https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol[SMTP], your system can relay emails through your online email provider to remedy this.

Expand Down
6 changes: 3 additions & 3 deletions _posts/2020-06-30-Install ZFS on the Pinebook Pro.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ $ sudo pacman -S dkms linux-pinebookpro-headers
$ sudo pacman -S yay
----

. Then, install the https://aur.archlinux.org/packages/zfs-dkms-any/[zfs-dkms-any] package from the AUR.
. Then, install the https://aur.archlinux.org/packages/zfs-dkms[zfs-dkms] package from the AUR.
+
[,sh]
----
$ yay -S zfs-dkms-any
$ yay -S zfs-dkms
----

=== Configure
Expand Down Expand Up @@ -64,4 +64,4 @@ $ sudo systemctl enable zfs.target

=== Next Steps

See <<zfs_external_storage_pinebook_pro#,External Storage on the Pinebook Pro with ZFS>> to learn how to use ZFS to store your files on a microSD card.
See <<external-storage-on-the-pinebook-pro-with-zfs#,External Storage on the Pinebook Pro with ZFS>> to learn how to use ZFS to store your files on a microSD card.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ And now you're just dying to use ZFS on that, right?

== Tutorial

Following the previous post, <<install_zfs_pinebook_pro#,Install ZFS on the Pinebook Pro>>, this tutorial describes the steps required to setup a microSD card for your music files with ZFS on the Pinebook Pro.
Following the previous post, <<install-zfs-on-the-pinebook-pro#,Install ZFS on the Pinebook Pro>>, this tutorial describes the steps required to setup a microSD card for your music files with ZFS on the Pinebook Pro.

=== Create the Pool

Expand Down
2 changes: 1 addition & 1 deletion _posts/2020-09-04-Update U-Boot on the PinePhone.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:page-tags: [ArchLinux, Boot, Linux, Manjaro, PinePhone, UBoot]

As I big fan of https://www.gnome.org/[GNOME], I really wanted a similar experience on the https://www.pine64.org/pinephone/[PinePhone].
That's why I opted for running https://osdn.net/projects/manjaro-arm/[Manjaro ARM]'s alpha for the PinePhone, which comes in a GNOME-like https://developer.puri.sm/Librem5/Software_Reference/Environments/Phosh.html[Phosh] flavor.
That's why I opted for running https://wiki.manjaro.org/index.php/Manjaro-ARM[Manjaro ARM]'s alpha for the PinePhone, which comes in a GNOME-like https://developer.puri.sm/Librem5/Software_Reference/Environments/Phosh.html[Phosh] flavor.
It's been running from the SD card great so far, but I thought to update the internal https://gitlab.manjaro.org/manjaro-arm/packages/core/uboot-pinephone-crust[U-Boot] as <<update-u-boot-on-the-pinebook-pro#,I did on the Pinebook Pro>>.
== Tutorial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ While I was working on my recent post <<virtualize-ubuntu-desktop-on-macos-with-
Multipass makes it extremely simple to spin up Ubuntu instances on the fly whether your on Linux, macOS, and Windows.
While your VM may not be as speedy as with QEMU, I would be remiss for not doing a quick write-up on this tool which makes it so easy to get up and running.
The main caveat for Multipass is that it is _only_ intended for running Ubuntu and neither other Linux distributions nor other operating systems.
By default on macOS, Multipass uses https://github.com/moby/hyperkit[Hyperkit] behind the scenes.footnote:[https://discourse.ubuntu.com/t/installing-multipass-on-macos/8329[Multipass Discourse: Installing Multipass on macOS]]
By default on macOS, Multipass uses https://github.com/moby/hyperkit[Hyperkit] behind the scenes.footnote:[https://discourse.ubuntu.com/t/8329[Multipass Discourse: Installing Multipass on macOS]]

== Tutorial

Setting up a desktop with Multipass is briefly described https://discourse.ubuntu.com/t/graphical-desktop-in-multipass/16229[here].
Setting up a desktop with Multipass is briefly described https://discourse.ubuntu.com/t/16229[here].
This tutorial, in contrast, provides a complete set of instructions for configuring and running a https://ubuntu-mate.org/[Ubuntu MATE] with Multipass on macOS.
This tutorial assumes you have some experience with the command-line, virtualization, Ubuntu, and macOS.

Expand Down
2 changes: 1 addition & 1 deletion _posts/2020-09-19-Password-Less Sudo.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ If you don't need that extra bit of protection, why enter your password more tha
You can forever skip entering your `sudo` password, and it's super easy and cross-platform.
For whatever reason, I learned and forgot about doing this sometime ago, so here's the gist.

To disable password authentication for `sudo` for a user, in this case `jordan`, just run the following command.footnote:[https://linuxize.com/post/how-to-add-user-to-sudoers-in-ubuntu/#adding-user-to-the-sudoers-file[Linuxize: How to Add User to Sudoers in Ubuntu - Adding User to the sudoers File]]
To disable password authentication for `sudo` for a user, in this case `jordan`, just run the following command.footnote:[https://linuxize.com/post/how-to-add-user-to-sudoers-in-ubuntu/[Linuxize: How to Add User to Sudoers in Ubuntu - Adding User to the sudoers File]]

[source,shell]
----
Expand Down
4 changes: 2 additions & 2 deletions _posts/2020-09-22-Configure ZSH.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ Plus, it details how to install and configure Antigen, oh-my-zsh, autosuggestion
$ sudo apt -y install zsh
----

. Register `/usr/bin/zsh` as a login shell by adding its path to https://manpages.ubuntu.com/manpages/en/man5/shells.5.html[`/etc/shells`].
. Register `/usr/bin/zsh` as a login shell by adding its path to https://manpages.debian.org/unstable/manpages/shells.5.en.html[`/etc/shells`].
+
--
Debian provides a convenient https://manpages.ubuntu.com/manpages/en/man8/add-shell.8.html[`add-shell`] command to accomplish this.
Debian provides a convenient https://manpages.debian.org/unstable/debianutils/add-shell.8.en.html[`add-shell`] command to accomplish this.

[,sh]
----
Expand Down
4 changes: 2 additions & 2 deletions _posts/2020-10-01-Change Your Shell.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ sudo apt -y install fish
This Debian package installs the `fish` executable in `/usr/bin`.
--

. Register `/usr/bin/fish` as a valid login shell by adding its path to https://manpages.ubuntu.com/manpages/en/man5/shells.5.html[`/etc/shells`].
. Register `/usr/bin/fish` as a valid login shell by adding its path to https://manpages.debian.org/unstable/manpages/shells.5.en.html[`/etc/shells`].
+
--
Debian provides a convenient https://manpages.ubuntu.com/manpages/en/man8/add-shell.8.html[`add-shell`] command to accomplish this.
Debian provides a convenient https://manpages.debian.org/unstable/debianutils/add-shell.8.en.html[`add-shell`] command to accomplish this.

[,sh]
----
Expand Down
Loading

0 comments on commit 47f9a45

Please sign in to comment.