about summary refs log tree commit diff stats
path: root/flake
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--flake.lock52
-rw-r--r--flake.nix3
-rw-r--r--flake/default.nix4
-rw-r--r--flake/nixosConfigurations/default.nix4
-rw-r--r--flake/packages/default.nix5
-rw-r--r--modules/common/default.nix (renamed from flake/nixosConfigurations/common.nix)77
6 files changed, 116 insertions, 29 deletions
diff --git a/flake.lock b/flake.lock
index c52bac02..e3fcf9be 100644
--- a/flake.lock
+++ b/flake.lock
@@ -265,11 +265,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1738145391,
-        "narHash": "sha256-/9mfbWYN9HDQbKa2HdAe2T5e3FfY8e4eqc1FIvAyvLg=",
+        "lastModified": 1738378034,
+        "narHash": "sha256-mldSa2NhDlnjqeSSFTNnkXIDrCLltpJfhrHUMBBKEiY=",
         "owner": "nix-community",
         "repo": "home-manager",
-        "rev": "1b4f2a48168b3d90e11365552d1e7e601a4be6b6",
+        "rev": "801ddd8693481866c2cfb1efd44ddbae778ea572",
         "type": "github"
       },
       "original": {
@@ -358,11 +358,11 @@
     },
     "library": {
       "locked": {
-        "lastModified": 1738161079,
-        "narHash": "sha256-YDiu0DbtwOSo1GO3D9A0Q+dHzsYJ6pJ8ZYEkgmK1szI=",
+        "lastModified": 1738443114,
+        "narHash": "sha256-IV7n/l3rFoz5UuavrDv0a7IIOPne0jDQVmJAR8bve8U=",
         "ref": "prime",
-        "rev": "847a8167fe3b52c3b8e19017b31a97e12ad411ea",
-        "revCount": 16,
+        "rev": "65bf71bb6ef05ce684924a1dc248bb2e8e2869fb",
+        "revCount": 17,
         "type": "git",
         "url": "https://git.foss-syndicate.org/vhack.eu/nix-library"
       },
@@ -379,11 +379,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1738033138,
-        "narHash": "sha256-qlIM8A3bdL9c6PexhpS+QyZLO9y/8a3V75HVyJgDE5Q=",
+        "lastModified": 1738277753,
+        "narHash": "sha256-iyFcCOk0mmDiv4ut9mBEuMxMZIym3++0qN1rQBg8FW0=",
         "owner": "lnl7",
         "repo": "nix-darwin",
-        "rev": "349a74c66c596ef97ee97b4d80a3ca61227b6120",
+        "rev": "49b807fa7c37568d7fbe2aeaafb9255c185412f9",
         "type": "github"
       },
       "original": {
@@ -464,11 +464,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1738170240,
-        "narHash": "sha256-4Sj34kjdmGVwwvCPOL4zztLOLMUv2jfvBDkvq6/KySc=",
+        "lastModified": 1738366771,
+        "narHash": "sha256-nyEBrP5t1g4vmy7YBkiGaIu19eG8zV3T4IQLQbJsVU8=",
         "owner": "nix-community",
         "repo": "nixvim",
-        "rev": "e908e344f4cd7b3eb629b93e8af312888f3ee681",
+        "rev": "c75e4ea37f25ec98aa6f2035e03e748e7369662c",
         "type": "github"
       },
       "original": {
@@ -502,11 +502,11 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1737885589,
-        "narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=",
+        "lastModified": 1738142207,
+        "narHash": "sha256-NGqpVVxNAHwIicXpgaVqJEJWeyqzoQJ9oc8lnK9+WC4=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "852ff1d9e153d8875a83602e03fdef8a63f0ecf8",
+        "rev": "9d3ae807ebd2981d593cddd0080856873139aa40",
         "type": "github"
       },
       "original": {
@@ -549,11 +549,11 @@
     },
     "nixpkgs-stable": {
       "locked": {
-        "lastModified": 1738023785,
-        "narHash": "sha256-BPHmb3fUwdHkonHyHi1+x89eXB3kA1jffIpwPVJIVys=",
+        "lastModified": 1738277201,
+        "narHash": "sha256-6L+WXKCw5mqnUIExvqkD99pJQ41xgyCk6z/H9snClwk=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "2b4230bf03deb33103947e2528cac2ed516c5c89",
+        "rev": "666e1b3f09c267afd66addebe80fb05a5ef2b554",
         "type": "github"
       },
       "original": {
@@ -675,11 +675,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1735599473,
-        "narHash": "sha256-lKKA9AI7uk+G+OY4fX3EcnTWqq9pr7Vryxxrm4aiT28=",
+        "lastModified": 1738406121,
+        "narHash": "sha256-N3scpt+nwPbqzsRs4gjZpDiBivfPRQJ0D75bPeYhHME=",
         "ref": "prime",
-        "rev": "a91e8256a3adc1ab7ee94bfcea7198b51cfb6b37",
-        "revCount": 18,
+        "rev": "2b6889092e5839c8987e800f1d3d847dd5b50153",
+        "revCount": 19,
         "type": "git",
         "url": "https://git.foss-syndicate.org/bpeetz/qmk_layout.git"
       },
@@ -802,11 +802,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1738117527,
-        "narHash": "sha256-GFviGfaezjGLFUlxdv3zyC7rSZvTXqwcG/YsF6MDkOw=",
+        "lastModified": 1738376888,
+        "narHash": "sha256-S6ErHxkSm0iA7ZMsjjDaASWxbELYcdfv8BhOkkj1rHw=",
         "owner": "oxalica",
         "repo": "rust-overlay",
-        "rev": "6a3dc6ce4132bd57359214d986db376f2333c14d",
+        "rev": "83284068670d5ae4a43641c4afb150f3446be70d",
         "type": "github"
       },
       "original": {
diff --git a/flake.nix b/flake.nix
index d8e38f34..6dd46d91 100644
--- a/flake.nix
+++ b/flake.nix
@@ -297,6 +297,8 @@
     system = "x86_64-linux";
     sysLib = shell_library.lib.${system};
 
+    baseLib = import ./lib {inherit (pkgs) lib;};
+
     inherit (library) nixLib;
 
     pkgsStable = nixpkgs-stable.legacyPackages.${system};
@@ -323,6 +325,7 @@
         myPkgs
         system
         sysLib
+        baseLib
         nixpkgs_as_input
         nixpkgs_open_prs
         # modules
diff --git a/flake/default.nix b/flake/default.nix
index be6d2b70..c942c678 100644
--- a/flake/default.nix
+++ b/flake/default.nix
@@ -4,6 +4,7 @@
   pkgs,
   pkgsStable,
   nixLib,
+  baseLib,
   myPkgs,
   system,
   sysLib,
@@ -43,6 +44,7 @@
       shell_library
       sysLib
       nixLib
+      baseLib
       templates
       # modules
       home-manager
@@ -111,6 +113,8 @@ in {
 
   formatter."${system}" = treefmtEval.config.build.wrapper;
 
+  baseLib."${system}" = baseLib;
+
   apps."${system}" = import ./apps {inherit self system;};
 
   devShells."${system}" = {
diff --git a/flake/nixosConfigurations/default.nix b/flake/nixosConfigurations/default.nix
index b0a02580..0c2f8c90 100644
--- a/flake/nixosConfigurations/default.nix
+++ b/flake/nixosConfigurations/default.nix
@@ -9,6 +9,7 @@
   shell_library,
   sysLib,
   nixLib,
+  baseLib,
   templates,
   # modules
   home-manager,
@@ -38,7 +39,7 @@
     serverphone.nixosModules.default
 
     ../../modules
-    ./common.nix
+    ../../modules/common
   ];
 
   specialArgs = {
@@ -50,6 +51,7 @@
       shell_library
       sysLib
       nixLib
+      baseLib
       # extra information
       system
       # modules
diff --git a/flake/packages/default.nix b/flake/packages/default.nix
index a8fc2d64..82924a25 100644
--- a/flake/packages/default.nix
+++ b/flake/packages/default.nix
@@ -23,7 +23,10 @@
         # NOTE: This is copied from `nixvim`, and could be achieved by setting
         # `config.wrapRc` to `true`. But I have yet to find a way to set this in this
         # context, but not in the general context.  <2024-11-09>
-        wrapped = config.build.package.override (prev: {
+        # NOTE: I'm not sure why we need `nvimPackage` instead of just the `package`
+        # attribute here, but the bare `package` attribute does not provide a `override`
+        # function. <2025-02-02>
+        wrapped = config.build.nvimPackage.override (prev: {
           wrapperArgs =
             (
               if lib.isString prev.wrapperArgs
diff --git a/flake/nixosConfigurations/common.nix b/modules/common/default.nix
index 8071c6a9..232c329d 100644
--- a/flake/nixosConfigurations/common.nix
+++ b/modules/common/default.nix
@@ -3,6 +3,7 @@
 {
   config,
   pkgs,
+  lib,
   ...
 }: {
   soispha = {
@@ -108,7 +109,81 @@
       imv.enable = true;
       less.enable = true;
       lf.enable = true;
-      river.enable = true;
+      river = {
+        enable = true;
+        init = {
+          rules = [
+            {
+              app-id = "float";
+              title = "*";
+              action = "float";
+            }
+            {
+              app-id = "mpv";
+              title = "*";
+              action = "float";
+            }
+            {
+              app-id = "ModernGL";
+              title = "*";
+              action = "float";
+            }
+            {
+              app-id = "*";
+              title = "Manim Slides";
+              action = "float";
+            }
+            {
+              app-id = "*";
+              title = "floating please";
+              action = "float";
+            }
+
+            {
+              app-id = "*";
+              title = "*";
+              action = "ssd";
+            }
+            # This remove the focus border around Firefox (which is useful because the Firefox is nearly always in its own tag.)
+            {
+              app-id = "firefox";
+              title = "*";
+              action = "csd";
+            }
+          ];
+          generalSettings = {
+            # background
+            background-color = "0x002b36";
+            border-color-focused = "0x93a1a1";
+            border-color-unfocused = "0x586e75";
+
+            # keyboard repeat rate
+            set-repeat = ["50" "300"];
+
+            # Cursor
+            focus-follows-cursor = "normal";
+            # hide-cursor = ["timeout" "2000"];
+            hide-cursor = ["when-typing" "enabled"];
+            set-cursor-warp = "on-output-change";
+            xcursor-theme = ["Nordzy-cursors" "24"];
+          };
+          inputs = {
+            pointer-1133-49970-Logitech_Gaming_Mouse_G502 = [["pointer-accel" "0"] ["accel-profile" "none"]];
+            pointer-12951-6505-ZSA_Technology_Labs_Moonlander_Mark_I = [["pointer-accel" "0"] ["accel-profile" "none"]];
+          };
+          backgroundStart = [
+            pkgs.gammastep
+            pkgs.yambar
+
+            pkgs.mako
+            ["${lib.getExe pkgs.swaybg}" "--image" "${./abstract-nord.png}"]
+            pkgs.swayidle
+            pkgs.alacritty
+          ];
+        };
+      };
+      mpv.enable = true;
+      swaylock.enable = true;
       taskwarrior.enable = true;
       yambar.enable = true;
       yt.enable = true;