mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-11 09:44:08 -05:00
umami test run
This commit is contained in:
parent
4a576f3550
commit
3f2dd8fc8a
5 changed files with 75 additions and 28 deletions
8
flake.lock
generated
8
flake.lock
generated
|
|
@ -168,11 +168,11 @@
|
|||
},
|
||||
"nix-secrets": {
|
||||
"locked": {
|
||||
"lastModified": 1739112909,
|
||||
"narHash": "sha256-8eXk5YmWOKAJEYRvlOdUvL5nKVzi1fF6C2ShTGZvwqI=",
|
||||
"lastModified": 1739551046,
|
||||
"narHash": "sha256-Rzr7Jj80lYm9EqTMXQXO8WFBs5uK7Hzo490SptJwTJQ=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "59bd793db72fd311a17f2d439a6df2d381afb6a2",
|
||||
"revCount": 43,
|
||||
"rev": "71b5c2ce2b4e45c236b99982999caac1e75141ae",
|
||||
"revCount": 45,
|
||||
"type": "git",
|
||||
"url": "ssh://git@github.com/TheWanderingCrow/nix-secrets"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -30,4 +30,5 @@
|
|||
programs.noisetorch.enable = true;
|
||||
|
||||
virtualisation.vmware.host.enable = true;
|
||||
software.keyd.enable = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,34 +7,29 @@
|
|||
enable = true;
|
||||
keyboards.default = {
|
||||
ids = ["*"];
|
||||
extraConfig = ''
|
||||
[global]
|
||||
settings = {
|
||||
main = {
|
||||
capslock = "layer(standardL2)";
|
||||
};
|
||||
standardL2 = {
|
||||
w = "up";
|
||||
s = "down";
|
||||
a = "left";
|
||||
d = "right";
|
||||
|
||||
default_layout = main
|
||||
b = "C-b";
|
||||
|
||||
[main:layout]
|
||||
space = "playpause";
|
||||
"." = "nextsong";
|
||||
"," = "previoussong";
|
||||
|
||||
capslock = layer(standardL2)
|
||||
"[" = "delete";
|
||||
"]" = "end";
|
||||
escape = "~";
|
||||
|
||||
[standardL2]
|
||||
|
||||
w = up
|
||||
s = down
|
||||
a = left
|
||||
d = right
|
||||
|
||||
b = C-b
|
||||
|
||||
space = playpause
|
||||
. = nextsong
|
||||
, = previoussong
|
||||
|
||||
[ = delete
|
||||
] = end
|
||||
escape = ~
|
||||
|
||||
home = end
|
||||
'';
|
||||
home = "end";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,5 +7,6 @@
|
|||
./grocy.nix
|
||||
./attic.nix
|
||||
./the-nest.nix
|
||||
./umami.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
50
modules/users/overseer/services/umami.nix
Normal file
50
modules/users/overseer/services/umami.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.user.overseer.enable {
|
||||
###########
|
||||
# Service #
|
||||
###########
|
||||
|
||||
sops = {
|
||||
secrets."umami/secret" = {};
|
||||
secrets."umami/db_url" = {};
|
||||
templates."umami-env".content = ''
|
||||
APP_SECRET=${config.sops.placeholder."umami/secret"}
|
||||
DATABASE_TYPE=mysql
|
||||
DATABASE_URL=${config.sops.placeholder."umami/db_url"}
|
||||
'';
|
||||
templates."umami-sql".content = ''
|
||||
ALTER USER 'umami"@'localhost' IDENTIFIED BY '${config.sops.placeholder."umami/db_pass"}';
|
||||
'';
|
||||
};
|
||||
|
||||
services.mysql = {
|
||||
enable = true;
|
||||
initialDatabases = ["umami"];
|
||||
initialScript = config.sops.templates."umami-sql".path;
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "umami";
|
||||
ensurePermissions = {
|
||||
"umami.*" = "ALL PRIVILEGES";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
virtualisation.oci-containers = {
|
||||
backend = "podman";
|
||||
containers = {
|
||||
umami = {
|
||||
image = "ghcr.io/umami-software/umami:mysql-v2.15.1";
|
||||
ports = ["3000:3000"];
|
||||
environmentFiles = [
|
||||
config.sops.templates."umami-env".path
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue