mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-12 02:04:09 -05:00
Merge branch 'master' of github.com:TheWanderingCrow/NixOS
This commit is contained in:
commit
c0e9652829
5 changed files with 95 additions and 6 deletions
8
flake.lock
generated
8
flake.lock
generated
|
|
@ -168,11 +168,11 @@
|
|||
},
|
||||
"nix-secrets": {
|
||||
"locked": {
|
||||
"lastModified": 1739650303,
|
||||
"narHash": "sha256-ijb3zxFUQJ9+UXoNW2VxGuaWF0dQZoihJEL8+LiccDs=",
|
||||
"lastModified": 1739808207,
|
||||
"narHash": "sha256-zIUNDAM1bpto8VYWF9y+4KLxWZlEiFnUynjofbQX6vI=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "d31054406479b1cd148954706662f8510abe16ce",
|
||||
"revCount": 46,
|
||||
"rev": "5794fabd27b350f7787b666b255acdffdc8aef6f",
|
||||
"revCount": 48,
|
||||
"type": "git",
|
||||
"url": "ssh://git@github.com/TheWanderingCrow/nix-secrets"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ lib.mkIf config.user.overseer.enable {
|
|||
certs = {
|
||||
"wanderingcrow.net" = {};
|
||||
"umami.wanderingcrow.net" = {};
|
||||
"garage.wanderingcrow.net" = {};
|
||||
"bar.wanderingcrow.net" = {};
|
||||
"home.wanderingcrow.net" = {};
|
||||
"homebox.wanderingcrow.net" = {};
|
||||
|
|
|
|||
|
|
@ -8,5 +8,6 @@
|
|||
./attic.nix
|
||||
./the-nest.nix
|
||||
./umami.nix
|
||||
./lubelogger.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,11 +6,17 @@
|
|||
lib.mkIf config.user.overseer.enable {
|
||||
# Homepage.dev secrets
|
||||
sops = {
|
||||
secrets."homepage/openmeteo/lat" = {};
|
||||
secrets."homepage/openmeteo/long" = {};
|
||||
secrets = {
|
||||
"homepage/openmeteo/lat" = {};
|
||||
"homepage/openmeteo/long" = {};
|
||||
"lubelogger/user" = {};
|
||||
"lubelogger/pass" = {};
|
||||
};
|
||||
templates."homepage-environment".content = ''
|
||||
HOMEPAGE_VAR_LAT = ${config.sops.placeholder."homepage/openmeteo/lat"}
|
||||
HOMEPAGE_VAR_LONG = ${config.sops.placeholder."homepage/openmeteo/long"}
|
||||
HOMEPAGE_VAR_LUBELOGGERUSER = ${config.sops.placeholder."lubelogger/user"}
|
||||
HOMEPAGE_VAR_LUBELOGGERPASS = ${config.sops.placeholder."lubelogger/pass"}
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
@ -42,6 +48,24 @@ lib.mkIf config.user.overseer.enable {
|
|||
settings = {
|
||||
theme = "dark";
|
||||
};
|
||||
services = [
|
||||
{
|
||||
"Services" = [
|
||||
{
|
||||
"Garage" = {
|
||||
href = "https://garage.wanderingcrow.net";
|
||||
description = "Vehicle management";
|
||||
widget = {
|
||||
type = "lubelogger";
|
||||
url = "https://garage.wanderingcrow.net";
|
||||
username = "{{HOMEPAGE_VAR_LUBELOGGERUSER}}";
|
||||
password = "{{HOMEPAGE_VAR_LUBELOGGERPASS}}";
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
widgets = [
|
||||
{
|
||||
search = {
|
||||
|
|
|
|||
63
modules/users/overseer/services/lubelogger.nix
Normal file
63
modules/users/overseer/services/lubelogger.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
let
|
||||
volumePath = "/overseer/services";
|
||||
in
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.user.overseer.enable {
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${volumePath}/lubelogger"
|
||||
"d ${volumePath}/lubelogger/data"
|
||||
"d ${volumePath}/lubelogger/keys"
|
||||
];
|
||||
###########
|
||||
# Service #
|
||||
###########
|
||||
|
||||
sops = {
|
||||
secrets = {
|
||||
"lubelogger/user_hash" = {};
|
||||
"lubelogger/pass_hash" = {};
|
||||
};
|
||||
templates."lubelogger-env".content = ''
|
||||
LC_ALL=en_US.UTF-8
|
||||
LANG=en_US.UTF-8
|
||||
MailConfig__EmailServer=""
|
||||
MailConfig__EmailFrom=""
|
||||
MailConfig__Port=587
|
||||
MailConfig__Username=""
|
||||
MailConfig__Password=""
|
||||
UserNameHash="${config.sops.placeholder."lubelogger/user_hash"}"
|
||||
UserPasswordHash="${config.sops.placeholder."lubelogger/pass_hash"}"
|
||||
LUBELOGGER_CUSTOM_WIDGETS=true
|
||||
'';
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts = {
|
||||
"garage.wanderingcrow.net" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "garage.wanderingcrow.net";
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.88.0.8:8080";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.oci-containers = {
|
||||
backend = "podman";
|
||||
containers = {
|
||||
"lubelogger" = {
|
||||
image = "ghcr.io/hargata/lubelogger:latest";
|
||||
extraOptions = ["--ip=10.88.0.8"];
|
||||
environmentFiles = [config.sops.templates."lubelogger-env".path];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue