infra/modules/core/default.nix
Benjamin Yule Bädorf 68278ad983
refactor: use options for config parts
This works towards having reusable modules

* `config.pub-solar-os.networking.domain` is used for the main domain
* `config.pub-solar-os.privacyPolicUrl` links towards the privacy policy
* `config.pub-solar-os.imprintUrl` links towards the imprint
* `config.pub-solar-os.auth.enable` enables the keycloak installation.
  This is needed because `config.pub-solar-os.auth` has to be available
  everywhere, but we do not want to install keycloak everywhere.
* `config.pub-solar-os.auth.realm` sets the keycloak realm name
2024-05-08 19:47:47 +02:00

48 lines
1.1 KiB
Nix

{ pkgs, config, flake, lib, ... }: {
imports = [
./nix.nix
./networking.nix
./terminal-tooling.nix
./users.nix
];
options.pub-solar-os = with lib; {
adminEmail = mkOption {
description = "Email address to use for administrative stuff like ACME";
type = types.str;
default = "admins@pub.solar";
};
privacyPolicyUrl = mkOption {
description = "URL of the privacy policy. Used to link there from applications";
type = types.str;
default = "https://pub.solar/privacy";
};
imprintUrl = mkOption {
description = "URL of the imprint. Used to link there from applications";
type = types.str;
default = "https://pub.solar/about";
};
};
config = {
environment = {
# Just a couple of global packages to make our lives easier
systemPackages = with pkgs; [ git vim wget ];
};
# Select internationalization properties
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
time.timeZone = "Etc/UTC";
home-manager.users.${config.pub-solar-os.authentication.username} = {
home.stateVersion = "23.05";
};
};
}