Merge remote-tracking branch 'origin/nixos' into nixos-work
This commit is contained in:
commit
904790c263
35 changed files with 586 additions and 502 deletions
127
flake.lock
generated
127
flake.lock
generated
|
|
@ -8,11 +8,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677247280,
|
"lastModified": 1677969766,
|
||||||
"narHash": "sha256-sa+8MtoAOSLsWP9vf0qiJUyMovIEYgDzHE8TkoK04Hk=",
|
"narHash": "sha256-AIp/ZYZMNLDZR/H7iiAlaGpu4lcXsVt9JQpBlf43HRY=",
|
||||||
"owner": "ryantm",
|
"owner": "ryantm",
|
||||||
"repo": "agenix",
|
"repo": "agenix",
|
||||||
"rev": "833f87c8ff574a29aea3e091045cbaed3cf86bc1",
|
"rev": "03b51fe8e459a946c4b88dcfb6446e45efb2c24e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -69,11 +69,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676581287,
|
"lastModified": 1678041467,
|
||||||
"narHash": "sha256-a/6ClchROZ5PoLz0WK42mkAkUtJlMDbe5QyyZZ7bomc=",
|
"narHash": "sha256-qqHbiN0ZfEuZ2guMAW5T011TqgrPqGqNWlHtd8AXtQA=",
|
||||||
"owner": "zhaofengli",
|
"owner": "zhaofengli",
|
||||||
"repo": "attic",
|
"repo": "attic",
|
||||||
"rev": "0bb3d001365a5d75947a7a713dfd06307b3934d4",
|
"rev": "1a3b6513b02202198bb497608d0cedc45119799b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -115,17 +115,16 @@
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673405853,
|
"lastModified": 1677892403,
|
||||||
"narHash": "sha256-6Nq9DuOo+gE2I8z5UZaKuumykz2xxZ9JGYmUthOuwSA=",
|
"narHash": "sha256-/Wi0L1spSWLFj+UQxN3j0mPYMoc7ZoAujpUF/juFVII=",
|
||||||
"owner": "ipetkov",
|
"owner": "ipetkov",
|
||||||
"repo": "crane",
|
"repo": "crane",
|
||||||
"rev": "b13963c8c18026aa694acd98d14f66d24666f70b",
|
"rev": "105e27adb70a9890986b6d543a67761cbc1964a2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "ipetkov",
|
"owner": "ipetkov",
|
||||||
"repo": "crane",
|
"repo": "crane",
|
||||||
"rev": "b13963c8c18026aa694acd98d14f66d24666f70b",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -333,11 +332,11 @@
|
||||||
"forgit-git": {
|
"forgit-git": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676021219,
|
"lastModified": 1677621471,
|
||||||
"narHash": "sha256-/cqDhHilbMSrzwip+2CGJ9Il4wsx5skyMbqC98hewdc=",
|
"narHash": "sha256-merUZ0IQ/qmDkquGFjKvc4vJBj4Ff62JpWYOB67lAVY=",
|
||||||
"owner": "wfxr",
|
"owner": "wfxr",
|
||||||
"repo": "forgit",
|
"repo": "forgit",
|
||||||
"rev": "065f7841f334b8707a49ac30d19370aa859db2ed",
|
"rev": "801239658718863b9c6e0ba21d027cb0caccd465",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -399,11 +398,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677104801,
|
"lastModified": 1678271387,
|
||||||
"narHash": "sha256-2V5nKOYVFMYlseYdDKiEaww2xqcE0GtS1ax3SoUX99I=",
|
"narHash": "sha256-H2dv/i1LRlunRtrESirELzfPWdlG/6ElDB1ksO529H4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "4295fdfa6b0005c32f2e1f0b732faf5810c1bc7f",
|
"rev": "36999b8d19eb6eebb41983ef017d7e0095316af2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -439,11 +438,11 @@
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1672071700,
|
"lastModified": 1677679546,
|
||||||
"narHash": "sha256-Z0pbBVtijv4xbL42rPzMoYFSOqALFRYDMN9iOumSEso=",
|
"narHash": "sha256-L+QE6hIHxhYHWPA1jfgZsbQFYxheD/hzFhtwGFRdWOk=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "contrib",
|
"repo": "contrib",
|
||||||
"rev": "37c8121f98d76f57caa00dd7106877876e0d7483",
|
"rev": "d4eccc8e7d31d30c7ce39dc2b864c4f23f173855",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -460,11 +459,11 @@
|
||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677162463,
|
"lastModified": 1678371846,
|
||||||
"narHash": "sha256-wjZbwJvIagJ0i82LYm3eIHNsqwblOjIzAyegA3z9olA=",
|
"narHash": "sha256-fOFX0PASpIpU4NK9Wen9yJKwg5RYe5jFIu1H0OUzglE=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
"rev": "60e37d727def25c87a3fd6c47751c05f6082260f",
|
"rev": "c9167d96467f0c1546f337828e874d7dd849f900",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -499,11 +498,11 @@
|
||||||
"nixpkgs": "nixpkgs_5"
|
"nixpkgs": "nixpkgs_5"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676681260,
|
"lastModified": 1677282271,
|
||||||
"narHash": "sha256-R2FvbPzgvDSVs0jCUA9CMDIgw4F6exF8cR+y3Yea5jQ=",
|
"narHash": "sha256-wNooEHZpKMJN2jj2qPa1jRhi6f5q1yTYCxQcXEJ32eM=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprpaper",
|
"repo": "hyprpaper",
|
||||||
"rev": "2bc88dc8c220db674f458432aec0ac0d9ea6a640",
|
"rev": "83867464c523c3ac2f7ce53d2c4b8d4f9b7551cd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -515,11 +514,11 @@
|
||||||
"lspsaga-nvim": {
|
"lspsaga-nvim": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677497543,
|
"lastModified": 1678361457,
|
||||||
"narHash": "sha256-xFba/hXqc0qyJH9Hd9XtXteXIqjJnIgYIy8Y5l9QPQQ=",
|
"narHash": "sha256-nrsMdfF43k0RavCq2hZ799HpY/40O0bi4kAM18dR+f4=",
|
||||||
"owner": "glepnir",
|
"owner": "glepnir",
|
||||||
"repo": "lspsaga.nvim",
|
"repo": "lspsaga.nvim",
|
||||||
"rev": "291629b704ba8fdd0134ef4204fb118050bca363",
|
"rev": "db6cdf51bf5ae45e4aa65760e597cf0d587c66ee",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -530,11 +529,11 @@
|
||||||
},
|
},
|
||||||
"master": {
|
"master": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677259386,
|
"lastModified": 1678375527,
|
||||||
"narHash": "sha256-gFXSvo9CuTJa6V0bK0Gm+JwizlJD+YyJ1VAUW2ij1R4=",
|
"narHash": "sha256-0W7Xu8XJLr8wUAf0fYKI2Ese3HB1fC5b/+lS9BPVgOQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e8d97da2540b9de5962849c75c425cc2469d77ad",
|
"rev": "87af394014d51f563dade30f3f7ef55a00a3d1d6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -550,11 +549,11 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "contrib",
|
"dir": "contrib",
|
||||||
"lastModified": 1677257437,
|
"lastModified": 1678371176,
|
||||||
"narHash": "sha256-fxEb0DrGXv3Q03Gz/oqI8x47WhXLlGtHQFgGIhBl4c0=",
|
"narHash": "sha256-tsPKurteDIU0bz9GutdRr4vwQ1kIsbJEbaY0nsz+H94=",
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
"repo": "neovim",
|
"repo": "neovim",
|
||||||
"rev": "15cce77b383d0b0bfdaa1415cdde005cc43267d0",
|
"rev": "9ef7297ef142354ace8b1f3f277d0eee3cfdc6d4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -575,11 +574,11 @@
|
||||||
"rust-overlay": "rust-overlay_2"
|
"rust-overlay": "rust-overlay_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676390054,
|
"lastModified": 1678313833,
|
||||||
"narHash": "sha256-w0KvrM+9WIEYr0juDh4Vs39ed2IaT0T696fp9pZ7i1I=",
|
"narHash": "sha256-HUkOzLVYDTYzxH4zMeR2JIrh1zY/n3LIs8rtNnKeOTA=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "nil",
|
"repo": "nil",
|
||||||
"rev": "944d5c335531778a1d7b54a97bf7fb5ec0c3e976",
|
"rev": "d1017418841c612552f73d1f670d87f57dc5e090",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -654,11 +653,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677063315,
|
"lastModified": 1658161305,
|
||||||
"narHash": "sha256-qiB4ajTeAOVnVSAwCNEEkoybrAlA+cpeiBxLobHndE8=",
|
"narHash": "sha256-X/nhnMCa1Wx4YapsspyAs6QYz6T/85FofrI6NpdPDHg=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "988cc958c57ce4350ec248d2d53087777f9e1949",
|
"rev": "e4d49de45a3b5dbcb881656b4e3986e666141ea9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -670,11 +669,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677063315,
|
"lastModified": 1677676435,
|
||||||
"narHash": "sha256-qiB4ajTeAOVnVSAwCNEEkoybrAlA+cpeiBxLobHndE8=",
|
"narHash": "sha256-6FxdcmQr5JeZqsQvfinIMr0XcTyTuR7EXX0H3ANShpQ=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "988cc958c57ce4350ec248d2d53087777f9e1949",
|
"rev": "a08d6979dd7c82c4cef0dcc6ac45ab16051c1169",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -686,11 +685,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677063315,
|
"lastModified": 1674641431,
|
||||||
"narHash": "sha256-qiB4ajTeAOVnVSAwCNEEkoybrAlA+cpeiBxLobHndE8=",
|
"narHash": "sha256-qfo19qVZBP4qn5M5gXc/h1MDgAtPA5VxJm9s8RUAkVk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "988cc958c57ce4350ec248d2d53087777f9e1949",
|
"rev": "9b97ad7b4330aacda9b2343396eb3df8a853b4fc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -718,11 +717,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_7": {
|
"nixpkgs_7": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677142198,
|
"lastModified": 1678298120,
|
||||||
"narHash": "sha256-Y/uC2ZmkQkyrdRZ5szZilhZ/46786Wio5CGTgL+Vb/c=",
|
"narHash": "sha256-iaV5xqgn29xy765Js3EoZePQyZIlLZA3pTYtTnKkejg=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "03fb72201639e5274fee6d77b0d9c66e98329aba",
|
"rev": "1e383aada51b416c6c27d4884d2e258df201bc11",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -826,11 +825,11 @@
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2"
|
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677160285,
|
"lastModified": 1677832802,
|
||||||
"narHash": "sha256-tBzpCjMP+P3Y3nKLYvdBkXBg3KvTMo3gvi8tLQaqXVY=",
|
"narHash": "sha256-XQf+k6mBYTiQUjWRf/0fozy5InAs03O1b30adCpWeXs=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "pre-commit-hooks.nix",
|
"repo": "pre-commit-hooks.nix",
|
||||||
"rev": "2bd861ab81469428d9c823ef72c4bb08372dd2c4",
|
"rev": "382bee738397ca005206eefa36922cc10df8a21c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -905,11 +904,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1675391458,
|
"lastModified": 1677638104,
|
||||||
"narHash": "sha256-ukDKZw922BnK5ohL9LhwtaDAdCsJL7L6ScNEyF1lO9w=",
|
"narHash": "sha256-vbdOoDYnQ1QYSchMb3fYGCLYeta3XwmGvMrlXchST5s=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "383a4acfd11d778d5c2efcf28376cbd845eeaedf",
|
"rev": "f388187efb41ce4195b2f4de0b6bb463d3cd0a76",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -921,11 +920,11 @@
|
||||||
"smartcolumn-nvim": {
|
"smartcolumn-nvim": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677125264,
|
"lastModified": 1677732751,
|
||||||
"narHash": "sha256-Om0t759e6JYwcg6V+HdJk59h2yVt9kPLwGBMKNnP8AA=",
|
"narHash": "sha256-uu9h5Pjw05IokTbJxrVlavZXpm3Ny6jrmhcHXzvwngU=",
|
||||||
"owner": "m4xshen",
|
"owner": "m4xshen",
|
||||||
"repo": "smartcolumn.nvim",
|
"repo": "smartcolumn.nvim",
|
||||||
"rev": "1202b0741b87b0815bdc6fc6ebacb2df9e6628ee",
|
"rev": "6e16c7d1b5e8bf4cb7ddcab5c91745190e80e99d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -936,11 +935,11 @@
|
||||||
},
|
},
|
||||||
"stable": {
|
"stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677075010,
|
"lastModified": 1678230755,
|
||||||
"narHash": "sha256-X+UmR1AkdR//lPVcShmLy8p1n857IGf7y+cyCArp8bU=",
|
"narHash": "sha256-SFAXgNjNTXzcAideXcP0takfUGVft/VR5CACmYHg+Fc=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "c95bf18beba4290af25c60cbaaceea1110d0f727",
|
"rev": "a7cc81913bb3cd1ef05ed0ece048b773e1839e51",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -974,11 +973,11 @@
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"host": "gitlab.freedesktop.org",
|
"host": "gitlab.freedesktop.org",
|
||||||
"lastModified": 1675374853,
|
"lastModified": 1677789111,
|
||||||
"narHash": "sha256-BSrjNcddYWhFUMtjGwxiEXw67MYRaIHGvLn19Mvm1NE=",
|
"narHash": "sha256-dWrk+Q3bLdtFe5rkyaAKWCQJCeE/KFNllcu1DvBC38c=",
|
||||||
"owner": "wlroots",
|
"owner": "wlroots",
|
||||||
"repo": "wlroots",
|
"repo": "wlroots",
|
||||||
"rev": "677a3f2f8847ed2de49dd60868f9d9487a546f58",
|
"rev": "5ae17de23f5fd9bb252a698f3771c840280e2c05",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
13
flake.nix
13
flake.nix
|
|
@ -104,11 +104,17 @@
|
||||||
|
|
||||||
channelsConfig.allowUnfree = true;
|
channelsConfig.allowUnfree = true;
|
||||||
|
|
||||||
|
lib = nixpkgs.lib.extend
|
||||||
|
(self: super: { my = import ./lib { lib = self; }; });
|
||||||
|
|
||||||
################
|
################
|
||||||
### Overlays ###
|
### Overlays ###
|
||||||
################
|
################
|
||||||
|
|
||||||
overlay = import ./overlays { inherit inputs; };
|
overlay = import ./overlays {
|
||||||
|
inherit inputs;
|
||||||
|
inherit (self) lib;
|
||||||
|
};
|
||||||
|
|
||||||
channels.nixpkgs.overlaysBuilder = channels: [
|
channels.nixpkgs.overlaysBuilder = channels: [
|
||||||
inputs.emacs.overlays.default
|
inputs.emacs.overlays.default
|
||||||
|
|
@ -135,8 +141,8 @@
|
||||||
./modules/profiles/desktop.nix
|
./modules/profiles/desktop.nix
|
||||||
./modules/profiles/work.nix
|
./modules/profiles/work.nix
|
||||||
];
|
];
|
||||||
|
hostDefaults = {
|
||||||
hostDefaults.modules = [
|
modules = [
|
||||||
./modules/default.nix
|
./modules/default.nix
|
||||||
self.nixosModules.base
|
self.nixosModules.base
|
||||||
inputs.home-manager.nixosModule
|
inputs.home-manager.nixosModule
|
||||||
|
|
@ -151,6 +157,7 @@
|
||||||
inputs.agenix.nixosModules.age
|
inputs.agenix.nixosModules.age
|
||||||
inputs.howdy.nixosModules.default
|
inputs.howdy.nixosModules.default
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
|
||||||
hosts.nixos-laptop.modules = [
|
hosts.nixos-laptop.modules = [
|
||||||
./hosts/nixos-laptop
|
./hosts/nixos-laptop
|
||||||
|
|
|
||||||
16
lib/default.nix
Normal file
16
lib/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
lib.makeExtensible (self: rec {
|
||||||
|
mkDate = longDate: lib.concatStringsSep "-" [
|
||||||
|
(builtins.substring 0 4 longDate)
|
||||||
|
(builtins.substring 4 2 longDate)
|
||||||
|
(builtins.substring 6 2 longDate)
|
||||||
|
];
|
||||||
|
mkVersionSrc = src: "unstable-" + builtins.substring 0 7 src.rev;
|
||||||
|
mkVersionInput = input:
|
||||||
|
let
|
||||||
|
date = mkDate (input.lastModifiedDate or "19700101");
|
||||||
|
rev = input.shortRev or "dirty";
|
||||||
|
in
|
||||||
|
"unstable-${date}_${rev}";
|
||||||
|
})
|
||||||
|
|
@ -63,7 +63,6 @@ in
|
||||||
fish.enable = true;
|
fish.enable = true;
|
||||||
git.enable = true;
|
git.enable = true;
|
||||||
gpg.enable = true;
|
gpg.enable = true;
|
||||||
vim.enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -105,6 +104,7 @@ in
|
||||||
up
|
up
|
||||||
viu
|
viu
|
||||||
wget
|
wget
|
||||||
|
vim
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts.fonts = with pkgs; [
|
fonts.fonts = with pkgs; [
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ with lib; {
|
||||||
adb.enable = true;
|
adb.enable = true;
|
||||||
hyprland.enable = true;
|
hyprland.enable = true;
|
||||||
code.enable = true;
|
code.enable = true;
|
||||||
emacs.enable = true;
|
|
||||||
firefox = {
|
firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
arkenfox = {
|
arkenfox = {
|
||||||
|
|
@ -77,6 +76,7 @@ with lib; {
|
||||||
hub.enable = true;
|
hub.enable = true;
|
||||||
ledger.enable = true;
|
ledger.enable = true;
|
||||||
logseq.enable = true;
|
logseq.enable = true;
|
||||||
|
nvim.enable = true;
|
||||||
python.versions."311".enable = true;
|
python.versions."311".enable = true;
|
||||||
ssh = {
|
ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -103,7 +103,7 @@ with lib; {
|
||||||
|
|
||||||
# ripping
|
# ripping
|
||||||
abcde
|
abcde
|
||||||
stable.handbrake # HACK to fix broken ffmpeg on unstable
|
handbrake
|
||||||
picard
|
picard
|
||||||
|
|
||||||
# other
|
# other
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ with lib; {
|
||||||
};
|
};
|
||||||
spotify.enable = true;
|
spotify.enable = true;
|
||||||
thunar.enable = true;
|
thunar.enable = true;
|
||||||
vim.enable = true;
|
nvim.enable = true;
|
||||||
zathura.enable = true;
|
zathura.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,16 +7,17 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.my.programs.vim;
|
cfg = config.my.programs.nvim;
|
||||||
|
|
||||||
|
mkPlugin = name: {
|
||||||
|
plugin = pkgs.vimPlugins.${name};
|
||||||
|
type = "lua";
|
||||||
|
config = lib.readFile (./plugins + "/${name}.lua");
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.programs.vim = {
|
options.my.programs.nvim.enable = mkEnableOption "nvim";
|
||||||
enable = mkOption {
|
|
||||||
default = true;
|
|
||||||
type = types.bool;
|
|
||||||
example = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home-manager.users.moritz = {
|
home-manager.users.moritz = {
|
||||||
|
|
@ -50,46 +51,50 @@ in
|
||||||
taplo
|
taplo
|
||||||
yamlfmt
|
yamlfmt
|
||||||
];
|
];
|
||||||
plugins = with pkgs.vimPlugins; [
|
plugins = builtins.map mkPlugin [
|
||||||
catppuccin-nvim
|
"catppuccin-nvim"
|
||||||
|
"comment-nvim"
|
||||||
|
"copilot-lua"
|
||||||
|
"dashboard-nvim"
|
||||||
|
"formatter-nvim"
|
||||||
|
"gitsigns-nvim"
|
||||||
|
"lualine-nvim"
|
||||||
|
"noice-nvim"
|
||||||
|
"nvim-autopairs"
|
||||||
|
"nvim-lastplace"
|
||||||
|
"nvim-surround"
|
||||||
|
"nvim-tree-lua"
|
||||||
|
"nvim-treesitter-textsubjects"
|
||||||
|
"nvim-ts-context-commentstring"
|
||||||
|
"orgmode"
|
||||||
|
"smartcolumn-nvim"
|
||||||
|
"telescope-fzf-native-nvim"
|
||||||
|
"telescope-nvim"
|
||||||
|
"telescope-zoxide"
|
||||||
|
"which-key-nvim"
|
||||||
|
"todo-comments-nvim"
|
||||||
|
] ++ (with pkgs.vimPlugins; [
|
||||||
cmp-nvim-lsp
|
cmp-nvim-lsp
|
||||||
cmp_luasnip
|
cmp_luasnip
|
||||||
comment-nvim
|
|
||||||
copilot-cmp
|
copilot-cmp
|
||||||
copilot-lua
|
|
||||||
dashboard-nvim
|
|
||||||
direnv-vim
|
direnv-vim
|
||||||
formatter-nvim
|
impatient-nvim
|
||||||
gitsigns-nvim
|
|
||||||
lsp_lines-nvim
|
lsp_lines-nvim
|
||||||
lspkind-nvim
|
lspkind-nvim
|
||||||
lspsaga-nvim-original
|
lspsaga-nvim-original
|
||||||
lualine-lsp-progress
|
lualine-lsp-progress
|
||||||
lualine-nvim
|
|
||||||
luasnip
|
luasnip
|
||||||
neogit
|
|
||||||
noice-nvim
|
|
||||||
nui-nvim # for noice-nvim
|
nui-nvim # for noice-nvim
|
||||||
nvim-autopairs
|
|
||||||
nvim-cmp
|
nvim-cmp
|
||||||
nvim-lastplace
|
|
||||||
nvim-lspconfig
|
nvim-lspconfig
|
||||||
nvim-surround
|
|
||||||
nvim-tree-lua
|
|
||||||
nvim-treesitter-textsubjects
|
|
||||||
nvim-treesitter.withAllGrammars
|
nvim-treesitter.withAllGrammars
|
||||||
nvim-ts-context-commentstring
|
nvim-ufo
|
||||||
nvim-web-devicons # for dashboard-nvim
|
nvim-web-devicons # for dashboard-nvim
|
||||||
orgmode
|
|
||||||
plenary-nvim # for telescope, neogit
|
plenary-nvim # for telescope, neogit
|
||||||
popup-nvim
|
popup-nvim
|
||||||
smartcolumn-nvim
|
promise-async
|
||||||
telescope-fzf-native-nvim
|
|
||||||
telescope-nvim
|
|
||||||
telescope-zoxide
|
|
||||||
vim-lion
|
vim-lion
|
||||||
which-key-nvim
|
]);
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ if not vim.loop.fs_stat(spelldir) then
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.opt.autoindent = true
|
vim.opt.autoindent = true
|
||||||
vim.opt.backupdir = { vim.fn.stdpath("state") .. "/nvim/backup//" } -- don't store backup in files dir
|
vim.opt.backupdir = { vim.fn.stdpath("state") .. "/nvim/backup/" } -- don't store backup in files dir
|
||||||
vim.opt.clipboard = "unnamedplus" -- sync with system clipboard
|
vim.opt.clipboard = "unnamedplus" -- sync with system clipboard
|
||||||
vim.opt.conceallevel = 2
|
vim.opt.conceallevel = 2
|
||||||
vim.opt.expandtab = true -- spaces instead of tabs
|
vim.opt.expandtab = true -- spaces instead of tabs
|
||||||
|
|
@ -37,78 +37,29 @@ if vim.g.neovide then
|
||||||
vim.g.neovide_scale_factor = 0.7
|
vim.g.neovide_scale_factor = 0.7
|
||||||
end
|
end
|
||||||
|
|
||||||
require("catppuccin").setup({
|
require("impatient")
|
||||||
compile_path = vim.fn.stdpath("cache") .. "/catppuccin", -- fix issue of writing to nix store
|
|
||||||
integrations = {
|
|
||||||
which_key = true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
vim.cmd.colorscheme("catppuccin-macchiato")
|
|
||||||
|
|
||||||
vim.o.timeout = true
|
|
||||||
vim.o.timeoutlen = 500
|
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
|
|
||||||
require("noice").setup({
|
|
||||||
lsp = {
|
|
||||||
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
|
||||||
override = {
|
|
||||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
|
||||||
["vim.lsp.util.stylize_markdown"] = true,
|
|
||||||
["cmp.entry.get_documentation"] = true,
|
|
||||||
},
|
|
||||||
progress = {
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- you can enable a preset for easier configuration
|
|
||||||
presets = {
|
|
||||||
bottom_search = true, -- use a classic bottom cmdline for search
|
|
||||||
command_palette = true, -- position the cmdline and popupmenu together
|
|
||||||
long_message_to_split = true, -- long messages will be sent to a split
|
|
||||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
|
||||||
lsp_doc_border = false, -- add a border to hover docs and signature help
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
require("telescope").load_extension("zoxide")
|
|
||||||
wk.register({
|
|
||||||
f = {
|
|
||||||
name = "find",
|
|
||||||
f = { "<cmd>Telescope find_files<cr>", "find file" },
|
|
||||||
z = { "<cmd>Telescope zoxide list<cr>", "find location" },
|
|
||||||
l = { "<cmd>Telescope current_buffer_fuzzy_find<cr>", "find line" },
|
|
||||||
g = { "<cmd>Telescope live_grep<cr>", "live grep" },
|
|
||||||
b = { "<cmd>Telescope buffers<cr>", "find buffer" },
|
|
||||||
},
|
|
||||||
}, { prefix = "<leader>" })
|
|
||||||
-- To get fzf loaded and working with telescope, you need to call
|
|
||||||
-- load_extension, somewhere after setup function:
|
|
||||||
require("telescope").load_extension("fzf")
|
|
||||||
|
|
||||||
require("neogit").setup({
|
|
||||||
disable_commit_confirmation = true,
|
|
||||||
})
|
|
||||||
wk.register({
|
|
||||||
g = { "<cmd>Neogit<cr>", "git" },
|
|
||||||
}, { prefix = "<leader>" })
|
|
||||||
|
|
||||||
require("nvim-treesitter.configs").setup({
|
require("nvim-treesitter.configs").setup({
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
auto_install = false,
|
auto_install = false,
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
additional_vim_regex_highlighting = true,
|
additional_vim_regex_highlighting = false,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
local lspkind = require("lspkind")
|
-- load cmp on InsertEnter
|
||||||
|
vim.api.nvim_create_autocmd("InsertEnter", {
|
||||||
|
callback = function()
|
||||||
|
local cmp = require("cmp")
|
||||||
|
local luasnip = require("luasnip")
|
||||||
|
require("copilot_cmp").setup()
|
||||||
|
|
||||||
local cmp = require("cmp")
|
cmp.setup({
|
||||||
local luasnip = require("luasnip")
|
|
||||||
cmp.setup({
|
|
||||||
formatting = {
|
formatting = {
|
||||||
format = lspkind.cmp_format({
|
format = require("lspkind").cmp_format({
|
||||||
mode = "symbol", -- show only symbol annotations
|
mode = "symbol", -- show only symbol annotations
|
||||||
maxwidth = 50, -- prevent the popup from showing more than provided characters
|
maxwidth = 50, -- prevent the popup from showing more than provided characters
|
||||||
ellipsis_char = "...", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead
|
ellipsis_char = "...", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead
|
||||||
|
|
@ -155,6 +106,8 @@ cmp.setup({
|
||||||
{ name = "nvim_lsp", priority = 9 },
|
{ name = "nvim_lsp", priority = 9 },
|
||||||
{ name = "orgmode", priority = 9 },
|
{ name = "orgmode", priority = 9 },
|
||||||
},
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
---merge tables
|
---merge tables
|
||||||
|
|
@ -185,76 +138,6 @@ local function table_merge(...)
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Provides the Format, FormatWrite, FormatLock, and FormatWriteLock commands
|
|
||||||
require("formatter").setup({
|
|
||||||
-- Enable or disable logging
|
|
||||||
logging = true,
|
|
||||||
-- Set the log level
|
|
||||||
log_level = vim.log.levels.WARN,
|
|
||||||
-- All formatter configurations are opt-in
|
|
||||||
filetype = {
|
|
||||||
json = {
|
|
||||||
require("formatter.filetypes.json").jq,
|
|
||||||
},
|
|
||||||
lua = {
|
|
||||||
require("formatter.filetypes.lua").stylua,
|
|
||||||
},
|
|
||||||
nix = {
|
|
||||||
require("formatter.filetypes.nix").nixpkgs_fmt,
|
|
||||||
},
|
|
||||||
python = {
|
|
||||||
require("formatter.filetypes.python").black,
|
|
||||||
},
|
|
||||||
rust = {
|
|
||||||
require("formatter.filetypes.rust").rustfmt,
|
|
||||||
},
|
|
||||||
sh = {
|
|
||||||
require("formatter.filetypes.sh").shfmt,
|
|
||||||
},
|
|
||||||
toml = {
|
|
||||||
require("formatter.filetypes.toml").taplo,
|
|
||||||
},
|
|
||||||
yaml = {
|
|
||||||
require("formatter.filetypes.yaml").yamlfmt,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- HACK to use specific formatters only when specified
|
|
||||||
alejandra = {
|
|
||||||
require("formatter.filetypes.nix").alejandra,
|
|
||||||
},
|
|
||||||
isort = {
|
|
||||||
require("formatter.filetypes.python").isort,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Use the special "*" filetype for defining formatter configurations on
|
|
||||||
-- any filetype
|
|
||||||
["*"] = {
|
|
||||||
-- "formatter.filetypes.any" defines default configurations for any
|
|
||||||
-- filetype
|
|
||||||
require("formatter.filetypes.any").remove_trailing_whitespace,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
vim.api.nvim_create_user_command("Fmt", function(opts)
|
|
||||||
local params = vim.split(opts.args, "%s+", { trimempty = true })
|
|
||||||
local filetype = vim.bo.filetype
|
|
||||||
vim.cmd("set filetype=" .. params[1]) -- fake filetype
|
|
||||||
vim.cmd(":Format")
|
|
||||||
vim.cmd("set filetype=" .. filetype) -- restore original filetype
|
|
||||||
end, {
|
|
||||||
nargs = 1,
|
|
||||||
complete = function()
|
|
||||||
local languages = {
|
|
||||||
nix = { "alejandra" },
|
|
||||||
python = { "isort" },
|
|
||||||
}
|
|
||||||
return languages[vim.bo.filetype] or {}
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
wk.register({
|
|
||||||
["="] = { "<cmd>Format<cr>", "format (formatter)" },
|
|
||||||
}, { noremap = true, silent = true })
|
|
||||||
|
|
||||||
local lsp_lines = require("lsp_lines")
|
local lsp_lines = require("lsp_lines")
|
||||||
lsp_lines.setup()
|
lsp_lines.setup()
|
||||||
-- Disable virtual_text since it's redundant due to lsp_lines.
|
-- Disable virtual_text since it's redundant due to lsp_lines.
|
||||||
|
|
@ -265,10 +148,64 @@ vim.diagnostic.config({
|
||||||
-- The nvim-cmp almost supports LSP's capabilities so You should advertise it to LSP servers..
|
-- The nvim-cmp almost supports LSP's capabilities so You should advertise it to LSP servers..
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
|
||||||
|
vim.o.foldcolumn = "1" -- '0' is not bad
|
||||||
|
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
|
||||||
|
vim.o.foldlevelstart = 99
|
||||||
|
vim.o.foldenable = true
|
||||||
|
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
|
||||||
|
vim.o.statuscolumn = "%= "
|
||||||
|
-- FIXME: figure out how to put on the other side without having to do a lot of shifting
|
||||||
|
.. "%s" -- sign column
|
||||||
|
.. "%{%" -- evaluate this, and then evaluate what it returns
|
||||||
|
.. "&number ?"
|
||||||
|
.. "(v:relnum ?"
|
||||||
|
-- when showing relative numbers, make sure to pad so things don't shift as you move the cursor
|
||||||
|
.. 'printf("%"..len(line("$")).."s", v:relnum)'
|
||||||
|
.. ":"
|
||||||
|
.. "v:lnum"
|
||||||
|
.. ")"
|
||||||
|
.. ":"
|
||||||
|
.. '""'
|
||||||
|
.. " " -- space between lines and fold
|
||||||
|
.. "%}"
|
||||||
|
.. "%= "
|
||||||
|
.. "%#FoldColumn#" -- highlight group for fold
|
||||||
|
.. "%{" -- expression for showing fold expand/colapse
|
||||||
|
.. "foldlevel(v:lnum) > foldlevel(v:lnum - 1)" -- any folds?
|
||||||
|
.. "? (foldclosed(v:lnum) == -1" -- currently open?
|
||||||
|
.. '? ""' -- point down
|
||||||
|
.. ': ""' -- point to right
|
||||||
|
.. ")"
|
||||||
|
.. ': " "' -- blank for no fold, or inside fold
|
||||||
|
.. "}"
|
||||||
|
.. "%= " -- spacing between end of column and start of text
|
||||||
|
|
||||||
|
-- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself
|
||||||
|
wk.register({
|
||||||
|
z = {
|
||||||
|
R = { require("ufo").openAllFolds, "Open all folds" },
|
||||||
|
M = { require("ufo").closeAllFolds, "Close all folds" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
-- Tell the server the capability of foldingRange,
|
||||||
|
-- Neovim hasn't added foldingRange to default capabilities, users must add it manually
|
||||||
|
capabilities.textDocument.foldingRange = {
|
||||||
|
dynamicRegistration = false,
|
||||||
|
lineFoldingOnly = true,
|
||||||
|
}
|
||||||
|
require("ufo").setup()
|
||||||
|
|
||||||
require("lspsaga").setup({
|
require("lspsaga").setup({
|
||||||
symbol_in_winbar = {
|
symbol_in_winbar = {
|
||||||
enable = false,
|
enable = false,
|
||||||
},
|
},
|
||||||
|
lightbulb = {
|
||||||
|
enable = true,
|
||||||
|
enable_in_insert = true,
|
||||||
|
sign = true,
|
||||||
|
sign_priority = 40,
|
||||||
|
virtual_text = false,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
|
|
@ -340,8 +277,6 @@ for _, lsp in ipairs(servers) do
|
||||||
end
|
end
|
||||||
|
|
||||||
lspconfig_setup("lua_ls", {
|
lspconfig_setup("lua_ls", {
|
||||||
on_attach = on_attach_def,
|
|
||||||
capabilities = capabilities,
|
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
runtime = {
|
runtime = {
|
||||||
|
|
@ -367,131 +302,3 @@ lspconfig_setup("lua_ls", {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
require("dashboard").setup({
|
|
||||||
theme = "hyper",
|
|
||||||
config = {
|
|
||||||
packages = { enable = false },
|
|
||||||
week_header = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
require("lualine").setup({
|
|
||||||
options = {
|
|
||||||
icons_enabled = true,
|
|
||||||
theme = "auto",
|
|
||||||
component_separators = "|",
|
|
||||||
section_separators = { left = "", right = "" },
|
|
||||||
disabled_filetypes = {
|
|
||||||
statusline = {},
|
|
||||||
winbar = {},
|
|
||||||
},
|
|
||||||
ignore_focus = {},
|
|
||||||
always_divide_middle = true,
|
|
||||||
globalstatus = false,
|
|
||||||
refresh = {
|
|
||||||
statusline = 1000,
|
|
||||||
tabline = 1000,
|
|
||||||
winbar = 1000,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_a = {
|
|
||||||
{ "mode", separator = { left = "" }, right_padding = 2 },
|
|
||||||
},
|
|
||||||
lualine_b = { "branch", "diff", "diagnostics" },
|
|
||||||
lualine_c = { "filename", "lsp_progress" },
|
|
||||||
lualine_x = { "encoding", "fileformat", "filetype" },
|
|
||||||
lualine_y = { "progress" },
|
|
||||||
lualine_z = {
|
|
||||||
{ "location", separator = { right = "" }, left_padding = 2 },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
inactive_sections = {
|
|
||||||
lualine_a = {},
|
|
||||||
lualine_b = {},
|
|
||||||
lualine_c = { "filename" },
|
|
||||||
lualine_x = { "location" },
|
|
||||||
lualine_y = {},
|
|
||||||
lualine_z = {},
|
|
||||||
},
|
|
||||||
tabline = {},
|
|
||||||
winbar = {},
|
|
||||||
inactive_winbar = {},
|
|
||||||
extensions = {},
|
|
||||||
})
|
|
||||||
|
|
||||||
require("Comment").setup()
|
|
||||||
|
|
||||||
require("nvim-treesitter.configs").setup({
|
|
||||||
context_commentstring = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
require("nvim-surround").setup({})
|
|
||||||
|
|
||||||
require("nvim-treesitter.configs").setup({
|
|
||||||
textsubjects = {
|
|
||||||
enable = true,
|
|
||||||
prev_selection = ",", -- (Optional) keymap to select the previous selection
|
|
||||||
keymaps = { ["."] = "textsubjects-smart" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
require("copilot").setup({
|
|
||||||
suggestion = { enabled = false },
|
|
||||||
panel = { enabled = false },
|
|
||||||
})
|
|
||||||
vim.api.nvim_create_autocmd("VimEnter", {
|
|
||||||
desc = "Disable Copilot by default on startup",
|
|
||||||
command = "Copilot disable",
|
|
||||||
})
|
|
||||||
require("copilot_cmp").setup()
|
|
||||||
|
|
||||||
local orgmode = require("orgmode")
|
|
||||||
-- Load custom treesitter grammar for org filetype
|
|
||||||
orgmode.setup_ts_grammar()
|
|
||||||
-- Treesitter configuration
|
|
||||||
require("nvim-treesitter.configs").setup({
|
|
||||||
-- If TS highlights are not enabled at all, or disabled via `disable` prop,
|
|
||||||
-- highlighting will fallback to default Vim syntax highlighting
|
|
||||||
highlight = {
|
|
||||||
enable = true,
|
|
||||||
-- Required for spellcheck, some LaTex highlights and
|
|
||||||
-- code block highlights that do not have ts grammar
|
|
||||||
additional_vim_regex_highlighting = { "org" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
orgmode.setup({
|
|
||||||
org_agenda_files = { "~/Notes/org" },
|
|
||||||
org_default_notes_file = "~/Notes/org/refile.org",
|
|
||||||
})
|
|
||||||
|
|
||||||
require("gitsigns").setup()
|
|
||||||
|
|
||||||
require("nvim-lastplace").setup({
|
|
||||||
lastplace_ignore_buftype = { "quickfix", "nofile", "help" },
|
|
||||||
lastplace_ignore_filetype = { "gitcommit", "gitrebase", "svn", "hgcommit" },
|
|
||||||
lastplace_open_folds = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
require("nvim-autopairs").setup()
|
|
||||||
|
|
||||||
-- disable netrw at the very start of your init.lua (strongly advised)
|
|
||||||
vim.g.loaded_netrw = 1
|
|
||||||
vim.g.loaded_netrwPlugin = 1
|
|
||||||
-- set termguicolors to enable highlight groups
|
|
||||||
vim.opt.termguicolors = true
|
|
||||||
-- empty setup using defaults
|
|
||||||
require("nvim-tree").setup()
|
|
||||||
wk.register({
|
|
||||||
t = { "<cmd>NvimTreeFindFileToggle<cr>", "nvim tree" },
|
|
||||||
}, { prefix = "<leader>t", silent = true })
|
|
||||||
|
|
||||||
require("smartcolumn").setup({
|
|
||||||
colorcolumn = 120,
|
|
||||||
disabled_filetypes = { "help", "text", "markdown", "dashboard" },
|
|
||||||
})
|
|
||||||
|
|
|
||||||
7
modules/programs/nvim/plugins/catppuccin-nvim.lua
Normal file
7
modules/programs/nvim/plugins/catppuccin-nvim.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
require("catppuccin").setup({
|
||||||
|
compile_path = vim.fn.stdpath("cache") .. "/catppuccin", -- fix issue of writing to nix store
|
||||||
|
integrations = {
|
||||||
|
which_key = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
vim.cmd.colorscheme("catppuccin-macchiato")
|
||||||
1
modules/programs/nvim/plugins/comment-nvim.lua
Normal file
1
modules/programs/nvim/plugins/comment-nvim.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
require("Comment").setup()
|
||||||
8
modules/programs/nvim/plugins/copilot-lua.lua
Normal file
8
modules/programs/nvim/plugins/copilot-lua.lua
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
require("copilot").setup({
|
||||||
|
suggestion = { enabled = false },
|
||||||
|
panel = { enabled = false },
|
||||||
|
})
|
||||||
|
vim.api.nvim_create_autocmd("VimEnter", {
|
||||||
|
desc = "Disable Copilot by default on startup",
|
||||||
|
command = "Copilot disable",
|
||||||
|
})
|
||||||
9
modules/programs/nvim/plugins/dashboard-nvim.lua
Normal file
9
modules/programs/nvim/plugins/dashboard-nvim.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
require("dashboard").setup({
|
||||||
|
theme = "hyper",
|
||||||
|
config = {
|
||||||
|
packages = { enable = false },
|
||||||
|
week_header = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
71
modules/programs/nvim/plugins/formatter-nvim.lua
Normal file
71
modules/programs/nvim/plugins/formatter-nvim.lua
Normal file
|
|
@ -0,0 +1,71 @@
|
||||||
|
-- Provides the Format, FormatWrite, FormatLock, and FormatWriteLock commands
|
||||||
|
require("formatter").setup({
|
||||||
|
-- Enable or disable logging
|
||||||
|
logging = true,
|
||||||
|
-- Set the log level
|
||||||
|
log_level = vim.log.levels.WARN,
|
||||||
|
-- All formatter configurations are opt-in
|
||||||
|
filetype = {
|
||||||
|
json = {
|
||||||
|
require("formatter.filetypes.json").jq,
|
||||||
|
},
|
||||||
|
lua = {
|
||||||
|
require("formatter.filetypes.lua").stylua,
|
||||||
|
},
|
||||||
|
nix = {
|
||||||
|
require("formatter.filetypes.nix").nixpkgs_fmt,
|
||||||
|
},
|
||||||
|
python = {
|
||||||
|
require("formatter.filetypes.python").black,
|
||||||
|
},
|
||||||
|
rust = {
|
||||||
|
require("formatter.filetypes.rust").rustfmt,
|
||||||
|
},
|
||||||
|
sh = {
|
||||||
|
require("formatter.filetypes.sh").shfmt,
|
||||||
|
},
|
||||||
|
toml = {
|
||||||
|
require("formatter.filetypes.toml").taplo,
|
||||||
|
},
|
||||||
|
yaml = {
|
||||||
|
require("formatter.filetypes.yaml").yamlfmt,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- HACK to use specific formatters only when specified
|
||||||
|
alejandra = {
|
||||||
|
require("formatter.filetypes.nix").alejandra,
|
||||||
|
},
|
||||||
|
isort = {
|
||||||
|
require("formatter.filetypes.python").isort,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Use the special "*" filetype for defining formatter configurations on
|
||||||
|
-- any filetype
|
||||||
|
["*"] = {
|
||||||
|
-- "formatter.filetypes.any" defines default configurations for any
|
||||||
|
-- filetype
|
||||||
|
require("formatter.filetypes.any").remove_trailing_whitespace,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_user_command("Fmt", function(opts)
|
||||||
|
local params = vim.split(opts.args, "%s+", { trimempty = true })
|
||||||
|
local filetype = vim.bo.filetype
|
||||||
|
vim.cmd("set filetype=" .. params[1]) -- fake filetype
|
||||||
|
vim.cmd(":Format")
|
||||||
|
vim.cmd("set filetype=" .. filetype) -- restore original filetype
|
||||||
|
end, {
|
||||||
|
nargs = 1,
|
||||||
|
complete = function()
|
||||||
|
local languages = {
|
||||||
|
nix = { "alejandra" },
|
||||||
|
python = { "isort" },
|
||||||
|
}
|
||||||
|
return languages[vim.bo.filetype] or {}
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
require("which-key").register({
|
||||||
|
["="] = { "<cmd>Format<cr>", "format (formatter)" },
|
||||||
|
}, { noremap = true, silent = true })
|
||||||
1
modules/programs/nvim/plugins/gitsigns-nvim.lua
Normal file
1
modules/programs/nvim/plugins/gitsigns-nvim.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
require("gitsigns").setup()
|
||||||
44
modules/programs/nvim/plugins/lualine-nvim.lua
Normal file
44
modules/programs/nvim/plugins/lualine-nvim.lua
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
require("lualine").setup({
|
||||||
|
options = {
|
||||||
|
icons_enabled = true,
|
||||||
|
theme = "auto",
|
||||||
|
component_separators = "|",
|
||||||
|
section_separators = { left = "", right = "" },
|
||||||
|
disabled_filetypes = {
|
||||||
|
statusline = {},
|
||||||
|
winbar = {},
|
||||||
|
},
|
||||||
|
ignore_focus = {},
|
||||||
|
always_divide_middle = true,
|
||||||
|
globalstatus = false,
|
||||||
|
refresh = {
|
||||||
|
statusline = 1000,
|
||||||
|
tabline = 1000,
|
||||||
|
winbar = 1000,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = {
|
||||||
|
{ "mode", separator = { left = "" }, right_padding = 2 },
|
||||||
|
},
|
||||||
|
lualine_b = { "branch", "diff", "diagnostics" },
|
||||||
|
lualine_c = { "filename", "lsp_progress" },
|
||||||
|
lualine_x = { "encoding", "fileformat", "filetype" },
|
||||||
|
lualine_y = { "progress" },
|
||||||
|
lualine_z = {
|
||||||
|
{ "location", separator = { right = "" }, left_padding = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
inactive_sections = {
|
||||||
|
lualine_a = {},
|
||||||
|
lualine_b = {},
|
||||||
|
lualine_c = { "filename" },
|
||||||
|
lualine_x = { "location" },
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = {},
|
||||||
|
},
|
||||||
|
tabline = {},
|
||||||
|
winbar = {},
|
||||||
|
inactive_winbar = {},
|
||||||
|
extensions = {},
|
||||||
|
})
|
||||||
21
modules/programs/nvim/plugins/noice-nvim.lua
Normal file
21
modules/programs/nvim/plugins/noice-nvim.lua
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
require("noice").setup({
|
||||||
|
lsp = {
|
||||||
|
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||||
|
override = {
|
||||||
|
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||||
|
["vim.lsp.util.stylize_markdown"] = true,
|
||||||
|
["cmp.entry.get_documentation"] = true,
|
||||||
|
},
|
||||||
|
progress = {
|
||||||
|
enabled = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- you can enable a preset for easier configuration
|
||||||
|
presets = {
|
||||||
|
bottom_search = true, -- use a classic bottom cmdline for search
|
||||||
|
command_palette = true, -- position the cmdline and popupmenu together
|
||||||
|
long_message_to_split = true, -- long messages will be sent to a split
|
||||||
|
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||||
|
lsp_doc_border = false, -- add a border to hover docs and signature help
|
||||||
|
},
|
||||||
|
})
|
||||||
1
modules/programs/nvim/plugins/nvim-autopairs.lua
Normal file
1
modules/programs/nvim/plugins/nvim-autopairs.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
require("nvim-autopairs").setup()
|
||||||
5
modules/programs/nvim/plugins/nvim-lastplace.lua
Normal file
5
modules/programs/nvim/plugins/nvim-lastplace.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
require("nvim-lastplace").setup({
|
||||||
|
lastplace_ignore_buftype = { "quickfix", "nofile", "help" },
|
||||||
|
lastplace_ignore_filetype = { "gitcommit", "gitrebase", "svn", "hgcommit" },
|
||||||
|
lastplace_open_folds = true,
|
||||||
|
})
|
||||||
1
modules/programs/nvim/plugins/nvim-surround.lua
Normal file
1
modules/programs/nvim/plugins/nvim-surround.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
require("nvim-surround").setup({})
|
||||||
10
modules/programs/nvim/plugins/nvim-tree-lua.lua
Normal file
10
modules/programs/nvim/plugins/nvim-tree-lua.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
-- disable netrw at the very start of your init.lua (strongly advised)
|
||||||
|
vim.g.loaded_netrw = 1
|
||||||
|
vim.g.loaded_netrwPlugin = 1
|
||||||
|
-- set termguicolors to enable highlight groups
|
||||||
|
vim.opt.termguicolors = true
|
||||||
|
-- empty setup using defaults
|
||||||
|
require("nvim-tree").setup()
|
||||||
|
require("which-key").register({
|
||||||
|
t = { "<cmd>NvimTreeFindFileToggle<cr>", "nvim tree" },
|
||||||
|
}, { prefix = "<leader>t", silent = true })
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
require("nvim-treesitter.configs").setup({
|
||||||
|
textsubjects = {
|
||||||
|
enable = true,
|
||||||
|
prev_selection = ",", -- (Optional) keymap to select the previous selection
|
||||||
|
keymaps = { ["."] = "textsubjects-smart" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
require("nvim-treesitter.configs").setup({
|
||||||
|
context_commentstring = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
18
modules/programs/nvim/plugins/orgmode.lua
Normal file
18
modules/programs/nvim/plugins/orgmode.lua
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
local orgmode = require("orgmode")
|
||||||
|
-- Load custom treesitter grammar for org filetype
|
||||||
|
orgmode.setup_ts_grammar()
|
||||||
|
-- Treesitter configuration
|
||||||
|
require("nvim-treesitter.configs").setup({
|
||||||
|
-- If TS highlights are not enabled at all, or disabled via `disable` prop,
|
||||||
|
-- highlighting will fallback to default Vim syntax highlighting
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
-- Required for spellcheck, some LaTex highlights and
|
||||||
|
-- code block highlights that do not have ts grammar
|
||||||
|
additional_vim_regex_highlighting = { "org" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
orgmode.setup({
|
||||||
|
org_agenda_files = { "~/Notes/org" },
|
||||||
|
org_default_notes_file = "~/Notes/org/refile.org",
|
||||||
|
})
|
||||||
4
modules/programs/nvim/plugins/smartcolumn-nvim.lua
Normal file
4
modules/programs/nvim/plugins/smartcolumn-nvim.lua
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
require("smartcolumn").setup({
|
||||||
|
colorcolumn = 120,
|
||||||
|
disabled_filetypes = { "help", "text", "markdown", "dashboard" },
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
require("telescope").load_extension("fzf")
|
||||||
9
modules/programs/nvim/plugins/telescope-nvim.lua
Normal file
9
modules/programs/nvim/plugins/telescope-nvim.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
require("which-key").register({
|
||||||
|
f = {
|
||||||
|
name = "find",
|
||||||
|
f = { "<cmd>Telescope find_files<cr>", "find file" },
|
||||||
|
l = { "<cmd>Telescope current_buffer_fuzzy_find<cr>", "find line" },
|
||||||
|
g = { "<cmd>Telescope live_grep<cr>", "live grep" },
|
||||||
|
b = { "<cmd>Telescope buffers<cr>", "find buffer" },
|
||||||
|
},
|
||||||
|
}, { prefix = "<leader>" })
|
||||||
7
modules/programs/nvim/plugins/telescope-zoxide.lua
Normal file
7
modules/programs/nvim/plugins/telescope-zoxide.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
require("telescope").load_extension("zoxide")
|
||||||
|
require("which-key").register({
|
||||||
|
f = {
|
||||||
|
name = "find",
|
||||||
|
z = { "<cmd>Telescope zoxide list<cr>", "find location" },
|
||||||
|
},
|
||||||
|
}, { prefix = "<leader>" })
|
||||||
1
modules/programs/nvim/plugins/todo-comments-nvim.lua
Normal file
1
modules/programs/nvim/plugins/todo-comments-nvim.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
require("todo-comments").setup({})
|
||||||
2
modules/programs/nvim/plugins/which-key-nvim.lua
Normal file
2
modules/programs/nvim/plugins/which-key-nvim.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
vim.o.timeout = true
|
||||||
|
vim.o.timeoutlen = 500
|
||||||
12
overlays/channels.nix
Normal file
12
overlays/channels.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ lib, inputs }:
|
||||||
|
|
||||||
|
final: prev: {
|
||||||
|
master = import inputs.master {
|
||||||
|
inherit (prev) system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
stable = import inputs.stable {
|
||||||
|
inherit (prev) system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,81 +1,9 @@
|
||||||
{ inputs }: final: prev:
|
{ inputs, lib }:
|
||||||
let
|
|
||||||
mkDate = longDate: (prev.lib.concatStringsSep "-" [
|
|
||||||
(builtins.substring 0 4 longDate)
|
|
||||||
(builtins.substring 4 2 longDate)
|
|
||||||
(builtins.substring 6 2 longDate)
|
|
||||||
]);
|
|
||||||
mkVersionSrc = src: "unstable-" + builtins.substring 0 7 src.rev;
|
|
||||||
mkVersionInput = input: "unstable-" + mkDate (input.lastModifiedDate or "19700101") + "_" + (input.shortRev or "dirty");
|
|
||||||
in
|
|
||||||
{
|
|
||||||
agenix = inputs.agenix.packages.${prev.system}.default;
|
|
||||||
attic = inputs.attic.packages.${prev.system}.default;
|
|
||||||
hyprpaper = inputs.hyprpaper.packages.${prev.system}.default;
|
|
||||||
neovim-nightly = inputs.neovim.packages.${prev.system}.default;
|
|
||||||
nil = inputs.nil.packages.${prev.system}.default;
|
|
||||||
|
|
||||||
logseq-wayland = prev.symlinkJoin {
|
lib.composeManyExtensions [
|
||||||
name = "logseq-wayland";
|
(import ./channels.nix { inherit inputs lib; })
|
||||||
paths = [ prev.logseq ];
|
(import ./packages.nix { inherit inputs lib; })
|
||||||
nativeBuildInputs = [ prev.makeWrapper ];
|
(import ./vimPlugins.nix { inherit inputs lib; })
|
||||||
postBuild = ''
|
(import ./wayland.nix { inherit inputs lib; })
|
||||||
wrapProgram $out/bin/logseq \
|
(import ./lib.nix { inherit inputs lib; })
|
||||||
--add-flags "--socket=wayland --enable-features=UseOzonePlatform --ozone-platform=wayland"
|
]
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
waybar-hyprland = prev.waybar.overrideAttrs (old: {
|
|
||||||
pname = "${old.pname}-hyprland";
|
|
||||||
postPatch = old.postPatch or "" + ''
|
|
||||||
sed -i 's,zext_workspace_handle_v1_activate(workspace_handle_);,const std::string command = "${final.hyprland}/bin/hyprctl dispatch workspace " + name_;\n\tsystem(command.c_str());,g' src/modules/wlr/workspace_manager.cpp
|
|
||||||
'';
|
|
||||||
mesonFlags = old.mesonFlags or [ ] ++ [ "-Dexperimental=true" ];
|
|
||||||
});
|
|
||||||
|
|
||||||
vimPlugins = prev.vimPlugins // {
|
|
||||||
nvim-treesitter-textsubjects = prev.vimUtils.buildVimPluginFrom2Nix {
|
|
||||||
pname = "nvim-treesitter-textsubjects";
|
|
||||||
version = mkVersionInput inputs.nvim-treesitter-textsubjects;
|
|
||||||
src = inputs.nvim-treesitter-textsubjects;
|
|
||||||
};
|
|
||||||
|
|
||||||
smartcolumn-nvim = prev.vimUtils.buildVimPluginFrom2Nix {
|
|
||||||
pname = "smartcolumn-nvim";
|
|
||||||
version = mkVersionInput inputs.smartcolumn-nvim;
|
|
||||||
src = inputs.smartcolumn-nvim;
|
|
||||||
};
|
|
||||||
|
|
||||||
copilot-lua = prev.vimPlugins.copilot-lua.overrideAttrs (old: {
|
|
||||||
version = mkVersionInput inputs.copilot-lua;
|
|
||||||
src = inputs.copilot-lua;
|
|
||||||
});
|
|
||||||
|
|
||||||
lspsaga-nvim-original = prev.vimPlugins.lspsaga-nvim-original.overrideAttrs (old: {
|
|
||||||
version = mkVersionInput inputs.lspsaga-nvim;
|
|
||||||
src = inputs.lspsaga-nvim;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
neovide-hyprland = final.symlinkJoin {
|
|
||||||
name = "neovide-hyprland-${final.neovide.version}";
|
|
||||||
paths = [ final.neovide ];
|
|
||||||
nativeBuildInputs = [ final.makeWrapper ];
|
|
||||||
postBuild = ''
|
|
||||||
rm $out/bin/neovide
|
|
||||||
makeWrapper ${final.neovide}/bin/neovide $out/bin/neovide --set WINIT_UNIX_BACKEND x11
|
|
||||||
'';
|
|
||||||
meta = final.neovide.meta // {
|
|
||||||
mainProgram = "neovide";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
master = import inputs.master {
|
|
||||||
inherit (prev) system;
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
stable = import inputs.stable {
|
|
||||||
inherit (prev) system;
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
|
||||||
5
overlays/lib.nix
Normal file
5
overlays/lib.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{ lib, inputs }:
|
||||||
|
|
||||||
|
final: prev: {
|
||||||
|
inherit lib;
|
||||||
|
}
|
||||||
10
overlays/packages.nix
Normal file
10
overlays/packages.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ inputs, lib }:
|
||||||
|
|
||||||
|
final: prev:
|
||||||
|
{
|
||||||
|
agenix = inputs.agenix.packages.${prev.system}.default;
|
||||||
|
attic = inputs.attic.packages.${prev.system}.default;
|
||||||
|
hyprpaper = inputs.hyprpaper.packages.${prev.system}.default;
|
||||||
|
neovim-nightly = inputs.neovim.packages.${prev.system}.default;
|
||||||
|
nil = inputs.nil.packages.${prev.system}.default;
|
||||||
|
}
|
||||||
29
overlays/vimPlugins.nix
Normal file
29
overlays/vimPlugins.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
{ inputs, lib }:
|
||||||
|
|
||||||
|
final: prev:
|
||||||
|
with lib.my;
|
||||||
|
{
|
||||||
|
vimPlugins = prev.vimPlugins // {
|
||||||
|
nvim-treesitter-textsubjects = prev.vimUtils.buildVimPluginFrom2Nix {
|
||||||
|
pname = "nvim-treesitter-textsubjects";
|
||||||
|
version = mkVersionInput inputs.nvim-treesitter-textsubjects;
|
||||||
|
src = inputs.nvim-treesitter-textsubjects;
|
||||||
|
};
|
||||||
|
|
||||||
|
smartcolumn-nvim = prev.vimUtils.buildVimPluginFrom2Nix {
|
||||||
|
pname = "smartcolumn-nvim";
|
||||||
|
version = mkVersionInput inputs.smartcolumn-nvim;
|
||||||
|
src = inputs.smartcolumn-nvim;
|
||||||
|
};
|
||||||
|
|
||||||
|
copilot-lua = prev.vimPlugins.copilot-lua.overrideAttrs (old: {
|
||||||
|
version = mkVersionInput inputs.copilot-lua;
|
||||||
|
src = inputs.copilot-lua;
|
||||||
|
});
|
||||||
|
|
||||||
|
lspsaga-nvim-original = prev.vimPlugins.lspsaga-nvim-original.overrideAttrs (old: {
|
||||||
|
version = mkVersionInput inputs.lspsaga-nvim;
|
||||||
|
src = inputs.lspsaga-nvim;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
33
overlays/wayland.nix
Normal file
33
overlays/wayland.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
{ lib, inputs }:
|
||||||
|
|
||||||
|
final: prev: {
|
||||||
|
neovide-hyprland = final.symlinkJoin {
|
||||||
|
name = "neovide-hyprland-${final.neovide.version}";
|
||||||
|
paths = [ final.neovide ];
|
||||||
|
nativeBuildInputs = [ final.makeWrapper ];
|
||||||
|
postBuild = ''
|
||||||
|
rm $out/bin/neovide
|
||||||
|
makeWrapper ${final.neovide}/bin/neovide $out/bin/neovide --set WINIT_UNIX_BACKEND x11
|
||||||
|
'';
|
||||||
|
meta = final.neovide.meta // {
|
||||||
|
mainProgram = "neovide";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
logseq-wayland = prev.symlinkJoin {
|
||||||
|
name = "logseq-wayland";
|
||||||
|
paths = [ prev.logseq ];
|
||||||
|
nativeBuildInputs = [ prev.makeWrapper ];
|
||||||
|
postBuild = ''
|
||||||
|
wrapProgram $out/bin/logseq \
|
||||||
|
--add-flags "--socket=wayland --enable-features=UseOzonePlatform --ozone-platform=wayland"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
waybar-hyprland = prev.waybar.overrideAttrs (old: {
|
||||||
|
pname = "${old.pname}-hyprland";
|
||||||
|
postPatch = old.postPatch or "" + ''
|
||||||
|
sed -i 's,zext_workspace_handle_v1_activate(workspace_handle_);,const std::string command = "${final.hyprland}/bin/hyprctl dispatch workspace " + name_;\n\tsystem(command.c_str());,g' src/modules/wlr/workspace_manager.cpp
|
||||||
|
'';
|
||||||
|
mesonFlags = old.mesonFlags or [ ] ++ [ "-Dexperimental=true" ];
|
||||||
|
});
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue