summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.github/workflows/publish.yml9
-rw-r--r--flake.nix80
-rw-r--r--src/404.html (renamed from 404.html)0
-rw-r--r--src/assets/css/default.scss (renamed from assets/css/default.scss)68
-rw-r--r--src/assets/css/syntax.scss (renamed from assets/css/syntax.scss)0
-rw-r--r--src/assets/fonts/AtkinsonHyperlegibleMono-Regular.ttf (renamed from assets/fonts/AtkinsonHyperlegibleMono-Regular.ttf)bin34320 -> 34320 bytes
-rw-r--r--src/assets/fonts/AtkinsonHyperlegibleNext-Regular.ttf (renamed from assets/fonts/AtkinsonHyperlegibleNext-Regular.ttf)bin48064 -> 48064 bytes
-rw-r--r--src/assets/images/converter.webp (renamed from assets/images/converter.webp)bin18080 -> 18080 bytes
-rw-r--r--src/assets/images/erebus.webp (renamed from assets/images/erebus.webp)bin17652 -> 17652 bytes
-rw-r--r--src/assets/images/favicon.ico (renamed from assets/images/favicon.ico)bin14098 -> 14098 bytes
-rw-r--r--src/assets/images/noise.png (renamed from assets/images/noise.png)bin26039 -> 26039 bytes
-rw-r--r--src/assets/images/nonbinary-flag.svg (renamed from assets/images/nonbinary-flag.svg)0
-rw-r--r--src/index.html (renamed from index.html)0
-rw-r--r--src/pages/playlists.html (renamed from pages/playlists.html)0
-rw-r--r--src/posts/2025-06-20-vr-plus-nixos-plus-nvidia.md (renamed from posts/2025-06-20-vr-plus-nixos-plus-nvidia.md)2
-rw-r--r--src/templates/archive.html (renamed from templates/archive.html)0
-rw-r--r--src/templates/default.html (renamed from templates/default.html)8
-rw-r--r--src/templates/post-list.html (renamed from templates/post-list.html)0
-rw-r--r--src/templates/post.html (renamed from templates/post.html)0
-rw-r--r--ssg/Main.hs (renamed from site.hs)32
-rw-r--r--ssg/ssg.cabal (renamed from skiletro.cabal)4
21 files changed, 113 insertions, 90 deletions
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 1d297d8..c7c1e63 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -17,11 +17,6 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- - name: Install Act Dependencies
- if: ${{ env.ACT }}
- run: |
- apt-get update && apt-get install sudo -y
-
- name: Checkout
uses: actions/checkout@v4
@@ -31,7 +26,7 @@ jobs:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build Site using Hakyll
- run: nix run .# build
+ run: nix run .#
- name: Setup Pages
id: pages
@@ -40,7 +35,7 @@ jobs:
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
- path: ./_site
+ path: ./results/dist
deploy:
environment:
diff --git a/flake.nix b/flake.nix
index ee12ea0..704bb00 100644
--- a/flake.nix
+++ b/flake.nix
@@ -5,8 +5,13 @@
haskell-flake.url = "github:srid/haskell-flake"; # https://community.flake.parts/haskell-flake
treefmt-nix.url = "github:numtide/treefmt-nix";
};
- outputs = inputs @ {flake-parts, ...}:
- flake-parts.lib.mkFlake {inherit inputs;} {
+ outputs =
+ inputs@{
+ self,
+ flake-parts,
+ ...
+ }:
+ flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
@@ -17,35 +22,56 @@
inputs.treefmt-nix.flakeModule
];
- perSystem = {
- self',
- pkgs,
- ...
- }: {
- haskellProjects.default = {
- devShell = {
- enable = true;
- tools = hp: {inherit (hp) hakyll;};
- hlsCheck.enable = true;
- mkShellArgs = {
- buildInputs = with pkgs; [just sass];
- shellHook = "just -l -u";
+ perSystem =
+ {
+ self',
+ pkgs,
+ lib,
+ ...
+ }:
+ {
+ packages.default = pkgs.stdenvNoCC.mkDerivation {
+ name = "website";
+ src = ./src;
+
+ GIT_REVISION = if (self ? shortRev) then self.shortRev else "dirty";
+
+ buildPhase = ''
+ ${lib.getExe self'.packages.ssg} build --verbose
+ '';
+
+ installPhase = ''
+ mkdir -p $out/dist
+ cp -a _site/. $out/dist
+ '';
+ };
+
+ haskellProjects.default = {
+ projectRoot = ./ssg;
+ devShell = {
+ enable = true;
+ tools = hp: { inherit (hp) hakyll; };
+ hlsCheck.enable = true;
+ mkShellArgs = {
+ buildInputs = with pkgs; [
+ just
+ sass
+ ];
+ shellHook = "just -l -u";
+ };
};
};
- };
- treefmt = {
- flakeCheck = true;
- programs = {
- alejandra.enable = true;
- deadnix.enable = true;
- just.enable = true;
- prettier.enable = true;
- stylish-haskell.enable = true;
+ treefmt = {
+ flakeCheck = true;
+ programs = {
+ nixfmt.enable = true;
+ deadnix.enable = true;
+ just.enable = true;
+ prettier.enable = true;
+ stylish-haskell.enable = true;
+ };
};
};
-
- packages.default = self'.packages.skiletro; # haskell-flake doesn't set the default package, but you can do it here.
- };
};
}
diff --git a/404.html b/src/404.html
index 4bbf02f..4bbf02f 100644
--- a/404.html
+++ b/src/404.html
diff --git a/assets/css/default.scss b/src/assets/css/default.scss
index 26d0937..8509dfb 100644
--- a/assets/css/default.scss
+++ b/src/assets/css/default.scss
@@ -38,7 +38,7 @@ $mobile: 980px;
* {
padding: 0;
margin: 0;
- transition: .1s ease-in-out;
+ transition: 0.1s ease-in-out;
font-family: "Atkinson Hyperlegible Next", sans-serif;
font-optical-sizing: auto;
text-transform: lowercase;
@@ -59,19 +59,20 @@ body {
overflow-x: hidden;
color: $clr-fg;
background-color: black;
- background: url("/assets/images/noise.png"),
+ background:
+ url("/assets/images/noise.png"),
radial-gradient(circle at center, $clr-bg, transparent),
- radial-gradient(circle at bottom left, #27577D, transparent),
- radial-gradient(circle at top right, #952EA4 0%, transparent),
- radial-gradient(circle at center right, #6949A5 0%, transparent),
- radial-gradient(circle at top center, #336BA0 0%, transparent);
+ radial-gradient(circle at bottom left, #27577d, transparent),
+ radial-gradient(circle at top right, #952ea4 0%, transparent),
+ radial-gradient(circle at center right, #6949a5 0%, transparent),
+ radial-gradient(circle at top center, #336ba0 0%, transparent);
background-attachment: fixed;
}
// LAYOUT WRAPPER
// ---------------------------------------------------------------------------
-body>* {
+body > * {
// every top-level section
display: flex;
flex-direction: column;
@@ -80,17 +81,17 @@ body>* {
max-width: $max-width;
padding: 1.5rem 2.5rem;
background: $clr-bg;
- outline: .2rem solid $clr-bg;
- outline-offset: .2rem;
+ outline: 0.2rem solid $clr-bg;
+ outline-offset: 0.2rem;
}
@include phone-only {
body {
padding: 0;
- gap: .2rem;
+ gap: 0.2rem;
}
- body>* {
+ body > * {
outline: 0;
}
}
@@ -161,7 +162,7 @@ h4,
h5,
h6 {
@include std-block;
- padding-top: .5rem;
+ padding-top: 0.5rem;
font-size: 1.75rem;
}
@@ -171,11 +172,11 @@ h6 {
$hashes: "";
@for $_ from 1 through $i {
- $hashes: $hashes + "#"
+ $hashes: $hashes + "#";
}
content: "#{$hashes} ";
- color: oklch(82.67% .087 #{280 + ($i - 1) * 40});
+ color: oklch(82.67% 0.087 #{280 + ($i - 1) * 40});
}
}
@@ -185,20 +186,20 @@ h6 {
ul {
display: flex;
flex-direction: column;
- gap: .5rem;
+ gap: 0.5rem;
list-style: none;
li::before {
content: "~";
- padding: 0 .25rem 0 .5rem;
- color: oklch(82.67% .087 180);
+ padding: 0 0.25rem 0 0.5rem;
+ color: oklch(82.67% 0.087 180);
}
}
// rainbow list items
@for $i from 1 through 15 {
- ul li:nth-child(n+#{$i})::before {
- color: oklch(82.67% .087 #{100 + ($i - 1) * 80});
+ ul li:nth-child(n + #{$i})::before {
+ color: oklch(82.67% 0.087 #{100 + ($i - 1) * 80});
}
}
@@ -209,12 +210,12 @@ a {
color: $clr-primary;
&:hover {
- filter: brightness(.75);
+ filter: brightness(0.75);
}
}
hr {
- $c: oklch(from $clr-fg .45 c h);
+ $c: oklch(from $clr-fg 0.45 c h);
background: $c;
border-color: $c;
}
@@ -224,19 +225,19 @@ img {
}
address {
- opacity: .5;
+ opacity: 0.5;
text-align: right;
margin-top: -2.1lh;
- margin-bottom: .5rem;
+ margin-bottom: 0.5rem;
}
footer {
gap: 0;
- >* {
+ > * {
text-align: center;
font-size: 1rem;
- opacity: .5;
+ opacity: 0.5;
}
}
@@ -244,22 +245,23 @@ footer {
// ---------------------------------------------------------------------------
div.sourceCode {
- padding: .2rem;
+ padding: 0.2rem;
overflow: hidden;
font-family: "Atkinson Hyperlegible Mono", monospace;
background-color: black;
- background: url("/images/noise.png"),
+ background:
+ url("/images/noise.png"),
radial-gradient(circle at center, $clr-bg, transparent),
- radial-gradient(circle at bottom left, #27577D, transparent),
- radial-gradient(circle at top right, #952EA4 0%, transparent),
- radial-gradient(circle at center right, #6949A5 0%, transparent),
- radial-gradient(circle at top center, #336BA0 0%, transparent);
+ radial-gradient(circle at bottom left, #27577d, transparent),
+ radial-gradient(circle at top right, #952ea4 0%, transparent),
+ radial-gradient(circle at center right, #6949a5 0%, transparent),
+ radial-gradient(circle at top center, #336ba0 0%, transparent);
background-attachment: scroll;
outline: 0.2rem solid $clr-bg;
outline-offset: 0.2rem;
- >* {
+ > * {
background: $clr-bg;
background-attachment: fixed;
padding: 1.2rem;
@@ -271,4 +273,4 @@ div.sourceCode {
text-transform: none;
font-size: 1.05rem;
}
-} \ No newline at end of file
+}
diff --git a/assets/css/syntax.scss b/src/assets/css/syntax.scss
index 42be310..42be310 100644
--- a/assets/css/syntax.scss
+++ b/src/assets/css/syntax.scss
diff --git a/assets/fonts/AtkinsonHyperlegibleMono-Regular.ttf b/src/assets/fonts/AtkinsonHyperlegibleMono-Regular.ttf
index 157d62e..157d62e 100644
--- a/assets/fonts/AtkinsonHyperlegibleMono-Regular.ttf
+++ b/src/assets/fonts/AtkinsonHyperlegibleMono-Regular.ttf
Binary files differ
diff --git a/assets/fonts/AtkinsonHyperlegibleNext-Regular.ttf b/src/assets/fonts/AtkinsonHyperlegibleNext-Regular.ttf
index 3fa771f..3fa771f 100644
--- a/assets/fonts/AtkinsonHyperlegibleNext-Regular.ttf
+++ b/src/assets/fonts/AtkinsonHyperlegibleNext-Regular.ttf
Binary files differ
diff --git a/assets/images/converter.webp b/src/assets/images/converter.webp
index 36764fa..36764fa 100644
--- a/assets/images/converter.webp
+++ b/src/assets/images/converter.webp
Binary files differ
diff --git a/assets/images/erebus.webp b/src/assets/images/erebus.webp
index 510545e..510545e 100644
--- a/assets/images/erebus.webp
+++ b/src/assets/images/erebus.webp
Binary files differ
diff --git a/assets/images/favicon.ico b/src/assets/images/favicon.ico
index 5000bb7..5000bb7 100644
--- a/assets/images/favicon.ico
+++ b/src/assets/images/favicon.ico
Binary files differ
diff --git a/assets/images/noise.png b/src/assets/images/noise.png
index 93c1ad7..93c1ad7 100644
--- a/assets/images/noise.png
+++ b/src/assets/images/noise.png
Binary files differ
diff --git a/assets/images/nonbinary-flag.svg b/src/assets/images/nonbinary-flag.svg
index 5252870..5252870 100644
--- a/assets/images/nonbinary-flag.svg
+++ b/src/assets/images/nonbinary-flag.svg
diff --git a/index.html b/src/index.html
index 574743e..574743e 100644
--- a/index.html
+++ b/src/index.html
diff --git a/pages/playlists.html b/src/pages/playlists.html
index 8437667..8437667 100644
--- a/pages/playlists.html
+++ b/src/pages/playlists.html
diff --git a/posts/2025-06-20-vr-plus-nixos-plus-nvidia.md b/src/posts/2025-06-20-vr-plus-nixos-plus-nvidia.md
index 88fd45c..7270865 100644
--- a/posts/2025-06-20-vr-plus-nixos-plus-nvidia.md
+++ b/src/posts/2025-06-20-vr-plus-nixos-plus-nvidia.md
@@ -101,9 +101,11 @@ We are using `osConfig` in this case, as to use the same package we use when ena
Going back to our main configuration, we now need to tell the game to actually use these settings.
We can do this by setting our game launch options to...
+
```sh
PRESSURE_VESSEL_FILESYSTEMS_RW=$XDG_RUNTIME_DIR/wivrn/comp_ipc %command%
```
+
...however, that isn't very "Nix", is it?
To do this for _every_ game, we can override our steam package to include this environment variable.
diff --git a/templates/archive.html b/src/templates/archive.html
index 346e978..346e978 100644
--- a/templates/archive.html
+++ b/src/templates/archive.html
diff --git a/templates/default.html b/src/templates/default.html
index 1193592..58df794 100644
--- a/templates/default.html
+++ b/src/templates/default.html
@@ -85,10 +85,12 @@
<footer>
<p>Branding © 2016-2025 Skiletro, All Rights Reserved</p>
<p>
- Made with ❤ with
+ Made with ❤ in Haskell and
<a href="https://jaspervdj.be/hakyll/">Hakyll</a>
- - commit
- <a href="https://github.com/skiletro/website">$revision$</a>
+ - Site built with commit
+ <a href="https://github.com/skiletro/website/commit/$revision$"
+ >$revision$</a
+ >
</p>
</footer>
</body>
diff --git a/templates/post-list.html b/src/templates/post-list.html
index a614f13..a614f13 100644
--- a/templates/post-list.html
+++ b/src/templates/post-list.html
diff --git a/templates/post.html b/src/templates/post.html
index 27f17da..27f17da 100644
--- a/templates/post.html
+++ b/src/templates/post.html
diff --git a/site.hs b/ssg/Main.hs
index 7c9980b..c130c91 100644
--- a/site.hs
+++ b/ssg/Main.hs
@@ -1,14 +1,15 @@
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
-import Control.Exception
-import Data.List
-import Data.Monoid
-import Hakyll
-import Hakyll.Web.Sass
-import System.Environment
-import System.FilePath.Posix
-import System.Process
+import Control.Exception
+import Data.List
+import Data.Maybe
+import Data.Monoid
+import Hakyll
+import Hakyll.Web.Sass
+import System.Environment
+import System.FilePath.Posix
+import System.Process
--------------------------------------------------------------------------------
main :: IO ()
@@ -47,7 +48,7 @@ main = hakyll $ do
compile $
pandocCompiler
>>= loadAndApplyTemplate "templates/default.html" defaultCtx
- >>= relativizeUrls
+ -- >>= relativizeUrls
>>= removeIndexHtml
create ["archive.html"] $ do
@@ -124,7 +125,7 @@ removeIndexHtml item = return $ fmap (withUrls removeIndexStr) item
removeIndexStr :: String -> String
removeIndexStr url = case splitFileName url of
(dir, "index.html") | isLocal dir -> dir
- _ -> url
+ _ -> url
where
isLocal uri = not ("://" `isInfixOf` uri)
@@ -142,14 +143,9 @@ hDateCtx = dateField "hdate" "%B %e, %Y"
cDateCtx :: Context String
cDateCtx = dateField "cdate" "%Y-%m-%d"
-gitRevisionField :: String -> Context String
-gitRevisionField = flip field (const gitRevision)
-
-gitRevision :: Compiler String
-gitRevision = unixFilter "git" ["rev-parse", "--short=7", "HEAD"] ""
-
gitRevisionCtx :: Context String
-gitRevisionCtx = gitRevisionField "revision"
+gitRevisionCtx = field "revision" $ \_ -> do
+ mRevision <- unsafeCompiler $ lookupEnv "GIT_REVISION"
+ return $ fromMaybe "dev" mRevision
--------------------------------------------------------------------------------
---------------------------------------------------------------------------------
diff --git a/skiletro.cabal b/ssg/ssg.cabal
index e4c59af..c22ef58 100644
--- a/skiletro.cabal
+++ b/ssg/ssg.cabal
@@ -1,10 +1,10 @@
-name: skiletro
+name: ssg
version: 0.1.0.0
build-type: Simple
cabal-version: >= 1.10
executable site
- main-is: site.hs
+ main-is: Main.hs
build-depends: base == 4.*
, filepath
, hakyll == 4.16.*