commit
6f3ece8d9a
46 changed files with 1394 additions and 1367 deletions
431
flake.lock
generated
431
flake.lock
generated
|
@ -4,19 +4,19 @@
|
|||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"haskell-flake": "haskell-flake",
|
||||
"hercules-ci-effects": "hercules-ci-effects",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1692787336,
|
||||
"narHash": "sha256-WabgeYsUiMRbpb1bCT3oY6GJEciZQIf3tYD8RQAUf2c=",
|
||||
"lastModified": 1733918199,
|
||||
"narHash": "sha256-hSuGa8Hh67EHr2x812Ay6WFyFT2BGKn+zk+FJWeKXPg=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "arion",
|
||||
"rev": "28902d348807c494115177595f812a3e54cc913b",
|
||||
"rev": "9f01fb79f61f53fe31d5ef831e420ab9ad252b99",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"ref": "v0.2.2.0",
|
||||
"repo": "arion",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
|||
"crane": "crane",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
|
@ -52,7 +52,7 @@
|
|||
"flake-compat": "flake-compat_2",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nix-filter": "nix-filter",
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1728224242,
|
||||
|
@ -115,7 +115,7 @@
|
|||
},
|
||||
"crane_3": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1724006180,
|
||||
|
@ -133,10 +133,7 @@
|
|||
},
|
||||
"crane_4": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"lanzaboote",
|
||||
"nixpkgs"
|
||||
]
|
||||
"nixpkgs": "nixpkgs_7"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1717535930,
|
||||
|
@ -191,7 +188,7 @@
|
|||
"deploy-rs": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_3",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
|
@ -211,14 +208,14 @@
|
|||
"dtth-phanpy": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": "nixpkgs_7"
|
||||
"nixpkgs": "nixpkgs_6"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731494335,
|
||||
"narHash": "sha256-G1G2WRGgIOFNmlJglfqEupSg0VWHgODbBJzp5xo+cYY=",
|
||||
"lastModified": 1739632357,
|
||||
"narHash": "sha256-aqLiDoLaqYdZIEgR7NGavo4KPbOYOhU7vuCDXe1uL5Y=",
|
||||
"ref": "dtth-fork",
|
||||
"rev": "c414bb78f27b20df4463c36a5851c94cfe9c79b0",
|
||||
"revCount": 3367,
|
||||
"rev": "30979814a9dbbf590d4d954e559811e6a7504459",
|
||||
"revCount": 3476,
|
||||
"type": "git",
|
||||
"url": "ssh://gitea@git.dtth.ch/nki-dtth/phanpy"
|
||||
},
|
||||
|
@ -337,11 +334,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1675933616,
|
||||
"narHash": "sha256-/rczJkJHtx16IFxMmAWu5nNYcSXNg1YYXTHoGjLrLUA=",
|
||||
"lastModified": 1733312601,
|
||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "47478a4a003e745402acf63be7f9a092d51b83d7",
|
||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -351,46 +348,6 @@
|
|||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1688466019,
|
||||
"narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "flake-parts",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"flake-parts_3": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"arion",
|
||||
"hercules-ci-effects",
|
||||
"hercules-ci-agent",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1688466019,
|
||||
"narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_4": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"lanzaboote",
|
||||
|
@ -411,16 +368,16 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_5": {
|
||||
"flake-parts_3": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib_2"
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722555600,
|
||||
"narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=",
|
||||
"lastModified": 1736143030,
|
||||
"narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "8471fe90ad337a8074e957b69ca4d0089218391d",
|
||||
"rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -503,11 +460,11 @@
|
|||
"systems": "systems_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -638,64 +595,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"haskell-flake_2": {
|
||||
"locked": {
|
||||
"lastModified": 1684780604,
|
||||
"narHash": "sha256-2uMZsewmRn7rRtAnnQNw1lj0uZBMh4m6Cs/7dV5YF08=",
|
||||
"owner": "srid",
|
||||
"repo": "haskell-flake",
|
||||
"rev": "74210fa80a49f1b6f67223debdbf1494596ff9f2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "srid",
|
||||
"ref": "0.3.0",
|
||||
"repo": "haskell-flake",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hercules-ci-agent": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_3",
|
||||
"haskell-flake": "haskell-flake_2",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1688568579,
|
||||
"narHash": "sha256-ON0M56wtY/TIIGPkXDlJboAmuYwc73Hi8X9iJGtxOhM=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "hercules-ci-agent",
|
||||
"rev": "367dd8cd649b57009a6502e878005a1e54ad78c5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "hercules-ci-agent",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"hercules-ci-effects": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
"hercules-ci-agent": "hercules-ci-agent",
|
||||
"nixpkgs": [
|
||||
"arion",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1689397210,
|
||||
"narHash": "sha256-fVxZnqxMbsDkB4GzGAs/B41K0wt/e+B/fLxmTFF/S20=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "hercules-ci-effects",
|
||||
"rev": "0a63bfa3f00a3775ea3a6722b247880f1ffe91ce",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "hercules-ci-effects",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -703,11 +602,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736373539,
|
||||
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
|
||||
"lastModified": 1739757849,
|
||||
"narHash": "sha256-Gs076ot1YuAAsYVcyidLKUMIc4ooOaRGO0PqTY7sBzA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
|
||||
"rev": "9d3d080aec2a35e05a15cedd281c2384767c2cfe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -724,11 +623,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736785676,
|
||||
"narHash": "sha256-TY0jUwR3EW0fnS0X5wXMAVy6h4Z7Y6a3m+Yq++C9AyE=",
|
||||
"lastModified": 1741791118,
|
||||
"narHash": "sha256-4Y427uj0eql4yRU5rely3EcOlB9q457UDbG9omPtXiA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "fc52a210b60f2f52c74eac41a8647c1573d2071d",
|
||||
"rev": "18780912345970e5b546b1b085385789b6935a83",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -740,15 +639,16 @@
|
|||
"kak-lsp": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1723206901,
|
||||
"narHash": "sha256-wPCu/VxAMIB+zI0+eDq7lJ/rHJZfe0whYzdoiwrixCc=",
|
||||
"lastModified": 1742457498,
|
||||
"narHash": "sha256-2jD0meehUNGvmywOY4D9CwP1qswD7QCPlctLBjngzvE=",
|
||||
"owner": "kakoune-lsp",
|
||||
"repo": "kakoune-lsp",
|
||||
"rev": "ebd370f43cb6e7af634e5f8cadb99cc8c16e1efe",
|
||||
"rev": "30dfe2873dae089981d63d3405323a8e9def0468",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "kakoune-lsp",
|
||||
"ref": "v18.1.3",
|
||||
"repo": "kakoune-lsp",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -773,8 +673,7 @@
|
|||
"inputs": {
|
||||
"crane": "crane_4",
|
||||
"flake-compat": "flake-compat_4",
|
||||
"flake-parts": "flake-parts_4",
|
||||
"flake-utils": "flake-utils_5",
|
||||
"flake-parts": "flake-parts_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
|
@ -782,16 +681,16 @@
|
|||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718178907,
|
||||
"narHash": "sha256-eSZyrQ9uoPB9iPQ8Y5H7gAmAgAvCw3InStmU3oEjqsE=",
|
||||
"lastModified": 1737639419,
|
||||
"narHash": "sha256-AEEDktApTEZ5PZXNDkry2YV2k6t0dTgLPEmAZbnigXU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "lanzaboote",
|
||||
"rev": "b627ccd97d0159214cee5c7db1412b75e4be6086",
|
||||
"rev": "a65905a09e2c43ff63be8c0e86a93712361f871e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "v0.4.1",
|
||||
"ref": "v0.4.2",
|
||||
"repo": "lanzaboote",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -799,15 +698,15 @@
|
|||
"lix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1729298361,
|
||||
"narHash": "sha256-hiGtfzxFkDc9TSYsb96Whg0vnqBVV7CUxyscZNhed0U=",
|
||||
"rev": "ad9d06f7838a25beec425ff406fe68721fef73be",
|
||||
"lastModified": 1737234286,
|
||||
"narHash": "sha256-CCKIAE84dzkrnlxJCKFyffAxP3yfsOAbdvydUGqq24g=",
|
||||
"rev": "2837da71ec1588c1187d2e554719b15904a46c8b",
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/ad9d06f7838a25beec425ff406fe68721fef73be.tar.gz?rev=ad9d06f7838a25beec425ff406fe68721fef73be"
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/2837da71ec1588c1187d2e554719b15904a46c8b.tar.gz?rev=2837da71ec1588c1187d2e554719b15904a46c8b"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/lix-project/lix/archive/2.91.1.tar.gz"
|
||||
"url": "https://git.lix.systems/lix-project/lix/archive/2.92.0.tar.gz"
|
||||
}
|
||||
},
|
||||
"lix-module": {
|
||||
|
@ -820,15 +719,15 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1729360442,
|
||||
"narHash": "sha256-6U0CyPycIBc04hbYy2hBINnVso58n/ZyywY2BD3hu+s=",
|
||||
"rev": "9098ac95768f7006d7e070b88bae76939f6034e6",
|
||||
"lastModified": 1737237494,
|
||||
"narHash": "sha256-YMLrcBpf0TR5r/eaqm8lxzFPap2TxCor0ZGcK3a7+b8=",
|
||||
"rev": "b90bf629bbd835e61f1317b99e12f8c831017006",
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/9098ac95768f7006d7e070b88bae76939f6034e6.tar.gz?rev=9098ac95768f7006d7e070b88bae76939f6034e6"
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/b90bf629bbd835e61f1317b99e12f8c831017006.tar.gz?rev=b90bf629bbd835e61f1317b99e12f8c831017006"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-1.tar.gz"
|
||||
"url": "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0.tar.gz"
|
||||
}
|
||||
},
|
||||
"mpd-mpris": {
|
||||
|
@ -862,11 +761,11 @@
|
|||
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736884105,
|
||||
"narHash": "sha256-WHxMcVuEmJvToC5DEVnSLwUrpHgJyqUqd/O8gZuaQsU=",
|
||||
"lastModified": 1741170398,
|
||||
"narHash": "sha256-l0oWdaphJuzGPePsOZG6YBwRxrGqrZPZ3Ee+QPrEEyY=",
|
||||
"owner": "sodiboo",
|
||||
"repo": "niri-flake",
|
||||
"rev": "a4e712bccfbe0526327c10b67f765b49cbbd7701",
|
||||
"rev": "7db97394c187e2a23127a45bf7ce8b969055c0db",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -878,16 +777,16 @@
|
|||
"niri-stable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1736614405,
|
||||
"narHash": "sha256-AJ1rlgNOPb3/+DbS5hkhm21t6Oz8IgqLllwmZt0lyzk=",
|
||||
"lastModified": 1740117926,
|
||||
"narHash": "sha256-mTTHA0RAaQcdYe+9A3Jx77cmmyLFHmRoZdd8RpWa+m8=",
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"rev": "e05bc269e678ecf828b96ae79c991c13b00b38a5",
|
||||
"rev": "b94a5db8790339cf9134873d8b490be69e02ac71",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "YaLTeR",
|
||||
"ref": "v25.01",
|
||||
"ref": "v25.02",
|
||||
"repo": "niri",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -895,11 +794,11 @@
|
|||
"niri-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1736879117,
|
||||
"narHash": "sha256-elG0TiWNFwgfTLrTTZVZQp3dEN6F6Qds6UF6BVxCIHs=",
|
||||
"lastModified": 1741001804,
|
||||
"narHash": "sha256-rMc6olQE1pT8M9wxapgDLLROBgUUX11SmAcPMRSivsA=",
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"rev": "a3cbe3514ba195bf74815008f75819944f888527",
|
||||
"rev": "26618f8d50dffda41791a211fd2aa02479a6d6a9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -925,16 +824,16 @@
|
|||
},
|
||||
"nix-gaming": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_5",
|
||||
"flake-parts": "flake-parts_3",
|
||||
"nixpkgs": "nixpkgs_9",
|
||||
"umu": "umu"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723945279,
|
||||
"narHash": "sha256-3W+/u3v/e0dTOxht6wW6pL+kr44e8Amb8A1Z3Bx8BUE=",
|
||||
"lastModified": 1737337163,
|
||||
"narHash": "sha256-Z9hc25iV+jhH0AlvsrG65KqLEd726/HVvalSiqNQLqA=",
|
||||
"owner": "fufexan",
|
||||
"repo": "nix-gaming",
|
||||
"rev": "bcf8116981cc332c2734d4c82a034f115780853d",
|
||||
"rev": "e5559b3a91433c21eb64792b78134582b3bd77f2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -982,11 +881,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1688322751,
|
||||
"narHash": "sha256-eW62dC5f33oKZL7VWlomttbUnOTHrAbte9yNUNW8rbk=",
|
||||
"lastModified": 1733212471,
|
||||
"narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0fbe93c5a7cac99f90b60bdf5f149383daaa615f",
|
||||
"rev": "55d15ad12a74eb7d4646254e13638ad0c4128776",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -998,32 +897,14 @@
|
|||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"dir": "lib",
|
||||
"lastModified": 1688049487,
|
||||
"narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4bc72cae107788bf3f24f30db2e2f685c9298dc9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"dir": "lib",
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib_2": {
|
||||
"locked": {
|
||||
"lastModified": 1722555339,
|
||||
"narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=",
|
||||
"lastModified": 1735774519,
|
||||
"narHash": "sha256-CewEm1o2eVAnoqb6Ml+Qi9Gg/EfNAxbRx1lANGVyoLI=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz"
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz"
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
|
@ -1060,11 +941,11 @@
|
|||
},
|
||||
"nixpkgs-stable_3": {
|
||||
"locked": {
|
||||
"lastModified": 1736754065,
|
||||
"narHash": "sha256-hcETjfECLklW1ND8svDvN0Nw6H/1qtuoz3rbFNQ1Lrk=",
|
||||
"lastModified": 1741048562,
|
||||
"narHash": "sha256-W4YZ3fvWZiFYYyd900kh8P8wU6DHSiwaH0j4+fai1Sk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "67e9c880898889470f153157a96b595e758167fc",
|
||||
"rev": "6af28b834daca767a7ef99f8a7defa957d0ade6f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1076,11 +957,11 @@
|
|||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1736755442,
|
||||
"narHash": "sha256-a3MMEY7i/wdF0gb7WFNTn6onzaiMOvwj7OerRVenA8o=",
|
||||
"lastModified": 1741708242,
|
||||
"narHash": "sha256-cNRqdQD4sZpN7JLqxVOze4+WsWTmv2DGH0wNCOVwrWc=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ef56e777fedaa4da8c66a150081523c5de1e0171",
|
||||
"rev": "b62d2a95c72fb068aecd374a7262b37ed92df82b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1092,11 +973,11 @@
|
|||
},
|
||||
"nixpkgs_10": {
|
||||
"locked": {
|
||||
"lastModified": 1736916166,
|
||||
"narHash": "sha256-puPDoVKxkuNmYIGMpMQiK8bEjaACcCksolsG36gdaNQ=",
|
||||
"lastModified": 1741048562,
|
||||
"narHash": "sha256-W4YZ3fvWZiFYYyd900kh8P8wU6DHSiwaH0j4+fai1Sk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e24b4c09e963677b1beea49d411cd315a024ad3a",
|
||||
"rev": "6af28b834daca767a7ef99f8a7defa957d0ade6f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1124,11 +1005,11 @@
|
|||
},
|
||||
"nixpkgs_12": {
|
||||
"locked": {
|
||||
"lastModified": 1734424634,
|
||||
"narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=",
|
||||
"lastModified": 1741513245,
|
||||
"narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33",
|
||||
"rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1139,22 +1020,6 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1676300157,
|
||||
"narHash": "sha256-1HjRzfp6LOLfcj/HJHdVKWAkX9QRAouoh6AjzJiIerU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "545c7a31e5dedea4a6d372712a18e00ce097d462",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1702539185,
|
||||
"narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=",
|
||||
|
@ -1170,7 +1035,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1718160348,
|
||||
"narHash": "sha256-9YrUjdztqi4Gz8n3mBuqvCkMo4ojrA6nASwyIKWMpus=",
|
||||
|
@ -1186,7 +1051,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1722640603,
|
||||
"narHash": "sha256-TcXjLVNd3VeH1qKPH335Tc4RbFDbZQX+d7rqnDUoRaY=",
|
||||
|
@ -1202,7 +1067,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_6": {
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1702272962,
|
||||
"narHash": "sha256-D+zHwkwPc6oYQ4G3A1HuadopqRwUY/JkMwHz1YF7j4Q=",
|
||||
|
@ -1218,7 +1083,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_7": {
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1728492678,
|
||||
"narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=",
|
||||
|
@ -1234,13 +1099,29 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_8": {
|
||||
"nixpkgs_7": {
|
||||
"locked": {
|
||||
"lastModified": 1736798957,
|
||||
"narHash": "sha256-qwpCtZhSsSNQtK4xYGzMiyEDhkNzOCz/Vfu4oL2ETsQ=",
|
||||
"lastModified": 1738452225,
|
||||
"narHash": "sha256-Qmwx3FXM0x0pdjibwTk/uRbayqDrs3EwmRJe7tQWu48=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9abb87b552b7f55ac8916b6fc9e5cb486656a2f3",
|
||||
"rev": "6c4e0724e0a785a20679b1bca3a46bfce60f05b6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_8": {
|
||||
"locked": {
|
||||
"lastModified": 1741010256,
|
||||
"narHash": "sha256-WZNlK/KX7Sni0RyqLSqLPbK8k08Kq7H7RijPJbq9KHM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1252,16 +1133,16 @@
|
|||
},
|
||||
"nixpkgs_9": {
|
||||
"locked": {
|
||||
"lastModified": 1736549401,
|
||||
"narHash": "sha256-ibkQrMHxF/7TqAYcQE+tOnIsSEzXmMegzyBWza6uHKM=",
|
||||
"owner": "nixos",
|
||||
"lastModified": 1737003892,
|
||||
"narHash": "sha256-RCzJE9wKByLCXmRBp+z8LK9EgdW+K+W/DXnJS4S/NVo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1dab772dd4a68a7bba5d9460685547ff8e17d899",
|
||||
"rev": "ae06b9c2d83cb5c8b12d7d0e32692e93d1379713",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-24.11",
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -1341,10 +1222,7 @@
|
|||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"lanzaboote",
|
||||
"flake-utils"
|
||||
],
|
||||
"flake-utils": "flake-utils_5",
|
||||
"nixpkgs": [
|
||||
"lanzaboote",
|
||||
"nixpkgs"
|
||||
|
@ -1591,11 +1469,11 @@
|
|||
},
|
||||
"locked": {
|
||||
"dir": "packaging/nix",
|
||||
"lastModified": 1723697867,
|
||||
"narHash": "sha256-LTfbJXR8x35oZ8Mo3R0WTVEp9toWpVfzD21xCSr64IM=",
|
||||
"lastModified": 1737484151,
|
||||
"narHash": "sha256-pONHsVIyIHbjyv51JQW3Nv9JeuqiVEuINyH+HnN4f8Q=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "c71a45ad53036f4c668bcbe1be7a49f9d3460151",
|
||||
"revCount": 699,
|
||||
"rev": "0cac244cc89ee69bf33ad60a3953cfde188ee8a6",
|
||||
"revCount": 907,
|
||||
"submodules": true,
|
||||
"type": "git",
|
||||
"url": "https://github.com/Open-Wine-Components/umu-launcher/"
|
||||
|
@ -1628,16 +1506,16 @@
|
|||
"xwayland-satellite-stable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1730166465,
|
||||
"narHash": "sha256-nq7bouXQXaaPPo/E+Jbq+wNHnatD4dY8OxSrRqzvy6s=",
|
||||
"lastModified": 1739246919,
|
||||
"narHash": "sha256-/hBM43/Gd0/tW+egrhlWgOIISeJxEs2uAOIYVpfDKeU=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "a713cf46cb7db84a0d1b57c3a397c610cad3cf98",
|
||||
"rev": "44590a416d4a3e8220e19e29e0b6efe64a80315d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Supreeeme",
|
||||
"ref": "v0.5",
|
||||
"ref": "v0.5.1",
|
||||
"repo": "xwayland-satellite",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -1645,11 +1523,11 @@
|
|||
"xwayland-satellite-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1736487362,
|
||||
"narHash": "sha256-4kGoOA7FgK9N2mzS+TFEn41kUUNY6KwdiA/0rqlr868=",
|
||||
"lastModified": 1741140299,
|
||||
"narHash": "sha256-Y2bPO92Yg5HcH5ORvrVOQb4wRGEapGEteHXGtNvboxk=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "8f55e27f63a749881c4bbfbb6b1da028342a91d1",
|
||||
"rev": "10cb041a80bb815cc1789cfa305923f1f9e3713d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1666,33 +1544,29 @@
|
|||
"rust-overlay": "rust-overlay_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737051126,
|
||||
"narHash": "sha256-RXdUcprutFE53CwSyimRsiodETsCz6nrarJlh1aMD/M=",
|
||||
"lastModified": 1741618312,
|
||||
"narHash": "sha256-xE/lt7LitX2ONR88L8bj0AlwuGK256AKWgiZdwhoPi8=",
|
||||
"owner": "natsukagami",
|
||||
"repo": "youmubot",
|
||||
"rev": "2f49f09a279f9cc20e2ea1dc312e213442cc7bf3",
|
||||
"rev": "a36fa879645469dde741cb399e202834e9b6fedd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "natsukagami",
|
||||
"ref": "osu-commands",
|
||||
"repo": "youmubot",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zen-browser": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_12",
|
||||
"zen-browser-aarch64": "zen-browser-aarch64",
|
||||
"zen-browser-generic": "zen-browser-generic",
|
||||
"zen-browser-specific": "zen-browser-specific"
|
||||
"nixpkgs": "nixpkgs_12"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734667644,
|
||||
"narHash": "sha256-vluyzRt6RikEn78Yk0t7Qd96iZZfyRBt4+ESI0mtlhk=",
|
||||
"lastModified": 1741838758,
|
||||
"narHash": "sha256-nGTC/y9e+1+QIVCzIbiSpPiXM2HfS8YwIDCp52CcOQ4=",
|
||||
"owner": "youwen5",
|
||||
"repo": "zen-browser-flake",
|
||||
"rev": "8c8af380bf45b42ae14b2f6d5252be3627332f23",
|
||||
"rev": "03a7fc89bc48344aed00e01b409c1d6ffc4c52ce",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1700,45 +1574,6 @@
|
|||
"repo": "zen-browser-flake",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zen-browser-aarch64": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1734641206,
|
||||
"narHash": "sha256-F5FwGqAgL4kfEy5rNWvofRQl8SH0udQvEIMhysRMDgs=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/zen-browser/desktop/releases/download/1.0.2-b.3/zen.linux-aarch64.tar.bz2"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/zen-browser/desktop/releases/download/1.0.2-b.3/zen.linux-aarch64.tar.bz2"
|
||||
}
|
||||
},
|
||||
"zen-browser-generic": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1734646830,
|
||||
"narHash": "sha256-slIWuEWSV9PK1JTr6UKKC+VP4oLNaczwkxkYiqcjZM8=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/zen-browser/desktop/releases/download/1.0.2-b.3/zen.linux-generic.tar.bz2"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/zen-browser/desktop/releases/download/1.0.2-b.3/zen.linux-generic.tar.bz2"
|
||||
}
|
||||
},
|
||||
"zen-browser-specific": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1734645803,
|
||||
"narHash": "sha256-zAo93sHeB8cTW2JBAqxx0wo3CANcxCgjEcTQgbDeWT4=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/zen-browser/desktop/releases/download/1.0.2-b.3/zen.linux-specific.tar.bz2"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/zen-browser/desktop/releases/download/1.0.2-b.3/zen.linux-specific.tar.bz2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
27
flake.nix
27
flake.nix
|
@ -18,46 +18,42 @@
|
|||
|
||||
# --- Secure boot
|
||||
lanzaboote = {
|
||||
url = github:nix-community/lanzaboote/v0.4.1;
|
||||
url = "github:nix-community/lanzaboote/v0.4.2";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# --- Build tools
|
||||
flake-utils.url = github:numtide/flake-utils;
|
||||
crane.url = github:ipetkov/crane;
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
crane.url = "github:ipetkov/crane";
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
arion.url = github:hercules-ci/arion;
|
||||
arion.url = "github:hercules-ci/arion/v0.2.2.0";
|
||||
lix-module = {
|
||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-1.tar.gz";
|
||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0.tar.gz";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# ---
|
||||
# Imported apps
|
||||
youmubot.url = "github:natsukagami/youmubot/osu-commands";
|
||||
# swayfx = {
|
||||
# url = github:WillPower3309/swayfx;
|
||||
# inputs.nixpkgs.follows = "nixpkgs";
|
||||
# };
|
||||
youmubot.url = "github:natsukagami/youmubot";
|
||||
mpd-mpris = {
|
||||
url = github:natsukagami/mpd-mpris;
|
||||
url = "github:natsukagami/mpd-mpris";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
dtth-phanpy.url = "git+ssh://gitea@git.dtth.ch/nki-dtth/phanpy?ref=dtth-fork";
|
||||
conduit.url = "gitlab:famedly/conduit/v0.9.0";
|
||||
nix-gaming.url = github:fufexan/nix-gaming;
|
||||
nix-gaming.url = "github:fufexan/nix-gaming";
|
||||
zen-browser.url = "github:youwen5/zen-browser-flake";
|
||||
niri.url = "github:sodiboo/niri-flake";
|
||||
|
||||
# --- Sources
|
||||
kakoune.url = github:mawww/kakoune;
|
||||
kakoune.url = "github:mawww/kakoune";
|
||||
kakoune.flake = false;
|
||||
kak-lsp.url = github:kakoune-lsp/kakoune-lsp;
|
||||
kak-lsp.url = "github:kakoune-lsp/kakoune-lsp/v18.1.3";
|
||||
kak-lsp.flake = false;
|
||||
nixos-m1.url = github:tpwrules/nixos-apple-silicon;
|
||||
nixos-m1.url = "github:tpwrules/nixos-apple-silicon";
|
||||
nixos-m1.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# ---
|
||||
|
@ -114,6 +110,7 @@
|
|||
sops-nix.nixosModules.sops
|
||||
inputs.lix-module.nixosModules.default
|
||||
];
|
||||
config.nix.settings.extra-deprecated-features = [ "url-literals" ]; # So lix won't complain
|
||||
};
|
||||
common-nixos = stable: { ... }: {
|
||||
imports = [
|
||||
|
|
|
@ -25,7 +25,6 @@ in
|
|||
./modules/monitors.nix
|
||||
./modules/linux/graphical
|
||||
./modules/X11/xfce4-notifyd.nix
|
||||
./modules/programs/discord.nix
|
||||
kwallet
|
||||
];
|
||||
config = (mkIf pkgs.stdenv.isLinux {
|
||||
|
@ -49,6 +48,7 @@ in
|
|||
services.owncloud-client.package = pkgs.owncloud-client.overrideAttrs (attrs: {
|
||||
buildInputs = attrs.buildInputs ++ [ pkgs.qt6.qtwayland ];
|
||||
});
|
||||
systemd.user.services.owncloud-client.Unit.After = [ "graphical-session.target" ];
|
||||
|
||||
# UDisks automounter
|
||||
services.udiskie.enable = true;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
./kakoune/kak.nix
|
||||
./kakoune.nix
|
||||
./fish/fish.nix
|
||||
./modules/programs/my-broot.nix
|
||||
./modules/programs/my-waybar.nix
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# Common configuration
|
||||
./common.nix
|
||||
# osu!
|
||||
./osu.nix
|
||||
./osu
|
||||
];
|
||||
|
||||
# Home Manager needs a bit of information about you and the
|
||||
|
@ -40,9 +40,11 @@
|
|||
linux.graphical.defaults.webBrowser.package = pkgs.zen-browser-bin;
|
||||
linux.graphical.defaults.webBrowser.desktopFile = "zen.desktop";
|
||||
programs.my-niri.enable = true;
|
||||
programs.my-niri.enableLaptop = false;
|
||||
programs.my-sway.enable = true;
|
||||
programs.my-sway.fontSize = 15.0;
|
||||
programs.my-sway.enableLaptop = true;
|
||||
programs.my-sway.enableLaptop = false;
|
||||
programs.my-waybar.fontSize = 15.0;
|
||||
programs.my-waybar.enableMpd = true;
|
||||
# Keyboard options
|
||||
wayland.windowManager.sway.config.input."type:keyboard".xkb_layout = "jp";
|
||||
|
|
142
home/kakoune.nix
Normal file
142
home/kakoune.nix
Normal file
|
@ -0,0 +1,142 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
|
||||
in
|
||||
{
|
||||
imports = [ ./modules/programs/my-kakoune ];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# ctags for peneira
|
||||
universal-ctags
|
||||
# tree-sitter for kak
|
||||
kak-tree-sitter
|
||||
];
|
||||
|
||||
# xdg.configFile."kak-tree-sitter/config.toml".source = ./kak-tree-sitter.toml;
|
||||
|
||||
# Enable the kakoune package.
|
||||
programs.my-kakoune.enable = true;
|
||||
programs.my-kakoune.enable-fish-session = true;
|
||||
programs.my-kakoune.tree-sitter.extraAliases = {
|
||||
# Scala stuff
|
||||
method = "function";
|
||||
module = "namespace";
|
||||
function_call = "function";
|
||||
method_call = "method";
|
||||
|
||||
boolean = "constant_builtin_boolean";
|
||||
number = "constant_numeric";
|
||||
float = "constant_numeric_float";
|
||||
|
||||
type_qualifier = "keyword_special";
|
||||
storageclass = "keyword_storage_modifier";
|
||||
conditional = "keyword_conditional";
|
||||
include = "keyword_control_import";
|
||||
};
|
||||
programs.my-kakoune.tree-sitter.languages =
|
||||
let
|
||||
tree-sitter-go = pkgs.fetchFromGitHub {
|
||||
owner = "tree-sitter";
|
||||
repo = "tree-sitter-go";
|
||||
rev = "v0.20.0";
|
||||
hash = "sha256-G7d8CHCyKDAb9j6ijRfHk/HlgPqSI+uvkuRIRRvjkHI=";
|
||||
};
|
||||
in
|
||||
{
|
||||
scala =
|
||||
let
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "tree-sitter";
|
||||
repo = "tree-sitter-scala";
|
||||
rev = "70afdd5632d57dd63a960972ab25945e353a52f6";
|
||||
hash = "sha256-bi0Lqo/Zs2Uaz1efuKAARpEDg5Hm59oUe7eSXgL1Wow=";
|
||||
};
|
||||
in
|
||||
{
|
||||
grammar.src = src;
|
||||
queries.src = src;
|
||||
queries.path = "queries/scala";
|
||||
};
|
||||
haskell =
|
||||
let
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "tree-sitter";
|
||||
repo = "tree-sitter-haskell";
|
||||
rev = "ba0bfb0e5d8e9e31c160d287878c6f26add3ec08";
|
||||
hash = "sha256-ZSOF0CLOn82GwU3xgvFefmh/AD2j5zz8I0t5YPwfan0=";
|
||||
};
|
||||
in
|
||||
{
|
||||
grammar.src = src;
|
||||
grammar.compile.args = [ "-c" "-fpic" "../parser.c" "../scanner.c" "../unicode.h" "-I" ".." ];
|
||||
queries.src = src;
|
||||
queries.path = "queries";
|
||||
};
|
||||
yaml = {
|
||||
grammar.src = pkgs.fetchFromGitHub {
|
||||
owner = "ikatyang";
|
||||
repo = "tree-sitter-yaml";
|
||||
rev = "0e36bed171768908f331ff7dff9d956bae016efb";
|
||||
hash = "sha256-bpiT3FraOZhJaoiFWAoVJX1O+plnIi8aXOW2LwyU23M=";
|
||||
};
|
||||
grammar.compile.args = [ "-c" "-fpic" "../scanner.cc" "../parser.c" "-I" ".." ];
|
||||
grammar.link.args = [ "-shared" "-fpic" "scanner.o" "parser.o" ];
|
||||
grammar.link.flags = [ "-O3" "-lstdc++" ];
|
||||
|
||||
queries.src = pkgs.fetchFromGitHub {
|
||||
owner = "helix-editor";
|
||||
repo = "helix";
|
||||
rev = "dbd248fdfa680373d94fbc10094a160aafa0f7a7";
|
||||
hash = "sha256-wk8qVUDFXhAOi1Ibc6iBMzDCXb6t+YiWZcTd0IJybqc=";
|
||||
};
|
||||
queries.path = "runtime/queries/yaml";
|
||||
};
|
||||
|
||||
templ =
|
||||
let
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "vrischmann";
|
||||
repo = "tree-sitter-templ";
|
||||
rev = "4519e3ec9ca92754ca25659bb1fd410d5e0f8d88";
|
||||
hash = "sha256-ic5SlqDEZoYakrJFe0H9GdzravqovlL5sTaHjyhe74M=";
|
||||
};
|
||||
in
|
||||
{
|
||||
grammar.src = src;
|
||||
queries.src = pkgs.runCommandLocal "templ-tree-sitter-queries" { } ''
|
||||
mkdir -p $out/queries
|
||||
# copy most stuff from tree-sitter-templ
|
||||
install -m644 ${src}/queries/templ/* $out/queries
|
||||
# override inherited files
|
||||
cat ${tree-sitter-go}/queries/highlights.scm ${src}/queries/templ/highlights.scm > $out/queries/highlights.scm
|
||||
'';
|
||||
queries.path = "queries";
|
||||
};
|
||||
|
||||
go = {
|
||||
grammar.src = tree-sitter-go;
|
||||
grammar.compile.args = [ "-c" "-fpic" "../parser.c" "-I" ".." ];
|
||||
grammar.link.args = [ "-shared" "-fpic" "parser.o" ];
|
||||
queries.src = tree-sitter-go;
|
||||
queries.path = "queries";
|
||||
};
|
||||
|
||||
hylo =
|
||||
let
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "natsukagami";
|
||||
repo = "tree-sitter-hylo";
|
||||
rev = "494cbdff0d13cbc67348316af2efa0286dbddf6f";
|
||||
hash = "sha256-R5UeoglCTl0do3VDJ/liCTeqbxU9slvmVKNRA/el2VY=";
|
||||
};
|
||||
in
|
||||
{
|
||||
grammar.src = src;
|
||||
grammar.compile.args = [ "-c" "-fpic" "../parser.c" "-I" ".." ];
|
||||
grammar.link.args = [ "-shared" "-fpic" "parser.o" ];
|
||||
queries.src = src;
|
||||
queries.path = "queries";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,516 +0,0 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
kak-lsp-frontend = { pkgs, lib, ... }:
|
||||
let
|
||||
langserver = name: {
|
||||
name = "vscode-${name}-language-server";
|
||||
value = {
|
||||
args = [ "--stdio" ];
|
||||
command = "vscode-${name}-language-server";
|
||||
filetypes = [ name ];
|
||||
roots = [ "package.json" ".git" ];
|
||||
};
|
||||
package = pkgs.nodePackages.vscode-langservers-extracted;
|
||||
};
|
||||
|
||||
tailwind = {
|
||||
command = "tailwindcss-language-server";
|
||||
args = [ "--stdio" ];
|
||||
filetypes = [ "html" "css" "javascript" "typescript" "templ" ];
|
||||
roots = [ "tailwind.config.{js,cjs,mjs,ts}" "package.json" ".git" ];
|
||||
settings_section = "tailwindCSS";
|
||||
settings.tailwindCSS = {
|
||||
validate = "warning";
|
||||
userLanguages.templ = "html";
|
||||
};
|
||||
package = pkgs.tailwindcss-language-server;
|
||||
};
|
||||
|
||||
templModule = { pkgs, lib, ... }: {
|
||||
programs.kak-lsp.languageServers."vscode-html-language-server".filetypes = [ "templ" ];
|
||||
programs.kak-lsp.languageServers."tailwindcss-language-server".filetypes = [ "templ" ];
|
||||
programs.kak-lsp.languageServers.templ = {
|
||||
command = "templ";
|
||||
args = [ "lsp" ];
|
||||
filetypes = [ "templ" ];
|
||||
roots = [ "go.mod" ".git" ];
|
||||
package = pkgs.unstable.templ;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
imports = [ templModule ];
|
||||
|
||||
programs.kak-lsp.languageServers = (builtins.listToAttrs (map langserver [ "html" "css" "json" ])) // {
|
||||
tailwindcss-language-server = tailwind;
|
||||
};
|
||||
};
|
||||
|
||||
ltexLsp = { pkgs, lib, ... }: {
|
||||
programs.kak-lsp.languageServers.ltex-ls = {
|
||||
command = "ltex-ls";
|
||||
args = [ "--log-file=/tmp" ];
|
||||
filetypes = [ "latex" "typst" ];
|
||||
roots = [ "main.tex" "main.typ" ".git" ];
|
||||
package = pkgs.ltex-ls;
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
imports = [ ../modules/programs/my-kakoune ./kaktex.nix kak-lsp-frontend ltexLsp ];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# ctags for peneira
|
||||
universal-ctags
|
||||
# tree-sitter for kak
|
||||
kak-tree-sitter
|
||||
];
|
||||
|
||||
# xdg.configFile."kak-tree-sitter/config.toml".source = ./kak-tree-sitter.toml;
|
||||
|
||||
# Enable the kakoune package.
|
||||
programs.my-kakoune.enable = true;
|
||||
programs.my-kakoune.enable-fish-session = true;
|
||||
programs.kak-lsp.enable = true;
|
||||
programs.kak-lsp.semanticTokens.additionalFaces = [
|
||||
# Typst
|
||||
{ face = "header"; token = "heading"; }
|
||||
{ face = "ts_markup_link_url"; token = "link"; }
|
||||
{ face = "ts_markup_link_uri"; token = "ref"; }
|
||||
{ face = "ts_markup_link_label"; token = "label"; }
|
||||
{ face = "ts_property"; token = "pol"; }
|
||||
{ face = "ts_markup_list_checked"; token = "marker"; }
|
||||
{ face = "ts_constant_builtin_boolean"; token = "bool"; }
|
||||
{ face = "ts_keyword_control"; token = "delim"; }
|
||||
{ face = "ts_number"; token = "text"; modifiers = [ "math" ]; }
|
||||
{ face = "ts_markup_bold"; token = "text"; modifiers = [ "strong" ]; }
|
||||
{ face = "ts_markup_italic"; token = "text"; modifiers = [ "emph" ]; }
|
||||
];
|
||||
|
||||
programs.kak-lsp.languageServers.elixir-ls = {
|
||||
args = [ ];
|
||||
command = "elixir-ls";
|
||||
filetypes = [ "elixir" ];
|
||||
roots = [ "mix.exs" ];
|
||||
};
|
||||
programs.kak-lsp.languageServers.typescript-language-server = {
|
||||
args = [ "--stdio" ];
|
||||
command = "typescript-language-server";
|
||||
filetypes = [ "typescript" "javascript" ];
|
||||
roots = [ "package.json" ];
|
||||
package = pkgs.nodePackages.typescript-language-server;
|
||||
};
|
||||
programs.kak-lsp.languageServers.fsautocomplete = {
|
||||
args = [ "--adaptive-lsp-server-enabled" "--project-graph-enabled" "--source-text-factory" "RoslynSourceText" ];
|
||||
command = "fsautocomplete";
|
||||
filetypes = [ "fsharp" ];
|
||||
roots = [ "*.fsproj" ];
|
||||
settings_section = "FSharp";
|
||||
settings.FSharp = {
|
||||
AutomaticWorkspaceInit = true;
|
||||
};
|
||||
};
|
||||
programs.kak-lsp.languageServers.metals = {
|
||||
command = "metals";
|
||||
filetypes = [ "scala" ];
|
||||
roots = [ "build.sbt" "build.sc" "build.mill" ];
|
||||
settings_section = "metals";
|
||||
settings.metals = {
|
||||
enableSemanticHighlighting = true;
|
||||
showInferredType = true;
|
||||
decorationProvider = true;
|
||||
inlineDecorationProvider = true;
|
||||
# From kakoune-lsp's own options
|
||||
icons = "unicode";
|
||||
isHttpEnabled = true;
|
||||
statusBarProvider = "log-message";
|
||||
compilerOptions = { overrideDefFormat = "unicode"; };
|
||||
};
|
||||
package = pkgs.metals;
|
||||
};
|
||||
programs.kak-lsp.languageServers.texlab = {
|
||||
command = "texlab";
|
||||
filetypes = [ "latex" ];
|
||||
roots = [ "main.tex" "all.tex" ".git" ];
|
||||
settings_section = "texlab";
|
||||
settings.texlab = {
|
||||
build.executable = "latexmk";
|
||||
build.args = [ "-pdf" "-shell-escape" "-interaction=nonstopmode" "-synctex=1" "%f" ];
|
||||
|
||||
build.forwardSearchAfter = true;
|
||||
build.onSave = true;
|
||||
|
||||
forwardSearch =
|
||||
(if pkgs.stdenv.isDarwin then {
|
||||
executable = "/Applications/Skim.app/Contents/SharedSupport/displayline";
|
||||
args = [ "-r" "-g" "%l" "%p" "%f" ];
|
||||
} else
|
||||
{
|
||||
executable = "${pkgs.zathura}/bin/zathura";
|
||||
args = [ "--synctex-forward" "%l:1:%f" "%p" "-x" "${./kaktex} jump %%{input} %%{line} %%{column}" ];
|
||||
});
|
||||
};
|
||||
package = pkgs.texlab;
|
||||
};
|
||||
programs.kak-lsp.languageServers.tinymist = {
|
||||
command = "tinymist";
|
||||
filetypes = [ "typst" ];
|
||||
roots = [ "main.typ" ".git" ];
|
||||
settings_section = "tinymist";
|
||||
settings.tinymist = {
|
||||
exportPdf = "onSave";
|
||||
formatterMode = "typstfmt";
|
||||
};
|
||||
};
|
||||
programs.kak-lsp.languageServers.marksman = {
|
||||
command = "marksman";
|
||||
filetypes = [ "markdown" ];
|
||||
roots = [ ".marksman.toml" ".git" ];
|
||||
package = pkgs.marksman;
|
||||
};
|
||||
programs.kak-lsp.languageServers.rust-analyzer = {
|
||||
args = [ ];
|
||||
command = "rust-analyzer";
|
||||
filetypes = [ "rust" ];
|
||||
roots = [ "Cargo.toml" ];
|
||||
package = pkgs.rust-analyzer;
|
||||
};
|
||||
|
||||
programs.my-kakoune.tree-sitter.extraAliases = {
|
||||
# Scala stuff
|
||||
method = "function";
|
||||
module = "namespace";
|
||||
function_call = "function";
|
||||
method_call = "method";
|
||||
|
||||
boolean = "constant_builtin_boolean";
|
||||
number = "constant_numeric";
|
||||
float = "constant_numeric_float";
|
||||
|
||||
type_qualifier = "keyword_special";
|
||||
storageclass = "keyword_storage_modifier";
|
||||
conditional = "keyword_conditional";
|
||||
include = "keyword_control_import";
|
||||
};
|
||||
programs.my-kakoune.tree-sitter.languages =
|
||||
let
|
||||
tree-sitter-go = pkgs.fetchFromGitHub {
|
||||
owner = "tree-sitter";
|
||||
repo = "tree-sitter-go";
|
||||
rev = "v0.20.0";
|
||||
hash = "sha256-G7d8CHCyKDAb9j6ijRfHk/HlgPqSI+uvkuRIRRvjkHI=";
|
||||
};
|
||||
in
|
||||
{
|
||||
scala =
|
||||
let
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "tree-sitter";
|
||||
repo = "tree-sitter-scala";
|
||||
rev = "70afdd5632d57dd63a960972ab25945e353a52f6";
|
||||
hash = "sha256-bi0Lqo/Zs2Uaz1efuKAARpEDg5Hm59oUe7eSXgL1Wow=";
|
||||
};
|
||||
in
|
||||
{
|
||||
grammar.src = src;
|
||||
queries.src = src;
|
||||
queries.path = "queries/scala";
|
||||
};
|
||||
haskell =
|
||||
let
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "tree-sitter";
|
||||
repo = "tree-sitter-haskell";
|
||||
rev = "ba0bfb0e5d8e9e31c160d287878c6f26add3ec08";
|
||||
hash = "sha256-ZSOF0CLOn82GwU3xgvFefmh/AD2j5zz8I0t5YPwfan0=";
|
||||
};
|
||||
in
|
||||
{
|
||||
grammar.src = src;
|
||||
grammar.compile.args = [ "-c" "-fpic" "../parser.c" "../scanner.c" "../unicode.h" "-I" ".." ];
|
||||
queries.src = src;
|
||||
queries.path = "queries";
|
||||
};
|
||||
yaml = {
|
||||
grammar.src = pkgs.fetchFromGitHub {
|
||||
owner = "ikatyang";
|
||||
repo = "tree-sitter-yaml";
|
||||
rev = "0e36bed171768908f331ff7dff9d956bae016efb";
|
||||
hash = "sha256-bpiT3FraOZhJaoiFWAoVJX1O+plnIi8aXOW2LwyU23M=";
|
||||
};
|
||||
grammar.compile.args = [ "-c" "-fpic" "../scanner.cc" "../parser.c" "-I" ".." ];
|
||||
grammar.link.args = [ "-shared" "-fpic" "scanner.o" "parser.o" ];
|
||||
grammar.link.flags = [ "-O3" "-lstdc++" ];
|
||||
|
||||
queries.src = pkgs.fetchFromGitHub {
|
||||
owner = "helix-editor";
|
||||
repo = "helix";
|
||||
rev = "dbd248fdfa680373d94fbc10094a160aafa0f7a7";
|
||||
hash = "sha256-wk8qVUDFXhAOi1Ibc6iBMzDCXb6t+YiWZcTd0IJybqc=";
|
||||
};
|
||||
queries.path = "runtime/queries/yaml";
|
||||
};
|
||||
|
||||
templ =
|
||||
let
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "vrischmann";
|
||||
repo = "tree-sitter-templ";
|
||||
rev = "044ad200092170727650fa6d368df66a8da98f9d";
|
||||
hash = "sha256-hJuB3h5pp+LLfP0/7bAYH0uLVo+OQk5jpzJb3J9BNkY=";
|
||||
};
|
||||
in
|
||||
{
|
||||
grammar.src = src;
|
||||
queries.src = pkgs.runCommandLocal "templ-tree-sitter-queries" { } ''
|
||||
mkdir -p $out/queries
|
||||
# copy most stuff from tree-sitter-templ
|
||||
install -m644 ${src}/queries/templ/* $out/queries
|
||||
# override inherited files
|
||||
cat ${tree-sitter-go}/queries/highlights.scm ${src}/queries/templ/highlights.scm > $out/queries/highlights.scm
|
||||
'';
|
||||
queries.path = "queries";
|
||||
};
|
||||
|
||||
go = {
|
||||
grammar.src = tree-sitter-go;
|
||||
grammar.compile.args = [ "-c" "-fpic" "../parser.c" "-I" ".." ];
|
||||
grammar.link.args = [ "-shared" "-fpic" "parser.o" ];
|
||||
queries.src = tree-sitter-go;
|
||||
queries.path = "queries";
|
||||
};
|
||||
|
||||
hylo =
|
||||
let
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "natsukagami";
|
||||
repo = "tree-sitter-hylo";
|
||||
rev = "494cbdff0d13cbc67348316af2efa0286dbddf6f";
|
||||
hash = "sha256-R5UeoglCTl0do3VDJ/liCTeqbxU9slvmVKNRA/el2VY=";
|
||||
};
|
||||
in
|
||||
{
|
||||
grammar.src = src;
|
||||
grammar.compile.args = [ "-c" "-fpic" "../parser.c" "-I" ".." ];
|
||||
grammar.link.args = [ "-shared" "-fpic" "parser.o" ];
|
||||
queries.src = src;
|
||||
queries.path = "queries";
|
||||
};
|
||||
};
|
||||
|
||||
programs.my-kakoune.package = pkgs.kakoune;
|
||||
programs.my-kakoune.rc =
|
||||
builtins.readFile ./kakrc + ''
|
||||
|
||||
# Source any settings in the current working directory,
|
||||
# recursive upwards
|
||||
evaluate-commands %sh{
|
||||
${pkgs.writeScript "source-pwd" (builtins.readFile ./source-pwd)}
|
||||
}
|
||||
'';
|
||||
|
||||
programs.my-kakoune.extraFaces = {
|
||||
Default = "%opt{text},%opt{base}";
|
||||
BufferPadding = "%opt{base},%opt{base}";
|
||||
MenuForeground = "%opt{blue},white+bF";
|
||||
MenuBackground = "%opt{sky},white+F";
|
||||
Information = "%opt{sky},white";
|
||||
# Markdown help color scheme
|
||||
InfoDefault = "Information";
|
||||
InfoBlock = "@block";
|
||||
InfoBlockQuote = "+i@block";
|
||||
InfoBullet = "@bullet";
|
||||
InfoHeader = "@header";
|
||||
InfoLink = "@link";
|
||||
InfoLinkMono = "+b@mono";
|
||||
InfoMono = "@mono";
|
||||
InfoRule = "+b@Information";
|
||||
InfoDiagnosticError = "@DiagnosticError";
|
||||
InfoDiagnosticHint = "@DiagnosticHint";
|
||||
InfoDiagnosticInformation = "@Information";
|
||||
InfoDiagnosticWarning = "@DiagnosticWarning";
|
||||
# Extra faces
|
||||
macro = "+u@function";
|
||||
method = "@function";
|
||||
format_specifier = "+i@string";
|
||||
mutable_variable = "+i@variable";
|
||||
class = "+b@variable";
|
||||
};
|
||||
programs.my-kakoune.autoload = [
|
||||
# My own scripts
|
||||
{
|
||||
name = "latex.kak";
|
||||
src = ./autoload/latex.kak;
|
||||
}
|
||||
{
|
||||
name = "markdown.kak";
|
||||
src = ./autoload/markdown.kak;
|
||||
}
|
||||
|
||||
# Plugins
|
||||
{
|
||||
name = "luar";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "gustavo-hms";
|
||||
repo = "luar";
|
||||
rev = "2f430316f8fc4d35db6c93165e2e77dc9f3d0450";
|
||||
sha256 = "sha256-vHn/V3sfzaxaxF8OpA5jPEuPstOVwOiQrogdSGtT6X4=";
|
||||
};
|
||||
activationScript = ''
|
||||
# Enable luar
|
||||
require-module luar
|
||||
# Use luajit
|
||||
set-option global luar_interpreter ${pkgs.luajit}/bin/luajit
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "peneira";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "natsukagami";
|
||||
repo = "peneira";
|
||||
rev = "743b9971472853a752475e7c070ce99089c6840c";
|
||||
sha256 = "sha256-E4ndbF9YC1p0KrvSuGgwmG1Y2IGTuGKJo/AuMixhzlM=";
|
||||
};
|
||||
activationScript = ''
|
||||
require-module peneira
|
||||
|
||||
# Change selection color
|
||||
set-face global PeneiraSelected @PrimarySelection
|
||||
|
||||
# Buffers list
|
||||
define-command -hidden peneira-buffers %{
|
||||
peneira 'buffers: ' %{ printf '%s\n' $kak_quoted_buflist } %{
|
||||
buffer %arg{1}
|
||||
}
|
||||
}
|
||||
|
||||
# Grep in the current location
|
||||
define-command peneira-grep %{
|
||||
peneira 'line: ' "rg -n ." %{
|
||||
lua %arg{1} %{
|
||||
local file, line = arg[1]:match("([^:]+):(%d+):")
|
||||
kak.edit(file, line)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# A peneira menu
|
||||
declare-user-mode fuzzy-match-menu
|
||||
|
||||
map -docstring "Switch to buffer" global fuzzy-match-menu b ": peneira-buffers<ret>"
|
||||
map -docstring "Symbols" global fuzzy-match-menu s ": peneira-symbols<ret>"
|
||||
map -docstring "Lines" global fuzzy-match-menu l ": peneira-lines<ret>"
|
||||
map -docstring "Lines in the current directory" global fuzzy-match-menu g ": peneira-grep<ret>"
|
||||
map -docstring "Files in project" global fuzzy-match-menu f ": peneira-files<ret>"
|
||||
map -docstring "Files in currently opening file's directory" global fuzzy-match-menu F ": peneira-local-files<ret>"
|
||||
|
||||
# Bind menu to user mode
|
||||
map -docstring "Fuzzy matching" global user f ": enter-user-mode fuzzy-match-menu<ret>"
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "kakoune-focus";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "caksoylar";
|
||||
repo = "kakoune-focus";
|
||||
rev = "949c0557cd4c476822acfa026ca3c50f3d38a3c0";
|
||||
sha256 = "sha256-ZV7jlLJQyL420YG++iC9rq1SMjo3WO5hR9KVvJNUiCs=";
|
||||
};
|
||||
activationScript = ''
|
||||
map global user <space> ': focus-toggle<ret>' -docstring "toggle selections focus"
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "kakoune-inc-dec";
|
||||
src = pkgs.fetchFromGitLab {
|
||||
owner = "Screwtapello";
|
||||
repo = "kakoune-inc-dec";
|
||||
rev = "7bfe9c51";
|
||||
sha256 = "0f33wqxqbfygxypf348jf1fiscac161wf2xvnh8zwdd3rq5yybl0";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "racket.kak";
|
||||
src = (builtins.fetchTree {
|
||||
type = "git";
|
||||
url = "https://bitbucket.org/KJ_Duncan/kakoune-racket.kak.git";
|
||||
rev = "e397042009b46916ff089d79166ec0e8ca813a18";
|
||||
narHash = "sha256-IcxFmvG0jqpMCG/dT9crVRgPgMGKkic6xwrnW5z4+bc=";
|
||||
}) + "/rc";
|
||||
}
|
||||
# {
|
||||
# name = "kakoune-discord";
|
||||
# src = (builtins.getFlake "github:natsukagami/kakoune-discord/03f95e40d6efd8fd3de7bca31653d43de2dcfc5f").packages.${pkgs.system}.kakoune-discord-rc + "/rc";
|
||||
# }
|
||||
rec {
|
||||
name = "kakoune-mirror";
|
||||
src = pkgs.fetchFromGitHub
|
||||
{
|
||||
owner = "Delapouite";
|
||||
repo = "kakoune-mirror";
|
||||
rev = "5710635f440bcca914d55ff2ec1bfcba9efe0f15";
|
||||
sha256 = "sha256-uslx4zZhvjUylrPWvTOugsKYKKpF0EEz1drc1Ckrpjk=";
|
||||
} + "/mirror.kak";
|
||||
wrapAsModule = true;
|
||||
activationScript = ''
|
||||
require-module ${name}
|
||||
|
||||
# Bind <a-w> to ${name}
|
||||
map global normal <a-w> ': enter-user-mode -lock mirror<ret>'
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "unicode-math";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "natsukagami";
|
||||
repo = "kakoune-unicode-math";
|
||||
rev = "08dff25da2b86ee0b0777091992bc7fb28c3cb1d";
|
||||
# sha256 = lib.fakeSha256;
|
||||
sha256 = "sha256-j0L1ARex1i2ma8sGLYwgkfAbh0jWKh/6QGHFaxPXIKc=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
activationScript = ''
|
||||
require-module unicode-math
|
||||
|
||||
# Bind <c-s> to the menu
|
||||
map global insert <c-s> '<a-;>: insert-unicode '
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "kakoune-buffers";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "Delapouite";
|
||||
repo = "kakoune-buffers";
|
||||
rev = "6b2081f5b7d58c72de319a5cba7bf628b6802881";
|
||||
sha256 = "sha256-jOSrzGcLJjLK1GiTSsl2jLmQMPbPxjycR0pwF5t/eV0=";
|
||||
};
|
||||
activationScript = ''
|
||||
# Suggested hook
|
||||
|
||||
hook global WinDisplay .* info-buffers
|
||||
|
||||
# Suggested mappings
|
||||
|
||||
map global user b ':enter-buffers-mode<ret>' -docstring 'buffers…'
|
||||
map global normal ^ ':enter-buffers-mode<ret>' -docstring 'buffers…'
|
||||
map global user B ':enter-user-mode -lock buffers<ret>' -docstring 'buffers (lock)…'
|
||||
|
||||
# Suggested aliases
|
||||
|
||||
alias global bd delete-buffer
|
||||
alias global bf buffer-first
|
||||
alias global bl buffer-last
|
||||
alias global bo buffer-only
|
||||
alias global bo! buffer-only-force
|
||||
'';
|
||||
}
|
||||
];
|
||||
programs.my-kakoune.themes = {
|
||||
catppuccin-latte = ./catppuccin-latte.kak;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# Source kaktex whenever we have a tex file
|
||||
programs.my-kakoune.rc = ''
|
||||
hook global WinSetOption filetype=(tex|latex) %{
|
||||
hook window WinDisplay '.*' %{
|
||||
eval %sh{
|
||||
${./kaktex} set $kak_client $kak_session
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
}
|
|
@ -10,7 +10,8 @@ in
|
|||
# We use our own firefox
|
||||
# ./firefox.nix
|
||||
# osu!
|
||||
# ./osu.nix
|
||||
# ./osu
|
||||
|
||||
];
|
||||
|
||||
# Home Manager needs a bit of information about you and the
|
||||
|
|
|
@ -3,7 +3,6 @@ with lib;
|
|||
let
|
||||
cfg = config.linux.graphical;
|
||||
|
||||
thunderbird = pkgs.thunderbird-128;
|
||||
vscode = with pkgs; if stdenv.isAarch64 then unstable.vscode else unstable.vscode-fhs;
|
||||
|
||||
wifi-indicator = pkgs.writeScriptBin "wifi-indicator" ''
|
||||
|
@ -52,15 +51,16 @@ in
|
|||
startup = mkOption {
|
||||
type = types.listOf types.package;
|
||||
description = "List of packages to include in ~/.config/autostart";
|
||||
default = with pkgs; [
|
||||
default = [
|
||||
cfg.defaults.webBrowser.package
|
||||
thunderbird
|
||||
vesktop
|
||||
pkgs.thunderbird
|
||||
cfg.defaults.discord.package
|
||||
];
|
||||
};
|
||||
defaults = {
|
||||
webBrowser = mkPackageWithDesktopOption { description = "default web browser"; };
|
||||
terminal = mkPackageWithDesktopOption { description = "default terminal"; default.package = pkgs.kitty; };
|
||||
discord = mkPackageWithDesktopOption { description = "Discord client"; default.package = pkgs.vesktop; };
|
||||
};
|
||||
};
|
||||
config = mkIf (cfg.type != null) {
|
||||
|
@ -83,6 +83,8 @@ in
|
|||
vivaldi
|
||||
# Audio
|
||||
qpwgraph # Pipewire graph
|
||||
audacity
|
||||
vlc
|
||||
|
||||
unstable.zotero
|
||||
libreoffice
|
||||
|
@ -104,9 +106,6 @@ in
|
|||
wifi-indicator
|
||||
] ++ cfg.startup);
|
||||
|
||||
nki.programs.discord.enable = pkgs.stdenv.isx86_64;
|
||||
nki.programs.discord.package = pkgs.vesktop;
|
||||
|
||||
# OBS
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
|
@ -144,6 +143,14 @@ in
|
|||
"application/x-extension-rss" = [ "thunderbird.desktop" ];
|
||||
"x-scheme-handler/tg2" = [ "org.telegram.desktop.desktop" ];
|
||||
"x-scheme-handler/tonsite2" = [ "org.telegram.desktop.desktop" ];
|
||||
|
||||
# Other browser stuff
|
||||
"application/x-extension-htm" = [ (desktopFileOf cfg.defaults.webBrowser) ];
|
||||
"application/x-extension-html" = [ (desktopFileOf cfg.defaults.webBrowser) ];
|
||||
"application/x-extension-shtml" = [ (desktopFileOf cfg.defaults.webBrowser) ];
|
||||
"application/xhtml+xml" = [ (desktopFileOf cfg.defaults.webBrowser) ];
|
||||
"application/x-extension-xhtml" = [ (desktopFileOf cfg.defaults.webBrowser) ];
|
||||
"application/x-extension-xht" = [ (desktopFileOf cfg.defaults.webBrowser) ];
|
||||
};
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
# Email
|
||||
|
@ -162,6 +169,7 @@ in
|
|||
|
||||
# Default web browser stuff
|
||||
"text/html" = [ (desktopFileOf cfg.defaults.webBrowser) ];
|
||||
"x-scheme-handler/chrome" = [ (desktopFileOf cfg.defaults.webBrowser) ];
|
||||
"x-scheme-handler/about" = [ (desktopFileOf cfg.defaults.webBrowser) ];
|
||||
"x-scheme-handler/unknown" = [ (desktopFileOf cfg.defaults.webBrowser) ];
|
||||
"x-scheme-handler/http" = [ (desktopFileOf cfg.defaults.webBrowser) ];
|
||||
|
@ -169,6 +177,12 @@ in
|
|||
"x-scheme-handler/ftp" = [ (desktopFileOf cfg.defaults.webBrowser) ];
|
||||
"x-scheme-handler/ftps" = [ (desktopFileOf cfg.defaults.webBrowser) ];
|
||||
"x-scheme-handler/file" = [ (desktopFileOf cfg.defaults.webBrowser) ];
|
||||
"application/x-extension-htm" = [ (desktopFileOf cfg.defaults.webBrowser) ];
|
||||
"application/x-extension-html" = [ (desktopFileOf cfg.defaults.webBrowser) ];
|
||||
"application/x-extension-shtml" = [ (desktopFileOf cfg.defaults.webBrowser) ];
|
||||
"application/xhtml+xml" = [ (desktopFileOf cfg.defaults.webBrowser) ];
|
||||
"application/x-extension-xhtml" = [ (desktopFileOf cfg.defaults.webBrowser) ];
|
||||
"application/x-extension-xht" = [ (desktopFileOf cfg.defaults.webBrowser) ];
|
||||
|
||||
# Torrent
|
||||
"application/x-bittorrent" = [ "deluge.desktop" ];
|
||||
|
@ -184,13 +198,16 @@ in
|
|||
# Telegram
|
||||
"x-scheme-handler/tg2" = "org.telegram.desktop.desktop";
|
||||
"x-scheme-handler/tonsite2" = "org.telegram.desktop.desktop";
|
||||
|
||||
# Discord
|
||||
"x-scheme-handler/discord" = [ (desktopFileOf cfg.defaults.discord) ];
|
||||
};
|
||||
|
||||
# Add one for kakoune
|
||||
xdg.desktopEntries."kakoune" = {
|
||||
name = "Kakoune";
|
||||
genericName = "Text Editor";
|
||||
exec = ''kitty --class kitty-float -o initial_window_width=150c -o initial_window_height=40c ${pkgs.writeShellScript "editor.sh" ''
|
||||
exec = ''${lib.getExe pkgs.kitty} --class kitty-float -o initial_window_width=150c -o initial_window_height=40c ${pkgs.writeShellScript "editor.sh" ''
|
||||
$EDITOR "$@"
|
||||
''} %U'';
|
||||
# exec = "kakoune %U";
|
||||
|
|
|
@ -10,8 +10,6 @@ let
|
|||
settings.widgets = [ "inhibitors" "title" "dnd" "mpris" "notifications" ];
|
||||
style = ./swaync.css;
|
||||
};
|
||||
systemd.user.services.swaync.Install.WantedBy = lib.mkForce [ "sway-session.target" ];
|
||||
systemd.user.services.swaync.Unit.PartOf = lib.mkForce [ "graphical-session.target" ];
|
||||
|
||||
programs.my-waybar = {
|
||||
extraSettings = [{
|
||||
|
@ -110,7 +108,6 @@ with lib;
|
|||
longitude = "6.38";
|
||||
};
|
||||
|
||||
|
||||
# Notification system
|
||||
# services.dunst = {
|
||||
# enable = true;
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.nki.programs.discord;
|
||||
in
|
||||
{
|
||||
options.nki.programs.discord = {
|
||||
enable = mkEnableOption "Enable discord";
|
||||
|
||||
basePackage = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.discord;
|
||||
description = "The base Discord package that will get patched";
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = cfg.basePackage.override { nss = pkgs.nss_latest; };
|
||||
description = "The actual package to use";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
};
|
||||
}
|
|
@ -1,40 +1,17 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{ config, options, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.programs.my-kakoune;
|
||||
|
||||
autoloadModule = types.submodule {
|
||||
options = {
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
description = "Name of the autoload script/folder. It might affect kakoune's load order.";
|
||||
};
|
||||
src = mkOption {
|
||||
type = types.path;
|
||||
description = "Path to the autoload script/folder.";
|
||||
};
|
||||
wrapAsModule = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Wrap the given source file in a `provide-module` command. Fails if the `src` is not a single file.";
|
||||
};
|
||||
activationScript = mkOption {
|
||||
type = types.nullOr types.lines;
|
||||
default = null;
|
||||
description = "Add an activation script to the module. It will be wrapped in a `hook global KakBegin .*` wrapper.";
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ ./kak-lsp.nix ./fish-session.nix ./tree-sitter.nix ];
|
||||
imports = [ ./fish-session.nix ./tree-sitter.nix ];
|
||||
|
||||
options.programs.my-kakoune = {
|
||||
enable = mkEnableOption "My version of the kakoune configuration";
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.kakoune;
|
||||
default = pkgs.nki-kakoune;
|
||||
description = "The kakoune package to be installed";
|
||||
};
|
||||
rc = mkOption {
|
||||
|
@ -42,22 +19,16 @@ in
|
|||
default = "";
|
||||
description = "Content of the kakrc file. A line-concatenated string";
|
||||
};
|
||||
autoload = mkOption {
|
||||
type = types.listOf autoloadModule;
|
||||
default = [ ];
|
||||
description = "Sources to autoload";
|
||||
};
|
||||
themes = mkOption {
|
||||
type = types.attrsOf types.path;
|
||||
default = { };
|
||||
description = "Themes to load";
|
||||
};
|
||||
|
||||
extraFaces = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = { };
|
||||
description = "Extra faces to include";
|
||||
};
|
||||
autoloadFile = mkOption {
|
||||
type = options.xdg.configFile.type;
|
||||
default = { };
|
||||
description = "Extra autoload files";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -65,37 +36,6 @@ in
|
|||
|
||||
xdg.configFile =
|
||||
let
|
||||
kakouneAutoload = { name, src, wrapAsModule ? false, activationScript ? null }:
|
||||
[
|
||||
(if !wrapAsModule then {
|
||||
name = "kak/autoload/${name}";
|
||||
value.source = src;
|
||||
} else {
|
||||
name = "kak/autoload/${name}/module.kak";
|
||||
value.text = ''
|
||||
provide-module ${name} %◍
|
||||
${readFile src}
|
||||
◍
|
||||
'';
|
||||
})
|
||||
] ++ (if activationScript == null then [ ] else [{
|
||||
name = "kak/autoload/on-load/${name}.kak";
|
||||
value.text = ''
|
||||
hook global KakBegin .* %{
|
||||
${activationScript}
|
||||
}
|
||||
'';
|
||||
}]);
|
||||
|
||||
kakouneThemes = builtins.listToAttrs (builtins.attrValues (
|
||||
builtins.mapAttrs
|
||||
(name: src: {
|
||||
name = "kak/colors/${name}.kak";
|
||||
value.source = src;
|
||||
})
|
||||
cfg.themes
|
||||
));
|
||||
|
||||
kakouneFaces =
|
||||
let
|
||||
txt = strings.concatStringsSep "\n" (builtins.attrValues (builtins.mapAttrs (name: face: "face global ${name} \"${face}\"") cfg.extraFaces));
|
||||
|
@ -103,6 +43,7 @@ in
|
|||
pkgs.writeText "faces.kak" txt;
|
||||
in
|
||||
{
|
||||
"kak/autoload/builtin".source = "${cfg.package}/share/kak/autoload";
|
||||
# kakrc
|
||||
"kak/kakrc".text = ''
|
||||
${cfg.rc}
|
||||
|
@ -110,15 +51,15 @@ in
|
|||
# Load faces
|
||||
source ${kakouneFaces}
|
||||
'';
|
||||
} //
|
||||
(builtins.listToAttrs (lib.lists.flatten (map kakouneAutoload ([
|
||||
# include the original autoload files
|
||||
{
|
||||
name = "rc";
|
||||
src = "${cfg.package}/share/kak/autoload/rc";
|
||||
}
|
||||
] ++ cfg.autoload))))
|
||||
// kakouneThemes;
|
||||
} // lib.mapAttrs'
|
||||
(name: attrs: {
|
||||
name = "kak/autoload/${name}";
|
||||
value = attrs // {
|
||||
target = "kak/autoload/${name}";
|
||||
};
|
||||
})
|
||||
cfg.autoloadFile;
|
||||
xdg.dataFile."kak".source = "${cfg.package}/share/kak";
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,213 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
lspConfig =
|
||||
{
|
||||
language_ids = {
|
||||
c = "c_cpp";
|
||||
cpp = "c_cpp";
|
||||
javascript = "javascriptreact";
|
||||
typescript = "typescriptreact";
|
||||
protobuf = "proto";
|
||||
sh = "shellscript";
|
||||
};
|
||||
|
||||
language_servers = {
|
||||
ccls = {
|
||||
args = [ "-v=2" "-log-file=/tmp/ccls.log" ];
|
||||
command = "ccls";
|
||||
filetypes = [ "c" "cpp" ];
|
||||
roots = [ "compile_commands.json" ".cquery" ".git" ];
|
||||
};
|
||||
gopls = {
|
||||
command = "gopls";
|
||||
filetypes = [ "go" ];
|
||||
offset_encoding = "utf-8";
|
||||
roots = [ "Gopkg.toml" "go.mod" ".git" ".hg" ];
|
||||
settings = { gopls = { hoverKind = "SynopsisDocumentation"; semanticTokens = true; }; };
|
||||
settings_section = "gopls";
|
||||
};
|
||||
haskell-language-server = {
|
||||
args = [ "--lsp" ];
|
||||
command = "haskell-language-server-wrapper";
|
||||
filetypes = [ "haskell" ];
|
||||
roots = [ "Setup.hs" "stack.yaml" "*.cabal" "package.yaml" ];
|
||||
settings_section = "haskell";
|
||||
};
|
||||
nil = {
|
||||
command = "${pkgs.nil}/bin/nil";
|
||||
filetypes = [ "nix" ];
|
||||
roots = [ "flake.nix" "shell.nix" ".git" ];
|
||||
settings.nil = {
|
||||
formatting.command = [ "${getExe pkgs.nixpkgs-fmt}" ];
|
||||
};
|
||||
};
|
||||
pyls = {
|
||||
command = "pyls";
|
||||
filetypes = [ "python" ];
|
||||
offset_encoding = "utf-8";
|
||||
roots = [ "requirements.txt" "setup.py" ".git" ".hg" ];
|
||||
};
|
||||
};
|
||||
semantic_tokens.faces = [
|
||||
## Items
|
||||
# (Rust) Macros
|
||||
{ face = "attribute"; token = "attribute"; }
|
||||
{ face = "attribute"; token = "derive"; }
|
||||
{ face = "macro"; token = "macro"; } # Function-like Macro
|
||||
# Keyword and Fixed Tokens
|
||||
{ face = "keyword"; token = "keyword"; }
|
||||
{ face = "operator"; token = "operator"; }
|
||||
# Functions and Methods
|
||||
{ face = "function"; token = "function"; }
|
||||
{ face = "method"; token = "method"; }
|
||||
# Constants
|
||||
{ face = "string"; token = "string"; }
|
||||
{ face = "format_specifier"; token = "formatSpecifier"; }
|
||||
# Variables
|
||||
{ face = "variable"; token = "variable"; modifiers = [ "readonly" ]; }
|
||||
{ face = "mutable_variable"; token = "variable"; }
|
||||
{ face = "module"; token = "namespace"; }
|
||||
{ face = "variable"; token = "type_parameter"; }
|
||||
{ face = "class"; token = "enum"; }
|
||||
{ face = "class"; token = "struct"; }
|
||||
{ face = "class"; token = "trait"; }
|
||||
{ face = "class"; token = "union"; }
|
||||
{ face = "class"; token = "class"; }
|
||||
|
||||
## Comments
|
||||
{ face = "documentation"; token = "comment"; modifiers = [ "documentation" ]; }
|
||||
{ face = "comment"; token = "comment"; }
|
||||
];
|
||||
server = { timeout = 1800; };
|
||||
snippet_support = false;
|
||||
verbosity = 255;
|
||||
};
|
||||
|
||||
languageServerOption = types.submodule {
|
||||
options = {
|
||||
filetypes = mkOption {
|
||||
type = types.listOf types.str;
|
||||
description = "The list of filetypes to assign the language to";
|
||||
};
|
||||
roots = mkOption {
|
||||
type = types.listOf types.str;
|
||||
description = "The list of root filenames that are used to determine the project root";
|
||||
};
|
||||
command = mkOption {
|
||||
type = types.str;
|
||||
description = "The LSP server command to be called.";
|
||||
};
|
||||
args = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
description = "The arguments passed onto the LSP server.";
|
||||
};
|
||||
offset_encoding = mkOption {
|
||||
type = types.nullOr (types.enum [ "utf-8" ]);
|
||||
default = null;
|
||||
description = "The offset encoding used by the LSP server.";
|
||||
};
|
||||
settings_section = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "The settings section to be sent to LSP server.";
|
||||
};
|
||||
settings = mkOption {
|
||||
type = types.nullOr (types.attrsOf types.anything);
|
||||
default = null;
|
||||
description = "Additional settings to be passed to the LSP server.";
|
||||
};
|
||||
package = mkOption {
|
||||
type = types.nullOr types.package;
|
||||
default = null;
|
||||
description = "The default package of the language server. Will be appended as the ending segments of the PATH to kak-lsp";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
cfg = config.programs.kak-lsp;
|
||||
|
||||
serverPackages =
|
||||
filter (v: v != null)
|
||||
(lib.mapAttrsToList (_: serv: serv.package) cfg.languageServers);
|
||||
|
||||
wrappedPackage = pkgs.symlinkJoin {
|
||||
name = "kak-lsp-wrapped";
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
paths = [ cfg.package ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/kak-lsp --suffix PATH ":" ${lib.makeBinPath serverPackages}
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
options.programs.kak-lsp = {
|
||||
enable = mkEnableOption "Enable kak-lsp support";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.kak-lsp;
|
||||
};
|
||||
|
||||
enableSnippets = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Enable snippet support";
|
||||
};
|
||||
|
||||
semanticTokens.faces = mkOption {
|
||||
type = types.listOf types.anything;
|
||||
default = lspConfig.semantic_tokens.faces;
|
||||
description = "The semantic tokens faces mapping given to kak";
|
||||
};
|
||||
semanticTokens.additionalFaces = mkOption {
|
||||
type = types.listOf types.anything;
|
||||
default = [ ];
|
||||
description = "The semantic tokens faces mapping given to kak";
|
||||
};
|
||||
|
||||
serverTimeout = mkOption {
|
||||
type = types.int;
|
||||
default = 1000;
|
||||
description = "Server timeout";
|
||||
};
|
||||
|
||||
languageServers = mkOption {
|
||||
type = types.attrsOf languageServerOption;
|
||||
default = { };
|
||||
description = "The language options";
|
||||
};
|
||||
|
||||
languageIds = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = { };
|
||||
description = "Language IDs to be sent to the LSP";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable
|
||||
{
|
||||
home.packages = [ wrappedPackage ];
|
||||
|
||||
# Configurations
|
||||
xdg.configFile."kak-lsp/kak-lsp.toml" =
|
||||
let
|
||||
toml = pkgs.formats.toml { };
|
||||
toLspConfig = lib.filterAttrsRecursive (n: v: n != "package" && v != null);
|
||||
in
|
||||
{
|
||||
source = toml.generate "config.toml"
|
||||
{
|
||||
semantic_tokens.faces = cfg.semanticTokens.faces ++ cfg.semanticTokens.additionalFaces;
|
||||
server.timeout = cfg.serverTimeout;
|
||||
snippet_support = cfg.enableSnippets;
|
||||
verbosity = 255;
|
||||
language_server = toLspConfig (lspConfig.language_servers // cfg.languageServers);
|
||||
language_ids = lspConfig.language_ids // cfg.languageIds;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -33,6 +33,27 @@ let
|
|||
};
|
||||
};
|
||||
};
|
||||
mkGrammarPackage =
|
||||
{ name
|
||||
, src
|
||||
, grammarPath ? "src"
|
||||
, grammarCompileArgs ? [ "-O3" "-c" "-fpic" "../parser.c" "../scanner.c" "-I" ".." ]
|
||||
, grammarLinkArgs ? [ "-shared" "-fpic" "parser.o" "scanner.o" ]
|
||||
}: pkgs.stdenv.mkDerivation {
|
||||
inherit src;
|
||||
name = "kak-tree-sitter-grammar-${name}.so";
|
||||
version = "latest";
|
||||
buildPhase = ''
|
||||
mkdir ${grammarPath}/build
|
||||
cd ${grammarPath}/build
|
||||
$CC ${lib.concatStringsSep " " grammarCompileArgs}
|
||||
$CC ${lib.concatStringsSep " " grammarLinkArgs} -o ${name}.so
|
||||
'';
|
||||
installPhase = ''
|
||||
cp ${name}.so $out
|
||||
'';
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
options.programs.my-kakoune.tree-sitter = {
|
||||
|
@ -200,24 +221,15 @@ in
|
|||
|
||||
toml = pkgs.formats.toml { };
|
||||
|
||||
srcName = src: lib.removePrefix "/nix/store/" src.outPath;
|
||||
mkGitRepo = src: pkgs.runCommandLocal "${src.name}-git" { } ''
|
||||
cp -r --no-preserve=all ${src} $out
|
||||
cd $out
|
||||
if ! test -d $out/.git; then
|
||||
${lib.getExe pkgs.git} init -b ${srcName src}
|
||||
${lib.getExe pkgs.git} config user.email "a@b.com"
|
||||
${lib.getExe pkgs.git} config user.name "a"
|
||||
${lib.getExe pkgs.git} add .
|
||||
${lib.getExe pkgs.git} commit -m "Just making a git commit"
|
||||
fi
|
||||
'';
|
||||
|
||||
toLanguageConf = name: lang: with lang; {
|
||||
grammar = {
|
||||
inherit (grammar) path;
|
||||
source.git.url = "${mkGitRepo grammar.src}";
|
||||
source.git.pin = "${srcName grammar.src}";
|
||||
source.local.path = mkGrammarPackage {
|
||||
inherit name;
|
||||
src = grammar.src;
|
||||
grammarPath = grammar.path;
|
||||
grammarCompileArgs = grammar.compile.flags ++ grammar.compile.args;
|
||||
grammarLinkArgs = grammar.link.flags ++ grammar.link.args;
|
||||
};
|
||||
compile = grammar.compile.command;
|
||||
compile_args = grammar.compile.args;
|
||||
compile_flags = grammar.compile.flags;
|
||||
|
@ -225,10 +237,9 @@ in
|
|||
link_args = grammar.link.args ++ [ "-o" "${name}.so" ];
|
||||
link_flags = grammar.link.flags;
|
||||
};
|
||||
queries = {
|
||||
source.git.url = "${mkGitRepo queries.src}";
|
||||
source.git.pin = "${srcName queries.src}";
|
||||
queries = rec {
|
||||
path = if queries.path == null then "runtime/queries/${name}" else queries.path;
|
||||
source.local.path = "${queries.src}/${path}";
|
||||
};
|
||||
};
|
||||
in
|
||||
|
@ -249,14 +260,14 @@ in
|
|||
features = cfg.features;
|
||||
language = builtins.mapAttrs toLanguageConf cfg.languages;
|
||||
};
|
||||
|
||||
onChange = ''
|
||||
export PATH=$PATH:${lib.getBin pkgs.gcc}
|
||||
${cfg.package}/bin/ktsctl sync -a
|
||||
'';
|
||||
};
|
||||
|
||||
programs.my-kakoune.extraFaces = faces;
|
||||
programs.my-kakoune.autoloadFile."kak-tree-sitter.kak".text = ''
|
||||
# Enable kak-tree-sitter
|
||||
eval %sh{kak-tree-sitter --kakoune -d --server --init $kak_session}
|
||||
map global normal <c-t> ": enter-user-mode tree-sitter<ret>"
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -70,9 +70,14 @@ in
|
|||
systemd.user.services.swaync.Install.WantedBy = [ "niri.service" ];
|
||||
systemd.user.services.swaync.Unit.After = [ "niri.service" ];
|
||||
systemd.user.targets.tray.Unit.After = [ "niri.service" ];
|
||||
systemd.user.targets.xwayland.Unit.After = [ "niri.service" ];
|
||||
|
||||
programs.my-waybar = {
|
||||
enable = true;
|
||||
enableLaptopBars = lib.mkDefault cfg.enableLaptop;
|
||||
};
|
||||
systemd.user.services.waybar.Unit.After = [ "niri.service" ];
|
||||
systemd.user.services.waybar.Install.WantedBy = [ "niri.service" ];
|
||||
systemd.user.targets.xwayland.Unit.After = [ "niri.service" ];
|
||||
|
||||
# xwayland-satellite
|
||||
systemd.user.services.niri-xwayland-satellite = lib.mkIf cfg.enable {
|
||||
|
@ -82,10 +87,13 @@ in
|
|||
Before = [ "xwayland.target" "xdg-desktop-autostart.target" ];
|
||||
After = [ "niri.service" ];
|
||||
};
|
||||
Install.WantedBy = [ "niri.service" ];
|
||||
Install.UpheldBy = [ "niri.service" ];
|
||||
Service.Slice = "session.slice";
|
||||
Service.Type = "notify";
|
||||
Service.ExecStart = "${lib.getExe pkgs.xwayland-satellite} ${xwayland-display}";
|
||||
Service.ExecStartPost = [ "systemctl --user set-environment DISPLAY=${xwayland-display}" ];
|
||||
Service.ExecStopPost = [ "systemctl --user unset-environment" ];
|
||||
};
|
||||
|
||||
programs.niri.settings = {
|
||||
|
@ -93,7 +101,6 @@ in
|
|||
QT_QPA_PLATFORM = "wayland";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
QT_IM_MODULE = "fcitx";
|
||||
GTK_IM_MODULE = "fcitx"; # Til text-input is merged
|
||||
# export NIXOS_OZONE_WL=1 # Until text-input is merged
|
||||
DISPLAY = xwayland-display;
|
||||
} // lib.optionalAttrs osConfig.services.desktopManager.plasma6.enable {
|
||||
|
@ -331,26 +338,26 @@ in
|
|||
#
|
||||
# For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
|
||||
# will all refer to the 3rd workspace.
|
||||
"Mod+1".action = focus-workspace (cfg.workspaces."01".name);
|
||||
"Mod+2".action = focus-workspace (cfg.workspaces."02".name);
|
||||
"Mod+3".action = focus-workspace (cfg.workspaces."03".name);
|
||||
"Mod+4".action = focus-workspace (cfg.workspaces."04".name);
|
||||
"Mod+5".action = focus-workspace (cfg.workspaces."05".name);
|
||||
"Mod+6".action = focus-workspace (cfg.workspaces."06".name);
|
||||
"Mod+7".action = focus-workspace (cfg.workspaces."07".name);
|
||||
"Mod+8".action = focus-workspace (cfg.workspaces."08".name);
|
||||
"Mod+9".action = focus-workspace (cfg.workspaces."09".name);
|
||||
"Mod+0".action = focus-workspace (cfg.workspaces."10".name);
|
||||
"Mod+Shift+1".action = move-column-to-workspace (cfg.workspaces."01".name);
|
||||
"Mod+Shift+2".action = move-column-to-workspace (cfg.workspaces."02".name);
|
||||
"Mod+Shift+3".action = move-column-to-workspace (cfg.workspaces."03".name);
|
||||
"Mod+Shift+4".action = move-column-to-workspace (cfg.workspaces."04".name);
|
||||
"Mod+Shift+5".action = move-column-to-workspace (cfg.workspaces."05".name);
|
||||
"Mod+Shift+6".action = move-column-to-workspace (cfg.workspaces."06".name);
|
||||
"Mod+Shift+7".action = move-column-to-workspace (cfg.workspaces."07".name);
|
||||
"Mod+Shift+8".action = move-column-to-workspace (cfg.workspaces."08".name);
|
||||
"Mod+Shift+9".action = move-column-to-workspace (cfg.workspaces."09".name);
|
||||
"Mod+Shift+0".action = move-column-to-workspace (cfg.workspaces."10".name);
|
||||
"Mod+1" = lib.mkIf cfg.workspaces."01".fixed { action = focus-workspace (cfg.workspaces."01".name); };
|
||||
"Mod+2" = lib.mkIf cfg.workspaces."02".fixed { action = focus-workspace (cfg.workspaces."02".name); };
|
||||
"Mod+3" = lib.mkIf cfg.workspaces."03".fixed { action = focus-workspace (cfg.workspaces."03".name); };
|
||||
"Mod+4" = lib.mkIf cfg.workspaces."04".fixed { action = focus-workspace (cfg.workspaces."04".name); };
|
||||
"Mod+5" = lib.mkIf cfg.workspaces."05".fixed { action = focus-workspace (cfg.workspaces."05".name); };
|
||||
"Mod+6" = lib.mkIf cfg.workspaces."06".fixed { action = focus-workspace (cfg.workspaces."06".name); };
|
||||
"Mod+7" = lib.mkIf cfg.workspaces."07".fixed { action = focus-workspace (cfg.workspaces."07".name); };
|
||||
"Mod+8" = lib.mkIf cfg.workspaces."08".fixed { action = focus-workspace (cfg.workspaces."08".name); };
|
||||
"Mod+9" = lib.mkIf cfg.workspaces."09".fixed { action = focus-workspace (cfg.workspaces."09".name); };
|
||||
"Mod+0" = lib.mkIf cfg.workspaces."10".fixed { action = focus-workspace (cfg.workspaces."10".name); };
|
||||
"Mod+Shift+1" = lib.mkIf cfg.workspaces."01".fixed { action = move-column-to-workspace (cfg.workspaces."01".name); };
|
||||
"Mod+Shift+2" = lib.mkIf cfg.workspaces."02".fixed { action = move-column-to-workspace (cfg.workspaces."02".name); };
|
||||
"Mod+Shift+3" = lib.mkIf cfg.workspaces."03".fixed { action = move-column-to-workspace (cfg.workspaces."03".name); };
|
||||
"Mod+Shift+4" = lib.mkIf cfg.workspaces."04".fixed { action = move-column-to-workspace (cfg.workspaces."04".name); };
|
||||
"Mod+Shift+5" = lib.mkIf cfg.workspaces."05".fixed { action = move-column-to-workspace (cfg.workspaces."05".name); };
|
||||
"Mod+Shift+6" = lib.mkIf cfg.workspaces."06".fixed { action = move-column-to-workspace (cfg.workspaces."06".name); };
|
||||
"Mod+Shift+7" = lib.mkIf cfg.workspaces."07".fixed { action = move-column-to-workspace (cfg.workspaces."07".name); };
|
||||
"Mod+Shift+8" = lib.mkIf cfg.workspaces."08".fixed { action = move-column-to-workspace (cfg.workspaces."08".name); };
|
||||
"Mod+Shift+9" = lib.mkIf cfg.workspaces."09".fixed { action = move-column-to-workspace (cfg.workspaces."09".name); };
|
||||
"Mod+Shift+0" = lib.mkIf cfg.workspaces."10".fixed { action = move-column-to-workspace (cfg.workspaces."10".name); };
|
||||
|
||||
"Mod+asciicircum".action = focus-workspace (cfg.workspaces."99".name);
|
||||
"Mod+Shift+asciicircum".action = move-column-to-workspace (cfg.workspaces."99".name);
|
||||
|
|
|
@ -45,12 +45,15 @@ let
|
|||
${pkgs.grim}/bin/grim -g (${pkgs.slurp}/bin/slurp) - | ${pkgs.swappy}/bin/swappy -f -
|
||||
'';
|
||||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||
|
||||
terminalCmd = lib.getExe config.linux.graphical.defaults.terminal.package;
|
||||
in
|
||||
{
|
||||
# imports = [ ./ibus.nix ];
|
||||
|
||||
options.programs.my-sway = {
|
||||
enable = mkEnableOption "Enable the sway configuration";
|
||||
package = mkPackageOption pkgs "swayfx" { };
|
||||
fontSize = mkOption {
|
||||
type = types.float;
|
||||
description = "The default font size";
|
||||
|
@ -65,11 +68,6 @@ in
|
|||
description = "Path to the wallpaper to be used";
|
||||
default = config.linux.graphical.wallpaper;
|
||||
};
|
||||
terminal = mkOption {
|
||||
type = types.str;
|
||||
description = "The command to the terminal emulator to be used";
|
||||
default = lib.getExe config.linux.graphical.defaults.terminal.package;
|
||||
};
|
||||
browser = mkOption {
|
||||
type = types.str;
|
||||
description = "The command for the browser";
|
||||
|
@ -102,11 +100,12 @@ in
|
|||
enable = true;
|
||||
fontSize = mkDefault cfg.fontSize;
|
||||
enableLaptopBars = mkDefault cfg.enableLaptop;
|
||||
terminal = mkDefault cfg.terminal;
|
||||
};
|
||||
config.systemd.user.services.swaync.Install.WantedBy = mkIf cfg.enable [ "sway-session.target" ];
|
||||
|
||||
config.wayland.windowManager.sway = mkIf cfg.enable {
|
||||
enable = true;
|
||||
package = cfg.package;
|
||||
systemd.enable = true;
|
||||
systemd.variables = options.wayland.windowManager.sway.systemd.variables.default ++ [
|
||||
"PATH" # for portals
|
||||
|
@ -143,7 +142,7 @@ in
|
|||
### Programs
|
||||
#
|
||||
# Terminal
|
||||
terminal = cfg.terminal;
|
||||
terminal = terminalCmd;
|
||||
menu = "${pkgs.dmenu}/bin/dmenu_path | ${pkgs.bemenu}/bin/bemenu | ${pkgs.findutils}/bin/xargs swaymsg exec --";
|
||||
# Startup
|
||||
startup = [
|
||||
|
|
|
@ -12,7 +12,7 @@ in
|
|||
terminal = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "The command to the terminal emulator to be used";
|
||||
default = "${config.programs.kitty.package}/bin/kitty";
|
||||
default = "${lib.getExe config.linux.graphical.defaults.terminal.package}";
|
||||
};
|
||||
|
||||
enableLaptopBars = lib.mkOption {
|
||||
|
@ -181,9 +181,10 @@ in
|
|||
"network" = {
|
||||
# interface = wlp2s0 # (Optional) To force the use of this interface
|
||||
format-wifi = "{essid} ({signalStrength}%) ";
|
||||
format-ethernet = "{ifname}: {ipaddr}/{cidr} ";
|
||||
format-ethernet = "{ifname} ";
|
||||
format-disconnected = "Disconnected ⚠";
|
||||
interval = 7;
|
||||
on-click = "${cfg.terminal} ${lib.getExe' pkgs.iwd "iwctl"}";
|
||||
};
|
||||
"bluetooth" = {
|
||||
format = " {status}";
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# We use our own firefox
|
||||
# ./firefox.nix
|
||||
# osu!
|
||||
./osu.nix
|
||||
./osu
|
||||
];
|
||||
|
||||
# Home Manager needs a bit of information about you and the
|
||||
|
@ -29,7 +29,8 @@
|
|||
# Graphical set up
|
||||
linux.graphical.type = "wayland";
|
||||
linux.graphical.wallpaper = ./images/wallpaper_0.png;
|
||||
linux.graphical.defaults.webBrowser.package = pkgs.librewolf;
|
||||
linux.graphical.defaults.webBrowser.package = pkgs.zen-browser-bin;
|
||||
linux.graphical.defaults.webBrowser.desktopFile = "zen.desktop";
|
||||
# Enable sway
|
||||
programs.my-sway.enable = true;
|
||||
programs.my-sway.fontSize = 14.0;
|
||||
|
@ -47,6 +48,10 @@
|
|||
};
|
||||
};
|
||||
programs.my-niri.enable = true;
|
||||
programs.my-niri.enableLaptop = true;
|
||||
programs.my-niri.workspaces = lib.genAttrs [ "04" "05" "06" "07" "08" "09" ] (_: {
|
||||
fixed = false;
|
||||
});
|
||||
programs.niri.settings = {
|
||||
input.keyboard.xkb.options = "ctrl:swapcaps";
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
{ pkgs, options, config, lib, ... }:
|
||||
|
||||
let
|
||||
iio-sway = pkgs.stdenv.mkDerivation {
|
||||
|
@ -22,7 +22,7 @@ in
|
|||
# We use our own firefox
|
||||
# ./firefox.nix
|
||||
# osu!
|
||||
./osu.nix
|
||||
./osu
|
||||
];
|
||||
|
||||
# Home Manager needs a bit of information about you and the
|
||||
|
@ -44,7 +44,7 @@ in
|
|||
# Graphical set up
|
||||
linux.graphical.type = "wayland";
|
||||
linux.graphical.wallpaper = ./images/wallpaper_0.png;
|
||||
linux.graphical.startup = with pkgs; [ zen-browser-bin thunderbird vesktop slack ];
|
||||
linux.graphical.startup = options.linux.graphical.startup.default ++ [ pkgs.slack ];
|
||||
linux.graphical.defaults.webBrowser.package = pkgs.zen-browser-bin;
|
||||
linux.graphical.defaults.webBrowser.desktopFile = "zen.desktop";
|
||||
# Enable sway
|
||||
|
@ -68,6 +68,7 @@ in
|
|||
];
|
||||
};
|
||||
programs.my-niri.enable = true;
|
||||
programs.my-niri.enableLaptop = true;
|
||||
# Assign some of the workspaces to big screen
|
||||
programs.my-niri.workspaces = lib.genAttrs [ "06" "07" "08" "09" "10" ] (_: { monitor = config.common.monitors.work.name; });
|
||||
programs.niri.settings = {
|
||||
|
|
|
@ -5,10 +5,10 @@ let
|
|||
osu-pkg = with pkgs; with lib;
|
||||
appimageTools.wrapType2 rec {
|
||||
pname = "osu-lazer-bin";
|
||||
version = "2025.101.0";
|
||||
version = "2025.321.0";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ppy/osu/releases/download/${version}/osu.AppImage";
|
||||
hash = "sha256-GsnTxVpNk2RXHLET6Ugv0/ZOlq8RUkw2ZXqRjkU+dzw=";
|
||||
hash = "sha256-mNxoEx/wgJ1OUm7y9JLd5vHSwfcB49QjKDVQWZaMDJQ=";
|
||||
};
|
||||
extraPkgs = pkgs: with pkgs; [ icu ];
|
||||
|
||||
|
@ -18,6 +18,7 @@ let
|
|||
''
|
||||
mv -v $out/bin/${pname} $out/bin/osu\!
|
||||
install -m 444 -D ${contents}/osu\!.desktop -t $out/share/applications
|
||||
install -m 444 -D ${./mimetypes.xml} $out/share/mime/packages/${pname}.xml
|
||||
for i in 16 32 48 64 96 128 256 512 1024; do
|
||||
install -D ${contents}/osu.png $out/share/icons/hicolor/''${i}x$i/apps/osu.png
|
||||
done
|
29
home/osu/mimetypes.xml
Normal file
29
home/osu/mimetypes.xml
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
|
||||
<mime-type type="application/x-osu-beatmap-archive">
|
||||
<icon name="osu"/>
|
||||
<comment xml:lang="en">osu! Beatmap Archive</comment>
|
||||
<glob pattern="*.osz"/>
|
||||
<glob pattern="*.olz"/>
|
||||
</mime-type>
|
||||
<mime-type type="application/x-osu-skin-archive">
|
||||
<icon name="osu"/>
|
||||
<comment xml:lang="en">osu! Skin Archive</comment>
|
||||
<glob pattern="*.osk"/>
|
||||
</mime-type>
|
||||
<mime-type type="application/x-osu-beatmap">
|
||||
<icon name="osu"/>
|
||||
<comment xml:lang="en">osu! Beatmap</comment>
|
||||
<glob pattern="*.osu"/>
|
||||
</mime-type>
|
||||
<mime-type type="application/x-osu-storyboard">
|
||||
<icon name="osu"/>
|
||||
<comment xml:lang="en">osu! Storyboard</comment>
|
||||
<glob pattern="*.osb"/>
|
||||
</mime-type>
|
||||
<mime-type type="application/x-osu-replay">
|
||||
<icon name="osu"/>
|
||||
<comment xml:lang="en">osu! Replay</comment>
|
||||
<glob pattern="*.osr"/>
|
||||
</mime-type>
|
||||
</mime-info>
|
|
@ -22,8 +22,8 @@ let
|
|||
};
|
||||
authentik = mkImage {
|
||||
imageName = "ghcr.io/goauthentik/server";
|
||||
finalImageTag = "2024.1.0.4";
|
||||
imageDigest = "sha256:5843c56a56be58dcee8927c705f8c9def0af7189511c0e8e687d430f543b0f6d";
|
||||
finalImageTag = "2025.2.1";
|
||||
imageDigest = "sha256:dc07e81b4462a1dad9c6720f4c73993e37d7cb2d2f94a306187318704d112e71";
|
||||
};
|
||||
};
|
||||
authentikEnv = pkgs.writeText "authentik.env" ''
|
||||
|
@ -52,6 +52,7 @@ in
|
|||
serviceConfig.EnvironmentFile = cfg.envFile;
|
||||
serviceConfig.Type = "notify";
|
||||
serviceConfig.NotifyAccess = "all";
|
||||
serviceConfig.TimeoutSec = 300;
|
||||
script = lib.mkBefore ''
|
||||
${lib.getExe pkgs.wait4x} http http://127.0.0.1:${toString cfg.port} --expect-status-code 200 -t 0 -q -- systemd-notify --ready &
|
||||
'';
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
commit 8c7f8c28fabc174a71499a4737579b24b5c4b244
|
||||
Author: Natsu Kagami <nki@nkagami.me>
|
||||
Date: Mon Oct 21 02:17:36 2024 +0200
|
||||
|
||||
Support R2
|
||||
|
||||
diff --git a/.env.sample b/.env.sample
|
||||
index eb57ad85c..94ffcee07 100644
|
||||
index 51046501d..6daf60347 100644
|
||||
--- a/.env.sample
|
||||
+++ b/.env.sample
|
||||
@@ -66,6 +66,8 @@ AWS_S3_UPLOAD_BUCKET_URL=http://s3:4569
|
||||
|
@ -18,10 +12,10 @@ index eb57ad85c..94ffcee07 100644
|
|||
# –––––––––––––– AUTHENTICATION ––––––––––––––
|
||||
|
||||
diff --git a/app/utils/files.ts b/app/utils/files.ts
|
||||
index 6607a6b12..5138f68ad 100644
|
||||
index 16b66a2c4..c56ffd2b2 100644
|
||||
--- a/app/utils/files.ts
|
||||
+++ b/app/utils/files.ts
|
||||
@@ -63,8 +63,13 @@ export const uploadFile = async (
|
||||
@@ -88,8 +88,13 @@ export const uploadFile = async (
|
||||
xhr.addEventListener("loadend", () => {
|
||||
resolve(xhr.readyState === 4 && xhr.status >= 200 && xhr.status < 400);
|
||||
});
|
||||
|
@ -57,20 +51,20 @@ index 5b420f2e1..4ea1e8d3c 100644
|
|||
* Whether to force path style URLs for S3 objects, this is required for some
|
||||
* S3-compatible storage providers.
|
||||
diff --git a/server/routes/api/attachments/attachments.ts b/server/routes/api/attachments/attachments.ts
|
||||
index 5e6c27594..b7620f440 100644
|
||||
index d2288c215..72251962c 100644
|
||||
--- a/server/routes/api/attachments/attachments.ts
|
||||
+++ b/server/routes/api/attachments/attachments.ts
|
||||
@@ -3,6 +3,7 @@ import { v4 as uuidv4 } from "uuid";
|
||||
import { AttachmentPreset } from "@shared/types";
|
||||
import { bytesToHumanReadable } from "@shared/utils/files";
|
||||
import { bytesToHumanReadable, getFileNameFromUrl } from "@shared/utils/files";
|
||||
import { AttachmentValidation } from "@shared/validations";
|
||||
+import env from "@server/env";
|
||||
import { AuthorizationError, ValidationError } from "@server/errors";
|
||||
import auth from "@server/middlewares/authentication";
|
||||
import { rateLimiter } from "@server/middlewares/rateLimiter";
|
||||
@@ -90,16 +91,30 @@ router.post(
|
||||
{ transaction }
|
||||
);
|
||||
import { createContext } from "@server/context";
|
||||
import {
|
||||
AuthorizationError,
|
||||
@@ -83,16 +84,30 @@ router.post(
|
||||
userId: user.id,
|
||||
});
|
||||
|
||||
- const presignedPost = await FileStorage.getPresignedPost(
|
||||
- key,
|
||||
|
@ -107,7 +101,7 @@ index 5e6c27594..b7620f440 100644
|
|||
"Cache-Control": "max-age=31557600",
|
||||
"Content-Type": contentType,
|
||||
diff --git a/server/storage/files/BaseStorage.ts b/server/storage/files/BaseStorage.ts
|
||||
index ce0287ebc..a1931c83d 100644
|
||||
index 339262cc5..03f658271 100644
|
||||
--- a/server/storage/files/BaseStorage.ts
|
||||
+++ b/server/storage/files/BaseStorage.ts
|
||||
@@ -26,6 +26,8 @@ export default abstract class BaseStorage {
|
||||
|
@ -135,7 +129,7 @@ index 83cf98c50..324e60dd9 100644
|
|||
return "/api/files.create";
|
||||
}
|
||||
diff --git a/server/storage/files/S3Storage.ts b/server/storage/files/S3Storage.ts
|
||||
index a42442e0c..d55ef5472 100644
|
||||
index beba39ab2..4f0fe09a9 100644
|
||||
--- a/server/storage/files/S3Storage.ts
|
||||
+++ b/server/storage/files/S3Storage.ts
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
|
@ -181,3 +175,4 @@ index a42442e0c..d55ef5472 100644
|
|||
const isDocker = env.AWS_S3_UPLOAD_BUCKET_URL.match(/http:\/\/s3:/);
|
||||
const params = {
|
||||
Bucket: this.getBucket(),
|
||||
|
||||
|
|
|
@ -76,6 +76,7 @@ let
|
|||
virtualisation = { pkgs, ... }: mkIf cfg.enable {
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
extraPackages = [ pkgs.slirp4netns ];
|
||||
dockerCompat = true;
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
|
@ -330,7 +331,12 @@ in
|
|||
# DConf for GNOME configurations
|
||||
programs.dconf.enable = true;
|
||||
# Gaming! (not for ARM64)
|
||||
programs.steam.enable = !pkgs.stdenv.isAarch64;
|
||||
programs.steam.enable = true;
|
||||
programs.gamescope = {
|
||||
enable = true;
|
||||
# capSysNice = true; # https://github.com/NixOS/nixpkgs/issues/351516
|
||||
args = [ "--adaptive-sync" "--rt" ];
|
||||
};
|
||||
|
||||
## Services
|
||||
# OpenSSH so you can SSH to me
|
||||
|
@ -351,9 +357,9 @@ in
|
|||
|
||||
config.sway.default = [ "wlr" "kde" "kwallet" ];
|
||||
config.niri = {
|
||||
default = [ "gnome" "gtk" ];
|
||||
"org.freedesktop.impl.portal.Access" = "gtk";
|
||||
"org.freedesktop.impl.portal.Notification" = "gtk";
|
||||
default = [ "kde" "gnome" "gtk" ];
|
||||
# "org.freedesktop.impl.portal.Access" = "gtk";
|
||||
# "org.freedesktop.impl.portal.Notification" = "gtk";
|
||||
"org.freedesktop.impl.portal.Secret" = "kwallet";
|
||||
"org.freedesktop.impl.portal.FileChooser" = "kde";
|
||||
};
|
||||
|
|
|
@ -33,6 +33,18 @@
|
|||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/steam" = {
|
||||
device = "/dev/disk/by-uuid/d1db9f65-6add-4714-b9d7-16e16f687396";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd" "subvol=steam" ];
|
||||
encrypted = {
|
||||
enable = true;
|
||||
label = "encdata";
|
||||
blkDev = "/dev/disk/by-uuid/6544f506-9a22-479c-8bfc-aee1b9e0deda";
|
||||
keyFile = "/sysroot/var/crypto/key_data";
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/561f6441-1915-4059-a5e1-76a449b0c9bf"; }];
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
./outline.nix
|
||||
./vikunja.nix
|
||||
./n8n.nix
|
||||
./grist.nix
|
||||
];
|
||||
|
||||
system.stateVersion = "21.11";
|
||||
|
@ -202,6 +203,16 @@
|
|||
envFile = config.sops.secrets.gts-env.path;
|
||||
};
|
||||
|
||||
# Grist
|
||||
sops.secrets."grist/env" = { restartUnits = [ "arion-grist.service" ]; };
|
||||
cloud.grist = {
|
||||
enable = true;
|
||||
envFile = config.sops.secrets."grist/env".path;
|
||||
host = "tables.dtth.ch";
|
||||
dataDir = "/mnt/data/grist";
|
||||
};
|
||||
|
||||
|
||||
# ntfy
|
||||
cloud.traefik.hosts.ntfy-sh = { host = "ntfy.nkagami.me"; port = 11161; noCloudflare = true; };
|
||||
services.ntfy-sh = {
|
||||
|
|
127
nki-personal-do/grist.nix
Normal file
127
nki-personal-do/grist.nix
Normal file
|
@ -0,0 +1,127 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.cloud.grist;
|
||||
|
||||
mkImage =
|
||||
{ imageName, imageDigest, ... }: "${imageName}@${imageDigest}";
|
||||
# If we can pullImage we can just do
|
||||
# mkImage = pkgs.dockerTools.pullImage;
|
||||
|
||||
images = {
|
||||
# https://hub.docker.com/r/gristlabs/grist/tags
|
||||
grist = mkImage {
|
||||
imageName = "docker.io/gristlabs/grist-oss";
|
||||
finalImageTag = "1.4.2";
|
||||
imageDigest = "sha256:508ed0024f08702ae8797a6607e42ca67e1a0be0ac95c02e75c2a226b5e9cb9b";
|
||||
};
|
||||
# https://hub.docker.com/r/valkey/valkey/tags
|
||||
valkey = mkImage {
|
||||
imageName = "docker.io/valkey/valkey";
|
||||
finalImageTag = "8.0.2-alpine";
|
||||
imageDigest = "sha256:0fae58181c223280867e8b6d9d5fa29fca507770aeb6819f36d059cab73fa2fd";
|
||||
};
|
||||
};
|
||||
defaultEnv = {
|
||||
GRIST_HIDE_UI_ELEMENTS = lib.concatStringsSep "," [ "helpCenter" "billing" "multiAccounts" "supportGrist" ];
|
||||
GRIST_PAGE_TITLE_SUFFIX = " - DTTH Grist";
|
||||
GRIST_FORCE_LOGIN = "true";
|
||||
GRIST_WIDGET_LIST_URL = "https://github.com/gristlabs/grist-widget/releases/download/latest/manifest.json";
|
||||
GRIST_EXTERNAL_ATTACHMENTS_MODE = "snapshots";
|
||||
|
||||
GRIST_SANDBOX_FLAVOR = "gvisor";
|
||||
PYTHON_VERSION = "3";
|
||||
PYTHON_VERSION_ON_CREATION = "3";
|
||||
};
|
||||
in
|
||||
{
|
||||
options.cloud.grist = {
|
||||
enable = mkEnableOption "Grist database server";
|
||||
envFile = mkOption {
|
||||
type = types.path;
|
||||
description = "Path to an environment file that specifies GRIST_SESSION_SECRET and others";
|
||||
};
|
||||
host = mkOption {
|
||||
type = types.str;
|
||||
description = "Exposed hostname";
|
||||
};
|
||||
port = mkOption {
|
||||
type = types.int;
|
||||
description = "Exposed port";
|
||||
default = 9674;
|
||||
};
|
||||
dataDir = mkOption {
|
||||
type = types.str;
|
||||
description = "Path to the data directory";
|
||||
};
|
||||
|
||||
settings = {
|
||||
allowedWebhookDomains = mkOption {
|
||||
type = types.listOf types.str;
|
||||
description = "List of domains to be allowed in webhooks";
|
||||
default = [ "dtth.ch" "nkagami.me" "discord.com" ];
|
||||
};
|
||||
defaultEmail = mkOption {
|
||||
type = types.str;
|
||||
description = "Default email address for admin user";
|
||||
default = "nki@nkagami.me";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
cloud.traefik.hosts.grist = {
|
||||
inherit (cfg) port host;
|
||||
};
|
||||
systemd.services.arion-grist = {
|
||||
serviceConfig.Type = "notify";
|
||||
serviceConfig.NotifyAccess = "all";
|
||||
serviceConfig.TimeoutSec = 300;
|
||||
script = lib.mkBefore ''
|
||||
${lib.getExe pkgs.wait4x} http http://127.0.0.1:${toString cfg.port} -t 0 -q -- systemd-notify --ready &
|
||||
'';
|
||||
unitConfig.RequiresMountsFor = [ cfg.dataDir ];
|
||||
unitConfig.ReadWritePaths = [ cfg.dataDir ];
|
||||
};
|
||||
virtualisation.arion.projects.grist.settings = {
|
||||
services.grist-server.service = {
|
||||
image = images.grist;
|
||||
restart = "unless-stopped";
|
||||
volumes = [ "${cfg.dataDir}:/persist" ];
|
||||
environment = defaultEnv // {
|
||||
APP_HOME_URL = "https://${cfg.host}";
|
||||
ALLOWED_WEBHOOK_DOMAINS = lib.concatStringsSep "," cfg.settings.allowedWebhookDomains;
|
||||
GRIST_DEFAULT_EMAIL = cfg.settings.defaultEmail;
|
||||
REDIS_URL = "redis://valkey/1";
|
||||
};
|
||||
env_file = [ cfg.envFile ];
|
||||
ports = [
|
||||
"127.0.0.1:${toString cfg.port}:8484"
|
||||
];
|
||||
};
|
||||
services.valkey.service = {
|
||||
image = images.valkey;
|
||||
command = "--save 60 1 --loglevel warning";
|
||||
restart = "unless-stopped";
|
||||
healthcheck = {
|
||||
test = [ "CMD-SHELL" "valkey-cli ping | grep PONG" ];
|
||||
start_period = "20s";
|
||||
interval = "30s";
|
||||
retries = 5;
|
||||
timeout = "3s";
|
||||
};
|
||||
volumes = [ "valkey:/data" ];
|
||||
};
|
||||
docker-compose.volumes = {
|
||||
valkey.driver = "local";
|
||||
};
|
||||
};
|
||||
systemd.tmpfiles.settings."10-grist".${cfg.dataDir}.d = {
|
||||
user = "root";
|
||||
group = "root";
|
||||
mode = "0700";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -47,6 +47,8 @@ vikunja:
|
|||
provider-clientsecret: ENC[AES256_GCM,data:/fN1rH2CKoaivhespd+/KamERjBQOdwR7QQ+hoB+pQ3ZSrBVIKbLMWyOJe8f7rVwXAByqDxQIZJEVPjcjhWSU1eicwpu57FBx+/xJLFazspTVZ+5XKyAwR+UxTHDGAgtFV00QHN53l7ygg4joWWko4IPN1JIpNIASaIWWzpsrIo=,iv:NLsZcmE1kKlzV7B/XPVfENMWlpQtOpESH0ByX1KQ8IQ=,tag:P+ZmsKq0KJAeRTTbvbduMg==,type:str]
|
||||
n8n:
|
||||
env: ENC[AES256_GCM,data:LA/6tMfGgX0cDNfhIZ+n2Ay+6OW5gPPebcXQnfO3qQJSjMjf9vwauF2+W3KpIvM1Dsg3hyNEwqLNRn/28bgWC/qpBpgU2/gVI2n5oxcQaYGgnS/jB0nZWXvORVTnXjH0R+HBFCWgMJe7v+o0EeBH6kni/Nc9geb8paRkxZOGVKeJQy9K4OB2CN6FVO9KeR7gpeQpsh5V5SVW1MoND2tpCOiIK7d0uM6OHF/7p2RFrEEAarvJssj/dZRHjA/jALuqbQ6UDAaAppqlkEgIdZdFEfgebfCWR4e4aWjznW1DGOQQYtg4k/Kj8J/df8CWXX+lUO+9nTo/lhhcH395w+CRE8GUwze15yxQppUwqyLKdYwgmpK1tFnLP/W/As2f97c1fBB9rXrZYOUEIq4GspHOTPgjzcRfWOxX8cMKG69EmeZ3mWPsIDaC1ZvkVQjjcH/o9aC7QeFCwPfcy+mgI+9RjAaCw7qdig1CwgQabAaCd2hzQ4FTXBFJoZRfYZ1v3Rdwe8zqMivIcw2AHv6kYx6c9A==,iv:KmyJ/CLAGrYfzHjSWygtgA/+am9fUrKnOsGRPgV9QfU=,tag:G3LhfdSujcaC9ZZFUse0DQ==,type:str]
|
||||
grist:
|
||||
env: ENC[AES256_GCM,data:eT4eFHMU6UgCr/lNbdqFivzZgNREHcM4b/7ZEoKYWWNssrgIJybLm709BG8Q8/kKnBHaFUlczRQNvjS/nexZ3LymMeiXEHcuxC7lEM5otMqKzYFar2Z4YzPaUWGGezYcYBK56Ia5CF8TdWDdTbgnaSBY6R2ViJYTvS3QSdK6AhWfgGrdTVbye2lL6b11TrfI4vC25DhHJbrhFCXf995Q4nnwoACGAQ+Pkk6dsuYme4plV4WfZ8w61Y4SyNhdWYPp/rsJiAQkPajVCFjfZhH6cQCxVmSVn4c59H8MFx4qTbbXCKp3tXV5eQPWQBri5rc1XXAxgHKyrBUpx3QiYI6UDjGbf6hjXPSEWHQPXFLiLVPgH0CjXZeyxcYsr2ZLcOF87grUTR+CcxbiP4CshuJbvKyWiQ4ISOAm3m84XjXNVqn2WEf4ndqpNEG8H+BVbQ9RrGvrdlJqcrqD6rNzw0y+4SEiVPpv1NQ5M7+f+SABO8S2T4BFp95fvX2DmR/z+c9g2xiAOmZDFMzjG97rPrKuZq8+b+H3jlBZ4mxUBiz7l0c3NJ1RGtIUgr+idYGMwpSyh4C1a6LEzlW72F4vF5e5sEyWAHApRGxQCIMAP7ACBotMYgIKSPAzwThHtoTcUdBlDiQw8blsU/1c/FzkpAF5kotyNnk4vJea0H1yZ7NSz12E61qH6utG1YW5BZzZn+TKj7RfPEqzFE1POA0H8v1egE0bu1ClrYDX112iGEGI4IQHXMOu2p15O0/D+Y+QBOhpDwQWbgDXTf3ZMS2tyBtOiYT//ejfExYzV99V9t86xqmAvHODc69WC5nzWUp7SqkLLTP6gBUPSrkPs4ugZRE0q3STOmcnfxGkgpW94oj+jcZZY5supmYWK6zvJsPF9mn6,iv:pfIiOiWVEl0wEK03gnWj+ZKxOBwtBtf1hqzYOSpTm10=,tag:il0r2A/Z8q88sAiVgsuEEA==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
|
@ -80,8 +82,8 @@ sops:
|
|||
by9kZFlTRVdCZFkxYTVVb0RIRk8zUlkKCqMw9oL9RaYBV5Hhy3o8Nm5xmGrPH8Sd
|
||||
hv36sxRFFNZT/DCKaHaSRbT3mfpBZSTXJt1dgl4nZe6whH54t/1KmA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-12-07T23:38:16Z"
|
||||
mac: ENC[AES256_GCM,data:GKCMZJVKj5Fq7Ak4wQgI/pAl8JKDdzAYCBRwnxHlg0Z10AstbchAYm+LLwCaE85ebl6m/JexmfJeutJo0yGXuOIQKcEgfyNq9O/i/y34ISc4looQ6cyH5Hcxsd9JXgrmgQzVPquBXQzDHz4rj93VhNrvqmw+SgDPZVwcUznvCBI=,iv:HtUmf0qjvbYW7ngocISpqycX7ceNv0YsILgZhOMTSMg=,tag:kJ7EFOLL8o/2OFkn5PhvJw==,type:str]
|
||||
lastmodified: "2025-03-06T23:20:44Z"
|
||||
mac: ENC[AES256_GCM,data:XSYbqif2lhjTW2yUnoqtQehXG3DjS9It1IX4LplRMSxPkK0cpK64z/ouFRi12a1tjzE5YkdmZ9DDIxkAVPG8/5kgcZr5c4ddS/Zt4d97bCeeij47yuvhhoKMRzgIDSokMMmoelOV1k4FkDOfTDuMp2+tjyCao//N9YJjhhRPFYc=,iv:YpNNrIPotZAAQOF8GXBTpMjTFxYDdAFSLB1CBvLOE+k=,tag:1eGTkLRlL4s8TruVDPCA/g==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.1
|
||||
version: 3.9.4
|
||||
|
|
72
overlay.nix
72
overlay.nix
|
@ -11,7 +11,7 @@ let
|
|||
typst-lsp = final.unstable.typst-lsp;
|
||||
};
|
||||
overlay-imported = final: prev: {
|
||||
sway = prev.sway.override { sway-unwrapped = final.swayfx-unwrapped; };
|
||||
# sway = prev.sway.override { sway-unwrapped = final.swayfx-unwrapped; };
|
||||
deploy-rs = inputs.deploy-rs.packages.default;
|
||||
dtth-phanpy = inputs.dtth-phanpy.packages.${final.system}.default;
|
||||
matrix-conduit = inputs.conduit.packages.${final.system}.default;
|
||||
|
@ -22,7 +22,7 @@ let
|
|||
|
||||
overlay-versioning = final: prev: {
|
||||
gotosocial = prev.gotosocial.overrideAttrs (attrs: rec {
|
||||
version = "0.17.1";
|
||||
version = "0.18.1";
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
|
@ -32,13 +32,13 @@ let
|
|||
|
||||
web-assets = final.fetchurl {
|
||||
url = "https://github.com/superseriousbusiness/gotosocial/releases/download/v${version}/gotosocial_${version}_web-assets.tar.gz";
|
||||
hash = "sha256-rGntLlIbgfCtdqpD7tnvAY8qwF+BpYbQWfAGMhdOTgY=";
|
||||
hash = "sha256-5MSABLPyTbFMTno9vUDvLT9h7oQM6eNUuwD+dsHiCLo=";
|
||||
};
|
||||
src = final.fetchFromGitHub {
|
||||
owner = "superseriousbusiness";
|
||||
repo = "gotosocial";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-oWWsCs9jgd244yzWhgLkuHp7kY0BQ8+Ay6KpuBVG+U8=";
|
||||
hash = "sha256-4jV1G1HwpIST2Y27RAhJB3CoJevwuhxdzi615hj0Qv0=";
|
||||
};
|
||||
postInstall = ''
|
||||
tar xf ${web-assets}
|
||||
|
@ -58,15 +58,6 @@ let
|
|||
];
|
||||
});
|
||||
|
||||
swayfx-unwrapped = prev.swayfx-unwrapped.overrideAttrs (attrs: {
|
||||
patches = (attrs.patches or [ ]) ++ [
|
||||
(final.fetchurl {
|
||||
url = "https://patch-diff.githubusercontent.com/raw/WillPower3309/swayfx/pull/315.patch";
|
||||
hash = "sha256-zamOLHUjlzRs8PytPTAzEsdzgVtK+HVziHgrhwPcB+E=";
|
||||
})
|
||||
];
|
||||
});
|
||||
|
||||
librewolf = (prev.librewolf.override {
|
||||
nativeMessagingHosts = with final; [ kdePackages.plasma-browser-integration ];
|
||||
});
|
||||
|
@ -83,6 +74,14 @@ let
|
|||
glib-compile-schemas $out/share/glib-2.0/schemas
|
||||
'';
|
||||
});
|
||||
|
||||
vesktop = prev.vesktop.overrideAttrs (attrs: {
|
||||
postFixup =
|
||||
let
|
||||
flagToReplace = if final.lib.hasInfix "--enable-wayland-ime=true" attrs.postFixup then "--enable-wayland-ime=true" else "--enable-wayland-ime";
|
||||
in
|
||||
builtins.replaceStrings [ "NIXOS_OZONE_WL" flagToReplace ] [ "WAYLAND_DISPLAY" "${flagToReplace} --wayland-text-input-version=3" ] attrs.postFixup;
|
||||
});
|
||||
};
|
||||
|
||||
overlay-libs = final: prev: {
|
||||
|
@ -90,33 +89,39 @@ let
|
|||
};
|
||||
|
||||
overlay-packages = final: prev: {
|
||||
kak-tree-sitter = final.callPackage ./packages/common/kak-tree-sitter.nix { rustPlatform = final.unstable.rustPlatform; };
|
||||
kak-tree-sitter = final.callPackage ./packages/common/kak-tree-sitter { rustPlatform = final.unstable.rustPlatform; };
|
||||
|
||||
kak-lsp =
|
||||
let
|
||||
src = inputs.kak-lsp;
|
||||
cargoArtifacts = final.libs.crane.buildDepsOnly { inherit src; };
|
||||
in
|
||||
final.libs.crane.buildPackage {
|
||||
inherit src cargoArtifacts;
|
||||
buildInputs = (with final;
|
||||
lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration CoreServices ])
|
||||
) ++ (with final; [ libiconv ]);
|
||||
};
|
||||
kak-lsp = final.unstable.rustPlatform.buildRustPackage {
|
||||
name = "kak-lsp";
|
||||
src = inputs.kak-lsp;
|
||||
cargoHash = "sha256-8Y+haxC7ssN07ODZcKoDdTv0vEnKqxYseLPoQSNmWI4=";
|
||||
buildInputs = [ final.libiconv ];
|
||||
|
||||
zen-browser-bin = final.callPackage inputs.zen-browser.packages.${final.stdenv.system}.zen-browser.override {
|
||||
wrap-firefox = opts: final.wrapFirefox (opts // {
|
||||
meta.mainProgram = "kak-lsp";
|
||||
};
|
||||
# cargoArtifacts = final.libs.crane.buildDepsOnly { inherit src; };
|
||||
# in
|
||||
# final.libs.crane.buildPackage {
|
||||
# inherit src cargoArtifacts;
|
||||
# buildInputs = (with final;
|
||||
# lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration CoreServices ])
|
||||
# ) ++ (with final; [ libiconv ]);
|
||||
|
||||
# meta.mainProgram = "kak-lsp";
|
||||
# };
|
||||
|
||||
zen-browser-bin = inputs.zen-browser.packages.${final.stdenv.system}.zen-browser.override {
|
||||
inherit (inputs.zen-browser.packages.${final.stdenv.system}) zen-browser-unwrapped;
|
||||
wrapFirefox = opts: final.wrapFirefox (opts // {
|
||||
nativeMessagingHosts = with final; [ kdePackages.plasma-browser-integration ];
|
||||
});
|
||||
zen-browser-unwrapped = final.callPackage inputs.zen-browser.packages.${final.stdenv.system}.zen-browser-unwrapped.override {
|
||||
sources = inputs.zen-browser.inputs;
|
||||
};
|
||||
# zen-browser-unwrapped = final.callPackage inputs.zen-browser.packages.${final.stdenv.system}.zen-browser-unwrapped.override {
|
||||
# sources = inputs.zen-browser.inputs;
|
||||
# };
|
||||
};
|
||||
};
|
||||
in
|
||||
[
|
||||
# inputs.swayfx.inputs.scenefx.overlays.override
|
||||
# inputs.swayfx.overlays.override
|
||||
inputs.mpd-mpris.overlays.default
|
||||
inputs.rust-overlay.overlays.default
|
||||
inputs.youmubot.overlays.default
|
||||
|
@ -133,6 +138,3 @@ in
|
|||
|
||||
# Bug fixes
|
||||
] # we assign the overlay created before to the overlays of nixpkgs.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,4 +2,5 @@ final: prev: {
|
|||
epfl-cups-drivers = final.callPackage ./epfl-cups-drivers { };
|
||||
ttaenc = final.callPackage ./ttaenc.nix { };
|
||||
suwako-cursors = final.callPackage ./suwako-cursors { };
|
||||
nki-kakoune = final.callPackage ./nki-kakoune { };
|
||||
}
|
||||
|
|
|
@ -3,15 +3,15 @@ let
|
|||
src = fetchFromSourcehut {
|
||||
owner = "~hadronized";
|
||||
repo = "kak-tree-sitter";
|
||||
rev = "kak-tree-sitter-v1.1.2";
|
||||
hash = "sha256-wBWfSyR8LGtug/mCD0bJ4lbdN3trIA/03AnCxZoEOSA=";
|
||||
rev = "kak-tree-sitter-v1.1.3";
|
||||
hash = "sha256-vQZ+zQgwIw5ZBdIuMDD37rIdhe+WpNBmq0TciXBNiSU=";
|
||||
};
|
||||
|
||||
kak-tree-sitter = rustPlatform.buildRustPackage {
|
||||
inherit src;
|
||||
pname = "kak-tree-sitter";
|
||||
version = "1.1.2";
|
||||
cargoHash = "sha256-OQPUWqJAts8DbFNSsC/CmMCbuZ9TVxRTR05O7oiodKI=";
|
||||
version = "1.1.3";
|
||||
cargoHash = "sha256-1OwPfl1446SYt1556jwR9mvWOWEv+ab+wH7GZQeS4/E=";
|
||||
cargoBuildOptions = [ "--package" "kak-tree-sitter" "--package" "ktsctl" ];
|
||||
|
||||
nativeBuildInputs = [ clang git ];
|
||||
|
@ -35,6 +35,8 @@ let
|
|||
self.runtime_dir.join("sources").join(url_dir)
|
||||
'')
|
||||
];
|
||||
|
||||
meta.mainProgram = "kak-tree-sitter";
|
||||
};
|
||||
in
|
||||
kak-tree-sitter
|
25
packages/common/nki-kakoune/default.nix
Normal file
25
packages/common/nki-kakoune/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ callPackage, kakoune, kakoune-unwrapped, ... }:
|
||||
let
|
||||
lsp = callPackage ./lsp.nix { };
|
||||
rc = (callPackage ./rc.nix { });
|
||||
in
|
||||
(kakoune.override {
|
||||
plugins = callPackage ./plugins.nix { }
|
||||
++ callPackage ./themes.nix { }
|
||||
++ [
|
||||
(callPackage ./kaktex { })
|
||||
(callPackage ./faces.nix { })
|
||||
rc
|
||||
lsp.plugin
|
||||
];
|
||||
}).overrideAttrs (attrs: {
|
||||
buildCommand = ''
|
||||
${attrs.buildCommand or ""}
|
||||
# location of kak binary is used to find ../share/kak/autoload,
|
||||
# unless explicitly overriden with KAKOUNE_RUNTIME
|
||||
rm "$out/bin/kak"
|
||||
makeWrapper "${kakoune-unwrapped}/bin/kak" "$out/bin/kak" \
|
||||
--set KAKOUNE_RUNTIME "$out/share/kak" \
|
||||
--suffix PATH ":" "${lsp.extraPaths}"
|
||||
'';
|
||||
})
|
31
packages/common/nki-kakoune/faces.nix
Normal file
31
packages/common/nki-kakoune/faces.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ callPackage, ... } :
|
||||
let
|
||||
utils = callPackage ./utils.nix { };
|
||||
faces = {
|
||||
Default = "%opt{text},%opt{base}";
|
||||
BufferPadding = "%opt{base},%opt{base}";
|
||||
MenuForeground = "%opt{blue},white+bF";
|
||||
MenuBackground = "%opt{sky},white+F";
|
||||
Information = "%opt{sky},white";
|
||||
# Markdown help color scheme
|
||||
InfoDefault = "Information";
|
||||
InfoBlock = "@block";
|
||||
InfoBlockQuote = "+i@block";
|
||||
InfoBullet = "@bullet";
|
||||
InfoHeader = "@header";
|
||||
InfoLink = "@link";
|
||||
InfoLinkMono = "+b@mono";
|
||||
InfoMono = "@mono";
|
||||
InfoRule = "+b@Information";
|
||||
InfoDiagnosticError = "@DiagnosticError";
|
||||
InfoDiagnosticHint = "@DiagnosticHint";
|
||||
InfoDiagnosticInformation = "@Information";
|
||||
InfoDiagnosticWarning = "@DiagnosticWarning";
|
||||
# Extra faces
|
||||
macro = "+u@function";
|
||||
method = "@function";
|
||||
format_specifier = "+i@string";
|
||||
mutable_variable = "+i@variable";
|
||||
class = "+b@variable";
|
||||
};
|
||||
in utils.mkFacesScript "default-faces" faces
|
|
@ -1,6 +1,3 @@
|
|||
# Enable kak-tree-sitter
|
||||
eval %sh{test -z "$WE_STARTED_KAK" && kak-tree-sitter --kakoune -d --server --init $kak_session}
|
||||
map global normal <c-t> ": enter-user-mode tree-sitter<ret>"
|
||||
# ## Set some color overrides
|
||||
# set global kts_yellow "rgb:e2b75e"
|
||||
# set global kts_teal "rgb:008080"
|
||||
|
@ -8,6 +5,7 @@ map global normal <c-t> ": enter-user-mode tree-sitter<ret>"
|
|||
# set global kts_sky "rgb:6aa622"
|
||||
# Color scheme
|
||||
colorscheme catppuccin-latte
|
||||
set-face global module "%opt{sapphire}"
|
||||
set global base "default"
|
||||
|
||||
# Set indentation guides
|
||||
|
@ -90,47 +88,6 @@ hook global InsertCompletionHide .* %{
|
|||
unmap window insert <s-tab> <c-p>
|
||||
}
|
||||
|
||||
# Enable LSP
|
||||
try %{
|
||||
eval %sh{test -z "$WE_STARTED_KAK" && kak-lsp --kakoune -s $kak_session}
|
||||
set-option global lsp_cmd "kak-lsp -s %val{session}"
|
||||
}
|
||||
hook global WinSetOption filetype=(racket|rust|python|go|javascript|typescript|c|cpp|tex|latex|fsharp|ocaml|haskell|nix|scala|typst|html|css|json|markdown|templ|elixir) %{
|
||||
lsp-enable-window
|
||||
map window lsp N -docstring "Display the next message request" ": lsp-show-message-request-next<ret>"
|
||||
map window normal <c-l> ": enter-user-mode lsp<ret>"
|
||||
map window normal <c-h> ": lsp-hover<ret>"
|
||||
map window normal <c-s-h> ": lsp-hover-buffer<ret>"
|
||||
# lsp-auto-hover-insert-mode-enable
|
||||
set window lsp_hover_anchor true
|
||||
map global insert <tab> '<a-;>:try lsp-snippets-select-next-placeholders catch %{ execute-keys -with-hooks <lt>tab> }<ret>' -docstring 'Select next snippet placeholder'
|
||||
map global object a '<a-semicolon>lsp-object<ret>' -docstring 'LSP any symbol'
|
||||
map global object <a-a> '<a-semicolon>lsp-object<ret>' -docstring 'LSP any symbol'
|
||||
map global object f '<a-semicolon>lsp-object Function Method<ret>' -docstring 'LSP function or method'
|
||||
map global object t '<a-semicolon>lsp-object Class Interface Struct<ret>' -docstring 'LSP class interface or struct'
|
||||
map global object d '<a-semicolon>lsp-diagnostic-object --include-warnings<ret>' -docstring 'LSP errors and warnings'
|
||||
map global object D '<a-semicolon>lsp-diagnostic-object<ret>' -docstring 'LSP errors'
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=(racket|rust|python|go|javascript|typescript|c|cpp|tex|latex|haskell|nix|fsharp|templ) %{
|
||||
# Format the document if possible
|
||||
hook window BufWritePre .* %{ lsp-formatting-sync }
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=(rust|scala|fsharp) %{
|
||||
# Enable inlay hints
|
||||
lsp-inlay-hints-enable window
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=(rust|go|fsharp|typst|scala) %{
|
||||
hook window -group semantic-tokens BufReload .* lsp-semantic-tokens
|
||||
hook window -group semantic-tokens NormalIdle .* lsp-semantic-tokens
|
||||
hook window -group semantic-tokens InsertIdle .* lsp-semantic-tokens
|
||||
hook -once -always window WinSetOption filetype=.* %{
|
||||
remove-hooks window semantic-tokens
|
||||
}
|
||||
}
|
||||
|
||||
# <a-a> in Insert mode moves to end of line.
|
||||
map global insert <a-a> '<esc>A'
|
||||
|
||||
|
@ -155,11 +112,6 @@ hook global WinSetOption filetype=(rust) %{
|
|||
set-option buffer makecmd "cargo check"
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=(scala) %{
|
||||
# Format the document if possible
|
||||
hook -group scala-fmt window BufWritePre .* %{ lsp-formatting-sync }
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=(typst) %{
|
||||
set-option window comment_line "//"
|
||||
set-option window comment_block_begin "/*"
|
||||
|
@ -174,15 +126,6 @@ hook global WinSetOption filetype=(typst) %{
|
|||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window markdown-.+ }
|
||||
}
|
||||
|
||||
|
||||
define-command -params 0 -docstring "Set up build" scala-build-connect %{
|
||||
lsp-execute-command 'build-connect' '"[]"'
|
||||
}
|
||||
|
||||
define-command -params 0 -docstring "Import build" scala-build-import %{
|
||||
lsp-execute-command 'build-import' '"[]"'
|
||||
}
|
||||
|
||||
def -hidden insert-c-n %{
|
||||
try %{
|
||||
lsp-snippets-select-next-placeholders
|
22
packages/common/nki-kakoune/kaktex/default.nix
Normal file
22
packages/common/nki-kakoune/kaktex/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ fish, lib, writeScript, writeTextDir, kakouneUtils, ... }:
|
||||
let
|
||||
kaktex-script = writeScript "kaktex" ''
|
||||
#!/usr/bin/env ${lib.getExe fish}
|
||||
|
||||
${builtins.readFile ./kaktex.fish}
|
||||
'';
|
||||
kaktex = writeTextDir "kaktex.kak" ''
|
||||
hook global WinSetOption filetype=(tex|latex) %{
|
||||
hook window WinDisplay '.*' %{
|
||||
eval %sh{
|
||||
${kaktex-script} set $kak_client $kak_session
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
in
|
||||
kakouneUtils.buildKakounePluginFrom2Nix {
|
||||
pname = "kaktex";
|
||||
version = "latest";
|
||||
src = kaktex;
|
||||
}
|
|
@ -1,5 +1,3 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
function usage
|
||||
echo "Usage: "
|
||||
echo " kaktex set [client] [session]"
|
387
packages/common/nki-kakoune/lsp.nix
Normal file
387
packages/common/nki-kakoune/lsp.nix
Normal file
|
@ -0,0 +1,387 @@
|
|||
{ lib
|
||||
, writeTextDir
|
||||
, formats
|
||||
, kak-lsp
|
||||
, # LSP packages
|
||||
ccls
|
||||
, gopls
|
||||
, nil
|
||||
, nixpkgs-fmt
|
||||
, python311Packages
|
||||
, ltex-ls
|
||||
, nodePackages
|
||||
, tailwindcss-language-server
|
||||
, fsautocomplete
|
||||
, metals
|
||||
, texlab
|
||||
, tinymist
|
||||
, marksman
|
||||
, templ
|
||||
, rust-analyzer
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
# Configuration for kak-lsp
|
||||
config = {
|
||||
languageIDs = {
|
||||
c = "c_cpp";
|
||||
cpp = "c_cpp";
|
||||
javascript = "javascriptreact";
|
||||
typescript = "typescriptreact";
|
||||
protobuf = "proto";
|
||||
sh = "shellscript";
|
||||
};
|
||||
|
||||
languageServers =
|
||||
let
|
||||
vscodeServerWith = { name, extraFileTypes ? [ ] }: {
|
||||
name = "vscode-${name}-language-server";
|
||||
value = {
|
||||
args = [ "--stdio" ];
|
||||
command = "vscode-${name}-language-server";
|
||||
filetypes = [ name ] ++ extraFileTypes;
|
||||
roots = [ "package.json" ".git" ];
|
||||
package = nodePackages.vscode-langservers-extracted;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
ccls = {
|
||||
args = [ "-v=2" "-log-file=/tmp/ccls.log" ];
|
||||
package = ccls;
|
||||
command = "ccls";
|
||||
filetypes = [ "c" "cpp" ];
|
||||
roots = [ "compile_commands.json" ".cquery" ".git" ];
|
||||
};
|
||||
gopls = {
|
||||
command = "gopls";
|
||||
package = gopls;
|
||||
filetypes = [ "go" ];
|
||||
offset_encoding = "utf-8";
|
||||
roots = [ "Gopkg.toml" "go.mod" ".git" ".hg" ];
|
||||
settings = { gopls = { hoverKind = "SynopsisDocumentation"; semanticTokens = true; }; };
|
||||
settings_section = "gopls";
|
||||
};
|
||||
haskell-language-server = {
|
||||
args = [ "--lsp" ];
|
||||
command = "haskell-language-server-wrapper";
|
||||
filetypes = [ "haskell" ];
|
||||
roots = [ "Setup.hs" "stack.yaml" "*.cabal" "package.yaml" ];
|
||||
settings_section = "haskell";
|
||||
};
|
||||
nil = {
|
||||
command = "nil";
|
||||
package = nil;
|
||||
filetypes = [ "nix" ];
|
||||
roots = [ "flake.nix" "shell.nix" ".git" ];
|
||||
settings.nil = {
|
||||
formatting.command = [ "${lib.getExe nixpkgs-fmt}" ];
|
||||
};
|
||||
};
|
||||
pylsp = {
|
||||
command = "pylsp";
|
||||
package = python311Packages.python-lsp-server;
|
||||
filetypes = [ "python" ];
|
||||
offset_encoding = "utf-8";
|
||||
roots = [ "requirements.txt" "setup.py" ".git" ".hg" ];
|
||||
};
|
||||
# Spellchecking server
|
||||
ltex-ls = {
|
||||
command = "ltex-ls";
|
||||
args = [ "--log-file=/tmp" ];
|
||||
filetypes = [ "latex" "typst" ];
|
||||
roots = [ "main.tex" "main.typ" ".git" ];
|
||||
package = ltex-ls;
|
||||
};
|
||||
tailwind = {
|
||||
command = "tailwindcss-language-server";
|
||||
args = [ "--stdio" ];
|
||||
filetypes = [ "html" "css" "javascript" "typescript" "templ" ];
|
||||
roots = [ "tailwind.config.{js,cjs,mjs,ts}" "package.json" ".git" ];
|
||||
settings_section = "tailwindCSS";
|
||||
settings.tailwindCSS = {
|
||||
validate = "warning";
|
||||
userLanguages.templ = "html";
|
||||
};
|
||||
package = tailwindcss-language-server;
|
||||
};
|
||||
elixir-ls = {
|
||||
args = [ ];
|
||||
command = "elixir-ls";
|
||||
filetypes = [ "elixir" ];
|
||||
roots = [ "mix.exs" ];
|
||||
};
|
||||
typescript-language-server = {
|
||||
args = [ "--stdio" ];
|
||||
command = "typescript-language-server";
|
||||
filetypes = [ "typescript" "javascript" ];
|
||||
roots = [ "package.json" ];
|
||||
package = nodePackages.typescript-language-server;
|
||||
};
|
||||
fsautocomplete = {
|
||||
args = [ "--adaptive-lsp-server-enabled" "--project-graph-enabled" "--source-text-factory" "RoslynSourceText" ];
|
||||
command = "fsautocomplete";
|
||||
filetypes = [ "fsharp" ];
|
||||
roots = [ "*.fsproj" ];
|
||||
settings_section = "FSharp";
|
||||
settings.FSharp = {
|
||||
AutomaticWorkspaceInit = true;
|
||||
};
|
||||
package = fsautocomplete;
|
||||
};
|
||||
metals = {
|
||||
command = "metals";
|
||||
filetypes = [ "scala" ];
|
||||
roots = [ "build.sbt" "build.sc" "build.mill" ];
|
||||
settings_section = "metals";
|
||||
settings.metals = {
|
||||
inlayHints.inferredTypes.enable = true;
|
||||
inlayHints.typeParameters.enable = true;
|
||||
inlayHints.hintsInPatternMatch.enable = true;
|
||||
# From kakoune-lsp's own options
|
||||
icons = "unicode";
|
||||
isHttpEnabled = true;
|
||||
statusBarProvider = "log-message";
|
||||
compilerOptions = { overrideDefFormat = "unicode"; };
|
||||
};
|
||||
package = metals;
|
||||
};
|
||||
texlab = {
|
||||
command = "texlab";
|
||||
filetypes = [ "latex" ];
|
||||
roots = [ "main.tex" "all.tex" ".git" ];
|
||||
settings_section = "texlab";
|
||||
settings.texlab = {
|
||||
build.executable = "latexmk";
|
||||
build.args = [ "-pdf" "-shell-escape" "-interaction=nonstopmode" "-synctex=1" "%f" ];
|
||||
|
||||
build.forwardSearchAfter = true;
|
||||
build.onSave = true;
|
||||
|
||||
# forwardSearch =
|
||||
# (if pkgs.stdenv.isDarwin then {
|
||||
# executable = "/Applications/Skim.app/Contents/SharedSupport/displayline";
|
||||
# args = [ "-r" "-g" "%l" "%p" "%f" ];
|
||||
# } else
|
||||
# {
|
||||
# executable = "${pkgs.zathura}/bin/zathura";
|
||||
# args = [ "--synctex-forward" "%l:1:%f" "%p" "-x" "${./kaktex} jump %%{input} %%{line} %%{column}" ];
|
||||
# });
|
||||
};
|
||||
package = texlab;
|
||||
};
|
||||
tinymist = {
|
||||
command = "tinymist";
|
||||
filetypes = [ "typst" ];
|
||||
roots = [ "main.typ" ".git" ];
|
||||
settings_section = "tinymist";
|
||||
settings.tinymist = {
|
||||
exportPdf = "onSave";
|
||||
formatterMode = "typstfmt";
|
||||
};
|
||||
package = tinymist;
|
||||
};
|
||||
marksman = {
|
||||
command = "marksman";
|
||||
filetypes = [ "markdown" ];
|
||||
roots = [ ".marksman.toml" ".git" ];
|
||||
package = marksman;
|
||||
};
|
||||
templ = {
|
||||
command = "templ";
|
||||
args = [ "lsp" ];
|
||||
filetypes = [ "templ" ];
|
||||
roots = [ "go.mod" ".git" ];
|
||||
package = templ;
|
||||
};
|
||||
rust-analyzer = {
|
||||
args = [ ];
|
||||
command = "rust-analyzer";
|
||||
filetypes = [ "rust" ];
|
||||
roots = [ "Cargo.toml" ];
|
||||
package = rust-analyzer;
|
||||
};
|
||||
|
||||
} // (builtins.listToAttrs (builtins.map
|
||||
(ft: vscodeServerWith {
|
||||
name = ft;
|
||||
extraFileTypes = if ft == "json" then [ ] else [ "templ" ];
|
||||
}) [ "html" "css" "json" ]));
|
||||
|
||||
faces = [
|
||||
## Items
|
||||
# (Rust) Macros
|
||||
{ face = "attribute"; token = "attribute"; }
|
||||
{ face = "attribute"; token = "derive"; }
|
||||
{ face = "macro"; token = "macro"; } # Function-like Macro
|
||||
# Keyword and Fixed Tokens
|
||||
{ face = "keyword"; token = "keyword"; }
|
||||
{ face = "operator"; token = "operator"; }
|
||||
# Functions and Methods
|
||||
{ face = "function"; token = "function"; }
|
||||
{ face = "method"; token = "method"; }
|
||||
# Constants
|
||||
{ face = "string"; token = "string"; }
|
||||
{ face = "format_specifier"; token = "formatSpecifier"; }
|
||||
# Variables
|
||||
{ face = "variable"; token = "variable"; modifiers = [ "readonly" ]; }
|
||||
{ face = "mutable_variable"; token = "variable"; }
|
||||
{ face = "module"; token = "namespace"; }
|
||||
{ face = "variable"; token = "type_parameter"; }
|
||||
{ face = "class"; token = "enum"; }
|
||||
{ face = "class"; token = "struct"; }
|
||||
{ face = "class"; token = "trait"; }
|
||||
{ face = "class"; token = "union"; }
|
||||
{ face = "class"; token = "class"; }
|
||||
|
||||
## Comments
|
||||
{ face = "documentation"; token = "comment"; modifiers = [ "documentation" ]; }
|
||||
{ face = "comment"; token = "comment"; }
|
||||
|
||||
# Typst
|
||||
{ face = "header"; token = "heading"; }
|
||||
{ face = "ts_markup_link_url"; token = "link"; }
|
||||
{ face = "ts_markup_link_uri"; token = "ref"; }
|
||||
{ face = "ts_markup_link_label"; token = "label"; }
|
||||
{ face = "ts_property"; token = "pol"; }
|
||||
{ face = "ts_markup_list_checked"; token = "marker"; }
|
||||
{ face = "ts_constant_builtin_boolean"; token = "bool"; }
|
||||
{ face = "ts_keyword_control"; token = "delim"; }
|
||||
{ face = "ts_number"; token = "text"; modifiers = [ "math" ]; }
|
||||
{ face = "ts_markup_bold"; token = "text"; modifiers = [ "strong" ]; }
|
||||
{ face = "ts_markup_italic"; token = "text"; modifiers = [ "emph" ]; }
|
||||
];
|
||||
|
||||
raw = {
|
||||
server = { timeout = 1800; };
|
||||
snippet_support = false;
|
||||
verbosity = 255;
|
||||
};
|
||||
};
|
||||
|
||||
per-lang-config = lang:
|
||||
let
|
||||
toml = formats.toml { };
|
||||
servers = lib.filterAttrs (_: server: builtins.elem lang server.filetypes) config.languageServers;
|
||||
serverSettings = lib.mapAttrs
|
||||
(name: server: builtins.removeAttrs
|
||||
(server // {
|
||||
root_globs = server.roots;
|
||||
}) [ "package" "filetypes" "roots" ])
|
||||
servers;
|
||||
serversToml = toml.generate "kak-lsp-${lang}.toml" serverSettings;
|
||||
lang-id =
|
||||
if builtins.hasAttr lang config.languageIDs then ''
|
||||
set-option buffer lsp_language_id ${config.languageIDs.${lang}}
|
||||
'' else "# No lang-id remap needed";
|
||||
in
|
||||
''
|
||||
# LSP Configuration for ${lang}
|
||||
hook -group lsp-filetype-${lang} global BufSetOption filetype=(?:${lang}) %{
|
||||
set-option buffer lsp_servers %{
|
||||
${builtins.readFile serversToml}
|
||||
}
|
||||
${lang-id}
|
||||
}
|
||||
'';
|
||||
|
||||
lang-config =
|
||||
let
|
||||
langs = lib.unique (lib.flatten (lib.mapAttrsToList (_: server: server.filetypes) config.languageServers));
|
||||
in
|
||||
lib.concatMapStringsSep "\n" per-lang-config langs;
|
||||
faces-config =
|
||||
let
|
||||
mapFace = face:
|
||||
let
|
||||
modifiers = if builtins.hasAttr "modifiers" face then ", modifiers=${builtins.toJSON face.modifiers}" else "";
|
||||
in
|
||||
"{face=${builtins.toJSON face.face}, token=${builtins.toJSON face.token}${modifiers}}";
|
||||
faces = lib.concatMapStringsSep ",\n " mapFace config.faces;
|
||||
in
|
||||
''
|
||||
set-option global lsp_semantic_tokens %{
|
||||
[
|
||||
${faces}
|
||||
]
|
||||
}
|
||||
'';
|
||||
|
||||
# kak-lsp-config =
|
||||
# let
|
||||
# toml = formats.toml { };
|
||||
# toLspConfig = builtins.mapAttrs (_: attrs: builtins.removeAttrs attrs [ "package" ]);
|
||||
# in
|
||||
# toml.generate "kak-lsp.toml" ({
|
||||
# semantic_tokens.faces = config.faces;
|
||||
# language_server = toLspConfig config.languageServers;
|
||||
# language_ids = config.languageIDs;
|
||||
# } // config.raw);
|
||||
|
||||
serverPackages =
|
||||
builtins.filter (v: v != null)
|
||||
(lib.mapAttrsToList (_: serv: serv.package or null) config.languageServers);
|
||||
in
|
||||
{
|
||||
extraPaths = lib.makeBinPath (serverPackages ++ [ kak-lsp ]);
|
||||
plugin = writeTextDir "share/kak/autoload/kak-lsp.kak" ''
|
||||
hook global KakBegin .* %{
|
||||
try %{
|
||||
eval %sh{kak-lsp --kakoune -s $kak_session}
|
||||
}
|
||||
|
||||
lsp-enable
|
||||
map global lsp N -docstring "Display the next message request" ": lsp-show-message-request-next<ret>"
|
||||
map global normal <c-l> ": enter-user-mode lsp<ret>"
|
||||
map global normal <c-h> ": lsp-hover<ret>"
|
||||
map global normal <c-s-h> ": lsp-hover-buffer<ret>"
|
||||
# lsp-auto-hover-insert-mode-enable
|
||||
set global lsp_hover_anchor true
|
||||
map global insert <tab> '<a-;>:try lsp-snippets-select-next-placeholders catch %{ execute-keys -with-hooks <lt>tab> }<ret>' -docstring 'Select next snippet placeholder'
|
||||
map global object a '<a-semicolon>lsp-object<ret>' -docstring 'LSP any symbol'
|
||||
map global object <a-a> '<a-semicolon>lsp-object<ret>' -docstring 'LSP any symbol'
|
||||
map global object f '<a-semicolon>lsp-object Function Method<ret>' -docstring 'LSP function or method'
|
||||
map global object t '<a-semicolon>lsp-object Class Interface Struct<ret>' -docstring 'LSP class interface or struct'
|
||||
map global object d '<a-semicolon>lsp-diagnostic-object --include-warnings<ret>' -docstring 'LSP errors and warnings'
|
||||
map global object D '<a-semicolon>lsp-diagnostic-object<ret>' -docstring 'LSP errors'
|
||||
|
||||
hook global WinSetOption filetype=(racket|rust|python|go|javascript|typescript|c|cpp|tex|latex|haskell|nix|fsharp|templ|scala) %{
|
||||
# Format the document if possible
|
||||
hook window -group lsp-formatting BufWritePre .* %{ lsp-formatting-sync }
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=(rust|scala|fsharp) %{
|
||||
# Enable inlay hints
|
||||
lsp-inlay-hints-enable window
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=(rust|go|fsharp|typst|scala) %{
|
||||
hook window -group semantic-tokens BufReload .* lsp-semantic-tokens
|
||||
hook window -group semantic-tokens NormalIdle .* lsp-semantic-tokens
|
||||
hook window -group semantic-tokens InsertIdle .* lsp-semantic-tokens
|
||||
hook -once -always window WinSetOption filetype=.* %{
|
||||
remove-hooks window semantic-tokens
|
||||
}
|
||||
}
|
||||
|
||||
define-command -params 0 -docstring "Set up build" scala-build-connect %{
|
||||
lsp-execute-command 'build-connect' '[]'
|
||||
}
|
||||
|
||||
define-command -params 0 -docstring "Change bsp build server" scala-bsp-switch %{
|
||||
lsp-execute-command 'bsp-switch' '[]'
|
||||
}
|
||||
|
||||
define-command -params 0 -docstring "Import build" scala-build-import %{
|
||||
lsp-execute-command 'build-import' '[]'
|
||||
}
|
||||
|
||||
## Language settings
|
||||
${lang-config}
|
||||
|
||||
## Faces
|
||||
${faces-config}
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
205
packages/common/nki-kakoune/plugins.nix
Normal file
205
packages/common/nki-kakoune/plugins.nix
Normal file
|
@ -0,0 +1,205 @@
|
|||
{ pkgs, symlinkJoin, writeTextDir, kakouneUtils, ... }:
|
||||
with {
|
||||
inherit (kakouneUtils) buildKakounePluginFrom2Nix;
|
||||
};
|
||||
let
|
||||
toDir = name: file: writeTextDir name (builtins.readFile file);
|
||||
|
||||
writeActivationScript = script: writeTextDir "on-load.kak" ''
|
||||
hook global KakBegin .* %{
|
||||
${script}
|
||||
}
|
||||
'';
|
||||
|
||||
writeModuleWrapper = name: script: writeTextDir "module.kak" ''
|
||||
provide-module ${name} %◍
|
||||
${script}
|
||||
◍
|
||||
'';
|
||||
|
||||
kakounePlugin = { name, src, wrapAsModule ? false, activationScript ? null, ... }@attrs:
|
||||
let
|
||||
module = if wrapAsModule then writeModuleWrapper name (builtins.readFile src) else src;
|
||||
in
|
||||
buildKakounePluginFrom2Nix {
|
||||
pname = name;
|
||||
version = attrs.version or "latest";
|
||||
src = if activationScript == null then module else
|
||||
symlinkJoin {
|
||||
name = "${name}-src";
|
||||
paths = [
|
||||
module
|
||||
(writeActivationScript activationScript)
|
||||
];
|
||||
};
|
||||
};
|
||||
in
|
||||
builtins.map kakounePlugin [
|
||||
# My own scripts
|
||||
{
|
||||
name = "latex.kak";
|
||||
src = toDir "latex.kak" ./autoload/latex.kak;
|
||||
}
|
||||
{
|
||||
name = "markdown.kak";
|
||||
src = toDir "markdown.kak" ./autoload/markdown.kak;
|
||||
}
|
||||
|
||||
# Plugins
|
||||
{
|
||||
name = "luar";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "gustavo-hms";
|
||||
repo = "luar";
|
||||
rev = "2f430316f8fc4d35db6c93165e2e77dc9f3d0450";
|
||||
sha256 = "sha256-vHn/V3sfzaxaxF8OpA5jPEuPstOVwOiQrogdSGtT6X4=";
|
||||
};
|
||||
activationScript = ''
|
||||
# Enable luar
|
||||
require-module luar
|
||||
# Use luajit
|
||||
set-option global luar_interpreter ${pkgs.luajit}/bin/luajit
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "peneira";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "natsukagami";
|
||||
repo = "peneira";
|
||||
rev = "743b9971472853a752475e7c070ce99089c6840c";
|
||||
sha256 = "sha256-E4ndbF9YC1p0KrvSuGgwmG1Y2IGTuGKJo/AuMixhzlM=";
|
||||
};
|
||||
activationScript = ''
|
||||
require-module peneira
|
||||
|
||||
# Change selection color
|
||||
set-face global PeneiraSelected @PrimarySelection
|
||||
|
||||
# Buffers list
|
||||
define-command -hidden peneira-buffers %{
|
||||
peneira 'buffers: ' %{ printf '%s\n' $kak_quoted_buflist } %{
|
||||
buffer %arg{1}
|
||||
}
|
||||
}
|
||||
|
||||
# Grep in the current location
|
||||
define-command peneira-grep %{
|
||||
peneira 'line: ' "rg -n ." %{
|
||||
lua %arg{1} %{
|
||||
local file, line = arg[1]:match("([^:]+):(%d+):")
|
||||
kak.edit(file, line)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# A peneira menu
|
||||
declare-user-mode fuzzy-match-menu
|
||||
|
||||
map -docstring "Switch to buffer" global fuzzy-match-menu b ": peneira-buffers<ret>"
|
||||
map -docstring "Symbols" global fuzzy-match-menu s ": peneira-symbols<ret>"
|
||||
map -docstring "Lines" global fuzzy-match-menu l ": peneira-lines<ret>"
|
||||
map -docstring "Lines in the current directory" global fuzzy-match-menu g ": peneira-grep<ret>"
|
||||
map -docstring "Files in project" global fuzzy-match-menu f ": peneira-files<ret>"
|
||||
map -docstring "Files in currently opening file's directory" global fuzzy-match-menu F ": peneira-local-files<ret>"
|
||||
|
||||
# Bind menu to user mode
|
||||
map -docstring "Fuzzy matching" global user f ": enter-user-mode fuzzy-match-menu<ret>"
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "kakoune-focus";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "caksoylar";
|
||||
repo = "kakoune-focus";
|
||||
rev = "949c0557cd4c476822acfa026ca3c50f3d38a3c0";
|
||||
sha256 = "sha256-ZV7jlLJQyL420YG++iC9rq1SMjo3WO5hR9KVvJNUiCs=";
|
||||
};
|
||||
activationScript = ''
|
||||
map global user <space> ': focus-toggle<ret>' -docstring "toggle selections focus"
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "kakoune-inc-dec";
|
||||
src = pkgs.fetchFromGitLab {
|
||||
owner = "Screwtapello";
|
||||
repo = "kakoune-inc-dec";
|
||||
rev = "7bfe9c51";
|
||||
sha256 = "0f33wqxqbfygxypf348jf1fiscac161wf2xvnh8zwdd3rq5yybl0";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "racket.kak";
|
||||
src = (builtins.fetchTree {
|
||||
type = "git";
|
||||
url = "https://bitbucket.org/KJ_Duncan/kakoune-racket.kak.git";
|
||||
rev = "e397042009b46916ff089d79166ec0e8ca813a18";
|
||||
narHash = "sha256-IcxFmvG0jqpMCG/dT9crVRgPgMGKkic6xwrnW5z4+bc=";
|
||||
}) + "/rc";
|
||||
}
|
||||
# {
|
||||
# name = "kakoune-discord";
|
||||
# src = (builtins.getFlake "github:natsukagami/kakoune-discord/03f95e40d6efd8fd3de7bca31653d43de2dcfc5f").packages.${pkgs.system}.kakoune-discord-rc + "/rc";
|
||||
# }
|
||||
rec {
|
||||
name = "kakoune-mirror";
|
||||
src = pkgs.fetchFromGitHub
|
||||
{
|
||||
owner = "Delapouite";
|
||||
repo = "kakoune-mirror";
|
||||
rev = "5710635f440bcca914d55ff2ec1bfcba9efe0f15";
|
||||
sha256 = "sha256-uslx4zZhvjUylrPWvTOugsKYKKpF0EEz1drc1Ckrpjk=";
|
||||
} + "/mirror.kak";
|
||||
wrapAsModule = true;
|
||||
activationScript = ''
|
||||
require-module ${name}
|
||||
|
||||
# Bind <a-w> to ${name}
|
||||
map global normal <a-w> ': enter-user-mode -lock mirror<ret>'
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "unicode-math";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "natsukagami";
|
||||
repo = "kakoune-unicode-math";
|
||||
rev = "08dff25da2b86ee0b0777091992bc7fb28c3cb1d";
|
||||
# sha256 = lib.fakeSha256;
|
||||
sha256 = "sha256-j0L1ARex1i2ma8sGLYwgkfAbh0jWKh/6QGHFaxPXIKc=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
activationScript = ''
|
||||
require-module unicode-math
|
||||
|
||||
# Bind <c-s> to the menu
|
||||
map global insert <c-s> '<a-;>: insert-unicode '
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "kakoune-buffers";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "Delapouite";
|
||||
repo = "kakoune-buffers";
|
||||
rev = "6b2081f5b7d58c72de319a5cba7bf628b6802881";
|
||||
sha256 = "sha256-jOSrzGcLJjLK1GiTSsl2jLmQMPbPxjycR0pwF5t/eV0=";
|
||||
};
|
||||
activationScript = ''
|
||||
# Suggested hook
|
||||
|
||||
hook global WinDisplay .* info-buffers
|
||||
|
||||
# Suggested mappings
|
||||
|
||||
map global user b ':enter-buffers-mode<ret>' -docstring 'buffers…'
|
||||
map global normal ^ ':enter-buffers-mode<ret>' -docstring 'buffers…'
|
||||
map global user B ':enter-user-mode -lock buffers<ret>' -docstring 'buffers (lock)…'
|
||||
|
||||
# Suggested aliases
|
||||
|
||||
alias global bd delete-buffer
|
||||
alias global bf buffer-first
|
||||
alias global bl buffer-last
|
||||
alias global bo buffer-only
|
||||
alias global bo! buffer-only-force
|
||||
'';
|
||||
}
|
||||
]
|
27
packages/common/nki-kakoune/rc.nix
Normal file
27
packages/common/nki-kakoune/rc.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ lib
|
||||
, fish
|
||||
, writeScript
|
||||
, writeTextDir
|
||||
, prependRc ? ""
|
||||
, appendRc ? ""
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
source-pwd = writeScript "source-pwd" ''
|
||||
#!/usr/bin/env ${lib.getExe fish}
|
||||
|
||||
${builtins.readFile ./source-pwd.fish}
|
||||
'';
|
||||
in
|
||||
writeTextDir "share/kak/kakrc.local" ''
|
||||
${prependRc}
|
||||
${builtins.readFile ./kakrc}
|
||||
${appendRc}
|
||||
|
||||
# Source any settings in the current working directory,
|
||||
# recursive upwards
|
||||
evaluate-commands %sh{
|
||||
${source-pwd}
|
||||
}
|
||||
''
|
|
@ -1,5 +1,3 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
if test (pwd) = "/home/natsukagami/.config/kak"
|
||||
exit 0
|
||||
end
|
9
packages/common/nki-kakoune/themes.nix
Normal file
9
packages/common/nki-kakoune/themes.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ writeTextDir, ... }:
|
||||
let
|
||||
themes = [
|
||||
{ name = "catppuccin-latte"; src = ./themes/catppuccin-latte.kak; }
|
||||
];
|
||||
|
||||
themeToColorscheme = { name, src }: writeTextDir "share/kak/colors/${name}.kak" (builtins.readFile src);
|
||||
in
|
||||
builtins.map themeToColorscheme themes
|
7
packages/common/nki-kakoune/utils.nix
Normal file
7
packages/common/nki-kakoune/utils.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ lib, writeTextDir, ... }: {
|
||||
mkFacesScript = name: faces: writeTextDir "share/kak/autoload/${name}/faces.kak" ''
|
||||
hook global KakBegin .* %{
|
||||
${lib.concatStringsSep "\n" (builtins.attrValues (builtins.mapAttrs (name: face: " face global ${name} \"${face}\"") faces))}
|
||||
}
|
||||
'';
|
||||
}
|
Loading…
Add table
Reference in a new issue