Compare commits
No commits in common. "5e51d5f25291a93f31a0326149b128686cca7368" and "283aba0c2c681e0bf6b03abd481e17162e61cf02" have entirely different histories.
5e51d5f252
...
283aba0c2c
3 changed files with 11 additions and 35 deletions
|
@ -58,9 +58,9 @@
|
|||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./parsons/configuration.nix
|
||||
./modules/buildinfo.nix
|
||||
sops-nix.nixosModules.sops
|
||||
{ nixpkgs.pkgs = pkgs; }
|
||||
{ environment.etc."haccfiles".source = self.outPath; }
|
||||
];
|
||||
specialArgs = {
|
||||
sources = inputs;
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
{ config, lib, pkgs, sources, ... }:
|
||||
|
||||
let
|
||||
self = sources.self;
|
||||
slice = string: start: length: with lib;
|
||||
strings.concatStrings
|
||||
(lists.take length
|
||||
(lists.drop start
|
||||
(strings.stringToCharacters string)));
|
||||
|
||||
formatDate = date:
|
||||
let
|
||||
year = slice date 0 4;
|
||||
month = slice date 4 2;
|
||||
day = slice date 6 2;
|
||||
hour = slice date 8 2;
|
||||
minute = slice date 10 2;
|
||||
second = slice date 12 2;
|
||||
in
|
||||
"${year}-${month}-${day} ${hour}:${minute}:${second} UTC";
|
||||
in
|
||||
{
|
||||
system.nixos.label = "${config.system.nixos.release}-haccfiles-${self.shortRev or self.dirtyShortRev}";
|
||||
users.motd = ''
|
||||
Welcome to ${config.networking.hostName}, running NixOS ${config.system.nixos.release}!
|
||||
Built from haccfiles ${self.rev or self.dirtyRev}.
|
||||
Last commit was at ${formatDate self.lastModifiedDate}.
|
||||
${if self ? dirtyRev then "\nPlease remember to commit your changes.\n" else ""}
|
||||
'';
|
||||
}
|
|
@ -1,17 +1,23 @@
|
|||
{ copyPathToStore, stdenvNoCC, zola, writeScriptBin }:
|
||||
{ stdenvNoCC, zola, writeScriptBin }:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
name = "docs.hacc.space-static";
|
||||
|
||||
src = ./.;
|
||||
content = copyPathToStore ../../docs;
|
||||
# HINT: this is cursed. Nix flakes have no optimisation to deal with ${./.},
|
||||
# so we wind up having to do this to make the symlink to content/ work.
|
||||
# (we still need to manually adjust it — but at least this way we can find
|
||||
# its target without further hoops)
|
||||
#
|
||||
# This does also mean we now copy the entire flake into the Nix store twice.
|
||||
# Yay for flakes!
|
||||
src = "${../../.}/websites/docs.hacc.space";
|
||||
|
||||
phases = [ "buildPhase" ];
|
||||
buildInputs = [ zola ];
|
||||
buildPhase = ''
|
||||
cp -r $src/* .
|
||||
rm content
|
||||
ln -s $content content
|
||||
ln -s $src/../../docs content
|
||||
zola build --output-dir $out
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in a new issue