add keycloak service
This commit is contained in:
parent
3e30171637
commit
f0b4a2c37a
3 changed files with 24 additions and 8 deletions
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -35,11 +35,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1718835956,
|
"lastModified": 1719253556,
|
||||||
"narHash": "sha256-wM9v2yIxClRYsGHut5vHICZTK7xdrUGfrLkXvSuv6s4=",
|
"narHash": "sha256-A/76RFUVxZ/7Y8+OMVL1Lc8LRhBxZ8ZE2bpMnvZ1VpY=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "dd457de7e08c6d06789b1f5b88fc9327f4d96309",
|
"rev": "fc07dc3bdf2956ddd64f24612ea7fc894933eb2e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
start =
|
start =
|
||||||
pkgs.writeShellScriptBin "start" ''
|
pkgs.writeShellScriptBin "start" ''
|
||||||
set -e
|
set -e
|
||||||
export QEMU_NET_OPTS="hostfwd=tcp::8080-:80,hostfwd=tcp::1433-:143,hostfwd=tcp::5877-:587"
|
export QEMU_NET_OPTS="hostfwd=tcp::8080-:80,hostfwd=tcp::8081-:8081,hostfwd=tcp::1433-:143,hostfwd=tcp::5877-:587"
|
||||||
${pkgs.nixos-shell}/bin/nixos-shell --flake .
|
${pkgs.nixos-shell}/bin/nixos-shell --flake .
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
devShells.x86_64-linux = {
|
devShells.x86_64-linux = {
|
||||||
default = with pkgs; mkShell {
|
default = with pkgs; mkShell {
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
php82Packages.composer
|
php83Packages.composer
|
||||||
phpunit
|
phpunit
|
||||||
nodejs
|
nodejs
|
||||||
nodePackages.rollup
|
nodePackages.rollup
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
package = pkgs.nextcloud29;
|
package = pkgs.nextcloud29;
|
||||||
hostName = "localhost";
|
hostName = "localhost";
|
||||||
extraApps = with config.services.nextcloud.package.packages.apps; {
|
extraApps = with config.services.nextcloud.package.packages.apps; {
|
||||||
inherit contacts calendar;
|
inherit contacts calendar user_oidc;
|
||||||
# FIXME
|
# FIXME
|
||||||
# enable hmr when debug flag is enabled
|
# enable hmr when debug flag is enabled
|
||||||
hmr_enabler = pkgs.php.buildComposerProject (finalAttrs: {
|
hmr_enabler = pkgs.php.buildComposerProject (finalAttrs: {
|
||||||
|
|
@ -88,6 +88,8 @@
|
||||||
trusted_domains = [ "10.100.100.1" ];
|
trusted_domains = [ "10.100.100.1" ];
|
||||||
"integrity.check.disabled" = true;
|
"integrity.check.disabled" = true;
|
||||||
debug = true;
|
debug = true;
|
||||||
|
# Required to allow insecure connection to KeyCloak on localhost
|
||||||
|
allow_local_remote_servers = true;
|
||||||
#apps_paths = [
|
#apps_paths = [
|
||||||
# {
|
# {
|
||||||
# path = "/var/lib/nextcloud/server/apps";
|
# path = "/var/lib/nextcloud/server/apps";
|
||||||
|
|
@ -153,11 +155,25 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# How to setup https://www.schiessle.org/articles/2023/07/04/nextcloud-and-openid-connect/
|
||||||
|
services.keycloak = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
hostname = "localhost";
|
||||||
|
http-enabled = true;
|
||||||
|
http-port = 8081;
|
||||||
|
hostname-strict-https = false;
|
||||||
|
};
|
||||||
|
database.passwordFile = "${pkgs.writeText "dbPassword" ''test123''}";
|
||||||
|
};
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
sqlite sqldiff
|
litecli
|
||||||
unzip wget
|
sqldiff
|
||||||
|
unzip
|
||||||
|
wget
|
||||||
];
|
];
|
||||||
|
|
||||||
documentation = {
|
documentation = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue