You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
632 B
27 lines
632 B
2 years ago
|
{ pkgs, lib, ... }:
|
||
|
|
||
|
let
|
||
2 years ago
|
theme = import ../theme;
|
||
2 years ago
|
startpageDir = import ./dir.nix;
|
||
|
out = "${startpageDir}.tmp/";
|
||
|
in
|
||
|
{
|
||
|
home.file = {
|
||
2 years ago
|
"${out}" = {
|
||
|
source = ./html;
|
||
|
recursive = true;
|
||
|
};
|
||
2 years ago
|
"${out}colors.css".text = ":root {\n" + (theme.css lib) + "\n}";
|
||
2 years ago
|
};
|
||
|
# Make files not symlinks, this causes issues displaying in Firefox
|
||
|
home.activation.startpage = lib.hm.dag.entryAfter["writeBoundary"] ''
|
||
|
mkdir -p ${startpageDir}
|
||
|
mv ${out}* ${startpageDir}
|
||
|
rmdir ${out}
|
||
|
cd ${startpageDir}
|
||
|
for file in `find -type l`; do
|
||
|
cp --remove-destination `readlink $file` $file
|
||
|
done
|
||
|
'';
|
||
|
}
|