use landingpage flake now

This commit is contained in:
Ingolf Wagner 2022-11-24 13:48:18 +01:00
parent 960c77a651
commit 5bf23593c7
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
5 changed files with 179 additions and 286 deletions

View file

@ -378,6 +378,21 @@
}
},
"flake-utils_5": {
"locked": {
"lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_6": {
"locked": {
"lastModified": 1637014545,
"narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=",
@ -392,7 +407,7 @@
"type": "github"
}
},
"flake-utils_6": {
"flake-utils_7": {
"locked": {
"lastModified": 1631561581,
"narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=",
@ -507,6 +522,25 @@
"type": "github"
}
},
"landingpage": {
"inputs": {
"flake-utils": "flake-utils_5",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1669293824,
"narHash": "sha256-LKKlmFM+B4B2Mzn4nXNOTnaHMAzGeHVAPvA5dFhboh0=",
"owner": "mrVanDalo",
"repo": "landingpage",
"rev": "fd81a841fd1f8a57b8800fff260eed5e2ea96a0b",
"type": "github"
},
"original": {
"owner": "mrVanDalo",
"repo": "landingpage",
"type": "github"
}
},
"nix-eval-jobs": {
"inputs": {
"flake-utils": [
@ -583,7 +617,7 @@
"nixpkgs-fmt": {
"inputs": {
"fenix": "fenix",
"flake-utils": "flake-utils_5",
"flake-utils": "flake-utils_6",
"nixpkgs": [
"nixpkgs"
]
@ -619,6 +653,21 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1645527175,
"narHash": "sha256-WeewqaO48sCctiN+iwgZZEJRU29Si7vHHoLCINAvuk8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "38346f64616c3176f73ad0f20e51557ec0f3d75d",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1668984258,
"narHash": "sha256-0gDMJ2T3qf58xgcSbYoXiRGUkPWmKyr5C3vcathWhKs=",
@ -634,7 +683,7 @@
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs_4": {
"locked": {
"lastModified": 1632855891,
"narHash": "sha256-crW76mt9/kbUBiKy/KiSnsQ9JEYgD3StDuYAMVkTbM0=",
@ -648,7 +697,7 @@
"type": "indirect"
}
},
"nixpkgs_4": {
"nixpkgs_5": {
"locked": {
"lastModified": 1668882784,
"narHash": "sha256-L1mHACWrG83j8U/jDtAdQHmVZu+JwVUxRPf5mhuzr2s=",
@ -762,8 +811,8 @@
},
"polygon-art": {
"inputs": {
"flake-utils": "flake-utils_6",
"nixpkgs": "nixpkgs_3"
"flake-utils": "flake-utils_7",
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1632864714,
@ -838,15 +887,15 @@
"home-manager": "home-manager",
"home-manager-utils": "home-manager-utils",
"krops": "krops",
"nixpkgs": "nixpkgs_2",
"landingpage": "landingpage",
"nixpkgs": "nixpkgs_3",
"nixpkgs-fmt": "nixpkgs-fmt",
"nixpkgs-unstable": "nixpkgs-unstable",
"polygon-art": "polygon-art",
"private_assets": "private_assets",
"retiolum": "retiolum",
"secrets": "secrets",
"sops-nix": "sops-nix",
"thinkpad-dock": "thinkpad-dock"
"sops-nix": "sops-nix"
}
},
"rotate-text": {
@ -917,7 +966,7 @@
},
"sops-nix": {
"inputs": {
"nixpkgs": "nixpkgs_4",
"nixpkgs": "nixpkgs_5",
"nixpkgs-22_05": "nixpkgs-22_05"
},
"locked": {
@ -950,22 +999,6 @@
"type": "github"
}
},
"thinkpad-dock": {
"flake": false,
"locked": {
"lastModified": 1617280004,
"narHash": "sha256-nhmYoiHNHk64CjgG7dutVpmrWpdwE3+4G8fGWNANTi8=",
"owner": "oxzi",
"repo": "nixos-thinkpad-dock",
"rev": "c18fe4116b20886c112acec19294e9b96e919526",
"type": "github"
},
"original": {
"owner": "oxzi",
"repo": "nixos-thinkpad-dock",
"type": "github"
}
},
"ts-fold": {
"flake": false,
"locked": {

View file

@ -59,9 +59,9 @@
url = "github:krebs/retiolum";
flake = false;
};
thinkpad-dock = {
url = "github:oxzi/nixos-thinkpad-dock";
flake = false;
landingpage = {
#url = "git+file:///home/palo/dev/landingpage";
url = "github:mrVanDalo/landingpage";
};
};
@ -83,7 +83,7 @@
, secrets
, sops-nix
, retiolum
, thinkpad-dock
, landingpage
}:
let
system = "x86_64-linux";
@ -134,6 +134,7 @@
# we assign the overlay created before to the overlays of nixpkgs.
unstable = nixpkgs-unstable.legacyPackages.${pkgs.system};
polygon-art = polygon-art.packages.${pkgs.system};
landingpage = landingpage.packages.${pkgs.system}.plain;
})
];
};

View file

@ -8,7 +8,6 @@ in {
bitwig-studio3 = callPackage ./bitwig-studio/bitwig-studio3.nix { };
emo = callPackage ./emoji { };
landingpage = callPackage ./landingpage { };
light-control = callPackage ./light-control { };
otpmenu = callPackage ./otpmenu { };
sononym = callPackage ./sononym { };

View file

@ -1,138 +0,0 @@
{ lib
, writeTextFile
, jsonConfig ? { }
, title ? "Landing Page"
, destination ? "/index.html"
, ...
}:
with lib;
writeTextFile {
name = "landingpage";
destination = destination;
text = ''
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>${title}</title>
<!-- The font -->
<link href="https://fonts.googleapis.com/css?family=Dosis&display=swap" rel="stylesheet">
<style>
:root{
font-family: 'Dosis', sans-serif;
}
body {
margin-left:0px;
margin-right:0px;
padding-left:0px;
padding-right:0px;
}
.container {
margin-left:0px;
margin-right:0px;
padding-left:0px;
padding-right:0px;
}
.row-items {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.row-title{
text-align: center;
padding-top: 7px;
padding-bottom: 2px;
}
.row-text {
text-align: center;
background-color: #e6ffcc;
padding-top: 7px;
padding-bottom: 7px;
}
.item {
display: grid;
grid-template-columns: 250px;
grid-template-rows: auto;
grid-template-areas:
"image"
"text";
margin: 2px;
// border-style: solid;
border-width: 0px;
border-color: #ffe6b3;
background-color: #ffe6b3;
}
.item-image {
grid-area: image;
width: 250px;
height: 180px;
}
.item-caption{
grid-area: text;
padding-bottom: 3px;
};
a {
text-decoration: none;
color: black;
}
a:link {
text-decoration: none;
color: black;
}
a:visited {
text-decoration: none;
color: black;
}
a:hover {
text-decoration: none;
color: black;
}
a:active {
text-decoration: none;
color: black;
}
</style>
</head>
<body>
${let
createItemRow = { titel ? null, text ? null, items ? [ ] }: ''
<div class="row">
${
optionalString (titel != null)
''<h2 class="row-title">${title}</h2>''
}
${
optionalString (text != null) ''
<div class="row-text">
<pre>${text}</pre>
</div>''
}
<div class="row-items">
${concatStringsSep "\n" (map createSubItem items)}
</div>
</div>'';
createSubItem = { label, href, image }:
# const shortLabel = (label.length > 28) ? `''${label.substring(0,25)}...` : label;
''
<div class="item">
<a target="_blank" rel="noopener noreferrer" href="${href}" class="thumbnail">
<img src="${image}" class="item-image">
<div class="item-caption" style="text-align:center;font-weight:bold">
${label}
</div>
</a>
</div>'';
in concatStringsSep "\n" (map createItemRow jsonConfig.items)}
</body>
</html>
'';
}

View file

@ -4,8 +4,7 @@
default = true;
locations."/" = {
root = pkgs.landingpage.override {
jsonConfig = {
items = [
jsonConfig = [
{
text = "Syncthings";
items = map
@ -123,5 +122,4 @@
};
};
};
};
}