Compare commits

...

118 Commits

Author SHA1 Message Date
Moritz Böhme 101ab079ac
fix(river): add back de layout 2024-08-30 10:30:23 +02:00
Moritz Böhme 6dde791fb7
feat(kitty): resize in steps 2024-08-30 10:29:59 +02:00
Moritz Böhme 6487394f14
refactor: small updates 2024-08-30 10:29:17 +02:00
Moritz Böhme f72096b717
feat: activate hjkl on tap and hold 2024-08-30 10:28:22 +02:00
Moritz Böhme ea07a73d07
feat: add kanshi profile for laptop 2024-08-30 10:27:00 +02:00
Moritz Böhme 6cbe647af7
feat: use kanata on laptop 2024-08-20 14:00:20 +02:00
Moritz Böhme 781d06f3de
feat: switch back to river 2024-08-20 13:58:45 +02:00
Moritz Böhme c249fab5cb
Merge remote-tracking branch 'refs/remotes/origin/nixos' into nixos 2024-08-19 09:59:46 +02:00
Moritz Böhme 02473b02f3
feat: add poetry to available packages 2024-08-19 09:55:03 +02:00
Moritz Böhme 7fb108df31
feat: try out intel-one-mono font 2024-08-19 09:54:40 +02:00
Moritz Böhme 56505a065f
feat(nvim): add back zen-mode 2024-08-19 09:49:13 +02:00
Moritz Böhme a4cb8f2dfd
feat: add lock keybind 2024-08-19 09:48:18 +02:00
Moritz Böhme f08c343ddf
feat: make luasnip handle injected languages 2024-08-18 15:17:43 +02:00
Moritz Böhme fc4dcbeeec
fix: issues from input bump 2024-08-18 13:48:41 +02:00
Moritz Böhme f19d50407e
feat: configure desktop monitors 2024-08-18 13:20:03 +02:00
Moritz Böhme 5c666feefb
Merge remote-tracking branch 'refs/remotes/origin/nixos' into nixos 2024-08-18 13:12:15 +02:00
Moritz Böhme 82e64e198f
feat: remove cmp-spell and copilot nvim plugins 2024-08-18 13:06:32 +02:00
Moritz Böhme 928f8b77fa
feat: use nom for rebuild only 2024-08-18 13:05:32 +02:00
Moritz Böhme 6bcccc1ff9
chore: update inputs 2024-08-18 13:03:18 +02:00
Moritz Böhme 9e2c4205d9
feat: improve snippet completion 2024-08-18 12:31:09 +02:00
Moritz Böhme 667b7a9db3
feat: add elixir stuff 2024-08-18 12:28:52 +02:00
Moritz Böhme cb8597a97a
Merge remote-tracking branch 'refs/remotes/origin/nixos' into nixos 2024-08-12 11:07:39 +02:00
Moritz Böhme 1cae5d144a
feat: add hyprland monitor options 2024-08-12 11:06:18 +02:00
Moritz Böhme 7472b94108 feat: do not use nom by default 2024-07-30 14:56:24 +02:00
Moritz Böhme e94c6ea4d7 feat: add short alias for default flake 2024-07-30 14:56:01 +02:00
Moritz Böhme b8ec445560 feat!: prefix P abbr with a dot 2024-07-30 14:55:23 +02:00
Moritz Böhme 9f931b563f
refactor: small clean up 2024-07-19 16:58:38 +02:00
Moritz Böhme a11717c8ce
feat: configure nil_ls 2024-07-01 21:41:32 +02:00
Moritz Böhme 55325053ec
fix: replace deprecated function 2024-07-01 21:41:04 +02:00
Moritz Böhme 9bd0870f1d
fix: typo 2024-07-01 21:40:49 +02:00
Moritz Böhme 189036f2c8
fix: openssh CVE-2024-6387 2024-07-01 21:39:05 +02:00
Moritz Böhme 72def5c785
feat: add more git abbreviations 2024-07-01 10:14:52 +02:00
Moritz Böhme 891283aa43
chore: update imputs 2024-07-01 07:06:23 +02:00
Moritz Böhme 17ab5faf24
fix: nixos-desktop keyboard layout 2024-07-01 07:04:54 +02:00
Moritz Böhme 2e38c56c93
feat: enable nvidia support for podman 2024-06-30 18:50:29 +02:00
Moritz Böhme fe78e6c206
feat: remove kanshi config 2024-06-30 18:50:11 +02:00
Moritz Böhme 331c34b147
fix!: inlay hint toggle (toggles globally now) 2024-06-30 18:49:14 +02:00
Moritz Böhme 9bbe4516f4
refactor: improve comment 2024-06-30 18:48:32 +02:00
Moritz Böhme 1dee671b98
refactor: add comment and move inherit 2024-06-30 18:46:10 +02:00
Moritz Böhme 4328c77625
refactor: finalPackage options was removed 2024-06-30 18:44:54 +02:00
Moritz Böhme 2381db697d
fix: for new hardware 2024-06-30 18:44:02 +02:00
Moritz Böhme 4762f6f196
fix: desktop keyboard layout 2024-06-30 18:42:03 +02:00
Moritz Böhme b03934b4a3
feat: add vimtex 2024-06-27 10:12:38 +02:00
Moritz Böhme 1a2369c8db
feat: add latexindent formatter 2024-06-24 09:43:55 +02:00
Moritz Böhme d4db0cec27
fix: plantuml-syntax 2024-06-24 09:43:22 +02:00
Moritz Böhme b5b54eb0e7
feat: update hyprland 2024-06-24 09:42:58 +02:00
Moritz Böhme 053f516175
Merge remote-tracking branch 'refs/remotes/origin/nixos' into nixos 2024-06-19 09:31:45 +02:00
Moritz Böhme 5c73524196
feat: use kitty again 2024-06-19 09:26:34 +02:00
Moritz Böhme f837b84892
chore: update inputs 2024-06-19 09:26:22 +02:00
Moritz Böhme c3bec6a16d
fix: python versions 2024-06-19 09:25:34 +02:00
Moritz Böhme 4dd2b63b9a
feat: update stable channel 2024-06-19 09:24:47 +02:00
Moritz Böhme 57d91555a0
Merge remote-tracking branch 'refs/remotes/origin/nixos' into nixos 2024-06-17 11:14:04 +02:00
Moritz Böhme 3b4b7b6657
feat: fix some wayland issues 2024-06-17 11:13:39 +02:00
Moritz Böhme 73689d50bf
feat: enable gitbutler 2024-06-17 11:13:09 +02:00
Moritz Böhme ca9f07d950
fix: hyprland 2024-06-17 11:12:59 +02:00
Moritz Böhme fad19c6a58
feat!: remove statuscol-nvim 2024-06-17 11:12:45 +02:00
Moritz Böhme ed9c5111e4
feat: add gitbutler 2024-06-17 11:12:00 +02:00
Moritz Böhme 8ce8af36de
feat: improve jetbrains 2024-06-17 10:02:38 +02:00
Moritz Böhme fcfc548717
feat: improve nvim experience 2024-06-17 10:02:10 +02:00
Moritz Böhme c11a2c5596
chore: update inputs 2024-06-17 10:01:32 +02:00
Moritz Böhme e45b2241fa
feat: update nixd config 2024-06-17 10:01:08 +02:00
Moritz Böhme a5a784b2d5
refactor: clean up a bit 2024-06-17 09:59:39 +02:00
Moritz Böhme 11d13544c1 feat: improve ideavimrc 2024-06-12 09:48:47 +02:00
Moritz Böhme e83ce10ad7 feat: add trigger for laptop open/close 2024-06-12 09:48:04 +02:00
Moritz Böhme bdc849205e Merge remote-tracking branch 'refs/remotes/origin/nixos' into nixos 2024-06-12 09:42:13 +02:00
Moritz Böhme bee307ae9c
fix(jetbrains): use correct package for idea 2024-05-27 16:17:34 +02:00
Moritz Böhme f6174bc0ba
feat: add jetbrains module 2024-05-27 15:09:37 +02:00
Moritz Böhme b526cfc6f8
feat: improve null-ls-nvim experience 2024-05-13 10:34:19 +02:00
Moritz Böhme f851cd63f6
refactor: remove outdated hack 2024-05-13 10:33:57 +02:00
Moritz Böhme f417d8b819
fix: new nvim problems 2024-05-13 10:33:17 +02:00
Moritz Böhme 946cb89900 Merge remote-tracking branch 'refs/remotes/origin/nixos' into nixos 2024-04-24 09:02:25 +02:00
Moritz Böhme 462cb1d851 feat: add plantuml-syntax plugin 2024-04-24 09:01:42 +02:00
Moritz Böhme f1b86275da
Merge remote-tracking branch 'refs/remotes/origin/nixos' into nixos 2024-04-22 09:38:39 +02:00
Moritz Böhme 5aba3a032c
feat: add tags keybinds to river 2024-04-22 09:35:59 +02:00
Moritz Böhme 31cd3f9957
feat: switch back to hyprland 2024-04-22 09:35:32 +02:00
Moritz Böhme 05e7391cb4
fix: various small things 2024-04-22 09:35:04 +02:00
Moritz Böhme 7ddd60e36c
feat: add sixel support to viu 2024-04-22 09:31:59 +02:00
Moritz Böhme 1b5659ac6c
feat: add easy mapping for "Gedit :" 2024-04-21 12:00:38 +02:00
Moritz Böhme 42edc5bd2f
fix: todo-comments-nvim plugin 2024-04-21 11:54:36 +02:00
Moritz Böhme b1ecc723cc
feat: do not use nix super by default 2024-04-21 11:54:18 +02:00
Moritz Böhme 2f4f58a68c
feat: update inputs 2024-04-21 11:54:00 +02:00
Moritz Böhme 54e55f4b6d
feat: cleanup 2024-04-21 11:21:46 +02:00
Moritz Böhme b09d30959b
feat: switch back to hyprland 2024-04-21 10:57:01 +02:00
Moritz Böhme 6a1b81565a
fix: typo 2024-03-24 13:22:53 +01:00
Moritz Böhme a2a624d534
feat: use river 2024-03-24 13:22:41 +01:00
Moritz Böhme 9acdfd5e4b
feat(river): add binds and polish a bit 2024-03-24 13:21:59 +01:00
Moritz Böhme e1a1c5060f
feat(river): use correct targets 2024-03-24 13:21:10 +01:00
Moritz Böhme 67a019f76b
feat: improve foot settings 2024-03-24 13:20:14 +01:00
Moritz Böhme c02b5c01e5
feat: use git river version 2024-03-24 13:16:27 +01:00
Moritz Böhme 006c4394f3
feat: add tofi module 2024-03-24 13:15:17 +01:00
Moritz Böhme ac9b136e6c
Merge remote-tracking branch 'refs/remotes/origin/nixos' into nixos 2024-03-21 18:52:56 +01:00
Moritz Böhme 4ff3bfbf50
feat: remove programs/services and add others 2024-03-21 18:47:46 +01:00
Moritz Böhme 10f9389319
feat: improve gi script 2024-03-21 18:46:06 +01:00
Moritz Böhme e714349fe1
feat: add river and foot modules 2024-03-21 17:19:06 +01:00
Moritz Böhme 09caae2e4e
feat: add gleam formatting and snippets 2024-03-02 13:54:08 +01:00
Moritz Böhme ad8ff7d016
feat(desktop): add obsidian (with wayland support) 2024-02-17 09:43:48 +01:00
Moritz Böhme e07c55d902
feat(git): add extra config and switch to delta 2024-02-17 09:43:02 +01:00
Moritz Böhme 8dab093deb
chore: update inputs 2024-02-16 11:28:30 +01:00
Moritz Böhme 43d2bd3645
feat: do not notify using nix-monitored 2024-02-16 11:28:08 +01:00
Moritz Böhme 71fe796589
refactor: move lsp-config 2024-02-16 11:02:46 +01:00
Moritz Böhme 66cbbaa4ba
feat: add nix-monitored 2024-02-16 11:02:24 +01:00
Moritz Böhme d098a8f907
refactor(nvim): add parser dir to front of runtimedir 2024-02-16 09:46:23 +01:00
Moritz Böhme 591f981e71
feat(nvim)!: remove nvim puppeteer 2024-02-16 09:45:20 +01:00
Moritz Böhme 8a9d67a3d5
fix(nvim)!: remove treesitter override because of lua issues 2024-02-16 09:44:17 +01:00
Moritz Böhme 5559e9291e Merge remote-tracking branch 'refs/remotes/origin/nixos' into nixos 2024-02-13 09:40:24 +01:00
Moritz Böhme 73f597b1c0 feat(nvim)!: do not use rope for pylsp 2024-02-13 09:27:27 +01:00
Moritz Böhme 298aa410eb
refacor: firefox search engine settings 2024-02-12 10:27:16 +01:00
Moritz Böhme 33df89b381
refator: sort list 2024-02-12 10:26:27 +01:00
Moritz Böhme 2b8335ffb0
fix: remove nix-super cache 2024-02-12 10:19:31 +01:00
Moritz Böhme 386da4ccb9
Merge remote-tracking branch 'refs/remotes/origin/nixos' into nixos 2024-02-12 10:13:28 +01:00
Moritz Böhme 1166a87fcb
feat(nvim): add gleam lsp 2024-02-12 10:12:07 +01:00
Moritz Böhme 4cf72f2a09
feat(nvim)!: remove unused plugins 2024-02-12 10:11:41 +01:00
Moritz Böhme 2be2adcaab
feat(nvim): add hawt-keys plugin 2024-02-12 10:11:13 +01:00
Moritz Böhme 9e4fdb00e3
feat(flake): add module for overlays 2024-02-12 10:10:32 +01:00
Moritz Böhme a14f999ab9
feat(nvim): add python snippets 2024-02-11 21:14:21 +01:00
Moritz Böhme 96697c684c
feat(nvim): improve cmp + luasnip keybinds 2024-02-11 21:13:50 +01:00
Moritz Böhme e87d0c7ec3
feat(nvim): add luasnip snippets 2024-02-10 18:22:09 +01:00
Moritz Böhme 59c843d452
feat: add exercism module 2024-02-03 20:49:24 +01:00
62 changed files with 2955 additions and 1397 deletions

View File

@ -1,9 +0,0 @@
{
"options": {
"enable": true,
"target": {
"args": [],
"installable": ".#nixosConfigurations.nixos-desktop.options"
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -10,18 +10,20 @@
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager/bf4b576f84e1ce54ec886836bae7695738aa5a6c"; # FIXME: home-manager.url = "github:nix-community/home-manager";
impermanence.url = "github:nix-community/impermanence"; impermanence.url = "github:nix-community/impermanence";
master.url = "github:nixos/nixpkgs"; master.url = "github:nixos/nixpkgs";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
stable.url = "github:nixos/nixpkgs/nixos-23.05"; stable.url = "github:nixos/nixpkgs/nixos-24.05";
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
nix-index-database.url = "github:Mic92/nix-index-database"; nix-index-database.url = "github:Mic92/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
# Programs # Programs
nix-super.url = "github:privatevoid-net/nix-super"; nix-super.url = "github:privatevoid-net/nix-super";
nix-monitored.url = "github:ners/nix-monitored";
nix-monitored.inputs.nixpkgs.follows = "nixpkgs";
timers.url = "git+https://gitea.moritzboeh.me/moritz/timers.git"; timers.url = "git+https://gitea.moritzboeh.me/moritz/timers.git";
# Neovim # Neovim
@ -31,26 +33,32 @@
nix-lazy-nvim.url = "git+https://git.moritzboeh.me/moritz/NixLazy.nvim"; nix-lazy-nvim.url = "git+https://git.moritzboeh.me/moritz/NixLazy.nvim";
nvim-lspconfig.flake = false; nvim-lspconfig.flake = false;
nvim-lspconfig.url = "github:neovim/nvim-lspconfig"; nvim-lspconfig.url = "github:neovim/nvim-lspconfig";
nvim-puppeteer.flake = false;
nvim-puppeteer.url = "github:chrisgrieser/nvim-puppeteer";
nvim-treesitter.flake = false;
nvim-treesitter.url = "github:nvim-treesitter/nvim-treesitter";
smartcolumn-nvim.flake = false; smartcolumn-nvim.flake = false;
smartcolumn-nvim.url = "github:m4xshen/smartcolumn.nvim"; smartcolumn-nvim.url = "github:m4xshen/smartcolumn.nvim";
telekasten-nvim.flake = false; telekasten-nvim.flake = false;
telekasten-nvim.url = "github:renerocksai/telekasten.nvim"; telekasten-nvim.url = "github:renerocksai/telekasten.nvim";
none-ls-nvim.flake = false;
none-ls-nvim.url = "github:nvimtools/none-ls.nvim";
neotest-python.flake = false; neotest-python.flake = false;
neotest-python.url = "github:MoritzBoehme/neotest-python/fix-runtimepath-search"; neotest-python.url = "github:MoritzBoehme/neotest-python/fix-runtimepath-search";
statuscol-nvim.flake = false;
statuscol-nvim.url = "github:luukvbaal/statuscol.nvim/0.10"; # HACK: fix for neovim-nightly
gen-nvim.flake = false; gen-nvim.flake = false;
gen-nvim.url = "github:David-Kunz/gen.nvim"; gen-nvim.url = "github:David-Kunz/gen.nvim";
hawtkeys-nvim.flake = false;
hawtkeys-nvim.url = "github:tris203/hawtkeys.nvim";
none-ls-shellcheck-nvim.flake = false;
none-ls-shellcheck-nvim.url = "github:gbprod/none-ls-shellcheck.nvim";
cmp-vimtex.flake = false;
cmp-vimtex.url = "github:micangl/cmp-vimtex";
# river
river.url = "git+https://github.com/riverwm/river?submodules=1";
river.flake = false;
# Hyprland # Hyprland
hypr-contrib.url = "github:hyprwm/contrib"; hypr-contrib.url = "github:hyprwm/contrib";
hyprland.url = "github:hyprwm/Hyprland"; hyprland = {
type = "git";
url = "https://github.com/hyprwm/Hyprland";
submodules = true;
};
# Laptop # Laptop
asus-touchpad-numpad-driver.url = "github:MoritzBoehme/asus-touchpad-numpad-driver/german-layout"; asus-touchpad-numpad-driver.url = "github:MoritzBoehme/asus-touchpad-numpad-driver/german-layout";
@ -62,32 +70,8 @@
}; };
outputs = inputs@{ self, flake-parts, ... }: outputs = inputs@{ self, flake-parts, ... }:
let
defaultOverlays = [
inputs.hypr-contrib.overlays.default
self.overlays.default
];
finalOverlays = defaultOverlays ++ [
(
_: prev: {
master = import inputs.master {
inherit (prev) system;
overlays = defaultOverlays;
};
stable = import inputs.stable {
inherit (prev) system;
overlays = defaultOverlays;
};
nur = import inputs.nur {
pkgs = prev;
nurpkgs = prev;
};
}
)
];
in
flake-parts.lib.mkFlake { inherit inputs; } { flake-parts.lib.mkFlake { inherit inputs; } {
debug = true; # NOTE: for nixd
imports = [ imports = [
inputs.pre-commit-hooks.flakeModule inputs.pre-commit-hooks.flakeModule
inputs.devshell.flakeModule inputs.devshell.flakeModule
@ -95,12 +79,6 @@
systems = [ "x86_64-linux" ]; systems = [ "x86_64-linux" ];
perSystem = { config, self', inputs', pkgs, system, ... }: { perSystem = { config, self', inputs', pkgs, system, ... }: {
_module.args.pkgs =
import inputs.nixpkgs {
inherit system;
overlays = finalOverlays;
};
devshells.default = { devshells.default = {
devshell.startup.pre-commit-hook.text = config.pre-commit.installationScript; devshell.startup.pre-commit-hook.text = config.pre-commit.installationScript;
commands = [ commands = [
@ -155,20 +133,12 @@
legacyPackages = pkgs; legacyPackages = pkgs;
packages =
self.lib.filterAttrs (_: self.lib.isDerivation)
(self.overlays.default pkgs pkgs);
}; };
flake = { flake = {
lib = inputs.nixpkgs.lib.extend lib = inputs.nixpkgs.lib.extend
(self: _: { my = import ./lib { lib = self; }; }); (self: _: { my = import ./lib { lib = self; }; });
overlays.default = import ./overlays {
inherit inputs;
inherit (self) lib;
};
nixosConfigurations = self.lib.my.mapModules nixosConfigurations = self.lib.my.mapModules
(path: self.lib.nixosSystem { (path: self.lib.nixosSystem {
inherit (self) lib; inherit (self) lib;
@ -178,12 +148,6 @@
modules = modules =
[ [
./modules ./modules
{
nixpkgs = {
overlays = finalOverlays;
config.allowUnfree = true;
};
}
{ {
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
@ -220,10 +184,8 @@
"https://hyprland.cachix.org" "https://hyprland.cachix.org"
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
"https://pre-commit-hooks.cachix.org" "https://pre-commit-hooks.cachix.org"
"https://cache.privatevoid.net"
]; ];
extra-trusted-public-keys = [ extra-trusted-public-keys = [
"cache.privatevoid.net:SErQ8bvNWANeAvtsOESUwVYr2VJynfuc9JRwlzTTkVg="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc=" "pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc="

View File

@ -19,21 +19,21 @@
gaming.enable = true; gaming.enable = true;
personal.enable = true; personal.enable = true;
impermanence.enable = true; impermanence.enable = true;
webis.enable = true;
}; };
programs.hyprland = { programs.hyprland.enable = true;
nvidiaSupport = true; programs.hyprland.nvidiaSupport = true;
monitors = [ "HDMI-A-1,3840x2160,auto,1.2" ",preferred,auto,1" ]; programs.hyprland.keyboardLayouts = [ "us" "de" ];
extraConfig = "exec=hyprctl keyword monitor HDMI-A-1,3840x2160@120,auto,1.2"; programs.hyprland.monitors."HDMI-A-2" = { scale = 1.2; };
keyboardLayouts = [ "us" "de" ]; programs.exercism.enable = true;
};
services.wallpaper.enable = true; services.wallpaper.enable = true;
services.ollama.enable = true;
programs.ledger.enable = true;
}; };
virtualisation.containers.cdi.dynamic.nvidia.enable = true;
home-manager.users.moritz.home.packages = with pkgs; [ home-manager.users.moritz.home.packages = with pkgs; [
anki anki
calibre stable.calibre # NOTE: breaks often in unstable
]; ];
hardware = { hardware = {
@ -42,7 +42,6 @@
opengl = { opengl = {
enable = true; enable = true;
driSupport32Bit = true; driSupport32Bit = true;
driSupport = true;
}; };
# sensors # sensors
@ -69,7 +68,7 @@
defaultGateway = "192.168.0.1"; defaultGateway = "192.168.0.1";
nameservers = [ "192.168.0.4" ]; nameservers = [ "192.168.0.4" ];
useDHCP = false; useDHCP = false;
interfaces.enp42s0 = { interfaces.enp6s0 = {
ipv4.addresses = [ ipv4.addresses = [
{ {
address = "192.168.0.14"; address = "192.168.0.14";

View File

@ -1,23 +1,27 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config { config, lib, pkgs, modulesPath, ... }:
, lib
, modulesPath
, ...
}: {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot = {
initrd = {
availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
kernelModules = [ ];
};
kernelModules = [ "kvm-amd" ];
extraModulePackages = [ ];
};
hardware.cpu.amd.updateMicrocode = {
lib.mkDefault config.hardware.enableRedistributableFirmware; imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp6s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp7s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View File

@ -20,7 +20,117 @@
webis.enable = true; webis.enable = true;
impermanence.enable = true; impermanence.enable = true;
}; };
programs.hyprland.monitors = [ "HDMI-A-1,3840x2160,auto,1.2" ",preferred,auto,1" ]; programs.river.enable = true;
programs.hyprland.enable = false;
programs.exercism.enable = true;
};
users.users.moritz.packages = [ pkgs.poetry ];
home-manager.users.moritz.services.kanshi.profiles = {
undocked = {
outputs = [
{
criteria = "eDP-1";
}
];
};
docked = {
outputs = [
{
criteria = "eDP-1";
position = "640,1800"; # NOTE: 2160 / 1.2 = 1800
}
{
criteria = "DP-3";
scale = 1.2;
position = "0,0";
}
];
};
};
services.kanata = {
enable = true;
keyboards = {
laptop = {
devices = [
"/dev/input/by-path/platform-i8042-serio-0-event-kbd"
];
config = "
(defsrc
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w e r t y u i o p [ ] \
caps a s d f g h j k l ; ' ret
lsft z x c v b n m , . / rsft
lctl lmet lalt spc ralt rctl
)
(deflayermap (default)
;; tarmak 1a
j n
n k
k e
;; tarmak 1b
h m
m h
;; tarmak 2a
b z
z x
x c
;; tarmak 2b
e f
f t
t b
;; tarmak 3
c d
d s
s r
;; tarmak 4
r p
p ;
; o
o y
y j
;; tarmak 5
u l
l i
i u
;; caps-word tap-dance
lsft (tap-dance 200 (_ (caps-word 2000) _ _))
;; change ctrl alt and meta
lctl lalt
lmet lctl
lalt (tap-dance 200 (lmet (multi lmet alt) lmet lmet))
;; hjkl layer
ralt (tap-hold 200 200 (layer-switch hjkl) (layer-while-held hjkl)) ;; tap: switch hold: switch while held
;; switch to normal keyboard layout
rctl (layer-switch normal)
)
(deflayermap (normal)
rctl (layer-switch default))
(deflayermap (hjkl)
h left
j down
k up
l right
ralt (layer-switch default))
";
};
};
}; };
# BOOT # BOOT
@ -31,8 +141,8 @@
# SERVICES # SERVICES
services = { services = {
xserver.libinput.enable = true; libinput.enable = true;
xserver.libinput.touchpad.disableWhileTyping = true; libinput.touchpad.disableWhileTyping = true;
printing.enable = true; printing.enable = true;
logind.lidSwitch = "hybrid-sleep"; logind.lidSwitch = "hybrid-sleep";
}; };

View File

@ -1,75 +0,0 @@
{ config, ... }:
{
age.secrets = {
root-password.file = ../../secrets/root-password.age;
moritz-password.file = ../../secrets/moritz-password.age;
};
users.users = {
root.hashedPasswordFile = config.age.secrets.root-password.path;
moritz.hashedPasswordFile = config.age.secrets.moritz-password.path;
};
users.mutableUsers = false;
environment.persistence."/persist" = {
hideMounts = true;
directories = [
"/etc/NetworkManager/system-connections"
"/var/db/dhcpcd/"
"/var/lib/NetworkManager/"
"/var/lib/bluetooth"
"/var/lib/nixos"
"/var/lib/systemd/coredump"
"/var/log"
];
files = [
"/etc/machine-id"
"/etc/nix/id_rsa"
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_rsa_key.pub"
];
users.moritz = {
directories = [
".SynologyDrive/data"
".SynologyDrive/log"
".cache/keepassxc"
".cache/nvim/luac"
".config/Nextcloud"
".config/keepassxc"
".local/share/direnv"
".local/share/nvim"
".local/share/zoxide"
".local/share/JetBrains"
".config/JetBrains"
".local/state/nvim"
".config/kdeconnect"
".cat_installer" # eduroam
".mozilla"
"Documents"
"Downloads"
"Music"
"Pictures"
"Videos"
{ directory = ".gnupg"; mode = "0700"; }
{ directory = ".local/share/keyrings"; mode = "0700"; }
{ directory = ".ssh"; mode = "0700"; }
];
files = [
".local/share/fish/fish_history"
".local/share/nix/trusted-settings.json"
".parallel/will-cite"
];
};
users.root = {
home = "/root";
directories = [
{ directory = ".gnupg"; mode = "0700"; }
{ directory = ".ssh"; mode = "0700"; }
];
files = [
".local/share/nix/trusted-settings.json"
];
};
};
}

View File

@ -31,6 +31,12 @@
}: }:
{ {
my.programs.tofi.settings = {
text-color = "#${text}";
prompt-color = "#${red}";
selection-color = "#${yellow}";
background-color = "#${base}";
};
home-manager.users.moritz = { home-manager.users.moritz = {
programs = { programs = {
fzf.colors = { fzf.colors = {
@ -47,6 +53,26 @@
prompt = "#${mauve}"; prompt = "#${mauve}";
spinner = "#${rosewater}"; spinner = "#${rosewater}";
}; };
foot.settings.colors = {
foreground = text; # Text
background = base; # Base
regular0 = surface1; # Surface 1
regular1 = red; # red
regular2 = green; # green
regular3 = yellow; # yellow
regular4 = blue;
regular5 = pink;
regular6 = teal;
regular7 = subtext1;
bright0 = surface2;
bright1 = red;
bright2 = green;
bright3 = yellow;
bright4 = blue;
bright5 = pink;
bright6 = teal;
bright7 = subtext0;
};
kitty.extraConfig = '' kitty.extraConfig = ''
# vim:ft=kitty # vim:ft=kitty

View File

@ -9,7 +9,7 @@ in
(import ./_catppuccin.nix (import ./_catppuccin.nix
{ {
inherit config lib pkgs; inherit config lib pkgs;
flavor = "mocha"; flavor = "macchiato";
rosewater = "f4dbd6"; rosewater = "f4dbd6";
flamingo = "f0c6c6"; flamingo = "f0c6c6";
pink = "f5bde6"; pink = "f5bde6";

View File

@ -31,6 +31,20 @@ in
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
my.programs.tofi.settings = {
font-size = "20";
font =
let
fontBasePath = pkgs.nerdfonts.override {
fonts = [ "FiraCode" ];
};
in
"${fontBasePath}/share/fonts/truetype/NerdFonts/FiraCodeNerdFont-Regular.ttf";
height = "360";
width = "720";
outline-width = "0";
border-width = "0";
};
home-manager.users.moritz = { home-manager.users.moritz = {
services.polybar = { services.polybar = {
config = { config = {
@ -39,7 +53,7 @@ in
monitor = "\${env:MONITOR}"; monitor = "\${env:MONITOR}";
bottom = true; bottom = true;
width = "100%"; width = "100%";
heigth = 15; height = 15;
border-size = 2; border-size = 2;

60
modules/nixpkgs.nix Normal file
View File

@ -0,0 +1,60 @@
{ config, lib, ... }:
with lib;
let
cfg = config.my.nixpkgs;
overlayType = mkOptionType {
name = "nixpkgs-overlay";
description = "nixpkgs overlay";
check = lib.isFunction;
merge = lib.mergeOneOption;
};
in
{
options.my.nixpkgs = {
overlays = mkOption {
default = [ ];
type = types.listOf overlayType;
example = literalExpression
''
[
(self: super: {
openssh = super.openssh.override {
hpnSupport = true;
kerberos = self.libkrb5;
};
})
]
'';
};
channels = mkOption {
default = { };
example = literalExpression ''
{
stable = inputs.nixpkgs-stable;
}
'';
type = with types; attrsOf package;
};
overlaysForAllChannels = mkEnableOption "apply overlays for all channels";
};
config.nixpkgs = {
overlays =
let
channelOverlays = _: prev:
mapAttrs
(_: value:
import value {
inherit (prev) system;
overlays = optional cfg.overlaysForAllChannels cfg.overlays;
}
)
cfg.channels;
in
cfg.overlays ++ [ channelOverlays ];
config.allowUnfree = true;
};
}

View File

@ -1,6 +1,7 @@
{ config { config
, lib , lib
, pkgs , pkgs
, inputs
, ... , ...
}: }:
@ -43,7 +44,7 @@ let
gi = pkgs.writeFishApplication { gi = pkgs.writeFishApplication {
name = "gi"; name = "gi";
runtimeInputs = with pkgs; [ fzf gum curl ]; runtimeInputs = with pkgs; [ fzf gum curl coreutils-full ];
text = /* fish */ '' text = /* fish */ ''
set url https://www.gitignore.io/api set url https://www.gitignore.io/api
@ -56,10 +57,12 @@ let
set choice (string join "," $argv[1..]) set choice (string join "," $argv[1..])
end end
set contents "$(curl -sL $url/$choice | head -n -2 | tail -n +4)"
if gum confirm "Overwrite current .gitignore?" if gum confirm "Overwrite current .gitignore?"
curl -sL $url/$choice > .gitignore echo "$contents" > .gitignore
else else
curl -sL $url/$choice >> .gitignore echo "$contents" >> .gitignore
end end
''; '';
completions = /* fish */ '' completions = /* fish */ ''
@ -76,7 +79,7 @@ in
isNormalUser = true; isNormalUser = true;
home = "/home/moritz"; home = "/home/moritz";
extraGroups = [ "wheel" "networkmanager" "video" ]; extraGroups = [ "wheel" "networkmanager" "video" ];
initialPassword = "password"; # CHANGE ME PLEASE # initialPassword = "password"; # CHANGE ME PLEASE
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGoAqa2m7hIzZ2LS96Z+RCIlRvhBM/j7h27tMBCwMT+a" # Moritz "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGoAqa2m7hIzZ2LS96Z+RCIlRvhBM/j7h27tMBCwMT+a" # Moritz
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDhtwHDGAZshiQWKkCcPWV9tC83b+bKBgjDcjP/N2CKO" # Laptop "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDhtwHDGAZshiQWKkCcPWV9tC83b+bKBgjDcjP/N2CKO" # Laptop
@ -88,6 +91,95 @@ in
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
my = { my = {
nixpkgs = {
overlays = [
(_: prev:
{
nur = import inputs.nur {
pkgs = prev;
nurpkgs = prev;
};
}
)
(
final: _:
with final.lib;
rec {
fishFile =
{ name
, destination
, content
, checkPhase ? null
}:
final.writeTextFile {
inherit name destination;
executable = true;
allowSubstitutes = true;
preferLocalBuild = false;
text = ''
#!${getExe final.fish}
${content}
'';
checkPhase =
if checkPhase == null then ''
runHook preCheck
${getExe final.fish} -n "$target"
runHook postCheck
''
else checkPhase;
};
writeFishApplication =
{ name
, text
, completions ? null
, runtimeInputs ? [ ]
, checkPhase ? null
}:
let
runtimeHeader = optionalString (runtimeInputs != [ ])
''export PATH="${makeBinPath runtimeInputs}:$PATH"'';
script = fishFile {
inherit checkPhase;
name = "${name}_script";
destination = "/bin/${name}";
content = concatLines [ runtimeHeader text ];
};
completions_file = fishFile {
inherit checkPhase;
name = "${name}_completions";
destination = "/share/fish/vendor_completions.d/${name}.fish";
content = concatLines [ runtimeHeader completions ];
};
in
final.symlinkJoin {
inherit name;
paths = [
script
] ++ optional (completions != null) completions_file;
};
}
)
(
_: prev: {
xorg = prev.xorg // {
lndir = prev.xorg.lndir.overrideAttrs (_: {
meta.mainProgram = "lndir";
});
};
}
)
];
channels = {
master = inputs.master;
stable = inputs.stable;
};
};
bin.enable = true; bin.enable = true;
shell = { shell = {
abbreviations = { abbreviations = {
@ -157,16 +249,17 @@ in
parallel parallel
ripgrep ripgrep
vim vim
viu (viu.override { withSixel = true; })
wget wget
]; ];
fonts = { fonts = {
enableDefaultPackages = true; enableDefaultPackages = true;
packages = with pkgs; [ packages = [
(nerdfonts.override { (pkgs.nerdfonts.override {
fonts = [ "FiraCode" ]; fonts = [ "FiraCode" ];
}) })
pkgs.master.intel-one-mono
]; ];
}; };

View File

@ -4,8 +4,8 @@
, ... , ...
}: }:
with lib;
let let
inherit (lib) mkEnableOption mkIf mkDefault;
cfg = config.my.profiles.desktop; cfg = config.my.profiles.desktop;
in in
{ {
@ -90,6 +90,15 @@ in
stable.texlive.combined.scheme-full # NOTE breaks often stable.texlive.combined.scheme-full # NOTE breaks often
thunderbird thunderbird
vlc vlc
(symlinkJoin {
name = "obsidian-wayland";
paths = [ obsidian ];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/obsidian \
--add-flags "--socket=wayland --enable-features=UseOzonePlatform --ozone-platform=wayland"
'';
})
]; ];
programs.nix-ld.enable = true; programs.nix-ld.enable = true;

View File

@ -42,18 +42,19 @@ in
".SynologyDrive/log" ".SynologyDrive/log"
".cache/keepassxc" ".cache/keepassxc"
".cache/nvim/luac" ".cache/nvim/luac"
".cat_installer" # eduroam
".config/JetBrains"
".config/Nextcloud" ".config/Nextcloud"
".config/calibre"
".config/github-copilot"
".config/kdeconnect"
".config/keepassxc" ".config/keepassxc"
".java/.userPrefs/jetbrains/"
".local/share/JetBrains"
".local/share/direnv" ".local/share/direnv"
".local/share/nvim" ".local/share/nvim"
".local/share/zoxide" ".local/share/zoxide"
".local/share/JetBrains"
".config/JetBrains"
".config/calibre"
".local/state/nvim" ".local/state/nvim"
".config/kdeconnect"
".config/github-copilot"
".cat_installer" # eduroam
".mozilla" ".mozilla"
"Documents" "Documents"
"Downloads" "Downloads"
@ -68,6 +69,7 @@ in
".local/share/fish/fish_history" ".local/share/fish/fish_history"
".local/share/nix/trusted-settings.json" ".local/share/nix/trusted-settings.json"
".parallel/will-cite" ".parallel/will-cite"
".local/state/tofi-history"
]; ];
}; };
users.root = { users.root = {

View File

@ -4,16 +4,23 @@
, ... , ...
}: }:
with lib;
let let
cfg = config.my.profiles.webis; cfg = config.my.profiles.webis;
inherit (lib) mkEnableOption mkIf;
in in
{ {
options.my.profiles.webis.enable = mkEnableOption "webis profile"; options.my.profiles.webis.enable = mkEnableOption "webis profile";
config = mkIf cfg.enable { config = mkIf cfg.enable {
my.programs.ssh.includeSecrets = [ ../../secrets/webis-ssh.age ]; my.programs = {
ssh.includeSecrets = [ ../../secrets/webis-ssh.age ];
jetbrains = {
pycharm.enable = true;
pycharm.package = pkgs.jetbrains.pycharm-professional;
};
};
age.secrets.webis = { age.secrets.webis = {
file = ../../secrets/webis.age; file = ../../secrets/webis.age;
name = "webis.ovpn"; name = "webis.ovpn";
@ -25,9 +32,6 @@ in
updateResolvConf = true; updateResolvConf = true;
}; };
}; };
environment.systemPackages = with pkgs; [
jetbrains.pycharm-professional
];
programs.dconf.enable = true; programs.dconf.enable = true;
}; };
} }

View File

@ -0,0 +1,19 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.my.programs.exercism;
in
{
options.my.programs.exercism.enable = mkEnableOption "Exercism";
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ exercism ];
age.secrets.exercism = {
path = "/home/moritz/.config/exercism/user.json";
file = ../../secrets/exercism.age;
owner = "1000";
mode = "500";
};
};
}

View File

@ -29,19 +29,36 @@ in
); );
}; };
}; };
setSearchEngines = mkEnableOption "firefox search engines"; package = mkOption {
type = types.package;
default = pkgs.firefox;
example = pkgs.firefox-esr;
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.moritz.programs.firefox = { home-manager.users.moritz.programs.firefox = {
enable = true; enable = true;
policies = mkIf cfg.setSearchEngines { policies =
SearchEngines = { let
Default = "Kagi"; removeExtensions = [ "Google" "Amazon.de" "Bing" "Amazon" "Wikipedia (en)" "Wikipedia (de)" ];
Remove = [ "Google" "Amazon.de" "Bing" ]; convertName = name:
let
lower = toLower name;
escaped = replaceStrings [ "." ] [ "dot" ] lower;
sanitized = head (splitString " " escaped);
in
"${sanitized}@search.mozilla.org";
in
{
SearchEngines = mkIf (hasInfix "esr" cfg.package) {
Default = "Kagi";
Remove = removeExtensions;
};
ExtensionSettings = genAttrs
(map convertName removeExtensions)
(_: { installation_mode = "blocked"; });
}; };
};
package = if cfg.setSearchEngines then pkgs.firefox-esr else pkgs.firefox;
profiles."default" = { profiles."default" = {
extraConfig = mkIf cfg.arkenfox.enable '' extraConfig = mkIf cfg.arkenfox.enable ''
// Arkenfox user.js // Arkenfox user.js

View File

@ -31,7 +31,7 @@ in
enable = true; enable = true;
shellAbbrs = shellConfig.abbreviations; shellAbbrs = shellConfig.abbreviations;
shellAliases = shellConfig.aliases; shellAliases = shellConfig.aliases;
shellInit = '' shellInit = /* fish */ ''
# Vi Mode # Vi Mode
fish_vi_key_bindings fish_vi_key_bindings
@ -62,7 +62,7 @@ in
end end
abbr --add dotdot --regex '^\.\.+$' --function multicd abbr --add dotdot --regex '^\.\.+$' --function multicd
abbr -a P --position anywhere --set-cursor "% | $PAGER" abbr -a .P --position anywhere --set-cursor "% | $PAGER"
function editor_edit function editor_edit
echo $EDITOR $argv echo $EDITOR $argv

29
modules/programs/foot.nix Normal file
View File

@ -0,0 +1,29 @@
{ config
, lib
, ...
}:
with lib;
let
cfg = config.my.programs.foot;
in
{
options.my.programs.foot.enable = mkEnableOption "foot";
config = mkIf cfg.enable {
home-manager.users.moritz = {
programs.foot = {
enable = true;
settings = {
main = {
term = "xterm-256color";
font = "FiraCode Nerd Font:size=10";
};
colors = {
alpha = 0.98;
};
};
};
};
};
}

View File

@ -1,6 +1,5 @@
{ config { config
, lib , lib
, pkgs
, ... , ...
}: }:
@ -30,18 +29,24 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
my.shell.abbreviations = { my.shell.abbreviations = {
g = "git";
gC = "git clone";
gF = "git pull";
gS = "git switch";
ga = "git add"; ga = "git add";
gap = "git add --patch"; gap = "git add --patch";
gr = "git restore";
grp = "git restore --patch";
gb = "git branch"; gb = "git branch";
gc = "git commit"; gc = "git commit";
gco = "git checkout"; gco = "git checkout";
gd = "git diff"; gd = "git diff";
gds = "git diff --staged"; gds = "git diff --staged";
gp = "git push";
gf = "git fetch"; gf = "git fetch";
gF = "git pull"; gp = "git push";
gr = "git restore";
grm = "git rm --cached";
grp = "git restore --patch";
grps = "git restore --patch --staged";
grs = "git restore --staged";
gs = "git status"; gs = "git status";
}; };
home-manager.users.moritz = { home-manager.users.moritz = {
@ -50,21 +55,23 @@ in
userName = cfg.identity.name; userName = cfg.identity.name;
userEmail = cfg.identity.email; userEmail = cfg.identity.email;
extraConfig = { extraConfig = {
commit.verbose = true;
diff.algorithm = "histogram";
fetch.fsckobjects = true;
init.defaultBranch = "main"; init.defaultBranch = "main";
merge.conflictstyle = "zdiff3"; merge.conflictstyle = "zdiff3";
diff.external = getExe pkgs.difftastic;
push.autoSetupRemote = true; push.autoSetupRemote = true;
receive.fsckObjects = true;
transfer.fsckobjects = true;
}; };
signing = mkIf cfg.signing { signing = mkIf cfg.signing {
key = "0x970C6E89EB0547A9"; key = "0x970C6E89EB0547A9";
signByDefault = true; signByDefault = true;
}; };
lfs.enable = true; lfs.enable = true;
delta.enable = true;
}; };
}; };
programs.git = { programs.git.enable = true;
enable = true;
config.safe.directory = "/home/moritz/.dotfiles";
};
}; };
} }

View File

@ -0,0 +1,24 @@
{ config
, pkgs
, lib
, ...
}:
let
inherit (lib) mkEnableOption mkIf mkOption types;
cfg = config.my.programs.gitbutler;
in
{
options.my.programs.gitbutler = {
enable = mkEnableOption "gitbutler";
package = mkOption {
default = pkgs.callPackage ./package.nix { };
type = types.package;
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
};
}

View File

@ -0,0 +1,16 @@
{ fetchzip, appimageTools }:
let
pname = "git-butler";
version = "0.12.4";
buildNum = "994";
srcZipped = fetchzip {
url = "https://releases.gitbutler.com/releases/release/${version}-${buildNum}/linux/x86_64/git-butler_${version}_amd64.AppImage.tar.gz";
hash = "sha256-+QP+H0bVSLbobv/W6lFBbl08RnwKvG8BVo68bwMrAzM=";
};
in
appimageTools.wrapType2 {
inherit pname version;
src = "${srcZipped}/git-butler_${version}_amd64.AppImage";
}

View File

@ -20,10 +20,7 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
hardware = { hardware = {
opengl = { opengl.enable = true;
enable = true;
driSupport = true;
};
pulseaudio.enable = false; pulseaudio.enable = false;
}; };
services.xserver = { services.xserver = {

View File

@ -3,10 +3,18 @@
, ... , ...
}: }:
with lib;
let let
inherit (lib) concatStringsSep flip boolToString mapAttrsToList;
cfg = config.my.programs.hyprland; cfg = config.my.programs.hyprland;
mkMonitor = { name, resolution, position, scale, disabled, extra }:
if disabled
then "monitor=${name},disabled"
else "monitor=${name},${resolution},${position},${scale},${extra}";
monitorsList = mapAttrsToList (name: value: { name = name; } // value) cfg.monitors;
monitors = map mkMonitor monitorsList;
mkRule = rule: windowRegexes: "windowrulev2 = ${rule},${concatStringsSep "," windowRegexes}"; mkRule = rule: windowRegexes: "windowrulev2 = ${rule},${concatStringsSep "," windowRegexes}";
mkRules = rules: windowRegexes: concatStringsSep "\n" (map (flip mkRule windowRegexes) rules); mkRules = rules: windowRegexes: concatStringsSep "\n" (map (flip mkRule windowRegexes) rules);
in in
@ -17,17 +25,14 @@ in
# #
# See https://wiki.hyprland.org/Configuring/Monitors/ # See https://wiki.hyprland.org/Configuring/Monitors/
${concatLines (map (x: "monitor=${x}") cfg.monitors)} ${concatStringsSep "\n" monitors}
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ # For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input { input {
kb_layout = ${concatStringsSep "," cfg.keyboardLayouts} kb_layout = ${concatStringsSep "," cfg.keyboardLayouts}
kb_variant =
kb_model =
kb_options = grp:win_space_toggle,caps:escape kb_options = grp:win_space_toggle,caps:escape
kb_rules =
follow_mouse = 1 follow_mouse = 1
@ -47,11 +52,13 @@ in
col.active_border = rgba(1affffee) col.active_border = rgba(1affffee)
col.inactive_border = rgba(595959aa) col.inactive_border = rgba(595959aa)
cursor_inactive_timeout = 1
layout = dwindle layout = dwindle
} }
cursor {
inactive_timeout = 1
}
decoration { decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more # See https://wiki.hyprland.org/Configuring/Variables/ for more
@ -102,7 +109,7 @@ in
master { master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
no_gaps_when_only = true no_gaps_when_only = true
new_is_master = false new_on_top = false
} }
gestures { gestures {
@ -117,15 +124,22 @@ in
force_default_wallpaper = 0 force_default_wallpaper = 0
} }
xwayland {
force_zero_scaling = true
}
# scale non native wayland gtk applications
env = GDK_SCALE,1.2
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# Firefox Sharing Indicator # Firefox Sharing Indicator
${mkRules ["float" "move 49% 40" "noborder" "nofullscreenrequest"] ["title:^(.*Sharing Indicator.*)$"]} ${mkRules ["float" "move 49% 40" "noborder"] ["title:^(.*Sharing Indicator.*)$"]}
# Emacs # Emacs
windowrulev2 = opaque, class:^(emacs)$ windowrulev2 = opaque, class:^(emacs)$
# Fullscreen Applications # Fullscreen Applications
${mkRules ["opaque" "noblur" "noborder" "noshadow" "forceinput"] ["fullscreen:1"]} ${mkRules ["opaque" "noblur" "noborder" "noshadow" "allowsinput"] ["fullscreen:1"]}
${mkRules ["tile" "opaque"] ["class:^(neovide)$"]} ${mkRules ["tile" "opaque"] ["class:^(neovide)$"]}
@ -133,7 +147,7 @@ in
windowrulev2 = rounding 0, xwayland:1, floating:1 windowrulev2 = rounding 0, xwayland:1, floating:1
windowrulev2 = center, class:^(.*jetbrains.*)$, title:^(Confirm Exit|Open Project|win424|win201|splash)$ windowrulev2 = center, class:^(.*jetbrains.*)$, title:^(Confirm Exit|Open Project|win424|win201|splash)$
windowrulev2 = size 640 400, class:^(.*jetbrains.*)$, title:^(splash)$ windowrulev2 = size 640 400, class:^(.*jetbrains.*)$, title:^(splash)$
${mkRules ["opaque" "noshadow" "noblur" "noanim" "move cursor 5 5"] ["class:^(.*jetbrains-.*)$"]} windowrulev2 = nofocus, class:^jetbrains-(?!toolbox), floating:1, title:^win\d+$
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER $mainMod = SUPER
@ -154,8 +168,8 @@ in
bind = $mainMod , D , exec , hyprctl keyword general:layout dwindle bind = $mainMod , D , exec , hyprctl keyword general:layout dwindle
bind = $mainMod , M , exec , hyprctl keyword general:layout master bind = $mainMod , M , exec , hyprctl keyword general:layout master
bind = $mainMod , R , exec , rofi -show combi bind = $mainMod , R , exec , rofi -show combi
# bind = $mainMod , RETURN , exec , systemctl --user is-active --quiet foot && footclient --no-wait || foot
bind = $mainMod , RETURN , exec , kitty bind = $mainMod , RETURN , exec , kitty
bind = $mainMod SHIFT , RETURN , exec , kitty -- tmux new "ts || tn home ~"
# XF86 keys # XF86 keys
binde = , XF86AudioLowerVolume , exec , pamixer -d 5 binde = , XF86AudioLowerVolume , exec , pamixer -d 5
@ -218,6 +232,14 @@ in
# Toggle waybar # Toggle waybar
bindr = $mainMod , SUPER_L , exec , pkill -USR1 waybar bindr = $mainMod , SUPER_L , exec , pkill -USR1 waybar
# Lid open/close
bindl=,switch:on:Lid Switch,exec,monitors="$(hyprctl monitors | grep -c '^Monitor')" && hyprctl keyword monitor "eDP-1, disable" && [ "$monitors" = 1 ] && loginctl lock-session
bindl=,switch:off:Lid Switch,exec, hyprctl keyword monitor "eDP-1, preferred, auto"
# Lock Screen
bind=$mainMod ALT, L, exec, loginctl lock-session
# Extra Config # Extra Config
${cfg.extraConfig} ${cfg.extraConfig}
'' ''

View File

@ -5,11 +5,11 @@
, ... , ...
} @ args: } @ args:
with lib;
let let
inherit (lib) mkOption mkEnableOption mkIf types getExe genAttrs optionalAttrs optional;
cfg = config.my.programs.hyprland; cfg = config.my.programs.hyprland;
hyprland = config.programs.hyprland.finalPackage; hyprland = inputs.hyprland.packages.${pkgs.system}.default;
in in
{ {
options.my.programs.hyprland = { options.my.programs.hyprland = {
@ -31,9 +31,35 @@ in
default = [ "de" "us" ]; default = [ "de" "us" ];
}; };
monitors = mkOption { monitors = mkOption {
type = types.listOf types.str; type = types.attrsOf (
description = "monitor settings"; let
default = [ ",preferred,auto,1" ]; sub = types.submodule {
options = {
resolution = mkOption {
type = types.strMatching "\(preferred\)|\([[:digit:]]+x[[:digit:]]+\(@[[:digit:]]+\)\?\)";
default = "preferred";
};
position = mkOption {
type = types.strMatching "\(auto\)|\(-\?[[:digit:]]+x-?[[:digit:]]+\)";
default = "auto";
};
disabled = mkEnableOption "disabled";
scale = mkOption {
type = types.oneOf [ types.float (types.strMatching "auto") ];
default = 1.0;
apply = x: if lib.isFloat x then lib.strings.floatToString x else x;
};
extra = mkOption {
type = types.listOf types.str;
default = [ ];
apply = lib.concatStringsSep ",";
};
};
};
in
sub
);
description = "monitor setting";
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.str; type = types.str;
@ -43,10 +69,16 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
my = { my = {
nixpkgs.overlays = [
inputs.hypr-contrib.overlays.default
];
programs = { programs = {
wallpaper.enable = true; wallpaper.enable = true;
# foot.enable = true;
kitty.enable = true; kitty.enable = true;
rofi.enable = true; rofi.enable = true;
hyprland.monitors."" = lib.mkDefault { };
hyprland.monitors."Unknown-1" = { disabled = true; };
}; };
wallpapers.enable = true; wallpapers.enable = true;
services = { services = {
@ -61,7 +93,7 @@ in
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;
package = inputs.hyprland.packages.${pkgs.system}.default; package = hyprland;
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland; portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
}; };
@ -81,6 +113,14 @@ in
# add waybar as a status bar # add waybar as a status bar
programs.waybar = { programs.waybar = {
enable = true; enable = true;
package = pkgs.waybar.overrideAttrs (old: {
patches = old.patches or [ ] ++ [
(pkgs.fetchpatch {
url = "https://gitlab.archlinux.org/archlinux/packaging/packages/waybar/-/raw/0306af03fcb6de6aee1e288f42b0bf1b223513bd/a544f4b2cdcf632f1a4424b89f6e3d85ef5aaa85.patch";
sha256 = "sha256-S/1oUj9Aj6BElNTsDY8CTcKtS1j7Gl54JFgCywH05pg=";
})
];
});
# start using systemd service # start using systemd service
systemd = { systemd = {
@ -93,7 +133,7 @@ in
start_hidden = true; start_hidden = true;
layer = "top"; layer = "top";
position = "top"; position = "top";
height = 20; height = 24;
modules-left = [ "hyprland/workspaces" ]; modules-left = [ "hyprland/workspaces" ];
modules-center = [ "hyprland/window" ]; modules-center = [ "hyprland/window" ];
modules-right = [ "hyprland/language" "network" "memory" "cpu" "battery" "clock" ]; modules-right = [ "hyprland/language" "network" "memory" "cpu" "battery" "clock" ];
@ -192,17 +232,16 @@ in
alsa.support32Bit = true; alsa.support32Bit = true;
pulse.enable = true; pulse.enable = true;
}; };
xserver = { displayManager = {
enable = true; enable = true;
displayManager = { autoLogin = {
lightdm.enable = true; enable = true;
autoLogin = { user = "moritz";
enable = true;
user = "moritz";
};
defaultSession = "hyprland";
}; };
defaultSession = "hyprland";
}; };
xserver.enable = true;
xserver.displayManager.lightdm.enable = true;
}; };
security.rtkit.enable = true; security.rtkit.enable = true;

View File

@ -0,0 +1,38 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) any filterAttrs mapAttrsToList mkEnableOption mkIf mkOption;
cfg = config.my.programs.jetbrains;
isEnabled = _: value: value.enable;
anyEnabled = any (x: x) (mapAttrsToList isEnabled cfg);
in
{
options.my.programs.jetbrains = {
pycharm = {
enable = mkEnableOption "pycharm";
package = mkOption {
default = pkgs.jetbrains.pycharm-community;
};
};
idea = {
enable = mkEnableOption "idea";
package = mkOption {
default = pkgs.jetbrains.idea-community;
};
};
};
config = mkIf anyEnabled {
home-manager.users.moritz = {
xdg.configFile."ideavim/ideavimrc" = {
source = ./ideavimrc;
};
home.packages =
let
enabledPackages = filterAttrs isEnabled cfg;
in
mapAttrsToList (_: value: value.package) enabledPackages;
};
};
}

View File

@ -0,0 +1,90 @@
""" Map leader to space ---------------------
let mapleader=" "
""" Plugins --------------------------------
set surround
set commentary
set NERDTree
""" Common settings -------------------------
set showmode
set so=5
set incsearch
set nu
set relativenumber
set number
""" Which-Key
set which-key
set timeoutlen=5000
""" Idea specific settings ------------------
set ideajoin
""" Mappings --------------------------------
"" Quick action
let g:WhichKeyDesc_quick_action = '<leader>q Quick action'
map <leader>q <Action>(ShowIntentionActions)
"" Refactor binds
let g:WhichKeyDesc_inline = '<leader>i Inline'
map <leader>i <Action>(Inline)
let g:WhichKeyDesc_extract = '<leader>e Extract'
let g:WhichKeyDesc_extract_variable = '<leader>ev Extract variable'
map <leader>ev <Action>(IntroduceVariable)
let g:WhichKeyDesc_extract_constant = '<leader>ec Extract constant'
map <leader>ec <Action>(IntroduceConstant)
let g:WhichKeyDesc_extract_field = '<leader>ef Extract field'
map <leader>ef <Action>(IntroduceField)
let g:WhichKeyDesc_extract_parameter = '<leader>ep Extract parameter'
map <leader>ep <Action>(IntroduceParameter)
let g:WhichKeyDesc_extract_method = '<leader>em Extract method'
map <leader>em <Action>(ExtractMethod)
let g:WhichKeyDesc_rename = '<leader>r Rename'
map <leader>r <Action>(RenameElement)
"" Navigation
let g:WhichKeyDesc_prev_buffer = ']b Previous buffer'
map [b <Action>(PreviousTab)
let g:WhichKeyDesc_next_buffer = ']b Next buffer'
map ]b <Action>(NextTab)
let g:WhichKeyDesc_goto_impl = 'gI Goto implementation'
map gI <Action>(GotoImplementation)
let g:WhichKeyDesc_goto_type = 'gt Goto type declaration'
map gt <Action>(GotoTypeDeclaration)
"" Other
let g:WhichKeyDesc_terminal = '<leader>t Terminal'
map <leader>t <Action>(ActivateTerminalToolWindow)
map = <Action>(ReformatCode)
"" Folding
let g:WhichKeyDesc_folding = 'z Folding'
let g:WhichKeyDesc_folding_toggle = 'za Toggle fold'
map za <Action>(ExpandCollapseToggleAction)
let g:WhichKeyDesc_folding_expand = 'zr Fold less'
map zr <Action>(ExpandRegion)
let g:WhichKeyDesc_folding_collapse = 'zR Open all folds'
map zR <Action>(ExpandAllRegions)
let g:WhichKeyDesc_folding_collapse = 'zm Fold more'
map zm <Action>(CollapseRegion)
let g:WhichKeyDesc_folding_collapse = 'zM Close all folds'
map zM <Action>(CollapseAllRegions)
let g:WhichKeyDesc_folding_collapse_doc = 'zc Collapse doc comments'
map zc <Action>(CollapseDocComments)
let g:WhichKeyDesc_folding_expand_doc = 'zC Expand doc comments'
map zC <Action>(ExpandDocComments)
let g:WhichKeyDesc_folding_expand_level_one = 'z1 Expand all to level 1'
map z1 <Action>(ExpandAllToLevel1)
let g:WhichKeyDesc_folding_expand_level_two = 'z2 Expand all to level 2'
map z2 <Action>(ExpandAllToLevel2)
let g:WhichKeyDesc_folding_expand_level_three = 'z3 Expand all to level 3'
map z3 <Action>(ExpandAllToLevel3)
let g:WhichKeyDesc_folding_expand_level_four = 'z4 Expand all to level 4'
map z4 <Action>(ExpandAllToLevel4)

View File

@ -22,13 +22,15 @@ in
window_padding_width = 3; window_padding_width = 3;
confirm_os_window_close = 0; confirm_os_window_close = 0;
background_opacity = "0.9"; background_opacity = "0.9";
font_features = "IntelOneMono-Regular +ss01";
resize_in_steps = "yes";
}; };
keybindings = { keybindings = {
"ctrl+plus" = "change_font_size all +2.0"; "ctrl+plus" = "change_font_size all +2.0";
"ctrl+minus" = "change_font_size all -2.0"; "ctrl+minus" = "change_font_size all -2.0";
}; };
font = { font = {
name = "FiraCode Nerd Font"; name = "Intel One Mono";
size = 10; size = 10;
}; };
}; };

View File

@ -6,9 +6,16 @@
, ... , ...
}: }:
with lib;
let let
inherit (lib) mkEnableOption mkOption types;
cfg = config.my.programs.nix; cfg = config.my.programs.nix;
mkNom = system: nix:
inputs.nix-monitored.packages.${system}.default.override
{
withNotify = false;
nix = nix;
};
in in
{ {
options.my.programs.nix = { options.my.programs.nix = {
@ -23,46 +30,62 @@ in
optimise.enable = mkEnableOption "nix-optimise"; optimise.enable = mkEnableOption "nix-optimise";
}; };
config.nix = { config = {
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; my.nixpkgs.overlays = [
(final: prev:
{
nixos-rebuild = prev.nixos-rebuild.override {
nix = mkNom final.system final.nix;
};
})
];
package = inputs.nix-super.packages.${pkgs.system}.default; home-manager.users.moritz.programs.direnv.nix-direnv.package = pkgs.nix-direnv.override {
nix = config.nix.package;
extraOptions = "experimental-features = nix-command flakes";
gc = {
automatic = cfg.gc.enable;
options = "--max-freed ${cfg.gc.minimumFreedGB} --delete-older-than 14d";
dates = "weekly";
}; };
optimise = { nix = {
automatic = cfg.optimise.enable; nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
dates = [ "weekly" ];
};
registry = { package = pkgs.nix;
master-upstream.to = {
type = "github"; extraOptions = "experimental-features = nix-command flakes";
owner = "nixos";
repo = "nixpkgs"; gc = {
automatic = cfg.gc.enable;
options = "--max-freed ${cfg.gc.minimumFreedGB} --delete-older-than 14d";
dates = "weekly";
}; };
master.flake = inputs.master;
nixpkgs.flake = inputs.nixpkgs;
stable.flake = inputs.stable;
dotfiles.flake = self;
default.flake = self;
};
settings = { optimise = {
substituters = [ automatic = cfg.optimise.enable;
"https://cache.nixos.org/" dates = [ "weekly" ];
]; };
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
];
trusted-users = [ "root" "@wheel" ]; registry = {
master-upstream.to = {
type = "github";
owner = "nixos";
repo = "nixpkgs";
};
master.flake = inputs.master;
nixpkgs.flake = inputs.nixpkgs;
stable.flake = inputs.stable;
dotfiles.flake = self;
default.flake = self;
d.flake = self;
};
settings = {
substituters = [
"https://cache.nixos.org/"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
];
trusted-users = [ "root" "@wheel" ];
};
}; };
}; };
} }

View File

@ -1,7 +1,8 @@
{ config, lib, pkgs, inputs, ... }: { config, lib, pkgs, inputs, ... }:
with lib;
let let
inherit (lib) mkEnableOption mkIf readFile;
cfg = config.my.programs.nvim; cfg = config.my.programs.nvim;
in in
{ {
@ -11,12 +12,13 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.moritz = { home-manager.users.moritz = {
xdg.configFile."nvim/snippets" = {
recursive = true;
source = ./plugins/snippets;
};
home.packages = with pkgs; [ home.packages = with pkgs; [
( xdotool # for vimtex
if config.my.programs.hyprland.enable
then neovide-hyprland
else neovide
)
]; ];
programs.neovim = { programs.neovim = {
@ -39,12 +41,12 @@ in
nixd nixd
nixpkgs-fmt nixpkgs-fmt
nodePackages.bash-language-server nodePackages.bash-language-server
nodePackages.jsonlint python3Packages.python-lsp-server
shellcheck shellcheck
shfmt shfmt
stable.yamlfix
statix statix
taplo taplo
stable.yamlfix
yamllint yamllint
]; ];
extraLuaConfig = readFile ./options.lua; extraLuaConfig = readFile ./options.lua;

View File

@ -1,73 +1,28 @@
{ pkgs, lib, ... }: { pkgs, lib, inputs, ... }:
with builtins; let
inherit (builtins) readFile;
in
{ {
config.home-manager.users.moritz.programs.neovim.lazy.plugins = with pkgs.vimPlugins; [ config.home-manager.users.moritz.programs.neovim.lazy.plugins = [
{ {
plugin = oil-nvim; plugin = pkgs.vimPlugins.oil-nvim;
lazy = false; lazy = false;
opts = { }; opts = { };
dependencies = [ dependencies = [{ plugin = pkgs.vimPlugins.nvim-web-devicons; }];
{ plugin = which-key-nvim; }
{ plugin = nvim-web-devicons; }
];
} }
{ {
plugin = mini-nvim; plugin = pkgs.vimPlugins.lualine-nvim;
opts = { };
dependencies = [{ plugin = pkgs.vimPlugins.nvim-web-devicons; }];
}
{
plugin = pkgs.vimPlugins.mini-nvim;
lazy = false; lazy = false;
conf = readFile ./lua/mini-nvim.lua; conf = readFile ./lua/mini-nvim.lua;
} }
{ {
plugin = trouble-nvim; plugin = pkgs.vimPlugins.nvim-cmp;
cmd = [ "TodoTelescope" ];
keys = [
{
key = "<leader>cD";
cmd = "<cmd>TroubleToggle document_diagnostics<cr>";
desc = "Document Diagnostics (Trouble)";
}
{
key = "<leader>cW";
cmd = "<cmd>TroubleToggle workspace_diagnostics<cr>";
desc = "Workspace Diagnostics (Trouble)";
}
{ key = "<leader>cl"; cmd = "<cmd>TroubleToggle loclist<cr>"; desc = "Location List (Trouble)"; }
{ key = "<leader>cq"; cmd = "<cmd>TroubleToggle quickfix<cr>"; desc = "Quickfix List (Trouble)"; }
{ key = "<leader>ft"; cmd = "<cmd>TodoTelescope<cr>"; desc = "Todo"; }
{
key = "[q";
func = /* lua */ ''
function()
if require("trouble").is_open() then
require("trouble").previous({ skip_groups = true, jump = true })
else
vim.cmd.cprev()
end
end
'';
desc = "Previous trouble/quickfix item";
}
{
key = "]q";
func = /* lua */ ''
function()
if require("trouble").is_open() then
require("trouble").next({ skip_groups = true, jump = true })
else
vim.cmd.cnext()
end
end
'';
desc = "Next trouble/quickfix item";
}
];
opts = { };
dependencies = [
{ plugin = nvim-web-devicons; }
];
}
{
plugin = nvim-cmp;
keys = [ keys = [
{ key = "<leader>tc"; cmd = "<cmd>CmpToggle<cr>"; desc = "Toggle Cmp sources"; } { key = "<leader>tc"; cmd = "<cmd>CmpToggle<cr>"; desc = "Toggle Cmp sources"; }
]; ];
@ -75,82 +30,94 @@ with builtins;
event = [ "InsertEnter" ]; event = [ "InsertEnter" ];
dependencies = [ dependencies = [
{ {
plugin = nvim-autopairs; plugin = pkgs.vimPlugins.nvim-autopairs;
opts = { }; opts = { };
} }
{ plugin = cmp-async-path; } { plugin = pkgs.vimPlugins.cmp-async-path; }
{ plugin = cmp-buffer; } { plugin = pkgs.vimPlugins.cmp-buffer; }
{ plugin = cmp-cmdline; } { plugin = pkgs.vimPlugins.cmp-cmdline; }
{ plugin = cmp-nvim-lsp; } { plugin = pkgs.vimPlugins.cmp-nvim-lsp-signature-help; }
{ plugin = cmp_luasnip; } { plugin = pkgs.vimPlugins.cmp-nvim-lsp; }
{ plugin = cmp-spell; }
{ plugin = cmp-nvim-lsp-signature-help; }
{ {
plugin = copilot-cmp; plugin = pkgs.vimUtils.buildVimPlugin {
opts = { }; pname = "cmp-vimtex";
dependencies = [ version = lib.my.mkVersionInput inputs.cmp-vimtex;
{ src = inputs.cmp-vimtex;
plugin = copilot-lua; };
opts = { }
suggestion = { enabled = false; }; { plugin = pkgs.vimPlugins.cmp_luasnip; }
panel = { enabled = false; }; # {
}; # plugin = pkgs.vimPlugins.copilot-cmp;
conf = /* lua */ '' # opts = { };
require("copilot").setup(opts) # dependencies = [
vim.cmd("Copilot disable") # {
''; # plugin = pkgs.vimPlugins.copilot-lua;
} # opts = {
]; # suggestion = { enabled = false; };
# panel = { enabled = false; };
# };
# conf = /* lua */ ''
# require("copilot").setup(opts)
# vim.cmd("Copilot disable")
# '';
# }
# ];
# }
{ plugin = pkgs.vimPlugins.friendly-snippets; }
{ plugin = pkgs.vimPlugins.lspkind-nvim; }
{
plugin = pkgs.vimPlugins.luasnip;
conf = readFile ./lua/luasnip.lua;
} }
{ plugin = friendly-snippets; }
{ plugin = lspkind-nvim; }
{ plugin = luasnip; }
]; ];
} }
{ {
plugin = direnv-vim; plugin = pkgs.vimPlugins.direnv-vim;
lazy = false; lazy = false;
} }
{ {
plugin = nvim-lspconfig; plugin = pkgs.vimPlugins.nvim-lspconfig.overrideAttrs (_: {
version = lib.my.mkVersionInput inputs.nvim-lspconfig;
src = inputs.nvim-lspconfig;
});
event = [ "BufRead" "BufNewFile" ]; event = [ "BufRead" "BufNewFile" ];
conf = readFile ./lua/nvim-lspconfig.lua; conf = readFile ./lua/nvim-lspconfig.lua;
dependencies = [ dependencies = [
{ {
plugin = null-ls-nvim; # TODO: add all required tools to neovim or silence warnings
plugin = pkgs.vimPlugins.none-ls-nvim;
conf = readFile ./lua/null-ls-nvim.lua; conf = readFile ./lua/null-ls-nvim.lua;
dependencies = [ dependencies = [
{ plugin = which-key-nvim; } {
{ plugin = plenary-nvim; } plugin = pkgs.vimUtils.buildVimPlugin {
pname = "none-ls-shellcheck.nvim";
version = lib.my.mkVersionInput inputs.none-ls-shellcheck-nvim;
src = inputs.none-ls-shellcheck-nvim;
};
}
]; ];
} }
{ plugin = which-key-nvim; } { plugin = pkgs.vimPlugins.lsp_lines-nvim; }
{ plugin = lsp_lines-nvim; }
{ {
plugin = nvim-ufo; plugin = pkgs.vimPlugins.inc-rename-nvim;
conf = readFile ./lua/nvim-ufo.lua;
dependencies = [
{ plugin = promise-async; }
];
}
{
plugin = neodev-nvim;
conf = readFile ./lua/neodev-nvim.lua;
}
{
plugin = inc-rename-nvim;
opts = { opts = {
input_buffer_type = "dressing"; input_buffer_type = "dressing";
}; };
dependencies = [ dependencies = [
{ plugin = dressing-nvim; } { plugin = pkgs.vimPlugins.dressing-nvim; }
]; ];
} }
{ plugin = actions-preview-nvim; } {
plugin = pkgs.vimUtils.buildVimPlugin {
pname = "actions-preview-nvim";
version = lib.my.mkVersionInput inputs.actions-preview-nvim;
src = inputs.actions-preview-nvim;
};
}
]; ];
} }
{ {
plugin = vim-fugitive; plugin = pkgs.vimPlugins.vim-fugitive;
cmd = [ cmd = [
"G" "G"
"Git" "Git"
@ -176,13 +143,16 @@ with builtins;
"GDelete" "GDelete"
"GBrowse" "GBrowse"
]; ];
keys = [
{ key = "<leader>gg"; cmd = "<cmd>Gedit :<cr>"; desc = "Open Status"; }
];
} }
{ {
plugin = vim-tmux-navigator; plugin = pkgs.vimPlugins.vim-tmux-navigator;
event = [ "VeryLazy" ]; event = [ "VeryLazy" ];
} }
{ {
plugin = nvim-lastplace; plugin = pkgs.vimPlugins.nvim-lastplace;
event = [ "BufReadPost" "BufNewFile" ]; event = [ "BufReadPost" "BufNewFile" ];
opts = { opts = {
lastplace_ignore_buftype = [ "quickfix" "nofile" "help" ]; lastplace_ignore_buftype = [ "quickfix" "nofile" "help" ];
@ -191,7 +161,7 @@ with builtins;
}; };
} }
{ {
plugin = telescope-nvim; plugin = pkgs.vimPlugins.telescope-nvim;
cmd = [ "Telescope" ]; cmd = [ "Telescope" ];
conf = builtins.readFile ./lua/telescope.lua; conf = builtins.readFile ./lua/telescope.lua;
keys = [ keys = [
@ -215,178 +185,49 @@ with builtins;
{ key = "<leader>fr"; cmd = "<cmd>Telescope oldfiles<cr>"; desc = "Recent files"; } { key = "<leader>fr"; cmd = "<cmd>Telescope oldfiles<cr>"; desc = "Recent files"; }
]; ];
dependencies = [ dependencies = [
{ plugin = plenary-nvim; } { plugin = pkgs.vimPlugins.plenary-nvim; }
{ plugin = telescope-fzf-native-nvim; } { plugin = pkgs.vimPlugins.telescope-fzf-native-nvim; }
]; ];
} }
{ {
plugin = vim-startuptime; plugin = pkgs.vimPlugins.vim-startuptime;
cmd = [ "StartupTime" ]; cmd = [ "StartupTime" ];
conf = readFile ./lua/vim-startuptime.lua; conf = readFile ./lua/vim-startuptime.lua;
} }
{ {
plugin = typst-vim; plugin = pkgs.vimPlugins.typst-vim;
ft = [ "typst" "typ" ]; ft = [ "typst" "typ" ];
} }
{ {
plugin = comment-nvim; plugin = pkgs.vimPlugins.comment-nvim;
event = [ "BufReadPost" "BufNewFile" ]; event = [ "BufReadPost" "BufNewFile" ];
opts = { }; opts = { };
} }
{ {
plugin = telekasten-nvim; plugin = pkgs.vimPlugins.nvim-surround;
dependencies = [
{ plugin = telescope-nvim; }
{ plugin = which-key-nvim; }
{
plugin = markdown-preview-nvim;
ft = [ "md" ];
}
];
cmd = [ "Telekasten" ];
keys = [
{ key = "<leader>fz"; cmd = "<cmd>Telekasten<cr>"; desc = "Zettelkasten"; }
];
conf = builtins.readFile ./lua/zettelkasten-nvim.lua;
}
{
plugin = nvim-surround;
event = [ "BufReadPost" "BufNewFile" ]; event = [ "BufReadPost" "BufNewFile" ];
opts = { }; opts = { };
} }
{ {
plugin = zen-mode-nvim; plugin = pkgs.vimPlugins.conform-nvim;
keys = [
{ key = "<leader>tz"; cmd = "<cmd>ZenMode<cr>"; desc = "Zen mode"; }
];
conf = /* lua */ ''
require("zen-mode").setup({
plugins = {
tmux = {
enabled = true,
},
},
})
'';
dependencies = [
{
plugin = twilight-nvim;
conf = /* lua */ ''
require("twilight").setup({
context = 20,
expand = { -- for treesitter, we we always try to expand to the top-most ancestor with these types
"function",
"function_definition",
"if_statement",
"method",
"method_definition",
"table",
},
})
'';
}
];
}
{
plugin = refactoring-nvim;
keys = [
{
key = "<leader>cR";
cmd = "<cmd>lua require('telescope').extensions.refactoring.refactors()<cr>";
desc = "Refactor";
mode = [ "x" "n" ];
}
];
dependencies = [
{ plugin = which-key-nvim; }
{ plugin = plenary-nvim; }
{ plugin = nvim-lspconfig; }
];
opts = { };
}
{
plugin = harpoon;
keys = [
{ key = "<leader>ha"; cmd = "<cmd>lua require('harpoon.mark').add_file()<cr>"; desc = "Add file"; }
{ key = "<leader>hh"; cmd = "<cmd>lua require('harpoon.ui').toggle_quick_menu()<cr>"; desc = "Harpoon"; }
{ key = "<leader>1"; cmd = "<cmd>lua require('harpoon.ui').nav_file(1)<cr>"; desc = "Harpoon file 1"; }
{ key = "<leader>2"; cmd = "<cmd>lua require('harpoon.ui').nav_file(2)<cr>"; desc = "Harpoon file 2"; }
{ key = "<leader>3"; cmd = "<cmd>lua require('harpoon.ui').nav_file(3)<cr>"; desc = "Harpoon file 3"; }
{ key = "<leader>4"; cmd = "<cmd>lua require('harpoon.ui').nav_file(4)<cr>"; desc = "Harpoon file 4"; }
];
opts = { };
init = /* lua */ ''
require("which-key").register({
["<leader>h"] = {
name = "harpoon",
},
})
'';
dependencies = [
{ plugin = which-key-nvim; }
];
}
{
plugin = nvim-puppeteer;
lazy = false; # NOTE: plugin lazy-loads itself.
}
{
plugin = neotest;
keys = [
{ key = "<leader>ct"; cmd = "<cmd>lua require('neotest').summary.toggle()<cr>"; desc = "Test"; }
];
dependencies = [
{ plugin = plenary-nvim; }
{ plugin = FixCursorHold-nvim; }
# adapters
{ plugin = neotest-python; }
];
conf = readFile ./lua/neotest.lua;
}
{
plugin = conform-nvim;
keys = [ keys = [
{ key = "="; cmd = "<cmd>lua require('conform').format()<cr>"; desc = "format buffer"; mode = [ "n" "v" ]; } { key = "="; cmd = "<cmd>lua require('conform').format()<cr>"; desc = "format buffer"; mode = [ "n" "v" ]; }
]; ];
cmd = [ "ConformInfo" "Format" ]; cmd = [ "ConformInfo" "Format" ];
conf = readFile ./lua/conform.lua; conf = readFile ./lua/conform.lua;
} }
{ plugin = pkgs.vimPlugins.plantuml-syntax; }
{ {
plugin = neogen; plugin = pkgs.vimPlugins.vimtex;
keys = [ lazy = false;
{ key = "<leader>cg"; cmd = "<cmd>Neogen<cr>"; desc = "Test"; } conf = /* lua */ ''
]; vim.g.vimtex_view_method = "zathura"
opts = { vim.g.vimtex_mappings_disable = vim.fn.executable("texlab") == 1 and { ["n"] = { "K" } } or {} -- disable `K` as it conflicts with LSP hover if texlab is in path
languages = { vim.g.vimtex_quickfix_method = vim.fn.executable("pplatex") == 1 and "pplatex" or "latexlog"
python = {
template = {
annotation_convention = "reST";
};
};
};
};
cmd = [ "Neogen" ];
}
{
plugin = gen-nvim;
init = /* lua */ ''
require("gen").setup({
model = "zephyr:7b-beta", -- The default model to use.
display_mode = "float", -- The display mode. Can be "float" or "split".
show_prompt = false, -- Shows the Prompt submitted to Ollama.
show_model = false, -- Displays which model you are using at the beginning of your chat session.
no_auto_close = false, -- Never closes the window automatically.
init = function(options) end,
-- Function to initialize Ollama
command = "${lib.getExe pkgs.curl} --silent --no-buffer -X POST http://localhost:11434/api/generate -d $body",
-- The command for the Ollama service. You can use placeholders $prompt, $model and $body (shellescaped).
-- This can also be a lua function returning a command string, with options as the input parameter.
-- The executed command must return a JSON object with { response, context }
-- (context property is optional).
debug = false -- Prints errors and the command which is run.
})
''; '';
keys = [
{ key = "<localleader>l"; cmd = ""; desc = "+vimtex"; }
];
} }
]; ];
} }

View File

@ -2,6 +2,8 @@ local conform = require("conform")
local formatters_by_ft = { local formatters_by_ft = {
["*"] = { "codespell", "trim_whitespace" }, ["*"] = { "codespell", "trim_whitespace" },
elixir = { "mix" },
gleam = { "gleam" },
go = { "gofmt" }, go = { "gofmt" },
json = { "jq" }, json = { "jq" },
lua = { "stylua" }, lua = { "stylua" },
@ -9,12 +11,21 @@ local formatters_by_ft = {
python = { { "ruff_fix", "isort" }, { "ruff_format", "black" } }, python = { { "ruff_fix", "isort" }, { "ruff_format", "black" } },
rust = { "rustfmt" }, rust = { "rustfmt" },
sh = { "shfmt" }, sh = { "shfmt" },
tex = { "latexindent" },
toml = { "taplo" }, toml = { "taplo" },
yaml = { "yamlfix" }, yaml = { "yamlfix" },
} }
conform.setup({ conform.setup({
formatters_by_ft = formatters_by_ft, formatters_by_ft = formatters_by_ft,
formatters = {
gleam = {
command = "gleam",
args = { "format", "--stdin" },
stdin = true,
cwd = require("conform.util").root_file({ "gleam.toml" }),
},
},
}) })
vim.api.nvim_create_user_command("Format", function(opts) vim.api.nvim_create_user_command("Format", function(opts)

View File

@ -1,15 +1,13 @@
require("gitsigns").setup() require("gitsigns").setup()
require("which-key").register({ require("which-key").add({
["[h"] = { "<cmd>Gitsigns prev_hunk<cr>", "Previous hunk" }, { "<leader>gP", "<cmd>Gitsigns preview_hunk<cr>", desc = "Preview hunk (float)" },
["]h"] = { "<cmd>Gitsigns next_hunk<cr>", "Next hunk" }, { "<leader>gR", "<cmd>Gitsigns reset_buffer<cr>", desc = "Reset buffer" },
["<leader>g"] = { { "<leader>gS", "<cmd>Gitsigns stage_buffer<cr>", desc = "Stage buffer" },
s = { "<cmd>Gitsigns stage_hunk<cr>", "Stage hunk", mode = { "n", "v" } }, { "<leader>gp", "<cmd>Gitsigns preview_hunk_inline<cr>", desc = "Preview hunk (inline)" },
r = { "<cmd>Gitsigns reset_hunk<cr>", "Reset hunk", mode = { "n", "v" } }, { "<leader>gu", "<cmd>Gitsigns undo_stage_hunk<cr>", desc = "Undo stage hunk" },
S = { "<cmd>Gitsigns stage_buffer<cr>", "Stage buffer" }, { "[h", "<cmd>Gitsigns prev_hunk<cr>", desc = "Previous hunk" },
R = { "<cmd>Gitsigns reset_buffer<cr>", "Reset buffer" }, { "]h", "<cmd>Gitsigns next_hunk<cr>", desc = "Next hunk" },
u = { "<cmd>Gitsigns undo_stage_hunk<cr>", "Undo stage hunk" }, { "<leader>gr", "<cmd>Gitsigns reset_hunk<cr>", desc = "Reset hunk", mode = { "n", "v" } },
p = { "<cmd>Gitsigns preview_hunk_inline<cr>", "Preview hunk (inline)" }, { "<leader>gs", "<cmd>Gitsigns stage_hunk<cr>", desc = "Stage hunk", mode = { "n", "v" } },
P = { "<cmd>Gitsigns preview_hunk<cr>", "Preview hunk (float)" }, { "ih", ":<C-U>Gitsigns select_hunk<cr>", desc = "gitsigns hunk", mode = { "o", "x" } },
},
["ih"] = { ":<C-U>Gitsigns select_hunk<cr>", "gitsigns hunk", mode = { "o", "x" } },
}) })

View File

@ -0,0 +1,25 @@
local ls = require("luasnip")
local types = require("luasnip.util.types")
-- Every unspecified option will be set to the default.
ls.setup({
history = true,
-- Update more often, :h events for more info.
update_events = "TextChanged,TextChangedI",
-- Snippets aren't automatically removed if their text is deleted.
-- `delete_check_events` determines on which events (:h events) a check for
-- deleted snippets is performed.
-- This can be especially useful when `history` is enabled.
delete_check_events = "TextChanged",
ext_opts = {
[types.choiceNode] = {
active = {
virt_text = { { "<--", "Error" } },
},
},
},
ft_func = require("luasnip.extras.filetype_functions").from_pos_or_filetype,
})
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/snippets" })

View File

@ -1,47 +1 @@
require("mini.align").setup() require("mini.align").setup()
require("mini.move").setup()
require("mini.statusline").setup({
content = {
active = function()
local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 })
local git = MiniStatusline.section_git({ trunc_width = 75 })
local diagnostics = MiniStatusline.section_diagnostics({ trunc_width = 75 })
local filename = MiniStatusline.section_filename({ trunc_width = 140 })
local fileinfo = MiniStatusline.section_fileinfo({ trunc_width = 120 })
local location = MiniStatusline.section_location({ trunc_width = 75 })
local mode_hl_inverse = mode_hl .. "Inverse"
-- Usage of `MiniStatusline.combine_groups()` ensures highlighting and
-- correct padding with spaces between groups (accounts for 'missing'
-- sections, etc.)
return MiniStatusline.combine_groups({
{ hl = mode_hl_inverse, strings = {} },
"",
{ hl = mode_hl, strings = { mode } },
{ hl = "MiniStatuslineDevinfo", strings = { git, diagnostics } },
"%<", -- Mark general truncate point
{ hl = "MiniStatuslineFilename", strings = { filename } },
"%=", -- End left alignment
{ hl = "MiniStatuslineFileinfo", strings = { fileinfo } },
{ hl = mode_hl, strings = { location } },
{ hl = mode_hl_inverse, strings = {} },
"",
})
end,
},
})
local MiniStatuslineModes = {
"MiniStatuslineModeInsert",
"MiniStatuslineModeNormal",
"MiniStatuslineModeReplace",
"MiniStatuslineModeVisual",
"MiniStatuslineModeCommand",
"MiniStatuslineModeOther",
}
for _, mode_hl in ipairs(MiniStatuslineModes) do
local hl_table = vim.api.nvim_get_hl(0, { name = mode_hl })
local fg = hl_table.fg
hl_table.fg = hl_table.bg
hl_table.bg = fg
vim.api.nvim_set_hl(0, mode_hl .. "Inverse", hl_table)
end

View File

@ -3,15 +3,14 @@ local null_ls = require("null-ls")
null_ls.setup({ null_ls.setup({
sources = { sources = {
-- Code actions -- Code actions
null_ls.builtins.code_actions.shellcheck, require("none-ls-shellcheck.code_actions"),
null_ls.builtins.code_actions.statix, null_ls.builtins.code_actions.statix,
-- Diagnostics -- Diagnostics
null_ls.builtins.diagnostics.checkmake, null_ls.builtins.diagnostics.checkmake,
null_ls.builtins.diagnostics.deadnix, null_ls.builtins.diagnostics.deadnix,
null_ls.builtins.diagnostics.dotenv_linter, null_ls.builtins.diagnostics.dotenv_linter,
null_ls.builtins.diagnostics.fish, null_ls.builtins.diagnostics.fish,
null_ls.builtins.diagnostics.jsonlint, require("none-ls-shellcheck.diagnostics"),
null_ls.builtins.diagnostics.shellcheck,
null_ls.builtins.diagnostics.statix, null_ls.builtins.diagnostics.statix,
null_ls.builtins.diagnostics.trail_space, null_ls.builtins.diagnostics.trail_space,
null_ls.builtins.diagnostics.yamllint, null_ls.builtins.diagnostics.yamllint,

View File

@ -2,14 +2,6 @@ local cmp = require("cmp")
local luasnip = require("luasnip") local luasnip = require("luasnip")
require("luasnip.loaders.from_vscode").lazy_load() require("luasnip.loaders.from_vscode").lazy_load()
local has_words_before = function()
if vim.api.nvim_buf_get_option(0, "buftype") == "prompt" then
return false
end
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_text(0, line - 1, 0, line - 1, col, {})[1]:match("^%s*$") == nil
end
cmp.setup({ cmp.setup({
formatting = { formatting = {
format = require("lspkind").cmp_format({ format = require("lspkind").cmp_format({
@ -17,7 +9,7 @@ cmp.setup({
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
symbol_map = { symbol_map = {
Copilot = "", -- Copilot = "",
}, },
}), }),
}, },
@ -31,36 +23,55 @@ cmp.setup({
["<C-b>"] = cmp.mapping.scroll_docs(-4), ["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4), ["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(), ["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(), ["<S-CR>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = true }), ["<CR>"] = cmp.mapping.confirm({ select = true }),
["<Tab>"] = cmp.mapping(function(fallback) ["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() and has_words_before() then if cmp.visible() then
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select }) cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
elseif luasnip.expand_or_jumpable() then elseif luasnip.locally_jumpable(1) then
luasnip.expand_or_jump() luasnip.jump(1)
else else
fallback() fallback()
end end
end, { "i", "s" }), end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback) ["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then if cmp.visible() then
cmp.select_prev_item() cmp.select_prev_item({ behavior = cmp.SelectBehavior.Select })
elseif luasnip.jumpable(-1) then elseif luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
["<C-n>"] = cmp.mapping(function(fallback)
if luasnip.choice_active() then
luasnip.change_choice(1)
elseif luasnip.locally_jumpable(1) then
luasnip.jump(1)
else
fallback()
end
end, { "i", "s" }),
["<C-p>"] = cmp.mapping(function(fallback)
if luasnip.choice_active() then
luasnip.change_choice(-1)
elseif luasnip.locally_jumpable(-1) then
luasnip.jump(-1) luasnip.jump(-1)
else else
fallback() fallback()
end end
end, { "i", "s" }), end, { "i", "s" }),
}), }),
sources = { sources = cmp.config.sources({
{ name = "async_path", priority = 1 }, { priority = 1, name = "async_path" },
{ name = "buffer", priority = 1 }, { priority = 1, name = "buffer" },
{ name = "spell", priority = 1 }, { priority = 1, name = "spell" },
{ name = "luasnip", priority = 2 }, { priority = 2, name = "nvim_lsp" },
{ name = "copilot", priority = 3 }, -- { priority = 3, name = "copilot" },
{ name = "nvim_lsp", priority = 3 }, { priority = 3, name = "nvim_lsp_signature_help" },
{ name = "nvim_lsp_signature_help", priority = 3 }, { priority = 4, name = "luasnip" },
}, { priority = 4, name = "vimtex" },
}),
}) })
-- Set configuration for specific filetype. -- Set configuration for specific filetype.

View File

@ -21,88 +21,87 @@ capabilities.didChangeWatchedFiles = {
local lspconfig = require("lspconfig") local lspconfig = require("lspconfig")
local on_attach_def = function(client, bufnr) local on_attach_def = function(client, bufnr)
require("which-key").register({ require("which-key").add({
K = { { "<leader>c", buffer = bufnr, group = "code" },
{
"<leader>cr",
function() function()
local winid = require("ufo").peekFoldedLinesUnderCursor() return ":IncRename " .. vim.fn.expand("<cword>")
if not winid then end,
vim.lsp.buf.hover() buffer = bufnr,
desc = "Rename",
expr = true,
replace_keycodes = false,
},
{
"<leader>ti",
function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
end,
buffer = bufnr,
desc = "LSP inlay hints",
},
{
"<leader>tl",
function()
lsp_lines.toggle()
if vim.diagnostic.is_disabled() then
vim.diagnostic.enable()
else
vim.diagnostic.disable()
end end
end, end,
"Hover", buffer = bufnr,
desc = "LSP lines",
}, },
["<leader>"] = { { "K", vim.lsp.buf.hover, buffer = bufnr, desc = "Hover" },
c = { { "[d", vim.diagnostic.goto_prev, buffer = bufnr, desc = "Previous diagnostic" },
name = "code", { "]d", vim.diagnostic.goto_next, buffer = bufnr, desc = "Next diagnostic" },
c = { require("actions-preview").code_actions, "Code action", mode = { "v", "n" } }, { "gD", vim.lsp.buf.declaration, buffer = bufnr, desc = "Goto declaration" },
r = { { "gI", "<cmd>Telescope lsp_implementations<cr>", buffer = bufnr, desc = "Goto implementation" },
function() { "gK", vim.lsp.buf.signature_help, buffer = bufnr, desc = "Signature help" },
return ":IncRename " .. vim.fn.expand("<cword>") {
end, "gd",
"Rename", function()
expr = true, require("telescope.builtin").lsp_definitions({ reuse_win = true })
}, end,
f = { buffer = bufnr,
function() desc = "Goto definition",
vim.lsp.buf.format({ async = true })
end,
"Format (lsp)",
mode = { "n", "v" },
},
},
t = {
l = {
function()
lsp_lines.toggle()
if vim.diagnostic.is_disabled() then
vim.diagnostic.enable()
else
vim.diagnostic.disable()
end
end,
"LSP lines",
},
i = {
function()
vim.lsp.inlay_hint.enable(bufnr, not vim.lsp.inlay_hint.is_enabled(bufnr))
end,
"LSP inlay hints",
},
},
}, },
g = { { "gr", "<cmd>Telescope lsp_references<cr>", buffer = bufnr, desc = "Goto references" },
d = { {
function() "gt",
require("telescope.builtin").lsp_definitions({ reuse_win = true })
end,
"Goto definition",
},
t = {
function()
require("telescope.builtin").lsp_type_definitions({ reuse_win = true })
end,
"Goto type definition",
},
r = { "<cmd>Telescope lsp_references<cr>", "Goto references" },
D = { vim.lsp.buf.declaration, "Goto declaration" },
I = { "<cmd>Telescope lsp_implementations<cr>", "Goto implementation" },
K = { vim.lsp.buf.signature_help, "Signature help" },
},
["["] = {
d = { vim.diagnostic.goto_prev, "Previous diagnostic" },
},
["]"] = {
d = { vim.diagnostic.goto_next, "Next diagnostic" },
},
}, { buffer = bufnr, silent = true })
function()
require("telescope.builtin").lsp_type_definitions({ reuse_win = true })
end,
buffer = bufnr,
desc = "Goto type definition",
},
{
"<leader>cc",
require("actions-preview").code_actions,
buffer = bufnr,
desc = "Code action",
mode = { "n", "v" },
},
{
"<leader>cf",
function()
vim.lsp.buf.format({ async = true })
end,
buffer = bufnr,
desc = "Format (lsp)",
mode = { "n", "v" },
},
})
if client.server_capabilities.inlayHintProvider then if client.server_capabilities.inlayHintProvider then
local slow_lsp_servers = { local slow_lsp_servers = {
"rust_analyzer", "rust_analyzer",
} }
local timeout = vim.tbl_contains(slow_lsp_servers, client.name, {}) and 500 or 0 local timeout = vim.tbl_contains(slow_lsp_servers, client.name, {}) and 500 or 0
vim.defer_fn(function() vim.defer_fn(function()
vim.lsp.inlay_hint.enable(bufnr, true) vim.lsp.inlay_hint.enable(true, { bufnr })
end, timeout) end, timeout)
end end
end end
@ -126,10 +125,10 @@ end
local servers = { local servers = {
"bashls", "bashls",
"gleam",
"gopls", "gopls",
"nil_ls", "pylsp",
"nixd", "ruff",
"ruff_lsp",
"templ", "templ",
"typst_lsp", "typst_lsp",
} }
@ -137,6 +136,41 @@ for _, lsp in ipairs(servers) do
lspconfig_setup(lsp, {}) lspconfig_setup(lsp, {})
end end
lspconfig_setup("elixirls", {
cmd = { "elixir-ls" },
})
lspconfig_setup("nil_ls", {
settings = {
flake = {
autoArchive = true,
autoEvalInputs = true,
nixpkgsInputName = "nixpkgs",
},
},
})
lspconfig_setup("nixd", {
settings = {
nixd = {
nixpkgs = {
expr = "import <nixpkgs> { }",
},
options = {
nixos = {
expr = '(builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations.nixos-desktop.options',
},
["flake-parts"] = {
expr = '(builtins.getFlake ("git+file://" + toString ./.)).debug.options',
},
["flake-parts2"] = {
expr = '(builtins.getFlake ("git+file://" + toString ./.)).currentSystem.options',
},
},
},
},
})
-- Add templ filetype -- Add templ filetype
vim.filetype.add({ extension = { templ = "templ" } }) vim.filetype.add({ extension = { templ = "templ" } })
@ -149,18 +183,6 @@ lspconfig_setup("tailwindcss", {
init_options = { userLanguages = { templ = "html" } }, init_options = { userLanguages = { templ = "html" } },
}) })
lspconfig_setup("pylsp", {
settings = {
pylsp = {
plugins = {
rope_autoimport = {
enabled = true,
},
},
},
},
})
lspconfig_setup("rust_analyzer", { lspconfig_setup("rust_analyzer", {
settings = { settings = {
["rust-analyzer"] = { ["rust-analyzer"] = {

View File

@ -1,22 +0,0 @@
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
local builtin = require("statuscol.builtin")
require("statuscol").setup({
segments = {
{
sign = { name = { ".*" }, auto = true },
click = "v:lua.ScSa",
},
{
text = { builtin.lnumfunc },
click = "v:lua.ScLa",
},
{
sign = { namespace = { "gitsigns*" }, auto = true },
click = "v:lua.ScSa",
},
{
text = { builtin.foldfunc, "" },
click = "v:lua.ScFa",
},
},
})

View File

@ -2,60 +2,50 @@ vim.o.timeout = true
vim.o.timeoutlen = 500 vim.o.timeoutlen = 500
-- Delete -- Delete
require("which-key").register({ require("which-key").add({
d = { { "<leader>d", group = "delete" },
name = "delete", { "<leader>db", "<cmd>bd<cr>", desc = "Delete buffer" },
b = { "<cmd>bd<cr>", "Delete buffer" }, { "<leader>dw", "<C-w>c", desc = "Delete window" },
w = { "<C-w>c", "Delete window" }, })
},
}, { prefix = "<leader>" })
-- buffer -- buffer
require("which-key").register({ require("which-key").add({
["["] = { { "[b", "<cmd>bprevious<cr>", desc = "Previous buffer" },
b = { "<cmd>bprevious<cr>", "Previous buffer" }, { "]b", "<cmd>bnext<cr>", desc = "Next buffer" },
},
["]"] = {
b = { "<cmd>bnext<cr>", "Next buffer" },
},
}) })
-- window -- window
require("which-key").register({ require("which-key").add({
w = { { "<leader>w", group = "window" },
name = "window", { "<leader>w-", "<C-w>s", desc = "Split window vertically" },
["|"] = { "<C-w>v", "Split window horizontally" }, { "<leader>ww", "<C-w>w", desc = "Switch window" },
["-"] = { "<C-w>s", "Split window vertically" }, { "<leader>w|", "<C-w>v", desc = "Split window horizontally" },
w = { "<C-w>w", "Switch window" }, })
},
}, { prefix = "<leader>" })
-- better descriptions for navigation -- better descriptions for navigation
require("which-key").register({ require("which-key").add({
["<leader>"] = { { "<leader>c", group = "code" },
f = { name = "file/find" }, { "<leader>f", group = "file/find" },
g = { name = "git" }, { "<leader>g", group = "git" },
c = { name = "code" }, { "<leader>s", group = "search" },
s = { name = "search" }, { "<leader>t", group = "toggle" },
t = { name = "toggle" }, { "[", group = "prev" },
}, { "]", group = "next" },
["["] = { name = "prev" }, { "g", group = "goto" },
["]"] = { name = "next" },
g = { name = "goto" },
}) })
-- Clear search with <esc> -- Clear search with <esc>
require("which-key").register({ require("which-key").add({
["<esc>"] = { "<cmd>noh<cr><esc>", "Escape and clear hlsearch", mode = { "n", "i" } }, { "<esc>", "<cmd>noh<cr><esc>", desc = "Escape and clear hlsearch", mode = { "i", "n" } },
}) })
-- better indenting -- better indenting
require("which-key").register({ require("which-key").add({
["<"] = { "<gv", "Shift left" }, { "<", "<gv", desc = "Shift left", mode = "v" },
[">"] = { ">gv", "Shift right" }, { ">", ">gv", desc = "Shift right", mode = "v" },
}, { mode = "v" }) })
-- better yank in visual mode -- better yank in visual mode
require("which-key").register({ require("which-key").add({
y = { "ygv<esc>", "Yank" }, { "y", "ygv<esc>", desc = "Yank", mode = "v" },
}, { mode = "v" }) })

View File

@ -0,0 +1,46 @@
local ls = require("luasnip")
local s = ls.snippet
local sn = ls.snippet_node
local isn = ls.indent_snippet_node
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local d = ls.dynamic_node
local r = ls.restore_node
local events = require("luasnip.util.events")
local ai = require("luasnip.nodes.absolute_indexer")
local extras = require("luasnip.extras")
local l = extras.lambda
local rep = extras.rep
local p = extras.partial
local m = extras.match
local n = extras.nonempty
local dl = extras.dynamic_lambda
local fmt = require("luasnip.extras.fmt").fmt
local fmta = require("luasnip.extras.fmt").fmta
local conds = require("luasnip.extras.expand_conditions")
local postfix = require("luasnip.extras.postfix").postfix
local types = require("luasnip.util.types")
local parse = require("luasnip.util.parser").parse_snippet
local ms = ls.multi_snippet
local k = require("luasnip.nodes.key_indexer").new_key
local def_template = [[
def {fname}({args}) do
{final}
end
]]
local def = s(
"def",
fmt(def_template, {
fname = i(1, "fname"),
args = i(2),
final = i(3),
}, { priority = 1001 })
)
return {
def,
}

View File

@ -0,0 +1,120 @@
local ls = require("luasnip")
local s = ls.snippet
local sn = ls.snippet_node
local isn = ls.indent_snippet_node
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local d = ls.dynamic_node
local r = ls.restore_node
local events = require("luasnip.util.events")
local ai = require("luasnip.nodes.absolute_indexer")
local extras = require("luasnip.extras")
local l = extras.lambda
local rep = extras.rep
local p = extras.partial
local m = extras.match
local n = extras.nonempty
local dl = extras.dynamic_lambda
local fmt = require("luasnip.extras.fmt").fmt
local fmta = require("luasnip.extras.fmt").fmta
local conds = require("luasnip.extras.expand_conditions")
local postfix = require("luasnip.extras.postfix").postfix
local types = require("luasnip.util.types")
local parse = require("luasnip.util.parser").parse_snippet
local ms = ls.multi_snippet
local k = require("luasnip.nodes.key_indexer").new_key
local matches = require("luasnip.extras.postfix").matches
local case_template = [[
case {expression} {{
{pattern1} -> {result1}
{pattern2} -> {result2}{final}
}}
]]
local dot_case = postfix({ filetype = "gleam", trig = ".case", match_pattern = matches.line }, {
d(1, function(_, parent)
return sn(
1,
fmt(case_template, {
expression = t(parent.env.POSTFIX_MATCH),
pattern1 = i(1, "pattern"),
result1 = i(2, "todo"),
pattern2 = i(3, "_"),
result2 = i(4, "todo"),
final = i(0),
})
)
end),
})
local case = s(
{ filetype = "gleam", trig = "case" },
fmt(case_template, {
expression = i(1),
pattern1 = i(2),
result1 = i(3, "todo"),
pattern2 = i(4, "_"),
result2 = i(5, "todo"),
final = i(0),
})
)
local fn_template = [[
fn {name}({args}) -> {rtype} {{
{body}
}}
]]
local fn = s(
{ filetype = "gleam", trig = "fn" },
fmt(fn_template, {
name = i(1),
args = i(2),
rtype = i(3),
body = i(0),
})
)
local pfn = s(
{ filetype = "gleam", trig = "pfn" },
fmt("pub " .. fn_template, {
name = i(1),
args = i(2),
rtype = i(3),
body = i(0),
})
)
local type_template = [[
type {name} {{
{body}
}}
]]
local type = s(
{ filetype = "gleam", trig = "type" },
fmt(type_template, {
name = i(1),
body = i(0),
})
)
local ptype = s(
{ filetype = "gleam", trig = "ptype" },
fmt("pub " .. type_template, {
name = i(1),
body = i(0),
})
)
return {
case,
dot_case,
fn,
pfn,
type,
ptype,
}

View File

@ -0,0 +1,138 @@
local ls = require("luasnip")
local s = ls.snippet
local sn = ls.snippet_node
local isn = ls.indent_snippet_node
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local d = ls.dynamic_node
local r = ls.restore_node
local events = require("luasnip.util.events")
local ai = require("luasnip.nodes.absolute_indexer")
local extras = require("luasnip.extras")
local l = extras.lambda
local rep = extras.rep
local p = extras.partial
local m = extras.match
local n = extras.nonempty
local dl = extras.dynamic_lambda
local fmt = require("luasnip.extras.fmt").fmt
local fmta = require("luasnip.extras.fmt").fmta
local conds = require("luasnip.extras.expand_conditions")
local postfix = require("luasnip.extras.postfix").postfix
local types = require("luasnip.util.types")
local parse = require("luasnip.util.parser").parse_snippet
local ms = ls.multi_snippet
local k = require("luasnip.nodes.key_indexer").new_key
local pe = s(
"pe",
fmt("<%= {final} %>", {
final = i(1),
}, { priority = 1001 })
)
local ln = s(
"ln",
fmt(
[[
<.link navigate={{~p"{path}"}}">{final}</.link>
]],
{ path = i(1, "/"), final = i(2) },
{ priority = 1001 }
)
)
local lp = s(
"lp",
fmt(
[[
<.link patch={{~p"{path}"}}">{final}</.link>
]],
{ path = i(1, "/"), final = i(2) },
{ priority = 1001 }
)
)
local if_ = s(
"if",
fmt("<%= if {condition} do %>{final}<% end %>", { condition = i(1, "condition"), final = i(2) }, { priority = 1001 })
)
local ife = s(
"ife",
fmt(
[[
<%= if {condition} do %>
{when}
<% else %>
{final}
<% end %>"
]],
{ condition = i(1, "condition"), when = i(2), final = i(3) },
{ priority = 1001 }
)
)
local for_ = s(
"for",
fmt(
[[
<%= for {item} <- {list} do %>
{final}
<% end %>
]],
{ item = i(1, "item"), list = i(2, "items"), final = i(3) },
{ priority = 1001 }
)
)
local lc =
s("lc", fmt("<.live_component module={{{module}}} id={{{id}}} />", { module = i(1), id = i(2) }, { priority = 1001 }))
local slot = s(
"slot",
fmt("<:slot>{final}</:slot>", {
final = i(1),
}, { priority = 1001 })
)
local socketp = s(
"socketp",
fmt(
[[
socket =
socket
|> {final}
]],
{ final = i(1) },
{ priority = 1001 }
)
)
local fl = s(
"fl",
fmt(
[[
<{elem} :for={{{item} <- {list}}} class="{class}">
{final}
</{elem}>
]],
{ elem = i(1, "div"), item = i(2, "item"), list = i(3, "items"), class = i(4), final = i(5) },
{ priority = 1001, repeat_duplicates = true }
)
)
return {
pe,
ln,
lp,
if_,
ife,
for_,
lc,
slot,
socketp,
fl,
}

View File

@ -0,0 +1,242 @@
local ls = require("luasnip")
local s = ls.snippet
local sn = ls.snippet_node
local isn = ls.indent_snippet_node
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local d = ls.dynamic_node
local r = ls.restore_node
local events = require("luasnip.util.events")
local ai = require("luasnip.nodes.absolute_indexer")
local extras = require("luasnip.extras")
local l = extras.lambda
local rep = extras.rep
local p = extras.partial
local m = extras.match
local n = extras.nonempty
local dl = extras.dynamic_lambda
local fmt = require("luasnip.extras.fmt").fmt
local fmta = require("luasnip.extras.fmt").fmta
local conds = require("luasnip.extras.expand_conditions")
local postfix = require("luasnip.extras.postfix").postfix
local types = require("luasnip.util.types")
local parse = require("luasnip.util.parser").parse_snippet
local ms = ls.multi_snippet
local k = require("luasnip.nodes.key_indexer").new_key
local arg_template = [[
{arg}: {type}
]]
local function pyarg()
return sn(
nil,
fmt(arg_template, {
arg = i(1, "arg"),
type = i(2, "Any"),
})
)
end
local function pyargs(_, _, _, user_args)
local choices = {
sn(nil, i(1)),
sn(nil, {
not user_args and t(", ") or t(""),
d(1, pyarg),
d(2, pyargs, { user_args = { false } }),
}),
}
-- switch order for first call
if user_args then
local fst, snd = unpack(choices)
choices = { snd, fst }
end
return sn(nil, c(1, choices))
end
local def_template = [[
def {fname}({args}) -> {rtype}:
"""
{docs}
"""
{final}
]]
local def = s(
"def",
fmt(def_template, {
fname = i(1, "fname"),
args = d(2, pyargs, nil, { user_args = { true } }),
rtype = i(3, "None"),
docs = i(4, "Documentation"),
final = i(5, "pass"),
}, { priority = 1001 })
)
local defs_template = [[
def {mname}(self, {args}) -> {rtype}:
"""
{docs}
"""
{final}
]]
local defs = s(
"defs",
fmt(defs_template, {
mname = i(1, "mname"),
args = d(2, pyargs, nil, { user_args = { true } }),
rtype = i(3, "None"),
docs = i(4, "Documentation"),
final = i(5, "pass"),
}, { priority = 1001 })
)
local enum_template = [[
for {i}, {value} in enumerate({iter}):
{final}
]]
local dot_enum = postfix(".enum", {
d(1, function(_, parent)
return sn(
1,
fmt(enum_template, {
i = i(1, "i"),
value = i(2, "value"),
iter = t(parent.env.POSTFIX_MATCH),
final = i(3, "pass"),
})
)
end),
})
local enum = s(
"enum",
fmt(enum_template, {
i = i(1, "i"),
value = i(2, "value"),
iter = i(3, "iter"),
final = i(4, "pass"),
})
)
local for_template = [[
for {item} in {iter}:
{final}
]]
local dot_for = postfix(".for", {
d(1, function(_, parent)
return sn(
1,
fmt(for_template, {
item = i(1, "item"),
iter = t(parent.env.POSTFIX_MATCH),
final = i(2, "pass"),
})
)
end),
})
local items_template = [[
for {key}, {value} in {iter}:
{final}
]]
local dot_items = postfix(".items", {
d(1, function(_, parent)
return sn(
1,
fmt(items_template, {
key = i(1, "key"),
value = i(2, "value"),
iter = t(parent.env.POSTFIX_MATCH),
final = i(3, "pass"),
})
)
end),
})
local try_template = [[
try:
{raises}
except {exception} as {ename}:
{final}
]]
local dot_try = postfix(".try", {
d(1, function(_, parent)
return sn(
1,
fmt(try_template, {
raises = t(parent.env.POSTFIX_MATCH),
exception = i(1, "Exception"),
ename = i(2, "e"),
final = i(3, "pass"),
})
)
end),
})
local parr = s(
"parr",
fmt(
[[
:param {name}: {description}
:type {name}: {type}
]],
{
name = i(1, "name"),
description = i(2, "description"),
type = i(3, "type"),
},
{
repeat_duplicates = true,
}
)
)
local retr = s(
"retr",
fmt(
[[
:return: {description}
:rtype: {rtype}
]],
{
description = i(1, "description"),
rtype = i(2, "rtype"),
}
)
)
local raisr = s(
"raisr",
fmt(
[[
:raises {exception}: {description}
]],
{
exception = i(1, "Exception"),
description = i(2, "description"),
}
)
)
return {
def,
defs,
dot_enum,
dot_for,
dot_items,
dot_try,
enum,
parr,
retr,
raisr,
}

View File

@ -1,13 +1,13 @@
{ pkgs, config, ... }: { pkgs, inputs, lib, ... }:
with builtins;
{ {
config.home-manager.users.moritz.programs.neovim.lazy.plugins = with pkgs.vimPlugins; [ config.home-manager.users.moritz.programs.neovim.lazy.plugins = [
( (
let let
nvim-treesitter = pkgs.vimPlugins.nvim-treesitter;
parserDir = pkgs.symlinkJoin { parserDir = pkgs.symlinkJoin {
name = "tresitter-grammars-all"; name = "tresitter-grammars-all";
paths = pkgs.vimPlugins.nvim-treesitter.withAllGrammars.dependencies; paths = nvim-treesitter.withAllGrammars.dependencies;
}; };
in in
{ {
@ -18,6 +18,7 @@ with builtins;
auto_install = false; auto_install = false;
highlight = { highlight = {
enable = true; enable = true;
disable = [ "latex" ];
}; };
textobjects = textobjects =
{ {
@ -51,31 +52,17 @@ with builtins;
}; };
}; };
conf = conf =
'' /* lua */ ''
local final_opts = vim.tbl_deep_extend("keep", opts, { parser_install_dir = "${parserDir}" }) vim.opt.runtimepath:append("${parserDir}")
require('nvim-treesitter.configs').setup(final_opts) local final_opts = vim.tbl_deep_extend("keep", opts, { parser_install_dir = "${parserDir}" })
''; require('nvim-treesitter.configs').setup(final_opts)
init = ''
local runtimepath = vim.opt.runtimepath:get()
table.insert(runtimepath, 4, "${parserDir}")
vim.opt.runtimepath = runtimepath
''; '';
priority = 100; priority = 100;
dependencies = [ dependencies = [
{ plugin = nvim-treesitter-textobjects; } { plugin = pkgs.vimPlugins.nvim-treesitter-textobjects; }
{ plugin = nvim-ts-context-commentstring; opts = { }; } { plugin = pkgs.vimPlugins.nvim-ts-context-commentstring; opts = { }; }
]; ];
} }
) )
{
plugin = nvim-treesitter-textsubjects;
event = [ "BufReadPost" "BufNewFile" ];
conf = readFile ./lua/nvim-treesitter-textsubjects.lua;
}
{
plugin = nvim-treesitter-context;
event = [ "BufReadPost" "BufNewFile" ];
opts = { };
}
]; ];
} }

View File

@ -1,47 +1,84 @@
{ pkgs, ... }: { pkgs, lib, inputs, ... }:
with builtins; let
inherit (lib) readFile;
in
{ {
config.home-manager.users.moritz.programs.neovim.lazy.plugins = with pkgs.vimPlugins; [ config.home-manager.users.moritz.programs.neovim.lazy.plugins = [
{ {
plugin = which-key-nvim; plugin = pkgs.vimPlugins.which-key-nvim;
lazy = false; lazy = false;
conf = readFile ./lua/which-key-nvim.lua; conf = readFile ./lua/which-key-nvim.lua;
} }
{ {
plugin = catppuccin-nvim; plugin = pkgs.vimPlugins.catppuccin-nvim;
conf = readFile ./lua/catppuccin-nvim.lua; conf = readFile ./lua/catppuccin-nvim.lua;
lazy = false; lazy = false;
priority = 99; priority = 99;
} }
{ {
plugin = todo-comments-nvim; plugin = pkgs.vimPlugins.todo-comments-nvim;
event = [ "BufReadPost" "BufNewFile" ]; dependencies = [{ plugin = pkgs.vimPlugins.plenary-nvim; }];
dependencies = [{ plugin = plenary-nvim; }];
opts = { }; opts = { };
} }
{ {
plugin = statuscol-nvim; plugin = pkgs.vimPlugins.dressing-nvim;
event = [ "VeryLazy" ];
conf = readFile ./lua/statuscol-nvim.lua;
}
{
plugin = smartcolumn-nvim;
event = [ "BufReadPost" "BufNewFile" ];
opts = {
colorcolumn = "120";
disabled_filetypes = [ "help" "text" "markdown" "dashboard" ];
};
}
{
plugin = dressing-nvim;
event = [ "VeryLazy" ]; event = [ "VeryLazy" ];
} }
{ {
plugin = gitsigns-nvim; plugin = pkgs.vimPlugins.gitsigns-nvim;
event = [ "BufReadPost" "BufNewFile" ]; event = [ "BufReadPost" "BufNewFile" ];
conf = readFile ./lua/gitsigns-nvim.lua; conf = readFile ./lua/gitsigns-nvim.lua;
dependencies = [{ plugin = which-key-nvim; }]; dependencies = [{ plugin = pkgs.vimPlugins.which-key-nvim; }];
}
{
plugin = pkgs.vimUtils.buildVimPlugin {
pname = "hawtkeys-nvim";
version = lib.my.mkVersionInput inputs.hawtkeys-nvim;
src = inputs.hawtkeys-nvim;
};
cmd = [ "Hawtkeys" "HawtkeysAll" "HawtkeysDupes" ];
opts = { };
dependencies = [
{ plugin = pkgs.vimPlugins.plenary-nvim; }
{ plugin = pkgs.vimPlugins.nvim-treesitter; }
];
}
{
plugin = pkgs.vimPlugins.zen-mode-nvim;
keys = [
{ key = "<leader>tz"; cmd = "<cmd>ZenMode<cr>"; desc = "Zen mode"; }
];
conf = /* lua */ ''
require("zen-mode").setup({
plugins = {
tmux = {
enabled = true,
},
},
})
'';
dependencies = [
{
plugin = pkgs.vimPlugins.twilight-nvim;
keys = [
{ key = "<leader>tZ"; cmd = "<cmd>Twilight<cr>"; desc = "Twilight mode"; }
];
conf = /* lua */ ''
require("twilight").setup({
context = 20,
expand = { -- for treesitter, we we always try to expand to the top-most ancestor with these types
"function",
"function_definition",
"if_statement",
"method",
"method_definition",
"table",
},
})
'';
}
];
} }
]; ];
} }

View File

@ -4,11 +4,13 @@
, ... , ...
}: }:
with lib;
let let
inherit (lib) range filterAttrs attrNames foldl' head tail mkOption mkEnableOption intersectLists genAttrs flip getAttr;
inherit (lib.types) listOf enum package;
cfg = config.my.programs.python; cfg = config.my.programs.python;
pythonVersions = map (version: "3${toString version}") (range 8 11); pythonVersions = map (version: "3${toString version}") (range 8 13);
enabledVersions = filterAttrs (_: value: value.enable) cfg.versions; enabledVersions = filterAttrs (_: value: value.enable) cfg.versions;
pythonPackages = version: attrNames pkgs."python${version}Packages"; pythonPackages = version: attrNames pkgs."python${version}Packages";
@ -23,7 +25,7 @@ let
enable = mkEnableOption (toString version); enable = mkEnableOption (toString version);
pythonPackages = mkOption { pythonPackages = mkOption {
default = [ ]; default = [ ];
type = with types; listOf (enum (pythonPackages version)); type = listOf (enum (pythonPackages version));
}; };
}; };
in in
@ -32,11 +34,11 @@ in
versions = genAttrs pythonVersions versionOpts; versions = genAttrs pythonVersions versionOpts;
defaultPackages = mkOption { defaultPackages = mkOption {
default = [ ]; default = [ ];
type = with types; listOf (enum commonPackages); type = listOf (enum commonPackages);
}; };
extraPackages = mkOption { extraPackages = mkOption {
default = [ ]; default = [ ];
type = with types; listOf package; type = listOf package;
}; };
}; };

View File

@ -0,0 +1,293 @@
{ config
, lib
, pkgs
, ...
}:
let
inherit (lib) mkEnableOption mkIf mkOption types;
cfg = config.my.programs.river;
in
{
options.my.programs.river = {
enable = mkEnableOption "river";
keyboardLayouts = mkOption {
type = types.listOf types.str;
description = "list of keyboard layouts";
default = [ "us" "de" ];
};
nvidiaSupport = mkEnableOption "nvidiaSupport";
};
config = mkIf cfg.enable {
programs.river.enable = true;
my = {
programs = {
wallpaper.enable = true;
kitty.enable = true;
tofi.enable = true;
};
wallpapers.enable = true;
services = {
dunst.enable = true;
wallpaper = {
enable = true;
target = "river-session.target";
};
spotify-player.target = "river-session.target";
};
};
home-manager.users.moritz = {
home.packages = with pkgs; [
rivercarro
];
services.kanshi = {
enable = true;
systemdTarget = "river-session.target";
};
wayland.windowManager.river = {
enable = true;
settings = {
border-width = 2;
declare-mode = [
"locked"
"normal"
"passthrough"
];
map = {
normal = {
"Super Q" = "close";
"Super Return" = "spawn kitty";
"Super R" = ''spawn 'exec $(tofi-run --fuzzy-match=true)' '';
"Super W" = ''spawn "pkill -USR1 waybar"'';
"Super+Shift R" = "spawn ~/.config/river/init";
# Focus view
"Super J" = "focus-view next";
"Super K" = "focus-view previous";
# swap the focused view
"Super+Shift J" = "swap next";
"Super+Shift K" = "swap previous";
# focus output
"Super Period" = "focus-output next";
"Super Comma" = "focus-output previous";
# send to output
"Super+Shift Period" = "send-to-output next";
"Super+Shift Comma" = "send-to-output previous";
# bump in layout stack
"Super Z" = "zoom";
# lock screen
"Super+Alt L" = ''spawn "loginctl lock-session"'';
} //
# tags
(
let
numbers = lib.range 1 9;
toTag = num: "$((1 << (${toString num} - 1)))";
mkMappings = num:
let
numStr = toString num;
tag = toTag num;
in
[
# Super+Control+[1-9] to toggle focus of tag [0-8]
{ name = "Super ${numStr}"; value = "set-focused-tags ${tag}"; }
# Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view
{ name = "Super+Shift ${numStr}"; value = "toggle-view-tags ${tag}"; }
];
mappings = lib.flatten (map mkMappings numbers);
in
lib.listToAttrs mappings
);
};
map-pointer = {
normal = {
"Super BTN_LEFT" = "move-view";
"Super BTN_RIGHT" = "resize-view";
"Super BTN_MIDDLE" = "toggle-float";
};
};
attach-mode = "bottom";
default-layout = "rivercarro";
focus-follows-cursor = "normal";
hide-cursor = {
timeout = "1500";
when-typing = "enabled";
};
set-cursor-warp = "on-focus-change";
keyboard-layout = "-options grp:win_space_toggle,caps:escape ${lib.concatStringsSep "," cfg.keyboardLayouts}";
};
extraConfig = /* bash */ ''
rivercarro_pid="$(pidof rivercarro)"
if [[ -z $rivercarro_pid ]]; then
rivercarro -inner-gaps 4 -outer-gaps 4 &
fi
'';
};
# add waybar as a status bar
programs.waybar = {
enable = true;
package = pkgs.waybar.overrideAttrs (old: {
patches = old.patches or [ ] ++ [
(pkgs.fetchpatch {
url = "https://gitlab.archlinux.org/archlinux/packaging/packages/waybar/-/raw/0306af03fcb6de6aee1e288f42b0bf1b223513bd/a544f4b2cdcf632f1a4424b89f6e3d85ef5aaa85.patch";
sha256 = "sha256-S/1oUj9Aj6BElNTsDY8CTcKtS1j7Gl54JFgCywH05pg=";
})
];
});
# start using systemd service
systemd = {
enable = true;
target = "river-session.target";
};
settings = {
mainBar = {
start_hidden = true;
layer = "top";
position = "top";
height = 20;
modules-left = [ "river/tags" ];
modules-center = [ "river/window" ];
modules-right = [ "network" "memory" "cpu" "battery" "clock" ];
};
};
style = lib.readFile ./style.css;
};
# lock screen after timeout
programs.swaylock = {
enable = true;
settings = {
color = "000000";
};
};
services.swayidle = {
enable = true;
events = [
{
event = "before-sleep";
command = "${lib.getExe pkgs.swaylock} -fF";
}
{
event = "lock";
command = "${lib.getExe pkgs.swaylock} -fF";
}
];
timeouts =
let
lockTimeout = 10;
in
[
{
timeout = lockTimeout * 60 - 10;
command = "${pkgs.libnotify}/bin/notify-send 'Locking screen!'";
}
{
timeout = lockTimeout * 60 + 10;
command = "${pkgs.systemd}/bin/loginctl lock-session";
}
];
systemdTarget = "river-session.target";
};
};
# adds pam module for swaylock
security.pam.services.swaylock = { };
# add user packages for wayland and hyprland in particular
users.users.moritz.packages = with pkgs; [
brightnessctl # control brightness
grimblast # screenshot tool for hyprland
pamixer # pulse audio cli
playerctl # control media playback
slurp # region select for wayland (for screensharing)
wdisplays # manage monitors
wl-clipboard # clipboard tool for wayland
];
# additional environment variables
environment.sessionVariables =
{
XDG_CURRENT_DESKTOP = "river";
XDG_SESSION_TYPE = "wayland";
XDG_SESSION_DESKTOP = "river";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_QPA_PLATFORM = "wayland;xcb";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
QT_QPA_PLATFORMTHEME = "qt5ct";
_JAVA_AWT_WM_NONEREPARENTING = "1";
} // (lib.optionalAttrs cfg.nvidiaSupport
{
GBM_BACKEND = "nvidia-drm";
GDK_BACKEND = "wayland";
LIBVA_DRIVER_NAME = "nvidia";
MOZ_ENABLE_WAYLAND = "1";
WLR_DRM_DEVICES = "/dev/dri/card0";
WLR_DRM_NO_ATOMIC = "1";
WLR_NO_HARDWARE_CURSORS = "1";
XDG_CURRENT_DESKTOP = "river";
_GL_GSYNC_ALLOWED = "0";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
__GL_VRR_ALLOWED = "0";
});
services = {
dbus.enable = true;
# use pipewire (needed for screensharing)
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
displayManager = {
autoLogin = {
enable = true;
user = "moritz";
};
defaultSession = "river";
};
xserver = {
enable = true;
displayManager.lightdm.enable = true;
};
};
security.rtkit.enable = true;
home-manager.users.moritz.systemd.user.services =
let
units = [ "waybar" ];
mkAfter = _: {
Unit = {
After = [ "river-session.target" ];
Wants = [ "river-session.target" ];
};
};
in
lib.genAttrs units mkAfter;
systemd.user.services =
let
units = [ "pipewire" "xdg-desktop-portal" "wireplumber" ];
mkAfter = _: {
after = [ "river-session.target" ];
wants = [ "river-session.target" ];
};
in
lib.genAttrs units mkAfter;
};
}

View File

@ -0,0 +1,339 @@
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 13px;
}
window#waybar {
background-color: rgba(43, 48, 59, 0.5);
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
color: #ffffff;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
}
button {
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each button name */
border: none;
border-radius: 0;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
button:hover {
background: inherit;
box-shadow: inset 0 -3px #ffffff;
}
/* you can set a style on hover for any module like this */
#pulseaudio:hover {
background-color: #a37800;
}
#workspaces button {
padding: 0 5px;
background-color: transparent;
color: #ffffff;
}
#workspaces button:hover {
background: rgba(0, 0, 0, 0.2);
}
#workspaces button.focused {
background-color: #64727D;
box-shadow: inset 0 -3px #ffffff;
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#mode {
background-color: #64727D;
box-shadow: inset 0 -3px #ffffff;
}
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#wireplumber,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#scratchpad,
#power-profiles-daemon,
#mpd {
padding: 0 10px;
color: #ffffff;
}
#window,
#workspaces {
margin: 0 4px;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
#clock {
background-color: #64727D;
}
#battery {
background-color: #ffffff;
color: #000000;
}
#battery.charging, #battery.plugged {
color: #ffffff;
background-color: #26A65B;
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
}
/* Using steps() instead of linear as a timing function to limit cpu usage */
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: steps(12);
animation-iteration-count: infinite;
animation-direction: alternate;
}
#power-profiles-daemon {
padding-right: 15px;
}
#power-profiles-daemon.performance {
background-color: #f53c3c;
color: #ffffff;
}
#power-profiles-daemon.balanced {
background-color: #2980b9;
color: #ffffff;
}
#power-profiles-daemon.power-saver {
background-color: #2ecc71;
color: #000000;
}
label:focus {
background-color: #000000;
}
#cpu {
background-color: #2ecc71;
color: #000000;
}
#memory {
background-color: #9b59b6;
}
#disk {
background-color: #964B00;
}
#backlight {
background-color: #90b1b1;
}
#network {
background-color: #2980b9;
}
#network.disconnected {
background-color: #f53c3c;
}
#pulseaudio {
background-color: #f1c40f;
color: #000000;
}
#pulseaudio.muted {
background-color: #90b1b1;
color: #2a5c45;
}
#wireplumber {
background-color: #fff0f5;
color: #000000;
}
#wireplumber.muted {
background-color: #f53c3c;
}
#custom-media {
background-color: #66cc99;
color: #2a5c45;
min-width: 100px;
}
#custom-media.custom-spotify {
background-color: #66cc99;
}
#custom-media.custom-vlc {
background-color: #ffa000;
}
#temperature {
background-color: #f0932b;
}
#temperature.critical {
background-color: #eb4d4b;
}
#tray {
background-color: #2980b9;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}
#idle_inhibitor {
background-color: #2d3436;
}
#idle_inhibitor.activated {
background-color: #ecf0f1;
color: #2d3436;
}
#mpd {
background-color: #66cc99;
color: #2a5c45;
}
#mpd.disconnected {
background-color: #f53c3c;
}
#mpd.stopped {
background-color: #90b1b1;
}
#mpd.paused {
background-color: #51a37a;
}
#language {
background: #00b093;
color: #740864;
padding: 0 5px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state {
background: #97e1ad;
color: #000000;
padding: 0 0px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state > label {
padding: 0 5px;
}
#keyboard-state > label.locked {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad.empty {
background-color: transparent;
}
#privacy {
padding: 0;
}
#privacy-item {
padding: 0 5px;
color: white;
}
#privacy-item.screenshare {
background-color: #cf5700;
}
#privacy-item.audio-in {
background-color: #1ca000;
}
#privacy-item.audio-out {
background-color: #0069d4;
}
#tags button {
color: black;
}
#tags button.occupied {
color: white;
}
#tags button.focused {
background-color: grey;
}

View File

@ -12,10 +12,8 @@ in
options.my.programs.sway.enable = mkEnableOption "sway"; options.my.programs.sway.enable = mkEnableOption "sway";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
hardware.opengl = { hardware.opengl.enable = true;
enable = true;
driSupport = true;
};
environment.loginShellInit = '' environment.loginShellInit = ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
exec sway exec sway

44
modules/programs/tofi.nix Normal file
View File

@ -0,0 +1,44 @@
{ config
, lib
, pkgs
, ...
}:
with lib;
let
cfg = config.my.programs.tofi;
configText =
let
settingsStrings = mapAttrsToList (name: value: "${name} = ${value}") cfg.settings;
in
concatLines settingsStrings;
in
{
options.my.programs.tofi = {
enable = mkEnableOption "tofi";
settings = mkOption {
type = with types; attrsOf str;
default = { };
};
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
(lib.mkIf config.networking.networkmanager.enable networkmanager_dmenu)
# (lib.mkIf config.hardware.bluetooth.enable rofi-bluetooth)
# rofi-power-menu
];
home-manager.users.moritz = {
home.packages = with pkgs; [ tofi ];
xdg = {
enable = true;
configFile."tofi/config".text = configText;
configFile."networkmanager-dmenu/config.ini".text = ''
[dmenu]
dmenu_command = tofi
'';
};
};
};
}

View File

@ -8,7 +8,14 @@ let
script = pkgs.writeShellApplication { script = pkgs.writeShellApplication {
name = "wallpaper"; name = "wallpaper";
runtimeInputs = with pkgs; [ findutils coreutils feh swaybg fzf viu ]; runtimeInputs = with pkgs; [
findutils
coreutils
feh
swaybg
fzf
(viu.override { withSixel = true; })
];
text = builtins.readFile ./wallpaper.sh; text = builtins.readFile ./wallpaper.sh;
}; };
in in

View File

@ -1,5 +1,6 @@
{ config { config
, lib , lib
, pkgs
, ... , ...
}: { }: {
## System security tweaks ## System security tweaks
@ -69,6 +70,7 @@
# SSH # SSH
services.openssh = { services.openssh = {
package = pkgs.master.openssh; # HACK: to fix CVE-2024-6387
settings = { settings = {
# Disable ssh password login # Disable ssh password login
PasswordAuthentication = lib.mkDefault false; PasswordAuthentication = lib.mkDefault false;

View File

@ -1,62 +0,0 @@
_:
final: _:
with final.lib;
rec {
fishFile =
{ name
, destination
, content
, checkPhase ? null
}:
final.writeTextFile {
inherit name destination;
executable = true;
allowSubstitutes = true;
preferLocalBuild = false;
text = ''
#!${getExe final.fish}
${content}
'';
checkPhase =
if checkPhase == null then ''
runHook preCheck
${getExe final.fish} -n "$target"
runHook postCheck
''
else checkPhase;
};
writeFishApplication =
{ name
, text
, completions ? null
, runtimeInputs ? [ ]
, checkPhase ? null
}:
let
runtimeHeader = optionalString (runtimeInputs != [ ])
''export PATH="${makeBinPath runtimeInputs}:$PATH"'';
script = fishFile {
inherit checkPhase;
name = "${name}_script";
destination = "/bin/${name}";
content = concatLines [ runtimeHeader text ];
};
completions_file = fishFile {
inherit checkPhase;
name = "${name}_completions";
destination = "/share/fish/vendor_completions.d/${name}.fish";
content = concatLines [ runtimeHeader completions ];
};
in
final.symlinkJoin {
inherit name;
paths = [
script
] ++ optional (completions != null) completions_file;
};
}

View File

@ -1,4 +0,0 @@
{ lib, ... }@args:
lib.composeManyExtensions
(lib.my.mapModules' (file: import file args) ./.)

View File

@ -1,16 +0,0 @@
{ lib, ... }:
final: prev: {
# python-poetry/poetry#5929
poetry = final.symlinkJoin {
name = "poetry";
paths = [ prev.poetry ];
postBuild =
let
regex = "s/'([a-z]*[[:blank:]][a-z]*)''/\1'/g";
in
''
${lib.getExe final.gnused} -i -E "${regex}" "$out/share/fish/vendor_completions.d/poetry.fish"
'';
};
}

View File

@ -1,5 +0,0 @@
{ lib, ... }:
_: _: {
inherit lib;
}

View File

@ -1,10 +0,0 @@
_:
_: prev:
{
xorg = prev.xorg // {
lndir = prev.xorg.lndir.overrideAttrs (_: {
meta.mainProgram = "lndir";
});
};
}

View File

@ -1,63 +0,0 @@
{ inputs, lib }:
_: prev:
with lib.my;
{
vimPlugins = prev.vimPlugins // {
smartcolumn-nvim = prev.vimUtils.buildVimPlugin {
pname = "smartcolumn-nvim";
version = mkVersionInput inputs.smartcolumn-nvim;
src = inputs.smartcolumn-nvim;
};
telekasten-nvim = prev.vimUtils.buildVimPlugin {
pname = "telekasten-nvim";
version = mkVersionInput inputs.telekasten-nvim;
src = inputs.telekasten-nvim;
};
actions-preview-nvim = prev.vimUtils.buildVimPlugin {
pname = "actions-preview-nvim";
version = mkVersionInput inputs.actions-preview-nvim;
src = inputs.actions-preview-nvim;
};
nvim-treesitter = prev.vimPlugins.nvim-treesitter.overrideAttrs (_: {
version = mkVersionInput inputs.nvim-treesitter;
src = inputs.nvim-treesitter;
});
statuscol-nvim = prev.vimPlugins.statuscol-nvim.overrideAttrs (_: {
version = mkVersionInput inputs.statuscol-nvim;
src = inputs.statuscol-nvim;
});
# HACK: to fix error in nixpkgs version of nvim-lspconfig
nvim-lspconfig = prev.vimPlugins.nvim-lspconfig.overrideAttrs (_: {
version = mkVersionInput inputs.nvim-lspconfig;
src = inputs.nvim-lspconfig;
});
nvim-puppeteer = prev.vimUtils.buildVimPlugin {
pname = "nvim-puppeteer";
version = mkVersionInput inputs.nvim-puppeteer;
src = inputs.nvim-puppeteer;
};
null-ls-nvim = prev.vimPlugins.null-ls-nvim.overrideAttrs (_: {
version = mkVersionInput inputs.none-ls-nvim;
src = inputs.none-ls-nvim;
});
neotest-python = prev.vimPlugins.neotest-python.overrideAttrs (_: {
version = mkVersionInput inputs.neotest-python;
src = inputs.neotest-python;
});
gen-nvim = prev.vimUtils.buildVimPlugin {
pname = "gen-nvim";
version = mkVersionInput inputs.gen-nvim;
src = inputs.gen-nvim;
};
};
}

View File

@ -1,25 +0,0 @@
_:
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"
'';
};
}

BIN
secrets/exercism.age Normal file

Binary file not shown.

View File

@ -23,6 +23,7 @@ in
"wireguard-private-key.age".publicKeys = personal; "wireguard-private-key.age".publicKeys = personal;
"webis.age".publicKeys = hosts-personal ++ [ scadspc25 moritz ]; "webis.age".publicKeys = hosts-personal ++ [ scadspc25 moritz ];
"webis-ssh.age".publicKeys = hosts-personal ++ [ scadspc25 moritz ]; "webis-ssh.age".publicKeys = hosts-personal ++ [ scadspc25 moritz ];
"root-password.age".publicKeys = hosts-personal ++ [ moritz ]; "root-password.age".publicKeys = personal;
"moritz-password.age".publicKeys = hosts-personal ++ [ moritz ]; "moritz-password.age".publicKeys = personal;
"exercism.age".publicKeys = personal;
} }