CT37H3QD5UB5LQON6OFH5MLYTYCGUXBMDIJ6NS3TMUUADVI5L2FAC
{
stdenvNoCC,
m4,
name,
}:
stdenvNoCC.mkDerivation {
inherit name;
src = ./.;
nativeBuildInputs = [
m4
];
makeFlags = [
"T=${name}"
"-r"
"DESTDIR=${placeholder "out"}"
];
passthru = {
webroot = "share/html/${name}";
};
}
include(`site.m4')
define(`SOURCE', `<span class="source">EXTLINK(`source', `$1')</span>')
BEGIN_DOCUMENT
Here's a list of the more noteworthy software I've written:
<ul class="biglist">
<li>
<h2>desktoputils</h2>dnl
<p class="description">dnl
Desktop environment-independent utilities for dealing with Freedesktop.org
application links.dnl
</p>dnl
SOURCE(`https://git.sr.ht/~dblsaiko/desktoputils')
</li>
<li>
<h2>nix-plugin-pijul</h2>dnl
<p class="description">dnl
A plugin for the EXTLINK(`Nix', `https://nixos.org') package manager which adds
support for the EXTLINK(`Pijul', `https://pijul.org') VCS.dnl
</p>dnl
SOURCE(`https://nest.pijul.com/dblsaiko/nix-plugin-pijul')
</li>
<li>
<h2>nucom</h2>dnl
<p class="description">dnl
A cross-platform implementation of Microsoft's COM. Currently supports a minimal
subset of COM for both Rust and C/C++.dnl
</p>dnl
SOURCE(`https://git.dblsaiko.net/nucom')
</li>
<li>
<h2>r2dj</h2>dnl
<p class="description">dnl
A music bot for EXTLINK(`Mumble', `https://www.mumble.info/'). Intended to
eventually be a complete music library manager with a desktop client.dnl
</p>dnl
SOURCE(`https://github.com/2xsaiko/r2dj')dnl
</li>
<li>
<h2>udptun</h2>dnl
<p class="description">dnl
A UDP tunnel which allows multiple clients to connect to one endpoint of
the tunnel, a bit like ngrok but for UDP.dnl
</p>dnl
SOURCE(`https://github.com/2xsaiko/udptun')
</li>
</ul>
My other repositories are available EXTLINK(`here',
`https://git.dblsaiko.net') (cgit), on EXTLINK(`sourcehut',
`https://git.sr.ht/~dblsaiko'), EXTLINK(`Pijul Nest',
`https://nest.pijul.com/dblsaiko') and EXTLINK(`GitHub',
`https://github.com/2xsaiko').
END_DOCUMENT
include(`common.m4')
define(`SITE_TITLE', `dblsaiko.net')
define(`PAGES', `index, software')
define(`PAGE_TITLE_index', `Home')
define(`PAGE_TITLE_software', `Software')
include(`site.m4')
BEGIN_DOCUMENT
<div class="article">
<p>
Hi! I'm 2xsaiko. I've been recreationally programming since around 2012, mostly
what personally interests me at the moment.
</p>
<p>
I currently usually write Rust, C or C++, and I've been dabbling in Objective-C
for macOS and iOS development as well, but I'm also comfortable with a few other
programming languages including Bash, Python and Java.
You can find some of the software that I consider potentially useful for others
under the PAGE_TITLE_software tab.
</p>
<p>
I'm a long-time and experienced Linux user, having used various distributions
throughout the years. Since 2021, I've been using EXTLINK(NixOS,
`https://nixos.org'), which I really like because of the reproducability and
being able to easily share configuration between systems.
<br>
All my NixOS configuration except of course for private keys and the like
is public, including the one for this server. You can see it EXTLINK(here,
`https://git.dblsaiko.net/systems'). I also have some public modules and
packages that can be used in others' configurations, which you can find
EXTLINK(here, `https://git.sr.ht/~dblsaiko/nix-extras').
</p>
<p>
I'm also an occasional contributor to EXTLINK(OpenStreetMap,
`https://openstreetmap.org'), with around 150
edits to the map as of writing this. EXTLINK(`Give it a try!',
`https://wiki.openstreetmap.org/wiki/Beginners%27_guide')
</p>
<p>
I'll hopefully be expanding this page in the future but I just want to get
something up for now.
</p>
</div>
<p>Contact: me [at] this domain</p>
END_DOCUMENT
TARGETS += index.html software.html
M4_DEPS += site.m4
include(`site.m4')
BEGIN_DOCUMENT
Status page for various services goes here. Eventually.
END_DOCUMENT
include(`common.m4')
define(`SITE_TITLE', `knifepoint.net')
define(`PAGES', `index, status')
define(`PAGE_TITLE_index', `Home')
define(`PAGE_TITLE_status', `Status')
include(`site.m4')
BEGIN_DOCUMENT
This is my (<a class="extlink" href="https://dblsaiko.net">2xsaiko</a>'s) brand
new infrastructure domain.
END_DOCUMENT
TARGETS += index.html status.html
M4_DEPS += site.m4
html {
max-width: 800px;
font-family: system-ui, sans-serif;
}
.navbar {
padding: 0;
margin: .5em 0;
border-bottom: .2em solid #ccc;
color: #555;
display: flex;
flex-wrap: wrap;
}
.navbar a:link {
text-decoration: unset;
color: unset;
}
.navbar a:visited {
color: unset;
}
.navbar li {
display: inline;
padding: 0 .5em;
}
.navbar li.current {
background-color: #ccc;
color: #000;
}
.banner {
font-size: 1.5em;
font-weight: unset;
margin: 0;
}
a.extlink {
white-space: nowrap;
}
a.extlink::after {
background-size: 0.5em 0.5em;
width: 0.5em;
height: 0.5em;
display: inline-block;
background-image: url('extlink.png');
content: "";
vertical-align: super;
}
.biglist {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1em;
padding: 0;
}
.biglist li {
display: block;
}
.biglist li h2 {
display: inline-block;
margin: 0;
font-size: unset;
}
.biglist li h2::after {
color: #555;
content: "—";
margin: 0 .2em;
}
.biglist li .description {
display: inline;
margin: 0;
}
.biglist li .source {
display: inline-block;
}
.biglist li .source::before {
color: #555;
content: "—";
margin: 0 .2em;
}
.article {
text-align: justify;
hyphens: auto;
}
.pagesrc {
display: block;
text-align: right;
font-size: 0.75em;
}
divert(-1)
define(`BEGIN_DOCUMENT', `
divert(0)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="main.css">
<title>PAGE_TITLE — SITE_TITLE</title>
</head>
<body>
HEADER
')
define(`END_DOCUMENT', `
<hr>
<span class="pagesrc">EXTLINK(`site source',
`https://nest.pijul.com/dblsaiko/web')</span>
</body>
</html>
divert(-1)
')
define(`MENUENTRY', `<li`'ifelse(CURPAGE, `$1', ` class="current"',)><a href="$1.html">PAGE_TITLE_$1</a></li>')
define(`_HEADER', `ifelse(`$#', `0', , `$#', `1', `MENUENTRY($1)', `MENUENTRY($1)_HEADER(shift($@))')')
define(`HEADER', `
SITE_BANNER
<ul class="navbar">_HEADER(PAGES)</ul>
')
define(`SITE_BANNER', `<h1 class="banner">SITE_TITLE</h1>')
define(`PAGE_TITLE', `PAGE_TITLE_'CURPAGE)
define(`EXTLINK', `<a class="extlink" href="$2" target="_blank">$1</a>')
RES += extlink.png main.css
M4_DEPS += common.m4
{
inputs = {
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
};
outputs = {
self,
nixpkgs,
}: let
systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
eachSystem = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
in {
formatter = eachSystem (pkgs: pkgs.alejandra);
packages = eachSystem (pkgs: {
infra = pkgs.callPackage ./static.nix {name = "infra";};
personal = pkgs.callPackage ./static.nix {name = "personal";};
});
};
}
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1701336116,
"narHash": "sha256-kEmpezCR/FpITc6yMbAh4WrOCiT2zg5pSjnKrq51h5Y=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f5c27c6136db4d76c30e533c20517df6864c46ee",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixpkgs-unstable",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}
.SUFFIXES:
SHELL = /bin/sh
INSTALL = install
M4 = m4
T = personal
SUBDIRS = global $(T)
M4FLAGS += $(patsubst %, -I%, $(SUBDIRS))
# these get automatically prefixed with the directory of the makefile that gets
# included, super ugly but haha
AUTOVARS = TARGETS RES M4_DEPS
define ASSIGN_TEMPLATE =
$(1) := $(2)
endef
$(foreach var,$(AUTOVARS),$(eval $(call ASSIGN_TEMPLATE,ABS_$(var))))
define INCLUDE_TEMPLATE =
$$(foreach var,$(AUTOVARS),$$(eval $$(call ASSIGN_TEMPLATE,$$(var))))
include $(1)/Makefile
$$(foreach var,$(AUTOVARS),$$(eval $$(call ASSIGN_TEMPLATE,ABS_$$(var),$$$$(ABS_$$(var)) $$$$(patsubst %, $(1)/%, $$$$($$(var))))))
endef
$(foreach subdir,$(SUBDIRS),$(eval $(call INCLUDE_TEMPLATE,$(subdir))))
TARGETS := $(ABS_TARGETS)
RES := $(ABS_RES)
$(foreach var,$(AUTOVARS),$(eval $(call ASSIGN_TEMPLATE,$(var),$$(ABS_$(var)))))
INSTALL_TARGETS = $(TARGETS) $(RES)
.PHONY: all
all: $(TARGETS)
.PHONY: clean
clean:
$(RM) $(TARGETS)
.PHONY: install
install:
$(INSTALL) -d $(DESTDIR)/share/html/$(T)
$(foreach target,$(INSTALL_TARGETS),$(INSTALL) -m644 $(target) $(DESTDIR)/share/html/$(T)/$(notdir $(target));)
%.html: %.html.m4 $(M4_DEPS)
$(M4) -DCURPAGE=$(notdir $*) $(M4FLAGS) $< > $@
sed -i '/^$$/d' $@
root = true
[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
[*.nix]
indent_style = space
indent_size = 2
[{Makefile,*.mk}]
indent_style = tab