diff options
author | Azat Bahawi <azat@bahawi.net> | 2024-04-15 10:07:12 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2024-04-15 10:07:12 +0300 |
commit | 6647f72957dad695dd2aef3acabe3dd1466692f7 (patch) | |
tree | bb331db9ac81fd3eed1ed797d3363bc143ce1940 /modules/nixos | |
parent | 2024-04-09 (diff) |
2024-04-15
Diffstat (limited to 'modules/nixos')
-rw-r--r-- | modules/nixos/common/locale.nix | 18 | ||||
-rw-r--r-- | modules/nixos/common/stylix.nix | 2 | ||||
-rw-r--r-- | modules/nixos/k3s.nix | 40 | ||||
-rw-r--r-- | modules/nixos/kde.nix | 11 |
4 files changed, 60 insertions, 11 deletions
diff --git a/modules/nixos/common/locale.nix b/modules/nixos/common/locale.nix index 699f89b..0f79cb7 100644 --- a/modules/nixos/common/locale.nix +++ b/modules/nixos/common/locale.nix @@ -1,4 +1,9 @@ -{ lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: with lib; { i18n = { @@ -13,10 +18,13 @@ with lib; inputMethod = { enabled = "fcitx5"; - fcitx5.addons = with pkgs; [ - fcitx5-configtool - fcitx5-mozc - ]; + fcitx5 = { + addons = with pkgs; [ + fcitx5-configtool + fcitx5-mozc + ]; + waylandFrontend = config.nixfiles.modules.wayland.enable; + }; }; }; diff --git a/modules/nixos/common/stylix.nix b/modules/nixos/common/stylix.nix index a89943a..58b4f29 100644 --- a/modules/nixos/common/stylix.nix +++ b/modules/nixos/common/stylix.nix @@ -10,7 +10,7 @@ with lib; imports = [ inputs.stylix.nixosModules.stylix ]; stylix.cursor = { - name = "phinger-cursors"; + name = "phinger-cursors-light"; package = pkgs.phinger-cursors; size = 32; }; diff --git a/modules/nixos/k3s.nix b/modules/nixos/k3s.nix index a6efd9f..1ad99c3 100644 --- a/modules/nixos/k3s.nix +++ b/modules/nixos/k3s.nix @@ -1,4 +1,9 @@ -{ config, lib, ... }: +{ + config, + lib, + pkgs, + ... +}: with lib; let cfg = config.nixfiles.modules.k3s; @@ -9,6 +14,20 @@ in }; config = mkIf cfg.enable { + assertions = [ + { + assertion = cfg.enable -> !config.services.nginx.enable; + message = "NGINX port binding will conflict with a Load Balancer"; + } + ]; + + nixfiles.modules.common.shell.aliases = { + h = mkDefault "helm"; + k = mkDefault "kubectl"; + kns = mkDefault "kubens"; + ktx = mkDefault "kubectx"; + }; + ark.directories = [ "/etc/rancher/k3s" "/var/lib/rancher/k3s" @@ -16,12 +35,29 @@ in services.k3s = { enable = true; + + package = pkgs.k3s_1_29; + role = "server"; }; systemd.services.k3s.environment = { K3S_KUBECONFIG_OUTPUT = "/etc/rancher/k3s/k3s.yaml"; - K3S_KUBECONFIG_MODE = "664"; + K3S_KUBECONFIG_MODE = "644"; + }; + + networking.firewall = { + trustedInterfaces = [ "cni0" ]; + + # allowedTCPPorts = [ + # 80 + # 443 + # ]; }; + + environment.systemPackages = with pkgs; [ + kubectx + kubernetes-helm + ]; }; } diff --git a/modules/nixos/kde.nix b/modules/nixos/kde.nix index 333e9f7..4f44a5e 100644 --- a/modules/nixos/kde.nix +++ b/modules/nixos/kde.nix @@ -20,8 +20,10 @@ in }; hm = { - # Fucking broken. I don't want to bother with fixing this shit now. - stylix.targets.kde.enable = false; + # NOTE This will fail the home-manager service upon startup while a Plasma + # session is not initialised. Something about dbus not being able to + # communicate with presumably KDE configuration daemon. + stylix.targets.kde.enable = true; programs.firefox.profiles.default.settings = { "widget.use-xdg-desktop-portal.file-picker" = 1; @@ -48,7 +50,10 @@ in services = { desktopManager.plasma6.enable = true; - xserver.displayManager.sddm.enable = true; + displayManager.sddm = { + enable = true; + wayland.enable = true; # Kinda broken. + }; }; environment.plasma6.excludePackages = with pkgs.kdePackages; [ |