summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/common/global/default.nix1
-rw-r--r--hosts/common/global/keyboard.nix21
-rw-r--r--hosts/common/global/locale.nix2
-rw-r--r--hosts/sol/configuration.nix9
4 files changed, 24 insertions, 9 deletions
diff --git a/hosts/common/global/default.nix b/hosts/common/global/default.nix
index 3af5cc8..a60c412 100644
--- a/hosts/common/global/default.nix
+++ b/hosts/common/global/default.nix
@@ -2,5 +2,6 @@
{
imports = [
./locale.nix
+ ./keyboard.nix
];
} \ No newline at end of file
diff --git a/hosts/common/global/keyboard.nix b/hosts/common/global/keyboard.nix
new file mode 100644
index 0000000..01d0cd7
--- /dev/null
+++ b/hosts/common/global/keyboard.nix
@@ -0,0 +1,21 @@
+{ pkgs, lib, config, ... }:
+{
+ options = {
+ keyboard.dvorak = lib.mkOption {
+ type = lib.types.bool;
+ default = true;
+ };
+ keyboard.desktop = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ };
+ };
+
+ config = {
+ console.keyMap = if config.keyboard.dvorak then "dvorak" else "us";
+ services.xserver.xkb = lib.mkIf config.keyboard.desktop {
+ layout = "us";
+ variant = lib.mkIf config.keyboard.dvorak "dvorak-alt-intl";
+ };
+ };
+} \ No newline at end of file
diff --git a/hosts/common/global/locale.nix b/hosts/common/global/locale.nix
index 7bc53c2..6c60bfc 100644
--- a/hosts/common/global/locale.nix
+++ b/hosts/common/global/locale.nix
@@ -2,7 +2,7 @@
{
time.timeZone = lib.mkDefault "Europe/Berlin";
i18n = {
- defaultLocale = lib.mkDefault "en_US.UTF-8";
+ defaultLocale = lib.mkDefault "en_IE.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = lib.mkDefault "en_IE.UTF-8";
LC_IDENTIFICATION = lib.mkDefault "en_IE.UTF-8";
diff --git a/hosts/sol/configuration.nix b/hosts/sol/configuration.nix
index 2106d05..b77debe 100644
--- a/hosts/sol/configuration.nix
+++ b/hosts/sol/configuration.nix
@@ -34,14 +34,7 @@
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.cinnamon.enable = true;
- # Configure keymap in X11
- services.xserver.xkb = {
- layout = "us";
- variant = "dvorak-alt-intl";
- };
-
- # Configure console keymap
- console.keyMap = "dvorak";
+ keyboard.desktop = true;
# Enable CUPS to print documents.
services.printing.enable = true;