Compare commits
41 commits
251fc88b64
...
cb800c9fa4
Author | SHA1 | Date | |
---|---|---|---|
|
cb800c9fa4 | ||
|
546d8fffb5 | ||
|
a6c34181b4 | ||
|
281fcad46f | ||
|
c6724e382b | ||
|
0f0c1649a2 | ||
|
8608362922 | ||
|
eb3d53b829 | ||
|
53cafeb021 | ||
|
87af0ae3ba | ||
|
22f6e123de | ||
|
6a924444c9 | ||
|
f636223a8c | ||
|
983a1fb071 | ||
|
a336f2dcd6 | ||
|
a86023efc7 | ||
|
96b6b8c954 | ||
|
bfaa5c00c5 | ||
|
e02b92e427 | ||
|
318abcfc80 | ||
|
9c5f0981a3 | ||
|
c080abeb6c | ||
|
770b47b6d4 | ||
|
ea331093bb | ||
|
56a8c33f9c | ||
|
28ce4a5feb | ||
|
7a893711dc | ||
|
840033ac1e | ||
|
f4a1a8e76c | ||
|
bd9604de5c | ||
|
abb7bd815c | ||
|
ab5fcfd802 | ||
|
48460fe71e | ||
|
dba80e2fd1 | ||
|
acf1e42b69 | ||
|
a3e4298d0a | ||
|
bfd19b166e | ||
|
924944f8fe | ||
|
e4aae3b8ae | ||
|
67f6aba9c5 | ||
|
07368dce7e |
181
flake.lock
181
flake.lock
|
@ -133,29 +133,17 @@
|
||||||
},
|
},
|
||||||
"crane_4": {
|
"crane_4": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": [
|
|
||||||
"lanzaboote",
|
|
||||||
"flake-compat"
|
|
||||||
],
|
|
||||||
"flake-utils": [
|
|
||||||
"lanzaboote",
|
|
||||||
"flake-utils"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"lanzaboote",
|
"lanzaboote",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
|
||||||
"rust-overlay": [
|
|
||||||
"lanzaboote",
|
|
||||||
"rust-overlay"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681177078,
|
"lastModified": 1717535930,
|
||||||
"narHash": "sha256-ZNIjBDou2GOabcpctiQykEQVkI8BDwk7TyvlWlI4myE=",
|
"narHash": "sha256-1hZ/txnbd/RmiBPNUs7i8UQw2N89uAK3UzrGAWdnFfU=",
|
||||||
"owner": "ipetkov",
|
"owner": "ipetkov",
|
||||||
"repo": "crane",
|
"repo": "crane",
|
||||||
"rev": "0c9f468ff00576577d83f5019a66c557ede5acf6",
|
"rev": "55e7754ec31dac78980c8be45f8a28e80e370946",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -319,11 +307,11 @@
|
||||||
"flake-compat_4": {
|
"flake-compat_4": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673956053,
|
"lastModified": 1696426674,
|
||||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -416,11 +404,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1680392223,
|
"lastModified": 1717285511,
|
||||||
"narHash": "sha256-n3g7QFr85lDODKt250rkZj2IFS3i4/8HBU2yKHO3tqw=",
|
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "dcc36e45d054d7bb554c9cdab69093debd91a0b5",
|
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -521,11 +509,11 @@
|
||||||
"systems": "systems_5"
|
"systems": "systems_5"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681202837,
|
"lastModified": 1710146030,
|
||||||
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
|
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -627,11 +615,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1660459072,
|
"lastModified": 1709087332,
|
||||||
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
|
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "gitignore.nix",
|
"repo": "gitignore.nix",
|
||||||
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
|
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -721,16 +709,16 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716736833,
|
"lastModified": 1733050161,
|
||||||
"narHash": "sha256-rNObca6dm7Qs524O4st8VJH6pZ/Xe1gxl+Rx6mcWYo0=",
|
"narHash": "sha256-lYnT+EYE47f5yY3KS/Kd4pJ6CO9fhCqumkYYkQ3TK20=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "a631666f5ec18271e86a5cde998cba68c33d9ac6",
|
"rev": "62d536255879be574ebfe9b87c4ac194febf47c5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "release-24.05",
|
"ref": "release-24.11",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
@ -742,11 +730,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731887066,
|
"lastModified": 1732884235,
|
||||||
"narHash": "sha256-uw7K/RsYioJicV79Nl39yjtfhdfTDU2aRxnBgvFhkZ8=",
|
"narHash": "sha256-r8j6R3nrvwbT1aUp4EPQ1KC7gm0pu9VcV1aNaB+XG6Q=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "f3a2ff69586f3a54b461526e5702b1a2f81e740a",
|
"rev": "819f682269f4e002884702b87e445c82840c68f2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -800,16 +788,16 @@
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1682802423,
|
"lastModified": 1718178907,
|
||||||
"narHash": "sha256-Fb5TeRTdvUlo/5Yi2d+FC8a6KoRLk2h1VE0/peMhWPs=",
|
"narHash": "sha256-eSZyrQ9uoPB9iPQ8Y5H7gAmAgAvCw3InStmU3oEjqsE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "lanzaboote",
|
"repo": "lanzaboote",
|
||||||
"rev": "64b903ca87d18cef2752c19c098af275c6e51d63",
|
"rev": "b627ccd97d0159214cee5c7db1412b75e4be6086",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "v0.3.0",
|
"ref": "v0.4.1",
|
||||||
"repo": "lanzaboote",
|
"repo": "lanzaboote",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
@ -1006,27 +994,27 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-stable_2": {
|
"nixpkgs-stable_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1678872516,
|
"lastModified": 1710695816,
|
||||||
"narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=",
|
"narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8",
|
"rev": "614b4613980a522ba49f0d194531beddbb7220d3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-22.11",
|
"ref": "nixos-23.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731890469,
|
"lastModified": 1734126203,
|
||||||
"narHash": "sha256-D1FNZ70NmQEwNxpSSdTXCSklBH1z2isPR84J6DQrJGs=",
|
"narHash": "sha256-0XovF7BYP50rTD2v4r55tR5MuBLet7q4xIz6Rgh3BBU=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5083ec887760adfe12af64830a66807423a859a7",
|
"rev": "71a6392e367b08525ee710a93af2e80083b5b3e2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -1052,6 +1040,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs_11": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1734424634,
|
||||||
|
"narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676300157,
|
"lastModified": 1676300157,
|
||||||
|
@ -1166,16 +1170,16 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_9": {
|
"nixpkgs_9": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731239293,
|
"lastModified": 1734083684,
|
||||||
"narHash": "sha256-q2yjIWFFcTzp5REWQUOU9L6kHdCDmFDpqeix86SOvDc=",
|
"narHash": "sha256-5fNndbndxSx5d+C/D0p/VF32xDiJCJzyOqorOYW4JEo=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "9256f7c71a195ebe7a218043d9f93390d49e6884",
|
"rev": "314e12ba369ccdb9b352a4db26ff419f7c49fa84",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-24.05",
|
"ref": "nixos-24.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
@ -1186,10 +1190,6 @@
|
||||||
"lanzaboote",
|
"lanzaboote",
|
||||||
"flake-compat"
|
"flake-compat"
|
||||||
],
|
],
|
||||||
"flake-utils": [
|
|
||||||
"lanzaboote",
|
|
||||||
"flake-utils"
|
|
||||||
],
|
|
||||||
"gitignore": "gitignore",
|
"gitignore": "gitignore",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"lanzaboote",
|
"lanzaboote",
|
||||||
|
@ -1198,11 +1198,11 @@
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2"
|
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681413034,
|
"lastModified": 1717664902,
|
||||||
"narHash": "sha256-/t7OjNQcNkeWeSq/CFLYVBfm+IEnkjoSm9iKvArnUUI=",
|
"narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "pre-commit-hooks.nix",
|
"repo": "pre-commit-hooks.nix",
|
||||||
"rev": "d3de8f69ca88fb6f8b09e5b598be5ac98d28ede5",
|
"rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -1235,7 +1235,8 @@
|
||||||
"rust-overlay": "rust-overlay_3",
|
"rust-overlay": "rust-overlay_3",
|
||||||
"secrets": "secrets",
|
"secrets": "secrets",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
"youmubot": "youmubot"
|
"youmubot": "youmubot",
|
||||||
|
"zen-browser": "zen-browser"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-analyzer-src": {
|
"rust-analyzer-src": {
|
||||||
|
@ -1267,11 +1268,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1682129965,
|
"lastModified": 1717813066,
|
||||||
"narHash": "sha256-1KRPIorEL6pLpJR04FwAqqnt4Tzcm4MqD84yhlD+XSk=",
|
"narHash": "sha256-wqbRwq3i7g5EHIui0bIi84mdqZ/It1AXBSLJ5tafD28=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "2c417c0460b788328220120c698630947547ee83",
|
"rev": "6dc3e45fe4aee36efeed24d64fc68b1f989d5465",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -1561,6 +1562,66 @@
|
||||||
"repo": "youmubot",
|
"repo": "youmubot",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"zen-browser": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs_11",
|
||||||
|
"zen-browser-aarch64": "zen-browser-aarch64",
|
||||||
|
"zen-browser-generic": "zen-browser-generic",
|
||||||
|
"zen-browser-specific": "zen-browser-specific"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1734667644,
|
||||||
|
"narHash": "sha256-vluyzRt6RikEn78Yk0t7Qd96iZZfyRBt4+ESI0mtlhk=",
|
||||||
|
"owner": "youwen5",
|
||||||
|
"repo": "zen-browser-flake",
|
||||||
|
"rev": "8c8af380bf45b42ae14b2f6d5252be3627332f23",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "youwen5",
|
||||||
|
"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",
|
"root": "root",
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
description = "nki's systems";
|
description = "nki's systems";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
nixos-hardware.url = "github:nixos/nixos-hardware";
|
nixos-hardware.url = "github:nixos/nixos-hardware";
|
||||||
darwin.url = "github:lnl7/nix-darwin/master";
|
darwin.url = "github:lnl7/nix-darwin/master";
|
||||||
darwin.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
darwin.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||||
home-manager.url = "github:nix-community/home-manager/release-24.05";
|
home-manager.url = "github:nix-community/home-manager/release-24.11";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
home-manager-unstable.url = "github:nix-community/home-manager";
|
home-manager-unstable.url = "github:nix-community/home-manager";
|
||||||
home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
# --- Secure boot
|
# --- Secure boot
|
||||||
lanzaboote = {
|
lanzaboote = {
|
||||||
url = github:nix-community/lanzaboote/v0.3.0;
|
url = github:nix-community/lanzaboote/v0.4.1;
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@
|
||||||
dtth-phanpy.url = "git+ssh://gitea@git.dtth.ch/nki-dtth/phanpy?ref=dtth-fork";
|
dtth-phanpy.url = "git+ssh://gitea@git.dtth.ch/nki-dtth/phanpy?ref=dtth-fork";
|
||||||
conduit.url = "gitlab:famedly/conduit/v0.9.0";
|
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";
|
||||||
|
|
||||||
# --- Sources
|
# --- Sources
|
||||||
kakoune.url = github:mawww/kakoune;
|
kakoune.url = github:mawww/kakoune;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./kakoune/kak.nix
|
./kakoune.nix
|
||||||
./fish/fish.nix
|
./fish/fish.nix
|
||||||
./modules/programs/my-broot.nix
|
./modules/programs/my-broot.nix
|
||||||
./modules/programs/my-sway
|
./modules/programs/my-sway
|
||||||
|
@ -26,6 +26,7 @@
|
||||||
ripgrep
|
ripgrep
|
||||||
openssh
|
openssh
|
||||||
tea # gitea CLI (gh-like)
|
tea # gitea CLI (gh-like)
|
||||||
|
glab # gitlab CLI
|
||||||
fx # JSON viewer
|
fx # JSON viewer
|
||||||
glow # Markdown viewer
|
glow # Markdown viewer
|
||||||
nix-output-monitor # Nice nix output formatting
|
nix-output-monitor # Nice nix output formatting
|
||||||
|
|
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,515 +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.typst-lsp = {
|
|
||||||
command = "typst-lsp";
|
|
||||||
filetypes = [ "typst" ];
|
|
||||||
roots = [ "main.typ" ".git" ];
|
|
||||||
settings_section = "typst-lsp";
|
|
||||||
settings.typst-lsp = {
|
|
||||||
experimentalFormatterMode = "on";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -131,6 +131,8 @@ in
|
||||||
"x-scheme-handler/feed" = [ "thunderbird.desktop" ];
|
"x-scheme-handler/feed" = [ "thunderbird.desktop" ];
|
||||||
"application/rss+xml" = [ "thunderbird.desktop" ];
|
"application/rss+xml" = [ "thunderbird.desktop" ];
|
||||||
"application/x-extension-rss" = [ "thunderbird.desktop" ];
|
"application/x-extension-rss" = [ "thunderbird.desktop" ];
|
||||||
|
"x-scheme-handler/tg2" = [ "org.telegram.desktop.desktop" ];
|
||||||
|
"x-scheme-handler/tonsite2" = [ "org.telegram.desktop.desktop" ];
|
||||||
};
|
};
|
||||||
xdg.mimeApps.defaultApplications = {
|
xdg.mimeApps.defaultApplications = {
|
||||||
# Email
|
# Email
|
||||||
|
@ -167,6 +169,10 @@ in
|
||||||
|
|
||||||
# Files
|
# Files
|
||||||
"inode/directory" = [ "dolphin.desktop" ];
|
"inode/directory" = [ "dolphin.desktop" ];
|
||||||
|
|
||||||
|
# Telegram
|
||||||
|
"x-scheme-handler/tg2" = "org.telegram.desktop.desktop";
|
||||||
|
"x-scheme-handler/tonsite2" = "org.telegram.desktop.desktop";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Add one for kakoune
|
# Add one for kakoune
|
||||||
|
|
|
@ -1,40 +1,17 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, options, pkgs, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.programs.my-kakoune;
|
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
|
in
|
||||||
{
|
{
|
||||||
imports = [ ./kak-lsp.nix ./fish-session.nix ./tree-sitter.nix ];
|
imports = [ ./fish-session.nix ./tree-sitter.nix ];
|
||||||
|
|
||||||
options.programs.my-kakoune = {
|
options.programs.my-kakoune = {
|
||||||
enable = mkEnableOption "My version of the kakoune configuration";
|
enable = mkEnableOption "My version of the kakoune configuration";
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
default = pkgs.kakoune;
|
default = pkgs.nki-kakoune;
|
||||||
description = "The kakoune package to be installed";
|
description = "The kakoune package to be installed";
|
||||||
};
|
};
|
||||||
rc = mkOption {
|
rc = mkOption {
|
||||||
|
@ -42,22 +19,16 @@ in
|
||||||
default = "";
|
default = "";
|
||||||
description = "Content of the kakrc file. A line-concatenated string";
|
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 {
|
extraFaces = mkOption {
|
||||||
type = types.attrsOf types.str;
|
type = types.attrsOf types.str;
|
||||||
default = { };
|
default = { };
|
||||||
description = "Extra faces to include";
|
description = "Extra faces to include";
|
||||||
};
|
};
|
||||||
|
autoloadFile = mkOption {
|
||||||
|
type = options.xdg.configFile.type;
|
||||||
|
default = { };
|
||||||
|
description = "Extra autoload files";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -65,37 +36,6 @@ in
|
||||||
|
|
||||||
xdg.configFile =
|
xdg.configFile =
|
||||||
let
|
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 =
|
kakouneFaces =
|
||||||
let
|
let
|
||||||
txt = strings.concatStringsSep "\n" (builtins.attrValues (builtins.mapAttrs (name: face: "face global ${name} \"${face}\"") cfg.extraFaces));
|
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;
|
pkgs.writeText "faces.kak" txt;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
"kak/autoload/builtin".source = "${cfg.package}/share/kak/autoload";
|
||||||
# kakrc
|
# kakrc
|
||||||
"kak/kakrc".text = ''
|
"kak/kakrc".text = ''
|
||||||
${cfg.rc}
|
${cfg.rc}
|
||||||
|
@ -110,15 +51,14 @@ in
|
||||||
# Load faces
|
# Load faces
|
||||||
source ${kakouneFaces}
|
source ${kakouneFaces}
|
||||||
'';
|
'';
|
||||||
} //
|
} // lib.mapAttrs'
|
||||||
(builtins.listToAttrs (lib.lists.flatten (map kakouneAutoload ([
|
(name: attrs: {
|
||||||
# include the original autoload files
|
name = "kak/autoload/${name}";
|
||||||
{
|
value = attrs // {
|
||||||
name = "rc";
|
target = "kak/autoload/${name}";
|
||||||
src = "${cfg.package}/share/kak/autoload/rc";
|
};
|
||||||
}
|
})
|
||||||
] ++ cfg.autoload))))
|
cfg.autoloadFile;
|
||||||
// kakouneThemes;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
in
|
||||||
{
|
{
|
||||||
options.programs.my-kakoune.tree-sitter = {
|
options.programs.my-kakoune.tree-sitter = {
|
||||||
|
@ -200,24 +221,15 @@ in
|
||||||
|
|
||||||
toml = pkgs.formats.toml { };
|
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; {
|
toLanguageConf = name: lang: with lang; {
|
||||||
grammar = {
|
grammar = {
|
||||||
inherit (grammar) path;
|
source.local.path = mkGrammarPackage {
|
||||||
source.git.url = "${mkGitRepo grammar.src}";
|
inherit name;
|
||||||
source.git.pin = "${srcName grammar.src}";
|
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 = grammar.compile.command;
|
||||||
compile_args = grammar.compile.args;
|
compile_args = grammar.compile.args;
|
||||||
compile_flags = grammar.compile.flags;
|
compile_flags = grammar.compile.flags;
|
||||||
|
@ -225,10 +237,9 @@ in
|
||||||
link_args = grammar.link.args ++ [ "-o" "${name}.so" ];
|
link_args = grammar.link.args ++ [ "-o" "${name}.so" ];
|
||||||
link_flags = grammar.link.flags;
|
link_flags = grammar.link.flags;
|
||||||
};
|
};
|
||||||
queries = {
|
queries = rec {
|
||||||
source.git.url = "${mkGitRepo queries.src}";
|
|
||||||
source.git.pin = "${srcName queries.src}";
|
|
||||||
path = if queries.path == null then "runtime/queries/${name}" else queries.path;
|
path = if queries.path == null then "runtime/queries/${name}" else queries.path;
|
||||||
|
source.local.path = "${queries.src}/${path}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
@ -249,14 +260,14 @@ in
|
||||||
features = cfg.features;
|
features = cfg.features;
|
||||||
language = builtins.mapAttrs toLanguageConf cfg.languages;
|
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.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>"
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,10 @@ let
|
||||||
osu-pkg = with pkgs; with lib;
|
osu-pkg = with pkgs; with lib;
|
||||||
appimageTools.wrapType2 rec {
|
appimageTools.wrapType2 rec {
|
||||||
pname = "osu-lazer-bin";
|
pname = "osu-lazer-bin";
|
||||||
version = "2024.1115.3";
|
version = "2024.1219.2";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/ppy/osu/releases/download/${version}/osu.AppImage";
|
url = "https://github.com/ppy/osu/releases/download/${version}/osu.AppImage";
|
||||||
sha256 = "sha256-kwZHy0FfOUFIWvyOj0ghlQz05U+Lnzl5TgC4T6bhm7o=";
|
hash = "sha256-gRUr7jf0+Xbfz8FurPk/o7F67TYisdNySNzVWEMb1es=";
|
||||||
};
|
};
|
||||||
extraPkgs = pkgs: with pkgs; [ icu ];
|
extraPkgs = pkgs: with pkgs; [ icu ];
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ let
|
||||||
mv -v $out/bin/${pname} $out/bin/osu\!
|
mv -v $out/bin/${pname} $out/bin/osu\!
|
||||||
install -m 444 -D ${contents}/osu\!.desktop -t $out/share/applications
|
install -m 444 -D ${contents}/osu\!.desktop -t $out/share/applications
|
||||||
for i in 16 32 48 64 96 128 256 512 1024; do
|
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
|
install -D ${contents}/osu.png $out/share/icons/hicolor/''${i}x$i/apps/osu.png
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -22,8 +22,8 @@ let
|
||||||
};
|
};
|
||||||
authentik = mkImage {
|
authentik = mkImage {
|
||||||
imageName = "ghcr.io/goauthentik/server";
|
imageName = "ghcr.io/goauthentik/server";
|
||||||
finalImageTag = "2024.8.2";
|
finalImageTag = "2024.1.0.4";
|
||||||
imageDigest = "sha256:71984fdbb7a9414f5172bb446104d3fe4ab1ab412c8b3343bb97b04449dd53eb";
|
imageDigest = "sha256:5843c56a56be58dcee8927c705f8c9def0af7189511c0e8e687d430f543b0f6d";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
authentikEnv = pkgs.writeText "authentik.env" ''
|
authentikEnv = pkgs.writeText "authentik.env" ''
|
||||||
|
@ -105,6 +105,7 @@ in
|
||||||
ports = [
|
ports = [
|
||||||
"127.0.0.1:${toString cfg.port}:9000"
|
"127.0.0.1:${toString cfg.port}:9000"
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
services.worker.service = {
|
services.worker.service = {
|
||||||
image = images.authentik;
|
image = images.authentik;
|
||||||
|
@ -123,6 +124,7 @@ in
|
||||||
AUTHENTIK_POSTGRESQL__NAME = "authentik";
|
AUTHENTIK_POSTGRESQL__NAME = "authentik";
|
||||||
};
|
};
|
||||||
env_file = [ cfg.envFile "${authentikEnv}" ];
|
env_file = [ cfg.envFile "${authentikEnv}" ];
|
||||||
|
user = "root";
|
||||||
};
|
};
|
||||||
docker-compose.volumes = {
|
docker-compose.volumes = {
|
||||||
database.driver = "local";
|
database.driver = "local";
|
||||||
|
|
|
@ -26,15 +26,13 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
graphics = { config, ... }: {
|
graphics = { config, pkgs, ... }: {
|
||||||
hardware =
|
hardware.graphics.enable = true;
|
||||||
if config.system.nixos.release == "24.05" then {
|
hardware.graphics.enable32Bit = true;
|
||||||
opengl.enable = true;
|
# Monitor backlight
|
||||||
opengl.driSupport32Bit = true;
|
hardware.i2c.enable = true;
|
||||||
} else {
|
services.ddccontrol.enable = true;
|
||||||
graphics.enable = true;
|
environment.systemPackages = [ pkgs.luminance pkgs.ddcutil ];
|
||||||
graphics.enable32Bit = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
accounts = { pkgs, ... }: mkIf (config.common.linux.enable && !pkgs.stdenv.isAarch64) {
|
accounts = { pkgs, ... }: mkIf (config.common.linux.enable && !pkgs.stdenv.isAarch64) {
|
||||||
|
@ -71,6 +69,7 @@ let
|
||||||
virtualisation = { pkgs, ... }: mkIf cfg.enable {
|
virtualisation = { pkgs, ... }: mkIf cfg.enable {
|
||||||
virtualisation.podman = {
|
virtualisation.podman = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
extraPackages = [ pkgs.slirp4netns ];
|
||||||
dockerCompat = true;
|
dockerCompat = true;
|
||||||
defaultNetwork.settings.dns_enabled = true;
|
defaultNetwork.settings.dns_enabled = true;
|
||||||
};
|
};
|
||||||
|
@ -88,7 +87,7 @@ let
|
||||||
enable = true;
|
enable = true;
|
||||||
# defaults (no need to be set unless modified)
|
# defaults (no need to be set unless modified)
|
||||||
quantum = 32;
|
quantum = 32;
|
||||||
rate = 48000;
|
rate = 44100;
|
||||||
};
|
};
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
|
@ -240,6 +239,8 @@ in
|
||||||
"wheel" # Enable ‘sudo’ for the user.
|
"wheel" # Enable ‘sudo’ for the user.
|
||||||
"plugdev" # Enable openrazer-daemon privileges
|
"plugdev" # Enable openrazer-daemon privileges
|
||||||
"audio"
|
"audio"
|
||||||
|
"video"
|
||||||
|
"input"
|
||||||
];
|
];
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,13 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
let
|
||||||
|
nerd-fonts =
|
||||||
|
if builtins.hasAttr "nerd-fonts" pkgs then
|
||||||
|
pkgs.nerd-fonts.symbols-only
|
||||||
|
else
|
||||||
|
pkgs.nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; };
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [ ./mounting.nix ];
|
imports = [ ./mounting.nix ];
|
||||||
# Fonts
|
# Fonts
|
||||||
|
@ -8,7 +15,7 @@ with lib;
|
||||||
packages = with pkgs; mkForce [
|
packages = with pkgs; mkForce [
|
||||||
noto-fonts-emoji-blob-bin
|
noto-fonts-emoji-blob-bin
|
||||||
ibm-plex
|
ibm-plex
|
||||||
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
|
nerd-fonts
|
||||||
noto-fonts
|
noto-fonts
|
||||||
(pkgs.noto-fonts-cjk-sans or pkgs.noto-fonts-cjk)
|
(pkgs.noto-fonts-cjk-sans or pkgs.noto-fonts-cjk)
|
||||||
merriweather
|
merriweather
|
||||||
|
|
|
@ -39,7 +39,7 @@ in
|
||||||
|
|
||||||
services.harmonia = mkIf cfg.enableServer {
|
services.harmonia = mkIf cfg.enableServer {
|
||||||
enable = true;
|
enable = true;
|
||||||
signKeyPath = cfg.privateKeyFile;
|
signKeyPaths = [ cfg.privateKeyFile ];
|
||||||
settings = {
|
settings = {
|
||||||
bind = bindAddr;
|
bind = bindAddr;
|
||||||
priority = 45;
|
priority = 45;
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.kernelPackages = pkgs.linuxPackages; # until mesa fixed
|
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
# Hibernation
|
# Hibernation
|
||||||
"resume=UUID=fa8aaf51-b99f-4fb4-9230-8c0957d8af3f"
|
"resume=UUID=fa8aaf51-b99f-4fb4-9230-8c0957d8af3f"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
environment.etc = {
|
environment.etc = {
|
||||||
"wireplumber/main.lua.d/51-sdac.lua".source = ./sdac.lua;
|
"wireplumber/wireplumber.conf.d/51-sdac.conf".source = ./sdac.conf.json;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
19
nki-home/audio/sdac.conf.json
Normal file
19
nki-home/audio/sdac.conf.json
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
monitor.alsa.rules = [
|
||||||
|
{
|
||||||
|
matches = [
|
||||||
|
{
|
||||||
|
device.name = "alsa_output.usb-Grace_Design_SDAC-00.*"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
actions = {
|
||||||
|
update-props = {
|
||||||
|
# audio.format = "S24_3LE"
|
||||||
|
audio.rate = 88200
|
||||||
|
api.alsa.period-size = 2
|
||||||
|
api.alsa.headroom = 0
|
||||||
|
api.alsa.disable-batch = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
|
@ -6,7 +6,7 @@ rule = {
|
||||||
},
|
},
|
||||||
apply_properties = {
|
apply_properties = {
|
||||||
["audio.format"] = "S24_3LE",
|
["audio.format"] = "S24_3LE",
|
||||||
["audio.rate"] = 96000,
|
["audio.rate"] = 44100,
|
||||||
["api.alsa.period-size"] = 2,
|
["api.alsa.period-size"] = 2,
|
||||||
["api.alsa.headroom"] = 0,
|
["api.alsa.headroom"] = 0,
|
||||||
["api.alsa.disable-batch"] = true
|
["api.alsa.disable-batch"] = true
|
||||||
|
|
|
@ -5,6 +5,16 @@
|
||||||
{ lib, config, pkgs, ... }:
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
let
|
||||||
|
openrazer = { pkgs, ... }: {
|
||||||
|
# Razer stuff
|
||||||
|
hardware.openrazer = {
|
||||||
|
enable = true;
|
||||||
|
users = [ "nki" ];
|
||||||
|
};
|
||||||
|
environment.systemPackages = with pkgs; [ polychromatic ];
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
|
@ -17,6 +27,7 @@ with lib;
|
||||||
# Other services
|
# Other services
|
||||||
../modules/personal/u2f.nix
|
../modules/personal/u2f.nix
|
||||||
./peertube-runner.nix
|
./peertube-runner.nix
|
||||||
|
openrazer
|
||||||
];
|
];
|
||||||
|
|
||||||
# Kernel
|
# Kernel
|
||||||
|
@ -181,5 +192,13 @@ with lib;
|
||||||
passwordFile = config.sops.secrets."scrobble/listenbrainz".path;
|
passwordFile = config.sops.secrets."scrobble/listenbrainz".path;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.virt-manager.enable = true;
|
||||||
|
|
||||||
|
users.groups.libvirtd.members = [ "nki" ];
|
||||||
|
|
||||||
|
virtualisation.libvirtd.enable = true;
|
||||||
|
|
||||||
|
virtualisation.spiceUSBRedirection.enable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
./owncast.nix
|
./owncast.nix
|
||||||
./peertube.nix
|
./peertube.nix
|
||||||
./outline.nix
|
./outline.nix
|
||||||
|
./vikunja.nix
|
||||||
|
./n8n.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
system.stateVersion = "21.11";
|
system.stateVersion = "21.11";
|
||||||
|
@ -60,6 +62,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
virtualisation.docker.extraOptions = "--data-root /mnt/data/docker";
|
||||||
|
|
||||||
services.do-agent.enable = true;
|
services.do-agent.enable = true;
|
||||||
|
|
||||||
|
@ -151,7 +154,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Mail
|
# Mail
|
||||||
sops.secrets.mail-users = { owner = "maddy"; };
|
sops.secrets.mail-users = { owner = "maddy"; reloadUnits = [ "maddy.service" ]; };
|
||||||
cloud.mail = {
|
cloud.mail = {
|
||||||
enable = true;
|
enable = true;
|
||||||
debug = true;
|
debug = true;
|
||||||
|
|
|
@ -180,7 +180,6 @@ in
|
||||||
MINIO_USE_SSL = "true";
|
MINIO_USE_SSL = "true";
|
||||||
MINIO_ENDPOINT = "60c0807121eb35ef52cdcd4a33735fa6.r2.cloudflarestorage.com";
|
MINIO_ENDPOINT = "60c0807121eb35ef52cdcd4a33735fa6.r2.cloudflarestorage.com";
|
||||||
MINIO_ACCESS_KEY_ID = "704c29ade7a8b438b77ab520da2799ca";
|
MINIO_ACCESS_KEY_ID = "704c29ade7a8b438b77ab520da2799ca";
|
||||||
MINIO_SECRET_ACCESS_KEY = "#miniosecretkey#";
|
|
||||||
MINIO_BUCKET = "dtth-gitea";
|
MINIO_BUCKET = "dtth-gitea";
|
||||||
MINIO_LOCATION = "auto";
|
MINIO_LOCATION = "auto";
|
||||||
MINIO_CHECKSUM_ALGORITHM = "md5"; # R2 moment
|
MINIO_CHECKSUM_ALGORITHM = "md5"; # R2 moment
|
||||||
|
@ -192,7 +191,8 @@ in
|
||||||
|
|
||||||
stateDir = "/mnt/data/gitea";
|
stateDir = "/mnt/data/gitea";
|
||||||
|
|
||||||
mailerPasswordFile = secrets."gitea/mailer-password".path;
|
secrets.mailer.PASSWD = secrets."gitea/mailer-password".path;
|
||||||
|
secrets.storage.MINIO_SECRET_ACCESS_KEY = config.sops.secrets."gitea/minio-secret-key".path;
|
||||||
|
|
||||||
database = {
|
database = {
|
||||||
inherit user;
|
inherit user;
|
||||||
|
@ -216,14 +216,7 @@ in
|
||||||
# https://github.com/NixOS/nixpkgs/commit/93c1d370db28ad4573fb9890c90164ba55391ce7
|
# https://github.com/NixOS/nixpkgs/commit/93c1d370db28ad4573fb9890c90164ba55391ce7
|
||||||
serviceConfig.SystemCallFilter = mkForce "~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @setuid @swap";
|
serviceConfig.SystemCallFilter = mkForce "~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @setuid @swap";
|
||||||
preStart =
|
preStart =
|
||||||
let
|
|
||||||
configFile = "${config.services.forgejo.customDir}/conf/app.ini";
|
|
||||||
in
|
|
||||||
''
|
''
|
||||||
# Update minio secret key
|
|
||||||
chmod u+w ${configFile} && \
|
|
||||||
${lib.getExe pkgs.replace-secret} '#miniosecretkey#' '${config.sops.secrets."gitea/minio-secret-key".path}' '${configFile}' && \
|
|
||||||
chmod u-w ${configFile}
|
|
||||||
# Import the signing subkey
|
# Import the signing subkey
|
||||||
if cat ${config.services.forgejo.stateDir}/.gnupg/gpg.conf | grep -q ${signingKey}; then
|
if cat ${config.services.forgejo.stateDir}/.gnupg/gpg.conf | grep -q ${signingKey}; then
|
||||||
echo "Keys already imported"
|
echo "Keys already imported"
|
||||||
|
|
|
@ -27,7 +27,8 @@ rec {
|
||||||
noCloudflare = true;
|
noCloudflare = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.headscale.requires = [ "postgresql.service" ];
|
systemd.services.headscale.requires = [ "postgresql.service" "arion-authentik.service" ];
|
||||||
|
systemd.services.headscale.after = [ "postgresql.service" "arion-authentik.service" ];
|
||||||
services.headscale = {
|
services.headscale = {
|
||||||
enable = true;
|
enable = true;
|
||||||
inherit port;
|
inherit port;
|
||||||
|
@ -35,23 +36,25 @@ rec {
|
||||||
settings = {
|
settings = {
|
||||||
server_url = "https://hs.dtth.ch";
|
server_url = "https://hs.dtth.ch";
|
||||||
|
|
||||||
db_type = "postgres";
|
database.type = "postgres";
|
||||||
db_host = "/var/run/postgresql"; # find out yourself
|
database.postgres = {
|
||||||
db_user = "headscale";
|
host = "/var/run/postgresql"; # find out yourself
|
||||||
db_name = "headscale";
|
user = "headscale";
|
||||||
|
name = "headscale";
|
||||||
|
};
|
||||||
|
|
||||||
dns_config = {
|
dns = {
|
||||||
base_domain = host;
|
base_domain = "dtth.ts";
|
||||||
};
|
};
|
||||||
|
|
||||||
noise = {
|
noise = {
|
||||||
private_key_path = "/var/lib/headscale/noise_private.key";
|
private_key_path = "/var/lib/headscale/noise_private.key";
|
||||||
};
|
};
|
||||||
|
|
||||||
ip_prefixes = [
|
prefixes = {
|
||||||
"fd7a:115c:a1e0::/48"
|
v6 = "fd7a:115c:a1e0::/48";
|
||||||
"100.64.0.0/10"
|
v4 = "100.64.0.0/10";
|
||||||
];
|
};
|
||||||
|
|
||||||
derp.paths = [
|
derp.paths = [
|
||||||
secrets."headscale/derp-servers/vnm".path
|
secrets."headscale/derp-servers/vnm".path
|
||||||
|
|
|
@ -42,7 +42,7 @@ in
|
||||||
systemd.services.miniflux = {
|
systemd.services.miniflux = {
|
||||||
description = "Miniflux service";
|
description = "Miniflux service";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" "postgresql.service" ];
|
||||||
requires = [ "postgresql.service" ];
|
requires = [ "postgresql.service" ];
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
|
78
nki-personal-do/n8n.nix
Normal file
78
nki-personal-do/n8n.nix
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
secrets = config.sops.secrets;
|
||||||
|
|
||||||
|
host = "n8n.dtth.ch";
|
||||||
|
db = "n8n";
|
||||||
|
user = db;
|
||||||
|
port = 23412;
|
||||||
|
|
||||||
|
dataFolder = "/mnt/data/n8n";
|
||||||
|
|
||||||
|
plugins = pkgs.callPackage ./n8n/plugins/package.nix { };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
sops.secrets."n8n/env" = { reloadUnits = [ "n8n.service" ]; };
|
||||||
|
cloud.postgresql.databases = [ db ];
|
||||||
|
cloud.traefik.hosts.n8n = {
|
||||||
|
inherit port host;
|
||||||
|
};
|
||||||
|
|
||||||
|
# users
|
||||||
|
users.users."${user}" = {
|
||||||
|
group = "${user}";
|
||||||
|
isSystemUser = true;
|
||||||
|
};
|
||||||
|
users.groups."${user}" = { };
|
||||||
|
|
||||||
|
services.n8n = {
|
||||||
|
enable = true;
|
||||||
|
webhookUrl = "https://${host}";
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.n8n = {
|
||||||
|
environment = {
|
||||||
|
# Database
|
||||||
|
DB_TYPE = "postgresdb";
|
||||||
|
DB_POSTGRESDB_DATABASE = db;
|
||||||
|
DB_POSTGRESDB_HOST = "/var/run/postgresql";
|
||||||
|
DB_POSTGRESDB_USER = db;
|
||||||
|
# Deployment
|
||||||
|
N8N_EDITOR_BASE_URL = "https://${host}";
|
||||||
|
N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS = "true";
|
||||||
|
N8N_USER_FOLDER = lib.mkForce dataFolder;
|
||||||
|
HOME = lib.mkForce dataFolder;
|
||||||
|
N8N_HOST = host;
|
||||||
|
N8N_PORT = toString port;
|
||||||
|
N8N_LISTEN_ADDRESS = "127.0.0.1";
|
||||||
|
N8N_HIRING_BANNER_ENABLED = "false";
|
||||||
|
N8N_PROXY_HOPS = "1";
|
||||||
|
# Logs
|
||||||
|
N8N_LOG_LEVEL = "debug";
|
||||||
|
# License
|
||||||
|
N8N_HIDE_USAGE_PAGE = "true";
|
||||||
|
# Security
|
||||||
|
N8N_BLOCK_ENV_ACCESS_IN_NODE = "true";
|
||||||
|
# Timezone
|
||||||
|
GENERIC_TIMEZONE = "Europe/Berlin";
|
||||||
|
};
|
||||||
|
serviceConfig = {
|
||||||
|
EnvironmentFile = [ secrets."n8n/env".path ];
|
||||||
|
User = user;
|
||||||
|
DynamicUser = lib.mkForce false;
|
||||||
|
ReadWritePaths = [ dataFolder ];
|
||||||
|
# ReadOnlyPaths = [ "/var/run/postgresql" ];
|
||||||
|
};
|
||||||
|
unitConfig.RequiresMountsFor = [ dataFolder ];
|
||||||
|
};
|
||||||
|
systemd.tmpfiles.settings."10-n8n" = {
|
||||||
|
${dataFolder}.d = {
|
||||||
|
user = user;
|
||||||
|
group = user;
|
||||||
|
mode = "0700";
|
||||||
|
};
|
||||||
|
"${dataFolder}/.n8n/nodes"."L+" = {
|
||||||
|
argument = "${plugins}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
1
nki-personal-do/n8n/plugins/.gitignore
vendored
Normal file
1
nki-personal-do/n8n/plugins/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
node_modules
|
1678
nki-personal-do/n8n/plugins/package-lock.json
generated
Normal file
1678
nki-personal-do/n8n/plugins/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
8
nki-personal-do/n8n/plugins/package.json
Normal file
8
nki-personal-do/n8n/plugins/package.json
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"name": "n8n-plugins",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"dependencies": {
|
||||||
|
"n8n-nodes-turndown-html-to-markdown": "^1.0.5",
|
||||||
|
"n8n-nodes-vikunja": "^0.2.0"
|
||||||
|
}
|
||||||
|
}
|
4
nki-personal-do/n8n/plugins/package.nix
Normal file
4
nki-personal-do/n8n/plugins/package.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{ nodejs, importNpmLock }: importNpmLock.buildNodeModules {
|
||||||
|
inherit nodejs;
|
||||||
|
npmRoot = ./.;
|
||||||
|
}
|
|
@ -3,7 +3,9 @@ let
|
||||||
secrets = config.sops.secrets;
|
secrets = config.sops.secrets;
|
||||||
cfg = config.services.peertube;
|
cfg = config.services.peertube;
|
||||||
|
|
||||||
|
user = "peertube";
|
||||||
host = "peertube.dtth.ch";
|
host = "peertube.dtth.ch";
|
||||||
|
dataFolder = "/mnt/data/peertube";
|
||||||
port = 19878;
|
port = 19878;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -57,12 +59,6 @@ in
|
||||||
settings.client.videos = {
|
settings.client.videos = {
|
||||||
resumable_upload.max_chunk_size = "90MB";
|
resumable_upload.max_chunk_size = "90MB";
|
||||||
};
|
};
|
||||||
settings.storage = {
|
|
||||||
storyboards = "/var/lib/peertube/storage/storyboards/";
|
|
||||||
tmp = "/mnt/data/peertube/tmp/";
|
|
||||||
tmp_persistent = "/mnt/data/peertube/tmp_persistent/";
|
|
||||||
web_videos = "/mnt/data/peertube/web-videos/";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Trust proxy
|
# Trust proxy
|
||||||
settings.trust_proxy = [ "loopback" ] ++ config.services.traefik.staticConfigOptions.entrypoints.https.forwardedHeaders.trustedIPs;
|
settings.trust_proxy = [ "loopback" ] ++ config.services.traefik.staticConfigOptions.entrypoints.https.forwardedHeaders.trustedIPs;
|
||||||
|
@ -76,5 +72,22 @@ in
|
||||||
|
|
||||||
dataDirs = [ "/var/lib/peertube" "/mnt/data/peertube" ];
|
dataDirs = [ "/var/lib/peertube" "/mnt/data/peertube" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.peertube = {
|
||||||
|
requires = [ "arion-authentik.service" ];
|
||||||
|
after = [ "arion-authentik.service" ];
|
||||||
|
unitConfig.RequiresMountsFor = [ dataFolder ];
|
||||||
|
};
|
||||||
|
systemd.tmpfiles.settings."10-peertube" = {
|
||||||
|
# The service hard-codes a lot of paths here, so it's nicer if we just symlink
|
||||||
|
"/var/lib/peertube"."L+" = {
|
||||||
|
argument = dataFolder;
|
||||||
|
};
|
||||||
|
${dataFolder}."d" = {
|
||||||
|
user = user;
|
||||||
|
group = user;
|
||||||
|
mode = "0700";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ authentik-oidc-client-secret: ENC[AES256_GCM,data:lD/xyU87nik68JX+T2H3Gw5ZqsSGzX
|
||||||
cloudflare-dns-api-token: ENC[AES256_GCM,data:2ny3JehpK30fTUDKrbzHv1QOczriChRyMQn6kNPULpUJ+eVwdptLvg==,iv:8wNAn3oawzLez7sO4ZvhFXcaZIpFVKgKCvTBlszFHn8=,tag:fRaO+u/5MtAWnTiy2Zwh0Q==,type:str]
|
cloudflare-dns-api-token: ENC[AES256_GCM,data:2ny3JehpK30fTUDKrbzHv1QOczriChRyMQn6kNPULpUJ+eVwdptLvg==,iv:8wNAn3oawzLez7sO4ZvhFXcaZIpFVKgKCvTBlszFHn8=,tag:fRaO+u/5MtAWnTiy2Zwh0Q==,type:str]
|
||||||
#ENC[AES256_GCM,data:KWrVRQg+cLm5MUdfsYrh7hkI4CWkl4Z0sDj0769eebeXDy+veixrQrxh1ZW+ro3WLwoIdU/IH5DPM4TWYn2qoM5aDHjGX764pr1x,iv:uZHBsGvSHv9vd/Wragl1dYNJ+8vCcMit2K3SrMFlz7s=,tag:7z4LyADfQvXsM2vvtWru8w==,type:comment]
|
#ENC[AES256_GCM,data:KWrVRQg+cLm5MUdfsYrh7hkI4CWkl4Z0sDj0769eebeXDy+veixrQrxh1ZW+ro3WLwoIdU/IH5DPM4TWYn2qoM5aDHjGX764pr1x,iv:uZHBsGvSHv9vd/Wragl1dYNJ+8vCcMit2K3SrMFlz7s=,tag:7z4LyADfQvXsM2vvtWru8w==,type:comment]
|
||||||
traefik-dashboard-users: ENC[AES256_GCM,data:kviapOq+xzxhjryse+5DaZbXRS/LEYyjqqFbHymXAZVEkWlu0T5pZ2bxSNCbXN+tXnb0u+6YPgGCaRNPLW74AF1hO8W8QqlLDA==,iv:41bwPyFQcuOLILTjLWUu5Kcnct/MaIIJsMbllc+n7Y0=,tag:17HyUjfRUcLGb0FrUm1O2A==,type:str]
|
traefik-dashboard-users: ENC[AES256_GCM,data:kviapOq+xzxhjryse+5DaZbXRS/LEYyjqqFbHymXAZVEkWlu0T5pZ2bxSNCbXN+tXnb0u+6YPgGCaRNPLW74AF1hO8W8QqlLDA==,iv:41bwPyFQcuOLILTjLWUu5Kcnct/MaIIJsMbllc+n7Y0=,tag:17HyUjfRUcLGb0FrUm1O2A==,type:str]
|
||||||
mail-users: ENC[AES256_GCM,data:qKLi42k8LT6ojxbPXQgbi6FlI2I6ge6qJn0aNj/Lp9iRjjnnuArdsLJTfBMB7rPUyKWELa7jPrh8cHzJZZX7PsaXt1x07tQrVitKY6aDMpmb0pdU5TsvRTNhMV8lNWDrQeDXMV3hfigFXDU9YYRowllTJn8Uh5m20oGm8xjQrc55pPd2mDRWUt8WdJYGIYvXJ4Dyc+kXwibFC5xb0+7sLIPOcL8SkurMk0v2E63oBvoR089ZOhgWZ2DtqsUF7cGMcEDj6D6GcH2tlIkhTXo/na0b6caK6/mSIHbz/cfeVD/kdphC+q9edqm5UAAm5SaBDsar5vrXZcgQfD3/iEDHpqfdNJQv7Jt1l4vfwSY6nx3BgjggAZpL7YKXME+5Qqrp/epSegailDled5GUOlXKtomzixTA4OsgTjhMFPPOR/GiBuNIbYoGWnnR6Zs6l9Nw5ITJXKFgwNQTZVkndvQcr1Bw6nQqBDXt1qgmTdKTtNkrWEfgyYBnJtQW6qS+rZL8RB1x9Rjnu5PE+ao4YzrZEnKcenlWRh7+1GUdkRPm5qJWAMnuT1LkBdUx4bUPGf1D8iQ12kMLa5NnMQMq4Yek,iv:fTsBB5yZYi47dk8JIDs1JmgtnK8dOhkNt481vqAU+ME=,tag:pAXBSgzPB8nDdAO9YXM02A==,type:str]
|
mail-users: ENC[AES256_GCM,data:4ugvUKK1Hxlnt/bTrAe7pEt5Ehla6yfCzeeZkwaXGN0rlYO3zIFz2paajuFDVoZ1UOntxgdoL/bmS55SkvinQybzQqK+1HUb5N4esODZyJkf8qhacBjjUnDq2sK0GXmoWRoR36ny4haRTbfzTxoVph+Y81P6+T7etnMuARM55i/kWCTcKyin9WKkllLF8vEi6MdbvDj5fwVSxKYQZk2Ti4xY+hCGkEUFL3S2l4Hgbzt2irV0ccjU4+GXSrRepFWSakvDl0fuQf0N3oXMQWCYkRqsoPdtV/n1+C1all9HWtA4XNcnNHlPk7bbi51gO3fSQwmayrgsqO4QAIKY2oJMCrMOabvSjRF8pjR/WFqEMN6fLOCByPYTtej2JEDZ0mg/uQIuIh+Us+QIO/ulMSK+Cq4WTBsmN0V9tYucp1vNv2xzuLUN4GkHc0tRZ6jIVPFUCIGEgw9x7qVPNqFPgr4RFzGGP12746+UwHqDuBIz4od47aQMNrXJOD9xbX7mp54bqwkdASIP/5iBAsnzRDhg/9hHMkJrhPjzrGC4feVNYzI9yo+v0cOPworKYuSfk6KYX5SGu2HgcgCG7zGRL4/NoytNwDGoqBKWA81Xuyp9+vMFF//nm5bKQH6Zt2gVaMViyqKZrTkITrOZMaMKVkOeiJdQQpsM1jqU5ygsrHIq9jc8BJ2MbK8WW2wlfovAo2MNtSN68LknoWiMbEuRXIcC8rhvdVX9C++XT/JQH+kHwg==,iv:059jHrKniQmw2H45FDz/5DJqeTzKdsg9a51pX3FxvHE=,tag:aCMJOFv8PWtz80ouUqUCGA==,type:str]
|
||||||
youmubot-env: ENC[AES256_GCM,data:EQ9e6lmCrjofHiHyN5Qe4b2oplP9/3JKl0vuFp54Hw9aYIS7j3nqzWLCvV54ZK7j1PcQ+CQorjeCVMV0TUy1f1Pf3qjrLkdOdV7ICq540gdfXOeXuhAx2EILpGkwIYOdKmTMSO3l2QkOlM02RNOn1lq/DogAydkEq7gJ7qSWnUEr45oNCa1+LamH8vcbDmIyzUWWXyA5EQ==,iv:fnNGZ6OaZ4D71SvWPRynsMpO1IsvxjQ3XtrswNSY+Wo=,tag:cN/ZnKrjSfD6AbU9pYNl+Q==,type:str]
|
youmubot-env: ENC[AES256_GCM,data:EQ9e6lmCrjofHiHyN5Qe4b2oplP9/3JKl0vuFp54Hw9aYIS7j3nqzWLCvV54ZK7j1PcQ+CQorjeCVMV0TUy1f1Pf3qjrLkdOdV7ICq540gdfXOeXuhAx2EILpGkwIYOdKmTMSO3l2QkOlM02RNOn1lq/DogAydkEq7gJ7qSWnUEr45oNCa1+LamH8vcbDmIyzUWWXyA5EQ==,iv:fnNGZ6OaZ4D71SvWPRynsMpO1IsvxjQ3XtrswNSY+Wo=,tag:cN/ZnKrjSfD6AbU9pYNl+Q==,type:str]
|
||||||
outline:
|
outline:
|
||||||
smtp-password: ENC[AES256_GCM,data:zpIi6jVB2Y7ksBOR8SGFgjOD1x3aS6dKa6taLKB8v2l9p92iWDti75qgB1puglmmq8mCzz8KXLrM0Bv7W8GWRg==,iv:6tKINzQcApmNuIbNn0kSzFJtwn3rky/uFG2Ff3lazUk=,tag:kjB6qB87tRQVpy32Pt3D5A==,type:str]
|
smtp-password: ENC[AES256_GCM,data:zpIi6jVB2Y7ksBOR8SGFgjOD1x3aS6dKa6taLKB8v2l9p92iWDti75qgB1puglmmq8mCzz8KXLrM0Bv7W8GWRg==,iv:6tKINzQcApmNuIbNn0kSzFJtwn3rky/uFG2Ff3lazUk=,tag:kjB6qB87tRQVpy32Pt3D5A==,type:str]
|
||||||
|
@ -42,6 +42,11 @@ peertube: ENC[AES256_GCM,data:YWySVZVTC26qPMcgSV5v4Vp1u69jGt7VV2ElQBSxvG/R589PCJ
|
||||||
peertube-env: ENC[AES256_GCM,data:ZrWBwSfMuepIYTzHVCCSnpsXb+MTcOfklI0O/UdcGaR3RzO1R+/wXQcFlV46g9dvKLMOaH7bxrHeWxqPh/7hlPEYFYwlbwcX31MGiSeRyeR5YtVi0CmhiGRA3l8X5NMCpvZmNhnjYNuri/My86SMkjhuaFQ5+BjYISoJ5WnbNSqE9qgQKuJVu64hsOgaQQbmaBL/LU7Pv/vushbNg421kdbRnzCPcc3IzkVzsFsgYH2fdEJa3gE8M63eLn99PbA+e5cWEwGNkuoNuro2tnaMaX1PM6iTF+q0A8HbiEioNMRIdD9czatgF7EwKgCFNu44cm2lp/c5qj+Lm/nC,iv:+MjpreGr9M+Oe5DrDe5SIBKtLuIqtb0a50YvGhDZT2Y=,tag:gYGlMcgWwa1ZpbQb4XfMmQ==,type:str]
|
peertube-env: ENC[AES256_GCM,data:ZrWBwSfMuepIYTzHVCCSnpsXb+MTcOfklI0O/UdcGaR3RzO1R+/wXQcFlV46g9dvKLMOaH7bxrHeWxqPh/7hlPEYFYwlbwcX31MGiSeRyeR5YtVi0CmhiGRA3l8X5NMCpvZmNhnjYNuri/My86SMkjhuaFQ5+BjYISoJ5WnbNSqE9qgQKuJVu64hsOgaQQbmaBL/LU7Pv/vushbNg421kdbRnzCPcc3IzkVzsFsgYH2fdEJa3gE8M63eLn99PbA+e5cWEwGNkuoNuro2tnaMaX1PM6iTF+q0A8HbiEioNMRIdD9czatgF7EwKgCFNu44cm2lp/c5qj+Lm/nC,iv:+MjpreGr9M+Oe5DrDe5SIBKtLuIqtb0a50YvGhDZT2Y=,tag:gYGlMcgWwa1ZpbQb4XfMmQ==,type:str]
|
||||||
nix-build-farm:
|
nix-build-farm:
|
||||||
private-key: ENC[AES256_GCM,data:bYQ5TAHgJ8rZmmnp0ZW9pM3p6e2ewAqz9+clp2lDnvPsU/YHr/POSW+UESvulT0UDI8t5th71py2G4BG3z9PdPaWw2iSm6hW3VITYCGYvLbF2yK6anSkww0ilpjwm5NXKJLTiPehkAqsZlZsAxeYw5bF0+7JjeH9+49jLOXtGD0uFSf5M3wVZcObzSYsdGaNKGYkokBYeZii1tdwZvAuUKKZ1eOvDAz5v6hjqZA7brDWr5IZXNCqRZOdyGQ5g3UP4o5XFnl57d1RAmKPK9WaTCjbi0hMfms4zldqGeXTRDAhvqMH2w/BY7KvgIOr+aQelTvQbOciq+DaZbzNgdI5gqrSUA19EEL04Qu/gjoVGwMhZ7Lq9+yS2Lb+xdhmn/99sbcRjaRqqjgzHRvbyirPT9EuEAdrijyuZzY9kASv8LN/Q8cawRZNk2vf0M8Qzg0F7iw2kcDrf+dwdcyrrAbg2XDlGsFBckBcPKA44PkOPtFLHZRU9pSpd15rL1JIes6m2YX7AmJFP2+FA5WjXQoqF+CRhBVUWXaXAmcq,iv:7Uqnu2xEcHotczRzIcDfq9bM7wNXdz0Fg2HNpxlV1/Q=,tag:w5aLsT9LN92+83rdP2YJTg==,type:str]
|
private-key: ENC[AES256_GCM,data:bYQ5TAHgJ8rZmmnp0ZW9pM3p6e2ewAqz9+clp2lDnvPsU/YHr/POSW+UESvulT0UDI8t5th71py2G4BG3z9PdPaWw2iSm6hW3VITYCGYvLbF2yK6anSkww0ilpjwm5NXKJLTiPehkAqsZlZsAxeYw5bF0+7JjeH9+49jLOXtGD0uFSf5M3wVZcObzSYsdGaNKGYkokBYeZii1tdwZvAuUKKZ1eOvDAz5v6hjqZA7brDWr5IZXNCqRZOdyGQ5g3UP4o5XFnl57d1RAmKPK9WaTCjbi0hMfms4zldqGeXTRDAhvqMH2w/BY7KvgIOr+aQelTvQbOciq+DaZbzNgdI5gqrSUA19EEL04Qu/gjoVGwMhZ7Lq9+yS2Lb+xdhmn/99sbcRjaRqqjgzHRvbyirPT9EuEAdrijyuZzY9kASv8LN/Q8cawRZNk2vf0M8Qzg0F7iw2kcDrf+dwdcyrrAbg2XDlGsFBckBcPKA44PkOPtFLHZRU9pSpd15rL1JIes6m2YX7AmJFP2+FA5WjXQoqF+CRhBVUWXaXAmcq,iv:7Uqnu2xEcHotczRzIcDfq9bM7wNXdz0Fg2HNpxlV1/Q=,tag:w5aLsT9LN92+83rdP2YJTg==,type:str]
|
||||||
|
vikunja:
|
||||||
|
env: ENC[AES256_GCM,data:wHwLaX7z31Ogee0fSIJ4EpP/FUHOmj8lESqPacmrgokf9+2NpG8OKt99csDiYM9EEq2S3P70N6r+Dhzxob53lmQhNK8JuvZqrZ1HxgvMXirjnkXl0LGqVHBM4QdMvxVkICRNc1GMrG6ZY4OBQkn5did1ZZiCuXFC/ByuNTqBNHXoZmZMrewF9MFY+wfGx7+gIYzZ5JF1sgkTqtBdnAiUT2t9AaYNc8qjoZvNj3sgMb35/tKG0CYpt0vz6QuMQwOBJNrRkh2lV7YgTcr1tOkTc2FvRoLLyDykl8fjUf9KDcJLz672E90D0rRA5oHp/Lk28sSThh9WAM0skJofjXMOpq9ScsljWovUuizXUVCg5O/79EyhI7zPX6M3C/415sWdmGLYcRYRq7Ww1IoRgi2j9nCDLstHSMgF1igRWnsBEIFISCmSURMHOZNMkxWsxJ+0HJoMX9bmoZLLMrkjCqyPi/1r0X90aforkmA2xB+pC8rvYBKSxXYt8Nfu6KOK1JsmKTMmmC1R1dswuXvt/qCCH0yf0tl7GrGACKkDerDXVDZj4+SygkXM2bQF/L/KjQI7UspSdmGUmAvjhX31Zt1qZoYa2E2gabBWSGgXDuNixgbL/twaUA1CcA+ZPVBH0oAlOCc0dLXy0OZSn2U4IV1NH//66s1cmWEQQs4GKxhXzABiBvYaSj45LQtnEo2/HaifKhBWPxkjY9fW85Hy4Bgock4ReHYKsCF0LbsgKZhZ+WQp9mjTGLKxmRJJskwSEgxLmjK+AC2FK8zq2COMQ/eOxHe9OxEwjiQs5xCwnYXt2wOMHcxg3yoBCkTxoqMLs11kWORqcXzyoW1rV5W5DHk8K+7a4N385arHyg9+9S2FtfFUL46/GPcqf7lw5qgCDP/An5lPQZxA7/ItLzxFkviSx+e/cNl3UMTdx2aX4dn4L2cv54GuXDMHVHw++onJJnqn97aczK4O5y0=,iv:4T7vftUcSOS84MpZUOM9ODA36GSrKeW5TClQM3GN2mk=,tag:5mzK4NsmmrYERRn+Vb01Eg==,type:str]
|
||||||
|
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]
|
||||||
sops:
|
sops:
|
||||||
kms: []
|
kms: []
|
||||||
gcp_kms: []
|
gcp_kms: []
|
||||||
|
@ -75,8 +80,8 @@ sops:
|
||||||
by9kZFlTRVdCZFkxYTVVb0RIRk8zUlkKCqMw9oL9RaYBV5Hhy3o8Nm5xmGrPH8Sd
|
by9kZFlTRVdCZFkxYTVVb0RIRk8zUlkKCqMw9oL9RaYBV5Hhy3o8Nm5xmGrPH8Sd
|
||||||
hv36sxRFFNZT/DCKaHaSRbT3mfpBZSTXJt1dgl4nZe6whH54t/1KmA==
|
hv36sxRFFNZT/DCKaHaSRbT3mfpBZSTXJt1dgl4nZe6whH54t/1KmA==
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
lastmodified: "2024-10-26T12:06:05Z"
|
lastmodified: "2024-12-07T23:38:16Z"
|
||||||
mac: ENC[AES256_GCM,data:nici08Luubj2xDfsi1s16VCyG5oizIC6DRfvypmjWRpn0DSpcoWW1j32ya2poEwzpBJoVksFp7ijyjaJv8obExKx94ZYc790eOp/kp1f8lBaHDF8qrYYPL5penkt+UTKeb8xb7BPCJ7O89IVkIjAt7EoQOliMYrLpbiZGkMdHE0=,iv:qY5+MjU5VaXAesuFGt4SgmEdcJ6+vb/mk+NdOPLjCik=,tag:poRJZW3sAMv6EMi64SEQyA==,type:str]
|
mac: ENC[AES256_GCM,data:GKCMZJVKj5Fq7Ak4wQgI/pAl8JKDdzAYCBRwnxHlg0Z10AstbchAYm+LLwCaE85ebl6m/JexmfJeutJo0yGXuOIQKcEgfyNq9O/i/y34ISc4looQ6cyH5Hcxsd9JXgrmgQzVPquBXQzDHz4rj93VhNrvqmw+SgDPZVwcUznvCBI=,iv:HtUmf0qjvbYW7ngocISpqycX7ceNv0YsILgZhOMTSMg=,tag:kJ7EFOLL8o/2OFkn5PhvJw==,type:str]
|
||||||
pgp: []
|
pgp: []
|
||||||
unencrypted_suffix: _unencrypted
|
unencrypted_suffix: _unencrypted
|
||||||
version: 3.9.1
|
version: 3.9.1
|
||||||
|
|
99
nki-personal-do/vikunja.nix
Normal file
99
nki-personal-do/vikunja.nix
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
let
|
||||||
|
secrets = config.sops.secrets;
|
||||||
|
|
||||||
|
host = "kanban.dtth.ch";
|
||||||
|
user = "vikunja";
|
||||||
|
port = 12785;
|
||||||
|
|
||||||
|
storageMount = "/mnt/data/vikunja";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
sops.secrets."vikunja/env" = { restartUnits = [ "vikunja.service" ]; };
|
||||||
|
sops.secrets."vikunja/provider-clientsecret" = { restartUnits = [ "vikunja.service" ]; };
|
||||||
|
cloud.postgresql.databases = [ user ];
|
||||||
|
cloud.traefik.hosts.vikunja = {
|
||||||
|
inherit port host;
|
||||||
|
};
|
||||||
|
|
||||||
|
# users
|
||||||
|
users.users."${user}" = {
|
||||||
|
group = "${user}";
|
||||||
|
isSystemUser = true;
|
||||||
|
};
|
||||||
|
users.groups."${user}" = { };
|
||||||
|
|
||||||
|
|
||||||
|
services.vikunja = {
|
||||||
|
inherit port;
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
frontendScheme = "https";
|
||||||
|
frontendHostname = host;
|
||||||
|
|
||||||
|
environmentFiles = [ secrets."vikunja/env".path ];
|
||||||
|
|
||||||
|
database = {
|
||||||
|
type = "postgres";
|
||||||
|
host = "/var/run/postgresql";
|
||||||
|
user = user;
|
||||||
|
database = user;
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
service = {
|
||||||
|
publicurl = "https://${host}";
|
||||||
|
enableregistration = false;
|
||||||
|
enablepublicteams = true;
|
||||||
|
};
|
||||||
|
mailer = {
|
||||||
|
enabled = true;
|
||||||
|
host = "mx1.nkagami.me";
|
||||||
|
port = 465;
|
||||||
|
forcessl = true;
|
||||||
|
};
|
||||||
|
files.basepath = lib.mkForce storageMount;
|
||||||
|
migration = {
|
||||||
|
todoist.enable = true;
|
||||||
|
trello.enable = true;
|
||||||
|
};
|
||||||
|
backgrounds.providers.unsplash.enabled = true;
|
||||||
|
auth = {
|
||||||
|
local.enabled = false;
|
||||||
|
openid = {
|
||||||
|
enabled = true;
|
||||||
|
providers.authentik = {
|
||||||
|
name = "DTTH Discord Account";
|
||||||
|
authurl = "https://auth.dtth.ch/application/o/vikunja/";
|
||||||
|
logouturl = "https://auth.dtth.ch/application/o/vikunja/end-session/";
|
||||||
|
clientid = "GvCIBtdE2ZRbAo5BJzw4FbZjer7umJlaROT1Pvlp";
|
||||||
|
scope = "openid profile email vikunja_scope";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
defaultsettings = {
|
||||||
|
avatar_provider = "gravatar";
|
||||||
|
week_start = 1;
|
||||||
|
language = "VN";
|
||||||
|
timezone = "Asia/Ho_Chi_Minh";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.vikunja = {
|
||||||
|
serviceConfig.LoadCredential = [ "VIKUNJA_AUTH_OPENID_PROVIDERS_AUTHENTIK_CLIENTSECRET_FILE:${secrets."vikunja/provider-clientsecret".path}" ];
|
||||||
|
serviceConfig.User = user;
|
||||||
|
serviceConfig.DynamicUser = lib.mkForce false;
|
||||||
|
serviceConfig.ReadWritePaths = [ storageMount ];
|
||||||
|
environment.VIKUNJA_AUTH_OPENID_PROVIDERS_AUTHENTIK_CLIENTSECRET_FILE = "%d/VIKUNJA_AUTH_OPENID_PROVIDERS_AUTHENTIK_CLIENTSECRET_FILE";
|
||||||
|
unitConfig = {
|
||||||
|
RequiresMountsFor = [ storageMount ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.tmpfiles.settings."10-vikunja".${storageMount}.d = {
|
||||||
|
user = user;
|
||||||
|
group = user;
|
||||||
|
mode = "0700";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -4,6 +4,14 @@
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
vmware = { pkgs, ... }: {
|
||||||
|
environment.systemPackages = [ pkgs.vmware-horizon-client ];
|
||||||
|
virtualisation.vmware.host = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
|
@ -13,6 +21,8 @@
|
||||||
../modules/personal/fonts
|
../modules/personal/fonts
|
||||||
# Encrypted DNS
|
# Encrypted DNS
|
||||||
../modules/services/edns
|
../modules/services/edns
|
||||||
|
|
||||||
|
vmware
|
||||||
];
|
];
|
||||||
|
|
||||||
# Secrets
|
# Secrets
|
||||||
|
@ -70,7 +80,7 @@
|
||||||
services.printing.drivers = with pkgs; [ epfl-cups-drivers ];
|
services.printing.drivers = with pkgs; [ epfl-cups-drivers ];
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
services.xserver.libinput.enable = true;
|
services.libinput.enable = true;
|
||||||
# Keyboard
|
# Keyboard
|
||||||
services.input-remapper.enable = true;
|
services.input-remapper.enable = true;
|
||||||
services.input-remapper.serviceWantedBy = [ "multi-user.target" ];
|
services.input-remapper.serviceWantedBy = [ "multi-user.target" ];
|
||||||
|
|
61
overlay.nix
61
overlay.nix
|
@ -9,9 +9,6 @@ let
|
||||||
# Typst updates really quickly.
|
# Typst updates really quickly.
|
||||||
typst = final.unstable.typst;
|
typst = final.unstable.typst;
|
||||||
typst-lsp = final.unstable.typst-lsp;
|
typst-lsp = final.unstable.typst-lsp;
|
||||||
|
|
||||||
# Until 0.35 is in
|
|
||||||
kitty = final.unstable.kitty;
|
|
||||||
};
|
};
|
||||||
overlay-imported = final: prev: {
|
overlay-imported = final: prev: {
|
||||||
sway = prev.sway.override { sway-unwrapped = final.swayfx-unwrapped; };
|
sway = prev.sway.override { sway-unwrapped = final.swayfx-unwrapped; };
|
||||||
|
@ -74,25 +71,17 @@ let
|
||||||
nativeMessagingHosts = with final; [ kdePackages.plasma-browser-integration ];
|
nativeMessagingHosts = with final; [ kdePackages.plasma-browser-integration ];
|
||||||
});
|
});
|
||||||
|
|
||||||
# Add desktop file to premid
|
vikunja =
|
||||||
premid = final.symlinkJoin {
|
builtins.seq
|
||||||
name = prev.premid.name;
|
(final.lib.assertMsg (prev.vikunja.version == "0.24.5") "Vikunja probably doesn't need custom versions anymore")
|
||||||
paths = [
|
(final.callPackage ./packages/common/vikunja.nix { });
|
||||||
prev.premid
|
|
||||||
(final.makeDesktopItem {
|
|
||||||
name = prev.premid.name;
|
|
||||||
desktopName = "PreMID";
|
|
||||||
exec = "${final.lib.getExe prev.premid} --no-sandbox %U";
|
|
||||||
icon = "premid";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/334822
|
luminance = prev.luminance.overrideAttrs (attrs: {
|
||||||
vulkan-validation-layers = prev.vulkan-validation-layers.overrideAttrs (attrs: {
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [ final.wrapGAppsHook ];
|
||||||
buildInputs = attrs.buildInputs ++ [
|
buildInputs = attrs.buildInputs ++ [ final.glib ];
|
||||||
final.spirv-tools
|
postInstall = attrs.postInstall + ''
|
||||||
];
|
glib-compile-schemas $out/share/glib-2.0/schemas
|
||||||
|
'';
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -101,7 +90,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
overlay-packages = final: prev: {
|
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 =
|
kak-lsp =
|
||||||
let
|
let
|
||||||
|
@ -113,25 +102,19 @@ let
|
||||||
buildInputs = (with final;
|
buildInputs = (with final;
|
||||||
lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration CoreServices ])
|
lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration CoreServices ])
|
||||||
) ++ (with final; [ libiconv ]);
|
) ++ (with final; [ libiconv ]);
|
||||||
|
|
||||||
|
meta.mainProgram = "kak-lsp";
|
||||||
};
|
};
|
||||||
|
|
||||||
zen-browser-bin = final.callPackage ./packages/x86_64-linux/zen-browser-bin.nix {
|
zen-browser-bin = final.callPackage inputs.zen-browser.packages.${final.stdenv.system}.zen-browser.override {
|
||||||
nativeMessagingHosts = with final; [ kdePackages.plasma-browser-integration ];
|
wrap-firefox = 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;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
overlay-rust-is-dumb = final: prev: {
|
|
||||||
# Use stable delta compiled with old Rust version
|
|
||||||
delta = final.stable.delta;
|
|
||||||
deepfilternet = final.stable.deepfilternet;
|
|
||||||
harmonia = final.callPackage
|
|
||||||
(import
|
|
||||||
(builtins.fetchurl {
|
|
||||||
url = "https://raw.githubusercontent.com/Mic92/nixpkgs/63f91202f5cd071187ede5e5ffc56003cb442876/pkgs/by-name/ha/harmonia/package.nix";
|
|
||||||
sha256 = "1mz211c0bxn116ix0j5xx4wlglpbkfg7d3npw1z8hg9gc0vbj2xb";
|
|
||||||
}))
|
|
||||||
{ };
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
[
|
[
|
||||||
# inputs.swayfx.inputs.scenefx.overlays.override
|
# inputs.swayfx.inputs.scenefx.overlays.override
|
||||||
|
@ -140,17 +123,17 @@ in
|
||||||
inputs.rust-overlay.overlays.default
|
inputs.rust-overlay.overlays.default
|
||||||
inputs.youmubot.overlays.default
|
inputs.youmubot.overlays.default
|
||||||
|
|
||||||
(import ./overlays/openrazer)
|
|
||||||
overlay-unstable
|
overlay-unstable
|
||||||
overlay-needs-unstable
|
overlay-needs-unstable
|
||||||
overlay-packages
|
overlay-packages
|
||||||
overlay-imported
|
overlay-imported
|
||||||
overlay-versioning
|
overlay-versioning
|
||||||
overlay-libs
|
overlay-libs
|
||||||
overlay-rust-is-dumb
|
|
||||||
|
|
||||||
(import ./packages/common)
|
(import ./packages/common)
|
||||||
|
|
||||||
# Bug fixes
|
# Bug fixes
|
||||||
] # we assign the overlay created before to the overlays of nixpkgs.
|
] # we assign the overlay created before to the overlays of nixpkgs.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
final: prev:
|
|
||||||
let
|
|
||||||
version = "3.3.0";
|
|
||||||
src = final.fetchFromGitHub {
|
|
||||||
owner = "openrazer";
|
|
||||||
repo = "openrazer";
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "sha256-lElE1nIiJ5fk2DupHu43tmxRjRsS5xeL1Yz/LuRlgtM=";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
rec
|
|
||||||
{
|
|
||||||
openrazer-daemon = prev.openrazer-daemon.overrideAttrs (old: {
|
|
||||||
inherit src version;
|
|
||||||
});
|
|
||||||
|
|
||||||
python3 = prev.python3.override {
|
|
||||||
packageOverrides = self: super: {
|
|
||||||
openrazer-daemon = super.openrazer-daemon.overrideAttrs (old: {
|
|
||||||
inherit src version;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
};
|
|
||||||
python3Packages = python3.pkgs;
|
|
||||||
|
|
||||||
linuxPackages_latest = prev.linuxPackages_latest.extend (self: super: {
|
|
||||||
openrazer = super.openrazer.overrideAttrs (old: {
|
|
||||||
inherit src version;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
|
@ -2,4 +2,5 @@ final: prev: {
|
||||||
epfl-cups-drivers = final.callPackage ./epfl-cups-drivers { };
|
epfl-cups-drivers = final.callPackage ./epfl-cups-drivers { };
|
||||||
ttaenc = final.callPackage ./ttaenc.nix { };
|
ttaenc = final.callPackage ./ttaenc.nix { };
|
||||||
suwako-cursors = final.callPackage ./suwako-cursors { };
|
suwako-cursors = final.callPackage ./suwako-cursors { };
|
||||||
|
nki-kakoune = final.callPackage ./nki-kakoune { };
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,8 @@ let
|
||||||
self.runtime_dir.join("sources").join(url_dir)
|
self.runtime_dir.join("sources").join(url_dir)
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
|
|
||||||
|
meta.mainProgram = "kak-tree-sitter";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
kak-tree-sitter
|
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 some color overrides
|
||||||
# set global kts_yellow "rgb:e2b75e"
|
# set global kts_yellow "rgb:e2b75e"
|
||||||
# set global kts_teal "rgb:008080"
|
# 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"
|
# set global kts_sky "rgb:6aa622"
|
||||||
# Color scheme
|
# Color scheme
|
||||||
colorscheme catppuccin-latte
|
colorscheme catppuccin-latte
|
||||||
|
set-face global module "%opt{sapphire}"
|
||||||
set global base "default"
|
set global base "default"
|
||||||
|
|
||||||
# Set indentation guides
|
# Set indentation guides
|
||||||
|
@ -90,47 +88,6 @@ hook global InsertCompletionHide .* %{
|
||||||
unmap window insert <s-tab> <c-p>
|
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.
|
# <a-a> in Insert mode moves to end of line.
|
||||||
map global insert <a-a> '<esc>A'
|
map global insert <a-a> '<esc>A'
|
||||||
|
|
||||||
|
@ -174,7 +131,6 @@ hook global WinSetOption filetype=(typst) %{
|
||||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window markdown-.+ }
|
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window markdown-.+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
define-command -params 0 -docstring "Set up build" scala-build-connect %{
|
define-command -params 0 -docstring "Set up build" scala-build-connect %{
|
||||||
lsp-execute-command 'build-connect' '"[]"'
|
lsp-execute-command 'build-connect' '"[]"'
|
||||||
}
|
}
|
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
|
function usage
|
||||||
echo "Usage: "
|
echo "Usage: "
|
||||||
echo " kaktex set [client] [session]"
|
echo " kaktex set [client] [session]"
|
307
packages/common/nki-kakoune/lsp.nix
Normal file
307
packages/common/nki-kakoune/lsp.nix
Normal file
|
@ -0,0 +1,307 @@
|
||||||
|
{ lib
|
||||||
|
, writeTextDir
|
||||||
|
, formats
|
||||||
|
, kak-lsp
|
||||||
|
, # LSP packages
|
||||||
|
ccls
|
||||||
|
, gopls
|
||||||
|
, nil
|
||||||
|
, nixpkgs-fmt
|
||||||
|
, python311Packages
|
||||||
|
, ltex-ls
|
||||||
|
, nodePackages
|
||||||
|
, tailwindcss-language-server
|
||||||
|
, fsautocomplete
|
||||||
|
, metals
|
||||||
|
, texlab
|
||||||
|
, marksman
|
||||||
|
, 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
|
||||||
|
vscodeServerOf = name: {
|
||||||
|
name = "vscode-${name}-language-server";
|
||||||
|
value = {
|
||||||
|
args = [ "--stdio" ];
|
||||||
|
command = "vscode-${name}-language-server";
|
||||||
|
filetypes = [ name "templ" ];
|
||||||
|
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 = {
|
||||||
|
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 = 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;
|
||||||
|
};
|
||||||
|
typst-lsp = {
|
||||||
|
command = "typst-lsp";
|
||||||
|
filetypes = [ "typst" ];
|
||||||
|
roots = [ "main.typ" ".git" ];
|
||||||
|
settings_section = "typst-lsp";
|
||||||
|
settings.typst-lsp = {
|
||||||
|
experimentalFormatterMode = "on";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
marksman = {
|
||||||
|
command = "marksman";
|
||||||
|
filetypes = [ "markdown" ];
|
||||||
|
roots = [ ".marksman.toml" ".git" ];
|
||||||
|
package = marksman;
|
||||||
|
};
|
||||||
|
rust-analyzer = {
|
||||||
|
args = [ ];
|
||||||
|
command = "rust-analyzer";
|
||||||
|
filetypes = [ "rust" ];
|
||||||
|
roots = [ "Cargo.toml" ];
|
||||||
|
package = rust-analyzer;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // (builtins.listToAttrs (builtins.map vscodeServerOf [ "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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
|
plugin = writeTextDir "share/kak/autoload/kak-lsp.kak" ''
|
||||||
|
hook global KakBegin .* %{
|
||||||
|
try %{
|
||||||
|
eval %sh{${lib.getExe kak-lsp} --kakoune --config ${kak-lsp-config} -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) %{
|
||||||
|
# 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
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"
|
if test (pwd) = "/home/natsukagami/.config/kak"
|
||||||
exit 0
|
exit 0
|
||||||
end
|
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))}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
128
packages/common/vikunja.nix
Normal file
128
packages/common/vikunja.nix
Normal file
|
@ -0,0 +1,128 @@
|
||||||
|
{ lib, fetchFromGitHub, stdenv, nodejs, pnpm, buildGoModule, mage, writeShellScriptBin, nixosTests, autoPatchelfHook, musl }:
|
||||||
|
|
||||||
|
let
|
||||||
|
version = "0.24.5-git";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "go-vikunja";
|
||||||
|
repo = "vikunja";
|
||||||
|
rev = "e57f04ec23e9ff8aa9877d2ea7d571c2a44790b0";
|
||||||
|
hash = "sha256-W6o1h6XBPvT1lH1zO5N7HcodksKill5eqSuaFl2kfuY=";
|
||||||
|
};
|
||||||
|
|
||||||
|
frontend = stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "vikunja-frontend";
|
||||||
|
inherit version src;
|
||||||
|
|
||||||
|
sourceRoot = "${finalAttrs.src.name}/frontend";
|
||||||
|
|
||||||
|
pnpmDeps = pnpm.fetchDeps {
|
||||||
|
inherit (finalAttrs) pname version src sourceRoot;
|
||||||
|
hash = "sha256-sOCaJDBgEMID+lN5plQpSqaGBIUs5h2tAwDzhtOH53o=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
nodejs
|
||||||
|
pnpm.configHook
|
||||||
|
autoPatchelfHook
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
musl # For sass-embedded
|
||||||
|
];
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
dontAutoPatchelf = true;
|
||||||
|
|
||||||
|
# See https://github.com/sass/embedded-host-node/issues/334
|
||||||
|
preBuild = ''
|
||||||
|
autoPatchelf node_modules/.pnpm/sass-embedded*
|
||||||
|
'';
|
||||||
|
|
||||||
|
postBuild = ''
|
||||||
|
pnpm run build
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
pnpm run test:unit --run
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
cp -r dist/ $out
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
|
# Injects a `t.Skip()` into a given test since there's apparently no other way to skip tests here.
|
||||||
|
skipTest = lineOffset: testCase: file:
|
||||||
|
let
|
||||||
|
jumpAndAppend = lib.concatStringsSep ";" (lib.replicate (lineOffset - 1) "n" ++ [ "a" ]);
|
||||||
|
in
|
||||||
|
''
|
||||||
|
sed -i -e '/${testCase}/{
|
||||||
|
${jumpAndAppend} t.Skip();
|
||||||
|
}' ${file}
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
buildGoModule {
|
||||||
|
inherit src version;
|
||||||
|
pname = "vikunja";
|
||||||
|
|
||||||
|
nativeBuildInputs =
|
||||||
|
let
|
||||||
|
fakeGit = writeShellScriptBin "git" ''
|
||||||
|
if [[ $@ = "describe --tags --always --abbrev=10" ]]; then
|
||||||
|
echo "${version}"
|
||||||
|
else
|
||||||
|
>&2 echo "Unknown command: $@"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
[ fakeGit mage ];
|
||||||
|
|
||||||
|
vendorHash = "sha256-UWjlivF9ySXCAr84A1trCJ/n9pB98ZhEyG11qz3PL7g=";
|
||||||
|
|
||||||
|
inherit frontend;
|
||||||
|
|
||||||
|
prePatch = ''
|
||||||
|
cp -r ${frontend} frontend/dist
|
||||||
|
'';
|
||||||
|
|
||||||
|
postConfigure = ''
|
||||||
|
# These tests need internet, so we skip them.
|
||||||
|
${skipTest 1 "TestConvertTrelloToVikunja" "pkg/modules/migration/trello/trello_test.go"}
|
||||||
|
${skipTest 1 "TestConvertTodoistToVikunja" "pkg/modules/migration/todoist/todoist_test.go"}
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
|
||||||
|
# Fixes "mkdir /homeless-shelter: permission denied" - "Error: error compiling magefiles" during build
|
||||||
|
export HOME=$(mktemp -d)
|
||||||
|
mage build:build
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
mage test:unit
|
||||||
|
mage test:integration
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
install -Dt $out/bin vikunja
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru.tests.vikunja = nixosTests.vikunja;
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
changelog = "https://kolaente.dev/vikunja/api/src/tag/v${version}/CHANGELOG.md";
|
||||||
|
description = "Todo-app to organize your life";
|
||||||
|
homepage = "https://vikunja.io/";
|
||||||
|
license = lib.licenses.agpl3Plus;
|
||||||
|
maintainers = with lib.maintainers; [ leona ];
|
||||||
|
mainProgram = "vikunja";
|
||||||
|
platforms = lib.platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,32 +0,0 @@
|
||||||
{ appimageTools, fetchurl, nativeMessagingHosts ? [ ], ... }:
|
|
||||||
let
|
|
||||||
pname = "zen-browser-bin";
|
|
||||||
version = "1.0.1-a.19";
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://github.com/zen-browser/desktop/releases/download/${version}/zen-specific.AppImage";
|
|
||||||
hash = "sha256-qAPZ4VyVmeZLRfL0kPHF75zyrSUFHKQUSUcpYKs3jk8=";
|
|
||||||
};
|
|
||||||
|
|
||||||
appimageContents = appimageTools.extract {
|
|
||||||
inherit pname version src;
|
|
||||||
};
|
|
||||||
|
|
||||||
in
|
|
||||||
appimageTools.wrapType2 {
|
|
||||||
inherit pname version src;
|
|
||||||
|
|
||||||
extraInstallCommands = ''
|
|
||||||
mv $out/bin/${pname} $out/bin/zen
|
|
||||||
install -m 444 -D ${appimageContents}/zen.desktop $out/share/applications/zen.desktop
|
|
||||||
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/128x128/apps/zen.png \
|
|
||||||
$out/share/icons/hicolor/128x128/apps/zen.png
|
|
||||||
|
|
||||||
mkdir -p $out/lib/mozilla/native-messaging-hosts
|
|
||||||
for ext in ${toString nativeMessagingHosts}; do
|
|
||||||
ln -sLt $out/lib/mozilla/native-messaging-hosts $ext/lib/mozilla/native-messaging-hosts/*
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta.mainProgram = "zen";
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue