This commit is contained in:
parent
4ed9ba0d24
commit
a90630ecb6
98 changed files with 2063 additions and 729 deletions
15
nixos/hosts/keycloak/custom-theme.nix
Normal file
15
nixos/hosts/keycloak/custom-theme.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{stdenv}:
|
||||
stdenv.mkDerivation rec {
|
||||
name = "keycloak_custom_theme";
|
||||
version = "1.0";
|
||||
|
||||
src = ./custom_theme;
|
||||
|
||||
nativeBuildInputs = [];
|
||||
buildInputs = [];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -a login $out
|
||||
'';
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
body {
|
||||
background: red;
|
||||
color: blue;
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
parent=base
|
||||
import=common/keycloak
|
||||
styles=css/custom.css
|
||||
11
nixos/hosts/keycloak/default.nix
Normal file
11
nixos/hosts/keycloak/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{pkgs, ...}: let
|
||||
callPackage = pkgs.callPackage;
|
||||
in {
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
custom_keycloak_themes = {
|
||||
custom = callPackage ./custom_theme.nix {};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
14
nixos/hosts/keycloak/host.nix
Normal file
14
nixos/hosts/keycloak/host.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../../templates/base.nix
|
||||
./networking.nix
|
||||
./sops.nix
|
||||
./keycloak.nix
|
||||
];
|
||||
}
|
||||
31
nixos/hosts/keycloak/keycloak.nix
Normal file
31
nixos/hosts/keycloak/keycloak.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.postgresql.enable = true;
|
||||
|
||||
services.keycloak = {
|
||||
enable = true;
|
||||
initialAdminPassword = "password";
|
||||
database = {
|
||||
type = "postgresql";
|
||||
createLocally = true;
|
||||
|
||||
username = "keycloak";
|
||||
passwordFile = config.sops.secrets.keycloak_psql_pass.path;
|
||||
};
|
||||
|
||||
settings = {
|
||||
hostname = "keycloak.procopius.dk";
|
||||
# hostname-admin = "http://keycloak.lab:8080";
|
||||
# hostname-strict = false;
|
||||
# hostname-backchannel-dynamic = true;
|
||||
http-enabled = true;
|
||||
http-port = 8080;
|
||||
proxy-headers = "xforwarded";
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [8080];
|
||||
}
|
||||
8
nixos/hosts/keycloak/networking.nix
Normal file
8
nixos/hosts/keycloak/networking.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
networking.hostName = "keycloak";
|
||||
}
|
||||
12
nixos/hosts/keycloak/sops.nix
Normal file
12
nixos/hosts/keycloak/sops.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{...}: let
|
||||
keycloakSops = ../../secrets/keycloak/secrets.yml;
|
||||
in {
|
||||
sops.secrets.keycloak_psql_pass = {
|
||||
sopsFile = keycloakSops;
|
||||
mode = "0440";
|
||||
};
|
||||
sops.secrets.keycloak_admin_pass = {
|
||||
sopsFile = keycloakSops;
|
||||
mode = "0440";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue