about summary refs log tree commit diff
path: root/modules/profiles/headful.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/profiles/headful.nix54
1 files changed, 41 insertions, 13 deletions
diff --git a/modules/profiles/headful.nix b/modules/profiles/headful.nix
index 3a795f1..62a036c 100644
--- a/modules/profiles/headful.nix
+++ b/modules/profiles/headful.nix
@@ -6,27 +6,29 @@
   this,
   ...
 }:
-with lib;
 let
   cfg = config.nixfiles.modules.profiles.headful;
 in
 {
-  options.nixfiles.modules.profiles.headful.enable = mkEnableOption "headful profile" // {
+  options.nixfiles.modules.profiles.headful.enable = lib.mkEnableOption "headful profile" // {
     default = this.isHeadful;
   };
 
-  config = mkIf cfg.enable {
+  config = lib.mkIf cfg.enable {
     nixfiles.modules = {
+      common.xdg.defaultApplications."org.telegram.desktop" = [ "x-scheme-handler/tg" ];
+
       profiles.dev.enable = true;
 
-      alacritty.enable = mkDefault true;
+      alacritty.enable = true;
       aria2.enable = true;
+      bat.enable = true;
       chromium.enable = true;
-      dwm.enable = mkDefault false;
       emacs.enable = true;
+      eza.enable = true;
       firefox.enable = true;
-      foot.enable = mkDefault true;
-      kde.enable = mkDefault true;
+      foot.enable = true;
+      kde.enable = true;
       mpv.enable = true;
       nullmailer.enable = true;
       openssh.client.enable = true;
@@ -34,8 +36,8 @@ in
       sound.enable = true;
       thunderbird.enable = true;
       vscode.enable = true;
-      wayland.enable = mkDefault true;
-      x11.enable = mkDefault true;
+      wayland.enable = true;
+      x11.enable = true;
       zathura.enable = true;
     };
 
@@ -52,11 +54,16 @@ in
         packages = with pkgs; [
           anki
           audacity
+          ayugram-desktop
+          bitwarden-cli
+          bitwarden-desktop
           byedpi
           eaglemode
+          easyeffects
           element-desktop
           fd
           gimp
+          helvum
           imv
           kdenlive
           libreoffice-fresh
@@ -80,7 +87,21 @@ in
     };
 
     boot = {
-      kernelPackages = mkDefault pkgs.linuxPackages_latest;
+      kernelPackages = lib.mkDefault (
+        if config.boot.zfs.enabled then
+          pkgs.linuxKernel.packages
+          |> lib.filterAttrs (
+            k: v:
+            (builtins.match "linux_[0-9]+_[0-9]+" k) != null
+            && (builtins.tryEval v).success
+            && (!v.${config.boot.zfs.package.kernelModuleAttribute}.meta.broken)
+          )
+          |> builtins.attrValues
+          |> lib.sort (a: b: lib.versionOlder a.kernel.version b.kernel.version)
+          |> lib.last
+        else
+          pkgs.linuxPackages_latest
+      );
 
       kernelParams = [
         # https://wiki.archlinux.org/title/improving_performance#Watchdogs
@@ -122,9 +143,16 @@ in
 
     services = {
       fwupd.enable = true;
+
       libinput.enable = true;
-      psd.enable = true;
+
       upower.enable = true;
+
+      languagetool = {
+        enable = true;
+        port = 8081;
+        allowOrigin = "*";
+      };
     };
 
     time.timeZone = "Europe/Moscow";
@@ -147,8 +175,8 @@ in
     system.extraDependencies =
       let
         collectFlakeInputs =
-          input: [ input ] ++ concatMap collectFlakeInputs (attrValues (input.inputs or { }));
+          input: [ input ] ++ (lib.attrValues (input.inputs or { }) |> lib.concatMap collectFlakeInputs);
       in
-      concatMap collectFlakeInputs (attrValues inputs);
+      lib.concatMap collectFlakeInputs (lib.attrValues inputs);
   };
 }

Consider giving Nix/NixOS a try! <3