-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
145 additions
and
20 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ config, pkgs, ... }: | ||
let | ||
# Fetch the libations recipes from a private repository. Note that there must be a | ||
# valid SSH key either in the agent of the user executing the `nix` command, or in | ||
# `/root/.ssh` or this will fail. | ||
recipes = builtins.fetchGit { | ||
url = "[email protected]:jnsgruk/libations-recipes"; | ||
rev = "9bd7e4ebe23f9421c3ccec5db20b4bdae2344ace"; | ||
}; | ||
|
||
libations = pkgs.buildGoModule { | ||
pname = "libations"; | ||
version = "unstable-2023-12-08"; | ||
src = pkgs.fetchFromGitHub { | ||
rev = "c1d968fdd87e6214ac5c9d50019749d5c05aa939"; | ||
owner = "jnsgruk"; | ||
repo = "libations"; | ||
hash = "sha256-Eu0LLQZ4ZB2fdedmpFjlRbJIzoA7ow1LGQtVdoyP2xM="; | ||
}; | ||
vendorHash = "sha256-Ep3nBl9WZm7skk1cmMS9KI019ZSRSxofbLs2Nrj6HM8="; | ||
nativeBuildInputs = with pkgs; [ hugo ]; | ||
postConfigure = '' | ||
# Patch the recipes that were fetched above into the app before building | ||
cp ${recipes}/recipes.json ./webui/data/drinks.json | ||
# Generate the Hugo site that's embedded in the app | ||
go generate | ||
''; | ||
}; | ||
in | ||
{ | ||
age.secrets = { | ||
libations-auth-key = { | ||
file = ../../../secrets/thor-libations-tskey.age; | ||
owner = "root"; | ||
group = "root"; | ||
mode = "400"; | ||
}; | ||
}; | ||
|
||
systemd.services.libations = { | ||
description = "Libations cocktail recipe viewer"; | ||
wantedBy = [ "multi-user.target" ]; | ||
after = [ "network.target" ]; | ||
environment = { | ||
"XDG_CONFIG_HOME" = "/var/lib/libations/"; | ||
}; | ||
serviceConfig = { | ||
DynamicUser = true; | ||
ExecStart = "${libations}/bin/libations"; | ||
Restart = "always"; | ||
EnvironmentFile = config.age.secrets.libations-auth-key.path; | ||
StateDirectory = "libations"; | ||
StateDirectoryMode = "0750"; | ||
}; | ||
}; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
age-encryption.org/v1 | ||
-> ssh-ed25519 ASg3Sg GUU7pEN/08zLJEZcZ2KNLXlO3j4V+zH3yvCZKgmuaV0 | ||
scttI3tiRqjqTrQOt95NMD+0CNqj2WSCCyV0hJ9IpgQ | ||
-> ssh-ed25519 HTYk+g IpBlhhEL6rIFl5gFMCP7icaOjt5VYjl+2w5icKhOEEM | ||
ofZM6NXDJg1SBmoTkln8E1Zi5wzNjCuO38pXl4ZX5Y8 | ||
-> h-grease g8IhTVps 2+>Y@^;2 ,NyPdN Q[.F|9X* | ||
zSwCpOrQ89FL | ||
--- RIurRnXPMXrmFaxQR91pTQbQL6jlPt3bmnxAHCQmSkU | ||
�6��B�� ��'qP�����/_���(�ο3IX�L�6p_p�wg9�ހ����ر��JA1��K���dq#��J��.J���Jg�wQ; | ||
-> ssh-ed25519 ASg3Sg fdfEEB6h2PjTUtQHeOYDOM9YdwF+Y5FEHHJokfXOjxE | ||
b59xNlXGYPlA3bK1QQfJUPdIlXyOfHgQL9KHqFRCnmM | ||
-> ssh-ed25519 HTYk+g whfs99yVZW4up2KKLxr+5C6X8KCX3EXr1nXtWB3qm1Y | ||
fzm34J5FM3DbZXmi3J9nU/J0jtFODOcL3143bjWmk0M | ||
-> =`X-grease | ||
mLWLA+xSfPIk11wV | ||
--- +qq22jL9+Mbqxvb5jnocqRpXi4nTbvZOay9fe1qVZ7c | ||
B�Q�NݻN��*v�5Q�]�Ө6�3�~�g�K�O��/E�H߱�c���nf�e�qK����;�*�RV��K���44����!� | ||
�I�< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
age-encryption.org/v1 | ||
-> ssh-ed25519 ASg3Sg bReKHI4P9ExPaNVwFf9bj2J0mibldAVXXxx1XgAYRTg | ||
OXuT3+puMZ86Zetd2oFLbPG01OoXNw49THoaOYz8v/w | ||
-> ssh-ed25519 HTYk+g QHATIVHm5m9b+h1OuwX7T8yrTdl2l4Ql72UqlhXHdSE | ||
b2nhm96JVs1n3aPsGYsbwS2d32ew/l2FTco+1RrhWMY | ||
-> MHcgU7A-grease 9ciM^Qo P !|/ ^u3cjI)s | ||
B4QLsVaiadaDq1BQ3F6F/E8u2Q5pnbzfZI3+TZh4Lb8XLD1eyFXd1gVASas2zcbu | ||
ObCUE6rDuja0Iv/5mSHGeEIT9QRNGRRn8yPh8mQ | ||
--- egNnJzgr/dfEa04oSc+/YvigU8h8GRzD+ZenEhf+CbA | ||
^�H�Y�ª7�^�aY~��8�g��R�a����)��{e�d>�lViƻW���m���X�L�f��st�?s�p,< �P��,�~�g�Q�D��ЯrY� |