Use modules folder
This commit is contained in:
parent
e42f845f09
commit
2903676336
46 changed files with 21 additions and 21 deletions
26
modules/startpage/default.nix
Normal file
26
modules/startpage/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
theme = import ../theme;
|
||||
startpageDir = import ./dir.nix;
|
||||
out = "${startpageDir}.tmp/";
|
||||
in
|
||||
{
|
||||
home.file = {
|
||||
"${out}" = {
|
||||
source = ./html;
|
||||
recursive = true;
|
||||
};
|
||||
"${out}colors.css".text = ":root {\n" + (theme.css lib) + "\n}";
|
||||
};
|
||||
# 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
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue