diff --git a/.config/nvim/syntax/ruler.vim b/.config/nvim/syntax/ruler.vim index 1554d4ef..386b7e16 100644 --- a/.config/nvim/syntax/ruler.vim +++ b/.config/nvim/syntax/ruler.vim @@ -10,19 +10,15 @@ syn match rulerLineComment "--.*$" syn match rulerTripleDot "\.\.\." syn match rulerDate "\d\d\d\d\D\d\d\D\d\d \d\d\D\d\d\D\(\d\d\|__\)" syn match rulerTag "\s\+[a-zA-Z]\+:[^\n]*" -syn keyword rulerImport import -syn keyword rulerType type -syn keyword rulerTimezone timezone +syn match rulerImport "import" -syn region rulerBlockComment start="{-" end="-}" contains=rulerBlockComment +syn region rulerBlockComment start="{-" end="-}" hi def link rulerLineComment Comment hi def link rulerBlockComment Comment hi def link rulerTripleDot Comment hi def link rulerDate Macro hi def link rulerImport Keyword -hi def link rulerType Keyword -hi def link rulerTimezone Keyword hi def link rulerTag @property let b:current_syntax = "ruler" diff --git a/nix/configurations/hetzner_benchmark.nix b/nix/configurations/hetzner_benchmark.nix index 6201e6f1..2fddb026 100644 --- a/nix/configurations/hetzner_benchmark.nix +++ b/nix/configurations/hetzner_benchmark.nix @@ -31,9 +31,6 @@ in # nixpkgs # { - # don't use `nixpkgs.flake.source`, it uses flake so it double fetches - nix.nixPath = [ "nixpkgs=${sources.nixpkgs}" ]; - nixpkgs = { overlays = map import [ ../packages/overlay.nix @@ -42,6 +39,10 @@ in ../overlays/lix.nix ../overlays/nix-monitored.nix ]; + + # Set NIX_PATH and flake registry at the same time + # https://github.com/NixOS/nixpkgs/pull/254405 + flake.source = sources.nixpkgs; }; nix.package = pkgs.nix-monitored; diff --git a/nix/configurations/hydrogen.nix b/nix/configurations/hydrogen.nix index 5a303423..c751ef0a 100644 --- a/nix/configurations/hydrogen.nix +++ b/nix/configurations/hydrogen.nix @@ -34,9 +34,6 @@ in # nixpkgs # { - # don't use `nixpkgs.flake.source`, it uses flake so it double fetches - nix.nixPath = [ "nixpkgs=${sources.nixpkgs}" ]; - nixpkgs = { overlays = map import [ ../overlays/agenix.nix @@ -48,6 +45,10 @@ in ../overlays/lix.nix ../overlays/nix-monitored.nix ]; + + # Set NIX_PATH and flake registry at the same time + # https://github.com/NixOS/nixpkgs/pull/254405 + flake.source = sources.nixpkgs; }; nix.package = pkgs.nix-monitored; diff --git a/nix/configurations/vanadium.nix b/nix/configurations/vanadium.nix index f881d389..2fba0b2a 100644 --- a/nix/configurations/vanadium.nix +++ b/nix/configurations/vanadium.nix @@ -35,9 +35,6 @@ in nix = { distributedBuilds = true; settings.builders-use-substitutes = true; - - # don't use `nixpkgs.flake.source`, it uses flake so it double fetches - nixPath = [ "nixpkgs=${sources.nixpkgs}" ]; }; nixpkgs = { @@ -73,6 +70,10 @@ in ../overlays/lix.nix ../overlays/nix-monitored.nix ]; + + # Set NIX_PATH and flake registry at the same time + # https://github.com/NixOS/nixpkgs/pull/254405 + flake.source = sources.nixpkgs; }; nix.package = pkgs.nix-monitored; diff --git a/nix/configurations/vanadium/home/programs.nix b/nix/configurations/vanadium/home/programs.nix index f97136e1..a2b44af7 100644 --- a/nix/configurations/vanadium/home/programs.nix +++ b/nix/configurations/vanadium/home/programs.nix @@ -85,7 +85,6 @@ pkgs.evolution pkgs.libreoffice pkgs.calibre - pkgs.foliate # TODO: replace calibre with foliate # pkgs.rawtherapee pkgs.digikam pkgs.gimp diff --git a/nix/configurations/vanadium/home/xmobar/xmobar.hs b/nix/configurations/vanadium/home/xmobar/xmobar.hs index 6479154e..314f4d50 100644 --- a/nix/configurations/vanadium/home/xmobar/xmobar.hs +++ b/nix/configurations/vanadium/home/xmobar/xmobar.hs @@ -73,10 +73,9 @@ config = , "--target", "2025-10-31=dragon book" , "--target", "2025-11-19=scalpel" , "--target", "2025-11-29=à deux" - -- , "--target", "2025-12-15=campus baguette" - -- , "--target", "2025-12-16=dragon book" - , "--target", "2025-12-18=baguette" + , "--target", "2025-12-16=dragon book" , "--target", "2025-12-30=seule" + , "--target", "2025-12-15=campus baguette" , "--target", "2026-02-02=monmaster" , "--target", "2026-02-22=dernier appel" ] diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 415a0fc1..bd224647 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -1,11 +1,9 @@ {-# LANGUAGE NegativeLiterals #-} -{-# OPTIONS_GHC -Wno-missing-signatures #-} -- my layout is getting crazy import XMonad import XMonad.Actions.CopyWindow import XMonad.Actions.Submap import XMonad.Actions.SwapWorkspaces -import XMonad.Actions.Warp import XMonad.Hooks.DynamicLog import XMonad.Hooks.EwmhDesktops import XMonad.Hooks.InsertPosition @@ -15,22 +13,18 @@ import XMonad.Hooks.OnPropertyChange import XMonad.Hooks.RefocusLast import XMonad.Hooks.StatusBar import XMonad.Layout.FocusTracking -import XMonad.Layout.IfMax -import XMonad.Layout.Magnifier hiding (Toggle) -import qualified XMonad.Layout.Magnifier as Mag import XMonad.Layout.NoBorders -import XMonad.Layout.PerWorkspace import XMonad.Layout.Reflect import XMonad.Layout.Reflect.Message import XMonad.Layout.Renamed import XMonad.Layout.ResizableTile import XMonad.Layout.Spacing -import XMonad.Layout.ToggleLayouts import qualified XMonad.StackSet as W import XMonad.Util.EZConfig import XMonad.Util.Hacks import XMonad.Util.NamedScratchpad import XMonad.Util.SpawnOnce +import XMonad.Layout.Magnifier import Data.Char.Greek import Data.Ratio @@ -68,28 +62,14 @@ main = `additionalKeys` keybinds myLayout = - avoidStruts - $ smartBorders - $ onWorkspace researchWS (toggleLayouts (mag tallr) full) - $ onWorkspace chatWS (toggleLayouts (mag tallr) full) - $ onWorkspace multimediaWS (toggleLayouts (mag tallr) full) - $ toggleLayouts (mag tallr) full - where - mag = magnifierOff - - full = focusTracking Full - - mkTallrN n = - smartSpacingWithEdge 5 - $ reflectMsg . reflectHoriz - $ ResizableTall n (1/10) (3/7) [] - - tallr = - renamed [ Replace "Tall" ] - $ ifMax 3 (mkTallrN 1) - $ ifMax 5 (mkTallrN 2) - $ ifMax 7 (mkTallrN 3) - $ mkTallrN 4 + let tallr = renamed [ Replace "Tall" ] + $ smartSpacingWithEdge 5 + $ reflectMsg . reflectHoriz + $ ResizableTall 1 (1/10) (3/7) [] + mag = magnifyxy 1.05 1.3 (NoMaster 3) False + in avoidStruts + $ smartBorders + $ mag tallr ||| focusTracking Full isSioyek :: Query Bool isSioyek = className =? "sioyek" @@ -284,13 +264,17 @@ keybinds = , ((0, xF86XK_AudioPlay), spawn "playerctl play-pause") , ((0, xF86XK_AudioNext), spawn "playerctl next" ) + -- Toggle fullscreen + , ((superMask, xK_Escape), sendMessage NextLayout) + -- Resize windows + , ((superMask, xK_equal ), sendMessage $ IncMasterN 1) + , ((superMask, xK_minus ), sendMessage $ IncMasterN -1) , ((superMask, xK_comma ), sendMessage Shrink ) , ((superMask, xK_period ), sendMessage Expand ) , ((superMask .|. shiftMask, xK_comma ), sendMessage MirrorShrink ) , ((superMask .|. shiftMask, xK_period), sendMessage MirrorExpand ) - , ((superMask , xK_apostrophe), sendMessage Mag.Toggle ) - , ((superMask , xK_space ), sendMessage ToggleLayout ) + , ((superMask , xK_apostrophe), sendMessage Toggle ) -- [D]o sink and lift , ( (superMask, xK_d) @@ -301,19 +285,6 @@ keybinds = ) ] - -- We override default focus shifting bindings to warp the cursor to the center of the new window. - -- This is especially useful because mag doesn't work well with focusFollowsMouse. - -- The order is important: focus shift, and then warp the cursor - -- - -- Warp when focus shifts by binding, not by mouse (otherwise it's annoying) - ++ (let warp = warpToWindow 0.5 0.5 - in [ ((superMask, xK_Tab ), windows W.focusDown >> warp) - , ((superMask .|. shiftMask, xK_Tab ), windows W.focusUp >> warp) - , ((superMask, xK_j ), windows W.focusDown >> warp) - , ((superMask, xK_k ), windows W.focusUp >> warp) - ] - ) - -- Screenshots ++ (let fullscreen = "maim -u | xclip -in -selection clipboard -t image/png" withSelection = "maim -u -s -b 5 -o | xclip -in -selection clipboard -t image/png" @@ -372,15 +343,12 @@ altMask = mod1Mask myWorkspaces :: [WorkspaceId] myWorkspaces = map (:[]) $ take 8 greekLower -researchWS :: WorkspaceId -researchWS = myWorkspaces !! 2 +multimediaWS :: WorkspaceId +multimediaWS = myWorkspaces !! 6 chatWS :: WorkspaceId chatWS = myWorkspaces !! 3 -multimediaWS :: WorkspaceId -multimediaWS = myWorkspaces !! 6 - centeredFloat, smallFloat, fullFloat, buttomRightFloat :: W.RationalRect centeredFloat = W.RationalRect (1%9) (1%9) (7%9) (7%9) smallFloat = W.RationalRect (3%5) (3%5) (2%7) (2%7) diff --git a/nix/configurations/vanadium/nixos/programs.nix b/nix/configurations/vanadium/nixos/programs.nix index b3e3ec6d..74d4be3e 100644 --- a/nix/configurations/vanadium/nixos/programs.nix +++ b/nix/configurations/vanadium/nixos/programs.nix @@ -78,15 +78,4 @@ ''; }; }; - - services.hoogle = { - enable = true; - packages = - haskellPackages: with haskellPackages; [ - optparse-applicative - megaparsec - tasty-golden - tree-diff - ]; - }; } diff --git a/nix/homeModules/common/zen-browser.nix b/nix/homeModules/common/zen-browser.nix index 4b2e2fbc..be5ded5b 100644 --- a/nix/homeModules/common/zen-browser.nix +++ b/nix/homeModules/common/zen-browser.nix @@ -59,9 +59,6 @@ in # diff .zen/default/prefs.js{.bk,} profiles.default = { settings = { - # Zen specific - "zen.theme.content-element-separation" = 0; # Remove "borders" around window - "toolkit.legacyUserProfileCustomizations.stylesheets" = true; "browser.tabs.loadInBackground" = true; "browser.ctrlTab.sortByRecentlyUsed" = false; diff --git a/nix/networks/list.nix b/nix/networks/list.nix index 30401b42..4ec25b95 100644 --- a/nix/networks/list.nix +++ b/nix/networks/list.nix @@ -6,7 +6,6 @@ in [ { ssid = "~"; - bssid = "de:ad:de:ad:d0:d0"; # dead dead dodo priority = preferredPriority; hasPassword = true; } @@ -81,13 +80,6 @@ in hasPassword = true; randomizeMac = true; } - { - ssid = "LouisaCoffee"; - bssid = "fa:92:bf:62:7c:19"; - priority = privatePriority; - hasPassword = true; - randomizeMac = true; - } { ssid = "MetroTaipei x Louisa"; # 大安 priority = privatePriority; diff --git a/nix/networks/wpa_supplicant-compat.nix b/nix/networks/wpa_supplicant-compat.nix index 2f57b267..65f130a0 100644 --- a/nix/networks/wpa_supplicant-compat.nix +++ b/nix/networks/wpa_supplicant-compat.nix @@ -13,7 +13,6 @@ let go = networkArgs@{ ssid, - bssid ? null, # Custom fields wrapping nixpkgs module options hasPassword ? false, scanOnLowSignal ? false, @@ -21,31 +20,24 @@ let ... }: { - ${ - # We use a unique key here to make sure no "same ssid different bssid" networks collide in key. - # This is ordered, we still show "null" so that it would come after hex characters [a-z0-9]. - # The serialization is based on string order. - "${ssid},${if bssid != null then bssid else "null"}" - } = - lib.mkMerge [ - (builtins.removeAttrs networkArgs [ - "hasPassword" - "scanOnLowSignal" - "randomizeMac" - ]) - (lib.optionalAttrs hasPassword { - pskRaw = "ext:${ - # this implies changing the external password key if you set a bssid! - escapePwdKey (if bssid == null then ssid else "${ssid},${bssid}") - }"; - }) - { - extraConfig = '' - ${lib.optionalString scanOnLowSignal "bgscan=\"simple:30:-70:3600\""} - ${lib.optionalString randomizeMac "mac_addr=1"} - ''; - } - ]; + ${ssid} = lib.mkMerge [ + (builtins.removeAttrs networkArgs [ + # We keep ssid, because it overrides the attrset name ssid + # "ssid" + "hasPassword" + "scanOnLowSignal" + "randomizeMac" + ]) + (lib.optionalAttrs hasPassword { + pskRaw = "ext:${escapePwdKey ssid}"; + }) + { + extraConfig = '' + ${lib.optionalString scanOnLowSignal "bgscan=\"simple:30:-70:3600\""} + ${lib.optionalString randomizeMac "mac_addr=1"} + ''; + } + ]; }; in ns: lib.mkMerge (map go ns) diff --git a/nix/packages/by-name/ruler/package.nix b/nix/packages/by-name/ruler/package.nix index 8cd1efb4..0e7d8aa9 100644 --- a/nix/packages/by-name/ruler/package.nix +++ b/nix/packages/by-name/ruler/package.nix @@ -1,5 +1,3 @@ -# Use the following to start a hoogle server for the project -# nix-shell -E 'with import ./. {}; packages.ruler.envFunc{withHoogle = true;}' --run "hoogle server --local" { haskellPackages, haskell, @@ -13,8 +11,8 @@ let domain = "git.confusedcompiler.org"; owner = "leana8959"; repo = "ruler"; - rev = "72069c79bd6540fb9a1ee941fa2502edd6853af8"; - hash = "sha256-UQYx1WoWxASnWINtlTE2zMrADBketo/bgo5aud5j8Og="; + rev = "2556b4985065d093b1db3a14a2c5c37115871c78"; + hash = "sha256-OvNhDpyAbZp+d0rSXLE55BvM5jT3OI8q79D6aVaA2FI="; }) { }; cabalOverrides = o: { diff --git a/nix/secrets/wpa_password.age b/nix/secrets/wpa_password.age index 3a79d0bc..17fe933a 100644 Binary files a/nix/secrets/wpa_password.age and b/nix/secrets/wpa_password.age differ diff --git a/npins/sources.json b/npins/sources.json index d02e14f7..d84bc0d3 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -114,9 +114,9 @@ }, "branch": "release-25.11", "submodules": false, - "revision": "20561be440a11ec57a89715480717baf19fe6343", - "url": "https://github.com/nix-community/home-manager/archive/20561be440a11ec57a89715480717baf19fe6343.tar.gz", - "hash": "1n2l891p04y3xmd0sl5i3553ndgpxkinysg1bf8iiixmxhcm7i9v" + "revision": "3fdd076e08049a9c7a83149b270440d9787d2df5", + "url": "https://github.com/nix-community/home-manager/archive/3fdd076e08049a9c7a83149b270440d9787d2df5.tar.gz", + "hash": "07k47xnkzha7ilcyak57wrh2ngka2j4f0d95zyyxn8jz8195q2q6" }, "infuse": { "type": "GitRelease", @@ -144,9 +144,9 @@ }, "branch": "main", "submodules": false, - "revision": "504599f7e555a249d6754698473124018b80d121", - "url": "https://github.com/oxalica/nil/archive/504599f7e555a249d6754698473124018b80d121.tar.gz", - "hash": "1mzx60999jciq2ax1l5ajmks6fb3cmjavn7fsyh4aysvcdgzrj6p" + "revision": "01e573c9e31ba3be7eaa848ba7dfcbd04260163e", + "url": "https://github.com/oxalica/nil/archive/01e573c9e31ba3be7eaa848ba7dfcbd04260163e.tar.gz", + "hash": "0j8dix0a29lmszpl0gpv9whrhigs9bj4s2is3rsdwqc6gviqsq92" }, "nix-monitored": { "type": "Git", @@ -173,10 +173,10 @@ "version_upper_bound": null, "release_prefix": null, "submodules": false, - "version": "v0.8.0", - "revision": "e7ef6623cf944b80e48196d74c6531dd79943652", - "url": "https://api.github.com/repos/utdemir/nix-tree/tarball/v0.8.0", - "hash": "1ag68xnszianrfinm56mf9bhvm0pglvnmlyffjr1pxrkji8d52nc" + "version": "v0.6.3", + "revision": "477021a0f5b2fce11cb73dde9ecce49094f56db0", + "url": "https://api.github.com/repos/utdemir/nix-tree/tarball/v0.6.3", + "hash": "1hzss0sqxhyjp1f8v1p2sqv1636943brwl2x0vn2f851xbb6kgz7" }, "nixos-hardware": { "type": "Git", @@ -200,9 +200,9 @@ }, "branch": "nixos-25.11-small", "submodules": false, - "revision": "1acf2f172ef3d6e31c9913ccb7ba07b13dadfedc", - "url": "https://github.com/nixos/nixpkgs/archive/1acf2f172ef3d6e31c9913ccb7ba07b13dadfedc.tar.gz", - "hash": "1hhjz7jx0n0i2mxq9d3yvqvlmrwjklq1ljcfzpmnzyfhrixqg9y5" + "revision": "e9f8538978f954bed00f6535b764e7932dbc3eea", + "url": "https://github.com/nixos/nixpkgs/archive/e9f8538978f954bed00f6535b764e7932dbc3eea.tar.gz", + "hash": "07wdninn693v06jz537pn1d257idi7p3dqh1mvygsb2zf6y4hypm" }, "nur": { "type": "Git", @@ -213,9 +213,9 @@ }, "branch": "main", "submodules": false, - "revision": "e7844e0f24c76b6137e16ab95c9a7c275acf2fbb", - "url": "https://github.com/nix-community/nur/archive/e7844e0f24c76b6137e16ab95c9a7c275acf2fbb.tar.gz", - "hash": "10bz6b1j2d5z257xv8bjwdr1636f807f2gr24yaswxr55a7wdyk9" + "revision": "cdeb308c4faaa430f951e81db2360cebb54feb58", + "url": "https://github.com/nix-community/nur/archive/cdeb308c4faaa430f951e81db2360cebb54feb58.tar.gz", + "hash": "1jjsgmg3maqkrncwc3fn7iqcsi88fjvfzkpchcc1iwih65kr91il" }, "pin-emacs28": { "type": "Git", @@ -378,9 +378,9 @@ }, "branch": "main", "submodules": false, - "revision": "1adab25828578301037855c59849e9bbecf8948b", - "url": "https://github.com/0xc000022070/zen-browser-flake/archive/1adab25828578301037855c59849e9bbecf8948b.tar.gz", - "hash": "091sdxgqxcmxh15w9b65bv29fw0cgg0mfpl3d1ymsv1510lq30a6" + "revision": "8c9284cc227a5c7cd8f1e1fa7a6882b0907187c8", + "url": "https://github.com/0xc000022070/zen-browser-flake/archive/8c9284cc227a5c7cd8f1e1fa7a6882b0907187c8.tar.gz", + "hash": "1k0bxn3c9bsm5543wsijv6r73jb8c1a4pzcwqh7rjpn67n988hj2" } }, "version": 5