diff --git a/flake.lock b/flake.lock index ca43f44..c5d2e62 100644 --- a/flake.lock +++ b/flake.lock @@ -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" }, diff --git a/hosts/Parzival/default.nix b/hosts/Parzival/default.nix index 140ee15..2c9f6fc 100644 --- a/hosts/Parzival/default.nix +++ b/hosts/Parzival/default.nix @@ -30,4 +30,5 @@ programs.noisetorch.enable = true; virtualisation.vmware.host.enable = true; + software.keyd.enable = true; } diff --git a/modules/software/keyd.nix b/modules/software/keyd.nix index 38d53eb..5a00dc3 100644 --- a/modules/software/keyd.nix +++ b/modules/software/keyd.nix @@ -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"; + }; + }; }; }; } diff --git a/modules/users/overseer/services/default.nix b/modules/users/overseer/services/default.nix index 7341583..c3f5036 100644 --- a/modules/users/overseer/services/default.nix +++ b/modules/users/overseer/services/default.nix @@ -7,5 +7,6 @@ ./grocy.nix ./attic.nix ./the-nest.nix + ./umami.nix ]; } diff --git a/modules/users/overseer/services/umami.nix b/modules/users/overseer/services/umami.nix new file mode 100644 index 0000000..0bdc5be --- /dev/null +++ b/modules/users/overseer/services/umami.nix @@ -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 + ]; + }; + }; + }; +}