diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2021-07-05 13:36:26 -0400 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2021-07-05 13:36:26 -0400 |
commit | 2888518fb5cb2b79529665756b4bda8d95fbcf5f (patch) | |
tree | 0d4ee01507736fcecc5ae035e027f8ed2b429c2b /modules | |
parent | ae6cb2cba7c6ee3cd32f3468fb4b18ccff173140 (diff) |
change
Diffstat (limited to 'modules')
-rw-r--r-- | modules/desktop.nix | 2 | ||||
-rw-r--r-- | modules/login.nix | 46 |
2 files changed, 48 insertions, 0 deletions
diff --git a/modules/desktop.nix b/modules/desktop.nix index c707545..6fcc3de 100644 --- a/modules/desktop.nix +++ b/modules/desktop.nix @@ -74,6 +74,7 @@ in ledger networkmanagerapplet nix-index + nixfmt pavucontrol rofi rxvt_unicode-with-plugins @@ -99,6 +100,7 @@ in services = { avahi.enable = true; + blueman.enable = true; xserver = { enable = true; diff --git a/modules/login.nix b/modules/login.nix new file mode 100644 index 0000000..d2a6de3 --- /dev/null +++ b/modules/login.nix @@ -0,0 +1,46 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.orbekk.login; + aliases = import ../data/aliases.nix; +in +{ + options = { + orbekk.login = { + enable = lib.mkEnableOption "Enable login server"; + loginPort = lib.mkOption { + type = lib.types.int; + default = aliases.services.login.port; + }; + loginDomain = lib.mkOption { + type = lib.types.str; + default = "login.orbekk.com"; + }; + }; + }; + + config = lib.mkIf cfg.enable { + services.keycloak = { + enable = false; + httpPort = "8080"; + bindAddress = "127.0.0.1"; + database.type = "postgresql"; + database.passwordFile = "/opt/secret/keycloak/db_password"; + frontendUrl = "http://localhost/auth"; + }; + + environment.systemPackages = with pkgs; [ + xmlstarlet + libtidy + jq + ]; + + # services.nginx.virtualHosts.${cfg.loginDomain} = { + # enableACME = true; + # forceSSL = true; + # locations."/" = { + # proxyPass = "http://127.0.0.1:${toString cfg.loginPort}"; + # proxyWebsockets = true; + # }; + # }; + }; +} |