Skip to content

Commit 94c9fdc

Browse files
authored
Merge pull request #8 from nix-pizza/aciceri/nix-milano
`milano.nix.pizza` landing page
2 parents 5bf707e + ac40da9 commit 94c9fdc

File tree

5 files changed

+180
-2
lines changed

5 files changed

+180
-2
lines changed

hosts/nix-pizza/default.nix

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
./mail.nix
99
./hedgedoc.nix
1010
./wastebin.nix
11+
./nix-milano
1112
];
1213

1314
boot.kernelParams = [ "console=tty" ];
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{ pkgs, lib, ... }:
2+
let
3+
markdown = ./nix-milano.md;
4+
css = ./nix-milano.css;
5+
nix-milano = pkgs.runCommandNoCC "nix-milano" { } ''
6+
mkdir $out
7+
cd $out
8+
cp ${css} nix-milano.css
9+
${lib.getExe pkgs.pandoc} --from markdown --css nix-milano.css -s ${markdown} -o index.html --metadata title="Nix Milano"
10+
'';
11+
in
12+
{
13+
services.nginx = {
14+
virtualHosts."milano.nix.pizza" = {
15+
enableACME = true;
16+
forceSSL = true;
17+
locations."/".root = nix-milano;
18+
};
19+
};
20+
}
+145
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
@import url(http://fonts.googleapis.com/css?family=Vollkorn:400,400italic,700,700italic&subset=latin);
2+
3+
html, body {
4+
padding:1em;
5+
margin:auto;
6+
max-width:42em;
7+
background:#fefefe;
8+
}
9+
body {
10+
font: 1.3em "Vollkorn", Palatino, Times;
11+
color: #333;
12+
line-height: 1.4;
13+
text-align: justify;
14+
}
15+
header, nav, article, footer {
16+
width: 700px;
17+
margin:0 auto;
18+
}
19+
article {
20+
margin-top: 4em;
21+
margin-bottom: 4em;
22+
min-height: 400px;
23+
}
24+
footer {
25+
margin-bottom:50px;
26+
}
27+
video {
28+
margin: 2em 0;
29+
border:1px solid #ddd;
30+
}
31+
32+
nav {
33+
font-size: .9em;
34+
font-style: italic;
35+
border-bottom: 1px solid #ddd;
36+
padding: 1em 0;
37+
}
38+
nav p {
39+
margin: 0;
40+
}
41+
img {
42+
width: 100%;
43+
}
44+
45+
/* Typography
46+
-------------------------------------------------------- */
47+
48+
h1 {
49+
margin-top: 0;
50+
font-weight: normal;
51+
}
52+
h2 {
53+
font-weight: normal;
54+
}
55+
h3 {
56+
font-weight: normal;
57+
font-style: italic;
58+
margin-top:3em;
59+
}
60+
p {
61+
margin-top:0;
62+
-webkit-hypens:auto;
63+
-moz-hypens:auto;
64+
hyphens:auto;
65+
}
66+
ul {
67+
list-style: square;
68+
padding-left:1.2em;
69+
}
70+
ol {
71+
padding-left:1.2em;
72+
}
73+
blockquote {
74+
margin-left: 1em;
75+
padding-left: 1em;
76+
border-left: 1px solid #ddd;
77+
}
78+
code {
79+
font-family: "Consolas", "Menlo", "Monaco", monospace, serif;
80+
font-size: .9em;
81+
background: white;
82+
}
83+
a {
84+
color: #2484c1;
85+
text-decoration: none;
86+
}
87+
a:hover {
88+
text-decoration: underline;
89+
}
90+
a img {
91+
border:none;
92+
}
93+
h1 a, h1 a:hover {
94+
color: #333;
95+
text-decoration: none;
96+
}
97+
hr {
98+
color : #ddd;
99+
height : 1px;
100+
margin: 2em 0;
101+
border-top : solid 1px #ddd;
102+
border-bottom : none;
103+
border-left: 0;
104+
border-right: 0;
105+
}
106+
p#heart{
107+
font-size: 2em;
108+
line-height: 1;
109+
text-align: center;
110+
color: #ccc;
111+
}
112+
.red {
113+
color:#B50000;
114+
}
115+
116+
/* Home Page
117+
--------------------------- */
118+
119+
body#index li {
120+
margin-bottom: 1em;
121+
}
122+
123+
124+
/* iPad
125+
-------------------------------------------------------- */
126+
@media only screen and (max-device-width: 1024px) {
127+
body {
128+
font-size: 120%;
129+
line-height: 1.4;
130+
}
131+
} /* @iPad */
132+
133+
/* iPhone
134+
-------------------------------------------------------- */
135+
@media only screen and (max-device-width: 480px) {
136+
body {
137+
text-align: left;
138+
}
139+
article, footer {
140+
width: auto;
141+
}
142+
article {
143+
padding: 0 10px;
144+
}
145+
} /* @iPhone */
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
![](https://secure.meetupstatic.com/photos/event/9/c/b/a/clean_519400122.webp)
2+
3+
# Meetup
4+
Per vedere i prossimi eventi organizzati o iscriverti ci trovi [su meetup](https://www.meetup.com/nix-milano/).
5+
6+
# Matrix
7+
Unisciti al [canale Matrix](https://matrix.to/#/#nix-milan:matrix.org).
8+
9+
# Telegram
10+
Unisciti al [gruppo Telegram](https://t.me/nixMilan).

packages/default.nix

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
{
2-
perSystem = { config, pkgs, ... }: {
1+
topArgs: {
2+
perSystem = { config, pkgs, lib, system, ... }: {
33
packages = {
44
inject-secrets = config.agenix-shell.installationScript;
55
inherit (pkgs) opentofu;
6+
} // lib.optionalAttrs (system == "aarch64-linux") {
7+
nix-milano = topArgs.config.flake.nixosConfigurations.nix-pizza.config.services.nginx.virtualHosts."milano.nix.pizza".locations."/".root;
68
};
79
};
810
}

0 commit comments

Comments
 (0)