about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2024-04-15 10:07:12 +0300
committerAzat Bahawi <azat@bahawi.net>2024-04-15 10:07:12 +0300
commit6647f72957dad695dd2aef3acabe3dd1466692f7 (patch)
treebb331db9ac81fd3eed1ed797d3363bc143ce1940 /modules
parent2024-04-09 (diff)
2024-04-15
Diffstat (limited to '')
-rw-r--r--modules/common/emacs/default.nix4
-rw-r--r--modules/common/emacs/doom/config.el18
-rw-r--r--modules/nixos/common/locale.nix18
-rw-r--r--modules/nixos/common/stylix.nix2
-rw-r--r--modules/nixos/k3s.nix40
-rw-r--r--modules/nixos/kde.nix11
6 files changed, 80 insertions, 13 deletions
diff --git a/modules/common/emacs/default.nix b/modules/common/emacs/default.nix
index 6bbba38..4c43fd5 100644
--- a/modules/common/emacs/default.nix
+++ b/modules/common/emacs/default.nix
@@ -188,7 +188,9 @@ in
 
                     ;; :input japanese
                     (setq migemo-dictionary "${pkgs.cmigemo}/share/migemo/utf-8/migemo-dict"
-                          skk-large-jisyo "${pkgs.skk-dicts}/share/SKK-JISYO.L")
+                          migemo-options '("--quiet" "--emacs")
+                          skk-large-jisyo "${pkgs.skk-dicts}/share/SKK-JISYO.L"
+                          skk-show-inline t)
 
                     ;; :editor parinfer
                     (setq parinfer-rust-auto-download nil
diff --git a/modules/common/emacs/doom/config.el b/modules/common/emacs/doom/config.el
index ac2578e..329931b 100644
--- a/modules/common/emacs/doom/config.el
+++ b/modules/common/emacs/doom/config.el
@@ -4,7 +4,7 @@
 
 (setq frame-title-format '("GNU Emacs"))
 
-(setq-hook! 'prog-mode-hook
+(setq-hook! '(prog-mode-hook yaml-mode-hook)
   display-line-numbers-type 'relative
   scroll-margin 10
   hscroll-margin 10)
@@ -235,3 +235,19 @@
                                  (setq-local company-idle-delay 0.1))))
   :init
   (setq hledger-input-buffer-height 20))
+
+;;
+;;; elfeed
+;;
+
+(add-hook! 'elfeed-new-entry-hook
+           '((elfeed-make-tagger :before "2 weeks ago"
+                                 :remove 'unread)
+             (elfeed-make-tagger :feed-title "SberMarket Tech"
+                                 :entry-title (not ".*(DevOps|Golang).*")
+                                 :add 'junk
+                                 :remove 'unread)
+             (elfeed-make-tagger :feed-title "dotconferences"
+                                 :entry-title (not ".*dotGo.*")
+                                 :add 'junk
+                                 :remove 'unread)))
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; [

Consider giving Nix/NixOS a try! <3