Add startpage
This commit is contained in:
parent
507e40abaf
commit
87dc899860
|
@ -47,10 +47,15 @@ let
|
|||
{ pkgs, lib, ... }: {
|
||||
systemd.user.services.blockserver = {
|
||||
Unit.Description = "Serve a blocklist";
|
||||
Service = {
|
||||
ExecStart = "${pkgs.python3}/bin/python -m http.server 8842 -d ${pkgs.writeTextDir "blocklist" (lib.concatStringsSep "\r\n" list)}";
|
||||
Restart = "always";
|
||||
};
|
||||
Service =
|
||||
let
|
||||
blocklist = pkgs.writeTextDir "blocklist" (lib.concatStringsSep "\r\n" list);
|
||||
startpage = pkgs.writeTextDir "index.html" (builtins.readFile ./startpage.html);
|
||||
in
|
||||
{
|
||||
ExecStart = "${pkgs.python3}/bin/python -m http.server 8842 -d ${pkgs.symlinkJoin { name = "blockserver-dir"; paths = [ blocklist startpage ]; }}";
|
||||
Restart = "always";
|
||||
};
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
};
|
||||
};
|
||||
|
@ -137,7 +142,7 @@ in
|
|||
./roles/update_tasks.nix
|
||||
./roles/vdirsyncer.nix
|
||||
(import ./roles/mode-switching.nix { modeDir = ".volatile/modes"; modeFile = ".mode"; })
|
||||
(setStartpage "https://stats.maralorn.de")
|
||||
(setStartpage "http://localhost:8842")
|
||||
(makeAutostart "kassandra2")
|
||||
(makeAutostart "unlock-ssh")
|
||||
];
|
||||
|
|
4
home-manager/startpage.html
Normal file
4
home-manager/startpage.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<html>
|
||||
<title>Maralorns Startpage</title>
|
||||
<body style="background: #f0f0ff"></body>
|
||||
</html>
|
Loading…
Reference in a new issue