1

Compare commits

...

70 Commits

Author SHA1 Message Date
8ee8558de3 Neovim: Add LaTeX specific localleader mappings 2024-10-10 15:54:53 +02:00
94b3d5e3ae Add sample latex-local nvim mapping 2024-10-10 15:05:41 +02:00
3b68cbcba7 Remove sneak as it breaks flash's <;> binding 2024-10-10 14:21:46 +02:00
4253c191db Update neovim config comments 2024-10-10 14:17:37 +02:00
d67fe9ec39 Substantial update to neovim config
- Overhaul keybindings
- Remove unused plugins (e.g., sandwich)
- Add markview and obsidian integration among others
2024-10-10 14:15:23 +02:00
508e65b8fe Update neovide font size 2024-10-10 14:14:35 +02:00
691cabd889 Enable -shell-escape for vimtex latexmk 2024-10-09 19:13:17 +02:00
52415d44f7 Update flake 2024-10-09 17:31:12 +02:00
5b273973ae Update neovim mappings 2024-10-09 17:31:08 +02:00
f76c7d16d5 Add Oil + Wakatime to neovim config 2024-10-09 17:31:01 +02:00
27eeb79674 Update firefox hwaccel config
Matches the nvidia-vaapi-driver docs now, but still doesn't work :(
2024-10-09 17:30:46 +02:00
214b5818cc Disable nvim_lsp_signature_help cmp backend
It overlaps with noice documentation popup
2024-09-22 22:27:39 +02:00
75098bcba0 Fix nextcloud wayland issue 2024-09-22 20:37:59 +02:00
dc8e2a619b Update options soon to be deprecated 2024-09-22 20:37:47 +02:00
ffd8a0fba5 Update flake 2024-09-22 20:37:28 +02:00
a4b9f013b2 Update git log mapping 2024-08-15 14:33:01 +02:00
3a8833525a Switch which-key preset to helix 2024-08-15 14:28:33 +02:00
b0dc048d2a Update nvim config after which-key + better-escape updates 2024-08-15 13:52:20 +02:00
5e56b4fe06 Update screenshots 2024-08-15 13:36:27 +02:00
a34daea3e5 Disable luarocks support in lazy 2024-08-15 13:32:42 +02:00
2f49d62b87 Update flake 2024-08-15 13:00:54 +02:00
280acc9318 Disable deprecated sound option 2024-08-15 13:00:51 +02:00
d60081ed0d Disable nvidia beta driver due to crash with hyprland 42.0 2024-08-15 13:00:43 +02:00
95586c0122 Enable ltex lsp 2024-08-15 13:00:33 +02:00
a5d157b1e2 Update trouble + vimtex mappings 2024-08-15 13:00:26 +02:00
3cbe3f5d6d Disable packages due to build failures 2024-08-15 13:00:08 +02:00
573e806998 Disable unity 2024-08-15 12:59:59 +02:00
ecc2c24c22 Add java config for neovim 2024-07-14 21:12:25 +02:00
ec9b9e8c2b Add default kernel set 2024-07-14 21:12:10 +02:00
b2408e55ce Update fish abbrs 2024-07-14 21:11:20 +02:00
3b37c0e989 Add java env flake 2024-07-14 21:11:13 +02:00
4b67d8889f Enable linux zen only on desktop 2024-07-06 21:27:25 +02:00
01a8c4f417 Rename options after update 2024-07-03 20:17:41 +02:00
eed6e50ad8 Fix hyprland config option after update 2024-07-03 20:08:27 +02:00
80299b6fd5 Disable deprecated stuff 2024-07-03 19:53:01 +02:00
f975f6ddfb Update flake 2024-07-03 19:50:25 +02:00
4f3a1fc1b7 Disable some deprecated/changed stuff before update 2024-07-03 19:50:21 +02:00
853ae42851 Add usbmuxd for iPhone tethering 2024-07-03 16:53:00 +02:00
045cf3c6ea Open Avatalk ports 2024-07-03 16:52:51 +02:00
ea787861d9 Enable nftables firewall instead of iptables 2024-07-03 16:52:46 +02:00
165408a4c7 Update hyprland config 2024-07-03 16:52:37 +02:00
2b1f5d7be8 Enable nixd LSP 2024-06-21 13:46:06 +02:00
c29c159ecf Set NIX_PATH env variable 2024-06-21 13:45:59 +02:00
72e6d5b2b9 Re-enable nvidia beta driver 2024-06-21 01:13:29 +02:00
0437534655 Obsidian to flatpak + Move jetbrains stuff to nixinator config 2024-06-21 01:13:24 +02:00
aad25a0d57 Restore firefox settings (became unstable with hwacc settings) 2024-06-10 16:36:20 +02:00
d5135f2f19 Add fish abbr 2024-06-10 16:36:03 +02:00
3c4f2faa92 Fix neovim rounded border for rust floats 2024-06-08 00:24:01 +02:00
cae0426db0 Disable nvidia beta driver (discord screenshare issue) 2024-06-07 20:42:14 +02:00
e8f30f4beb Add desmume 2024-06-07 20:42:00 +02:00
d63226a205 Update neovim module 2024-06-06 18:49:42 +02:00
56b5821458 Rename neovim/keybinds.nix to mappings.nix 2024-06-06 18:28:25 +02:00
47ed10c720 Update neovim module 2024-06-06 00:27:52 +02:00
fd77105b9a Update comments 2024-06-05 22:05:25 +02:00
cf95882979 Update neovim module 2024-06-05 21:58:56 +02:00
c0a61ededb Update neovim module 2024-06-05 13:02:04 +02:00
ea993c146b Really fix neovim toggleterm lazy loading 2024-06-05 11:55:31 +02:00
7f5f726eee Fix neovim toggleterm lazy loading 2024-06-05 11:46:41 +02:00
b27bc82249 Update neovim module 2024-06-05 01:43:22 +02:00
0933a14304 Comment 2024-06-05 01:43:15 +02:00
65c2092be6 Fix kitty autostart 2024-06-05 01:43:10 +02:00
2e9ccc2e58 Add incline render function 2024-06-04 23:51:47 +02:00
b5ab792fde Update readme 2024-06-04 22:34:19 +02:00
4b88b4e69f Various cleanups 2024-06-04 22:28:25 +02:00
533f21c02a Disable old derivations 2024-06-04 22:27:59 +02:00
e34ac0e562 Update neovim module 2024-06-04 01:51:53 +02:00
6c03d6b720 Ignore config/neovim/store 2024-06-03 21:10:20 +02:00
8d68a49cc5 Delete lazyvim module 2024-06-03 21:10:12 +02:00
5821220f03 Update neovim module 2024-06-03 20:37:56 +02:00
6ef030e91e Update flake 2024-06-03 20:37:34 +02:00
41 changed files with 2795 additions and 2530 deletions

8
.gitignore vendored
View File

@ -1,8 +1,10 @@
.owncloudsync.log
.nextcloudsync.log
.sync_*
result
.directory
.direnv
.idea
/.directory
.nextcloudsync.log
.docs
result
config/neovim/store

BIN
NixVim.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

@ -1,44 +1,42 @@
# NixOS Configuration
This is my modular NixOS configuration, using Hyprland for a lightweight desktop.
Modular NixOS configuration, using Hyprland for a lightweight desktop.
![](Foggy-Lake.png)
To install, run ``nixos-rebuild`` with the ``--flake`` parameter from the ``NixFlake`` directory: ``nixos-rebuild switch --flake .#nixinator``.
![](NixVim.png)
To install, run `nixos-rebuild` with the `--flake` parameter from the `NixFlake` directory: `nixos-rebuild switch --flake .#nixinator`.
## NixFlake/system
This folder contains all the system configurations.
Contains all the system configurations.
- There is a common configuration used for all systems: ``NixFlake/system/default.nix``
- Every system has its own special configuration: ``NixFlake/system/<hostname>/default.nix``
- System modules are located in ``NixFlake/system/modules``
- There is a common configuration used for all systems: `NixFlake/system/default.nix`
- Every system has its own special configuration: `NixFlake/system/<hostname>/default.nix`
- System modules are located in `NixFlake/system/modules`
When creating a NixOS configuration inside the ``NixFlake/flake.nix`` the common configuration is imported.
When creating a NixOS configuration inside the `NixFlake/flake.nix` the common configuration is imported.
Because the hostname is propagated to the common configuration, it can import the host-specific config by itself.
## NixFlake/home
This folder contains all the home-manager configurations.
Contains all the home-manager configurations.
- There is a common configuration for each user: ``NixFlake/home/<username>/default.nix``
- There is a configuration for a single system of this user: ``NixFlake/home/<username>/<hostname>/default.nix``
- Home-Manager modules are located in ``NixFlake/home/modules``
- There is a common configuration for each user: `NixFlake/home/<username>/default.nix`
- There is a configuration for a single system of this user: `NixFlake/home/<username>/<hostname>/default.nix`
- Home-Manager modules are located in `NixFlake/home/modules`
When creating a NixOS configuration inside the ``NixFlake/flake.nix`` the common configuration is imported.
When creating a NixOS configuration inside the `NixFlake/flake.nix` the common configuration is imported.
Because the hostname is propagated to the common configuration, it can import the host-specific config by itself.
## NixFlake/derivations
This folder contains all the stuff I packaged.
Each derivation is loaded into ``NixFlake/derivations/default.nix``.
Contains all the stuff I packaged.
Each derivation is loaded into `NixFlake/derivations/default.nix`.
## NixFlake/overlays
This folder contains (not at the moment) all overlays.
The ``NixFlake/overlays/default.nix`` imports all of the overlays and all of the derivations.
It is then imported by the toplevel ``NixFlake/flake.nix``, to make everything available to the system/home configurations.
## NixFlake/docs
This folder contains automatically generated static documentation sites for my Home-Manager modules.
Contains (not at the moment) all overlays.
The `NixFlake/overlays/default.nix` imports all of the overlays and all of the derivations.
It is then imported by the toplevel `NixFlake/flake.nix`, to make everything available to the system/home configurations.

View File

@ -77,7 +77,7 @@ dwindle {
}
master {
new_is_master = true
new_status = master
}
gestures {

View File

@ -5,13 +5,13 @@
...
}: {
# vital-synth = pkgs.callPackage ./vital-synth {}; # Kept as an example, don't know if I will fix this or keep using distrho
adwaita-for-steam = pkgs.callPackage ./adwaita-for-steam {src = inputs.adwaita-for-steam;};
dconf-editor-wrapped = pkgs.callPackage ./dconf-editor-wrapped {};
# adwaita-for-steam = pkgs.callPackage ./adwaita-for-steam {src = inputs.adwaita-for-steam;};
# dconf-editor-wrapped = pkgs.callPackage ./dconf-editor-wrapped {};
dell-b1160w = pkgs.callPackage ./dell-b1160w {};
firefox-gnome-theme = pkgs.callPackage ./firefox-gnome-theme {src = inputs.firefox-gnome-theme;};
# modules-options-doc = pkgs.callPackage ./modules-options-doc {mylib = mylib;}; # TODO: Borked
# spotdl-4_1_6 = pkgs.callPackage ./spotdl-4_1_6 {}; # TODO: Old
xdg-desktop-portal-termfilechooser = pkgs.callPackage ./xdg-desktop-portal-termfilechooser {};
wiiu-downloader = pkgs.callPackage ./wiiu-downloader {};
# wiiu-downloader = pkgs.callPackage ./wiiu-downloader {};
decker = pkgs.callPackage ./decker {};
}

33
env/flake_java.nix vendored Normal file
View File

@ -0,0 +1,33 @@
{
description = "Java Environment";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.devshell.url = "github:numtide/devshell";
outputs = {
self,
nixpkgs,
flake-utils,
devshell,
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true; # For clion
overlays = [devshell.overlays.default];
};
in {
devShell = pkgs.devshell.mkShell {
name = "Java Environment";
packages = with pkgs; [
jdk22
jdt-language-server
gradle
];
commands = [];
};
});
}

276
flake.lock generated
View File

@ -2,15 +2,14 @@
"nodes": {
"devshell": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1713532798,
"narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=",
"lastModified": 1722113426,
"narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=",
"owner": "numtide",
"repo": "devshell",
"rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40",
"rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae",
"type": "github"
},
"original": {
@ -21,18 +20,17 @@
},
"devshell_2": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1713532798,
"narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=",
"lastModified": 1722113426,
"narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=",
"owner": "numtide",
"repo": "devshell",
"rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40",
"rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae",
"type": "github"
},
"original": {
@ -43,16 +41,16 @@
},
"emacs-overlay": {
"inputs": {
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1717033835,
"narHash": "sha256-m+5EQOjc7AKKrPYD+GkAn2W52z92+9IBdIVtTu0WJTY=",
"lastModified": 1728205869,
"narHash": "sha256-nUoDO1cB/9G26aSWECRU/UhMp7tKX7oE3jK9MgZlK+0=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "441ed86922224973b0853255785d3ce88b683b1a",
"rev": "705b1d0be622b52a8b40d64a701e56b8924d8fb8",
"type": "github"
},
"original": {
@ -64,11 +62,11 @@
"firefox-gnome-theme": {
"flake": false,
"locked": {
"lastModified": 1716813977,
"narHash": "sha256-8fabA8OY1n2OcJFbbE03+bMydVANSBrNGo8hkzhXxxU=",
"lastModified": 1727973442,
"narHash": "sha256-nf+0/UR5TZArp3Dn3NS3nB+ZGqecTOTOZRCFM3a1veM=",
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"rev": "8171c0578feb835ce66d49edba7429f46b7ac3f6",
"rev": "59eee4080aa79a0671e98358f91ae1ef0c0806e1",
"type": "github"
},
"original": {
@ -78,6 +76,21 @@
}
},
"flake-compat": {
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
@ -91,22 +104,6 @@
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@ -115,11 +112,11 @@
]
},
"locked": {
"lastModified": 1715865404,
"narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=",
"lastModified": 1727826117,
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9",
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
"type": "github"
},
"original": {
@ -128,31 +125,16 @@
"type": "github"
}
},
"flake-root": {
"locked": {
"lastModified": 1713493429,
"narHash": "sha256-ztz8JQkI08tjKnsTpfLqzWoKFQF4JGu2LRz8bkdnYUk=",
"owner": "srid",
"repo": "flake-root",
"rev": "bc748b93b86ee76e2032eecda33440ceb2532fcd",
"type": "github"
},
"original": {
"owner": "srid",
"repo": "flake-root",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
@ -184,11 +166,11 @@
"systems": "systems_3"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
@ -199,7 +181,10 @@
},
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-compat": [
"nixvim",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
@ -211,11 +196,11 @@
]
},
"locked": {
"lastModified": 1716213921,
"narHash": "sha256-xrsYFST8ij4QWaV6HEokCUNIZLjjLP1bYC60K8XiBVA=",
"lastModified": 1728092656,
"narHash": "sha256-eMeCTJZ5xBeQ0f9Os7K8DThNVSo9gy4umZLDfF5q6OM=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "0e8fcc54b842ad8428c9e705cb5994eaf05c26a0",
"rev": "1211305a5b237771e13fcca0c51e60ad47326a9a",
"type": "github"
},
"original": {
@ -248,11 +233,11 @@
},
"hardware": {
"locked": {
"lastModified": 1716987116,
"narHash": "sha256-uuEkErFVsFdg2K0cKbNQ9JlFSAm/xYqPr4rbPLI91Y8=",
"lastModified": 1728056216,
"narHash": "sha256-IrO06gFUDTrTlIP3Sz+mRB6WUoO2YsgMtOD3zi0VEt0=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "8251761f93d6f5b91cee45ac09edb6e382641009",
"rev": "b7ca02c7565fbf6d27ff20dd6dbd49c5b82eef28",
"type": "github"
},
"original": {
@ -268,11 +253,11 @@
]
},
"locked": {
"lastModified": 1717052710,
"narHash": "sha256-LRhOxzXmOza5SymhOgnEzA8EAQp+94kkeUYWKKpLJ/U=",
"lastModified": 1728041527,
"narHash": "sha256-03liqiJtk9UP7YQHW4r8MduKCK242FQzud8iWvvlK+o=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "29c69d9a466e41d46fd3a7a9d0591ef9c113c2ae",
"rev": "509dbf8d45606b618e9ec3bbe4e936b7c5bc6c1e",
"type": "github"
},
"original": {
@ -289,11 +274,11 @@
]
},
"locked": {
"lastModified": 1716457508,
"narHash": "sha256-ZxzffLuWRyuMrkVVq7wastNUqeO0HJL9xqfY1QsYaqo=",
"lastModified": 1728041527,
"narHash": "sha256-03liqiJtk9UP7YQHW4r8MduKCK242FQzud8iWvvlK+o=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "850cb322046ef1a268449cf1ceda5fd24d930b05",
"rev": "509dbf8d45606b618e9ec3bbe4e936b7c5bc6c1e",
"type": "github"
},
"original": {
@ -302,6 +287,28 @@
"type": "github"
}
},
"nix-alien": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils_2",
"nix-filter": "nix-filter",
"nix-index-database": "nix-index-database",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1726398642,
"narHash": "sha256-tBM92BUtvY3vawqzl50VLY/EFhxw9LjuB/QN6QUC4ls=",
"owner": "thiagokokada",
"repo": "nix-alien",
"rev": "399c8e50f10d9bace3a024496e5f4dee28bdfdcd",
"type": "github"
},
"original": {
"owner": "thiagokokada",
"repo": "nix-alien",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
@ -310,11 +317,11 @@
]
},
"locked": {
"lastModified": 1716511055,
"narHash": "sha256-5Fe/DGgvMhPEMl9VdVxv3zvwRcwNDmW5eRJ0gk72w7U=",
"lastModified": 1727999297,
"narHash": "sha256-LTJuQPCsSItZ/8TieFeP30iY+uaLoD0mT0tAj1gLeyQ=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "0bea8222f6e83247dd13b055d83e64bce02ee532",
"rev": "8c8388ade72e58efdeae71b4cbb79e872c23a56b",
"type": "github"
},
"original": {
@ -323,6 +330,21 @@
"type": "github"
}
},
"nix-filter": {
"locked": {
"lastModified": 1710156097,
"narHash": "sha256-1Wvk8UP7PXdf8bCCaEoMnOT1qe5/Duqgj+rL8sRQsSM=",
"owner": "numtide",
"repo": "nix-filter",
"rev": "3342559a24e85fc164b295c3444e8a139924675b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "nix-filter",
"type": "github"
}
},
"nix-flatpak": {
"locked": {
"lastModified": 1711997201,
@ -339,13 +361,34 @@
"type": "github"
}
},
"nix-index-database": {
"inputs": {
"nixpkgs": [
"nix-alien",
"nixpkgs"
]
},
"locked": {
"lastModified": 1726370017,
"narHash": "sha256-CJOV4JiLhd++w9K+h2z00DiB4R1CCuElWzhldrXSq5w=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "0a2fba621b6bbf06be0b4edd974236e3d2fcc1a9",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-index-database",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1704161960,
"narHash": "sha256-QGua89Pmq+FBAro8NriTuoO/wNaUtugt29/qqA8zeeM=",
"lastModified": 1722073938,
"narHash": "sha256-OpX0StkL8vpXyWOGUD6G+MA26wAXK6SpT94kLJXo6B4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "63143ac2c9186be6d9da6035fa22620018c85932",
"rev": "e36e9f57337d0ff0cf77aceb58af4c805472bfae",
"type": "github"
},
"original": {
@ -357,27 +400,27 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1716633019,
"narHash": "sha256-xim1b5/HZYbWaZKyI7cn9TJCM6ewNVZnesRr00mXeS4=",
"lastModified": 1728067476,
"narHash": "sha256-/uJcVXuBt+VFCPQIX+4YnYrHaubJSx4HoNsJVNRgANM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9d29cd266cebf80234c98dd0b87256b6be0af44e",
"rev": "6e6b3dd395c3b1eb9be9f2d096383a8d05add030",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1716769173,
"narHash": "sha256-7EXDb5WBw+d004Agt+JHC/Oyh/KTUglOaQ4MNjBbo5w=",
"lastModified": 1728018373,
"narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9ca3f649614213b2aaf5f1e16ec06952fe4c2632",
"rev": "bc947f541ae55e999ffdb4013441347d83b00feb",
"type": "github"
},
"original": {
@ -389,15 +432,15 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1716769173,
"narHash": "sha256-7EXDb5WBw+d004Agt+JHC/Oyh/KTUglOaQ4MNjBbo5w=",
"owner": "nixos",
"lastModified": 1726062873,
"narHash": "sha256-IiA3jfbR7K/B5+9byVi9BZGWTD4VSbWe8VLpp9B/iYk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9ca3f649614213b2aaf5f1e16ec06952fe4c2632",
"rev": "4f807e8940284ad7925ebd0a0993d2a1791acb2f",
"type": "github"
},
"original": {
"owner": "nixos",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
@ -405,15 +448,15 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1716509168,
"narHash": "sha256-4zSIhSRRIoEBwjbPm3YiGtbd8HDWzFxJjw5DYSDy1n8=",
"owner": "NixOS",
"lastModified": 1728018373,
"narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "bfb7a882678e518398ce9a31a881538679f6f092",
"rev": "bc947f541ae55e999ffdb4013441347d83b00feb",
"type": "github"
},
"original": {
"owner": "NixOS",
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
@ -422,21 +465,23 @@
"nixvim": {
"inputs": {
"devshell": "devshell_2",
"flake-compat": "flake-compat",
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts",
"flake-root": "flake-root",
"git-hooks": "git-hooks",
"home-manager": "home-manager_2",
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs_4",
"nixpkgs": [
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1717012327,
"narHash": "sha256-hmm9DA0+7RSbxudrscrjKJ3EGSwxvrkpjpCEAa+GtT8=",
"lastModified": 1728176751,
"narHash": "sha256-hVmdzrZMFC/5q3dSjbKX9qocWN9coPBhs8muLsL3738=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "2031a09b36c19526aa82d27167942edf62915b66",
"rev": "d42c804ad515f45f8addaf5a4bb0b8ce405ea140",
"type": "github"
},
"original": {
@ -447,11 +492,11 @@
},
"nur": {
"locked": {
"lastModified": 1717054761,
"narHash": "sha256-LBrHEBC0S7C6zjQTsjahAvxxlDH3cbZmEgHiri9o4SM=",
"lastModified": 1728215254,
"narHash": "sha256-z/fDpgmuRI/X3h74cGph7DU0VEBC8VWcrKY8AdTVABw=",
"owner": "nix-community",
"repo": "NUR",
"rev": "a4eff07f9bbcf74522c642c72047ed03c3831501",
"rev": "e6ad3593324e2a96526177ec7c3041ea97bf6946",
"type": "github"
},
"original": {
@ -460,6 +505,28 @@
"type": "github"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1728017046,
"narHash": "sha256-ofWYux/uUAv8wq7sWw8XWke0sh8p4qYxSOn8d+EaJ8c=",
"owner": "NuschtOS",
"repo": "search",
"rev": "ba81d9c1eae20fc3a1cd066062a05ac2e799e629",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"root": {
"inputs": {
"devshell": "devshell",
@ -467,8 +534,9 @@
"firefox-gnome-theme": "firefox-gnome-theme",
"hardware": "hardware",
"home-manager": "home-manager",
"nix-alien": "nix-alien",
"nix-flatpak": "nix-flatpak",
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_4",
"nixvim": "nixvim",
"nur": "nur"
}
@ -526,11 +594,11 @@
]
},
"locked": {
"lastModified": 1715940852,
"narHash": "sha256-wJqHMg/K6X3JGAE9YLM0LsuKrKb4XiBeVaoeMNlReZg=",
"lastModified": 1727984844,
"narHash": "sha256-xpRqITAoD8rHlXQafYZOLvUXCF6cnZkPfoq67ThN0Hc=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "2fba33a182602b9d49f0b2440513e5ee091d838b",
"rev": "4446c7a6fc0775df028c5a3f6727945ba8400e64",
"type": "github"
},
"original": {

View File

@ -11,30 +11,31 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
hardware.url = "github:nixos/nixos-hardware";
# Home manager
# Home Manager
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# Other Flakes
emacs-overlay.url = "github:nix-community/emacs-overlay";
nur.url = "github:nix-community/NUR";
devshell.url = "github:numtide/devshell";
# Other
nixvim.url = "github:nix-community/nixvim";
nixvim.inputs.nixpkgs.follows = "nixpkgs";
emacs-overlay.url = "github:nix-community/emacs-overlay";
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1";
nix-alien.url = "github:thiagokokada/nix-alien";
devshell.url = "github:numtide/devshell";
nur.url = "github:nix-community/NUR"; # Nix User Repository
firefox-gnome-theme.url = "github:rafaelmardojai/firefox-gnome-theme";
firefox-gnome-theme.flake = false;
# Disabled
# adwaita-for-steam.url = "github:tkashkin/Adwaita-for-Steam";
# adwaita-for-steam.flake = false;
# plasma-manager.url = "github:pjones/plasma-manager";
# plasma-manager.inputs.nixpkgs.follows = "nixpkgs";
# plasma-manager.inputs.home-manager.follows = "home-manager";
# musnix.url = "github:musnix/musnix";
# nixified-ai.url = "github:nixified-ai/flake";
# nixos-conf-editor.url = "github:vlinkz/nixos-conf-editor";
# nix-matlab.url = "gitlab:doronbehar/nix-matlab";
# plasma-manager.url = "github:pjones/plasma-manager";
# plasma-manager.inputs.nixpkgs.follows = "nixpkgs";
# plasma-manager.inputs.home-manager.follows = "home-manager";
firefox-gnome-theme.url = "github:rafaelmardojai/firefox-gnome-theme";
firefox-gnome-theme.flake = false;
# adwaita-for-steam.url = "github:tkashkin/Adwaita-for-Steam";
# adwaita-for-steam.flake = false;
};
# Outputs is a function that takes the inputs as arguments.

View File

@ -15,6 +15,7 @@
# This is a module
# Because no imports/options/config is defined explicitly, everything is treated as config
# { inputs, lib, ... }: { ... } gets turned into { inputs, lib, ... }: { config = { ... }; } implicitly
# TODO: Add nixified.ai module
rec {
# Every module is a nix expression, specifically a function { inputs, lib, ... }: { ... }
# Every module (/function) is called with the same arguments as this module (home.nix)
@ -63,7 +64,7 @@ rec {
firefox = {
enable = true;
wayland = true;
vaapi = true; # NOTE: Crashes AMDGPU driver fairly often (don't know why exactly)
vaapi = true;
disableTabBar = true;
defaultBookmarks = true;
gnomeTheme = true;
@ -113,12 +114,11 @@ rec {
};
autostart = {
immediate = [
"kitty"
];
# immediate = [];
delayed = [
# "kdeconnect-indicator"
"kitty"
"nextcloud --background"
"keepassxc"
];
@ -131,14 +131,17 @@ rec {
"jetbrains-idea"
"jetbrains-pycharm"
"jetbrains-rustrover"
"jetbrains-rider"
"code-url-handler"
];
"3" = [
"obsidian"
"unityhub"
"Unity"
"chromium-browser"
];
"4" = [
"firefox"
"chromium-browser"
"Google-chrome"
];
"7" = [
@ -149,6 +152,7 @@ rec {
];
"9" = [
"discord"
"vesktop"
];
};
@ -166,12 +170,15 @@ rec {
"kitty"
"Alacritty"
"discord"
"signal"
"vesktop"
"Spotify"
"obsidian"
"jetbrains-clion"
"jetbrains-idea"
"jetbrains-pycharm"
"jetbrains-rustrover"
"jetbrains-rider"
"code-url-handler"
"neovide"
];
@ -179,37 +186,12 @@ rec {
kitty.enable = true;
misc = {
enable = true;
keepass = {
enable = true;
autostart = false; # TODO: This option should use hyprland module
};
protonmail = {
enable = true;
autostart = false; # TODO: This option should use hyprland module
};
};
neovim = {
enable = true;
alias = true;
neovide = true;
};
# lazyvim = {
# enable = true;
# alias = true;
# neovide = true;
# };
nextcloud = {
enable = true;
autostart = false; # TODO: This option should use hyprland module
};
nnn.enable = true;
# ranger = {
@ -223,58 +205,30 @@ rec {
theme = "Foggy-Lake";
};
vscode.enable = true;
vscode.enable = false; # TODO: Had broken package ms-vscode-cpptools
waybar = {
enable = true;
};
};
manual.manpages.enable = true;
manual.html.enable = true;
manual = {
manpages.enable = true;
html.enable = false;
};
# Make fonts installed through user packages available to applications
# NOTE: I don't think I need this anymore as all fonts are installed through the system config but let's keep this just in case
fonts.fontconfig.enable = true; # Also updates the font-cache
# Generate a list of installed user packages in ~/.local/share/current-user-packages
home.file.".local/share/current-user-packages".text = let
packages = builtins.map (p: "${p.name}") home.packages;
sortedUnique = builtins.sort builtins.lessThan (lib.unique packages);
formatted = builtins.concatStringsSep "\n" sortedUnique;
in
formatted;
home.file.".config/mpv" = {
recursive = true;
source = ../../config/mpv;
};
# TODO: Latex module
home.file."texmf/tex/latex/custom/christex.sty".source = ../../config/latex/christex.sty;
home.file."Notes/Obsidian/Chriphost/christex.sty".source = ../../config/latex/christex.sty; # For obsidian notes
home.file.".indentconfig.yaml".source = ../../config/latex/.indentconfig.yaml;
home.file.".indentsettings.yaml".source = ../../config/latex/.indentsettings.yaml;
# TODO: Use mkLink
# home.file."Notes/Obsidian/Chriphost/latex_snippets.json".source = ../../config/obsidian/latex_snippets.json;
home.file."Notes/Obsidian/Chriphost/.obsidian/snippets/latex_preview.css".source = ../../config/obsidian/css_snippets/latex_preview.css;
# TODO: If navi enabled
# TODO: Symlink this, so the config doesn't have to be rebuilt every time
home.file.".local/share/navi/cheats/christoph.cheat".source = ../../config/navi/christoph.cheat;
home.activation = {
linkObsidianLatexSnippets =
lib.hm.dag.entryAfter ["writeBoundary"]
(mylib.modules.mkLink "~/NixFlake/config/obsidian/latex_snippets.json" "~/Notes/Obsidian/Chriphost/latex_snippets.json");
};
xdg.mime.enable = true;
xdg.mimeApps = {
enable = true;
associations.added = nixosConfig.xdg.mime.addedAssociations;
associations.removed = nixosConfig.xdg.mime.removedAssociations;
inherit (nixosConfig.xdg.mime) defaultApplications; # Equal to "defaultApplications = nixosConfig.xdg.mime.defaultApplications"
xdg = {
mime.enable = true;
mimeApps = {
enable = true;
associations.added = nixosConfig.xdg.mime.addedAssociations;
associations.removed = nixosConfig.xdg.mime.removedAssociations;
inherit (nixosConfig.xdg.mime) defaultApplications; # Equal to "defaultApplications = nixosConfig.xdg.mime.defaultApplications"
};
};
home = {
@ -306,147 +260,160 @@ rec {
# WINEFSYNC = 1;
# WINEPREFIX = "/home/christoph/.wine";
# NOTE: GTK_IM_MODULE, QT_IM_MODULE, XMODIFIERS are set by HomeManager fcitx5 module
# GTK_IM_MODULE, QT_IM_MODULE, XMODIFIERS are set by HomeManager fcitx5 module
};
file = {
# Generate a list of installed user packages in ~/.local/share/current-user-packages
".local/share/current-user-packages".text = let
packages = builtins.map (p: "${p.name}") home.packages;
sortedUnique = builtins.sort builtins.lessThan (lib.unique packages);
formatted = builtins.concatStringsSep "\n" sortedUnique;
in
formatted;
".config/mpv" = {
recursive = true;
source = ../../config/mpv;
};
# TODO: Latex module
"texmf/tex/latex/custom/christex.sty".source = ../../config/latex/christex.sty;
"Notes/Obsidian/Chriphost/christex.sty".source = ../../config/latex/christex.sty; # For obsidian notes
".indentconfig.yaml".source = ../../config/latex/.indentconfig.yaml;
".indentsettings.yaml".source = ../../config/latex/.indentsettings.yaml;
# TODO: Use mkLink
# "Notes/Obsidian/Chriphost/latex_snippets.json".source = ../../config/obsidian/latex_snippets.json;
"Notes/Obsidian/Chriphost/.obsidian/snippets/latex_preview.css".source = ../../config/obsidian/css_snippets/latex_preview.css;
# TODO: If navi enabled
# TODO: Symlink this, so the config doesn't have to be rebuilt every time
".local/share/navi/cheats/christoph.cheat".source = ../../config/navi/christoph.cheat;
};
activation = {
linkObsidianLatexSnippets =
lib.hm.dag.entryAfter ["writeBoundary"]
(mylib.modules.mkLink "~/NixFlake/config/obsidian/latex_snippets.json" "~/Notes/Obsidian/Chriphost/latex_snippets.json");
};
# TODO: Make a module for standard UNIX replacements
# Add stuff for your user as you see fit:
packages = with pkgs; [
# Shell utils
(ripgrep.override {withPCRE2 = true;}) # fast as fuck
gdu # Alternative to du-dust (I like it better)
duf # Disk usage analyzer (for all disk overview)
sd # sed alternative
fclones # duplicate file finder
tealdeer # very fast tldr (so readable man)
atool # Archive preview
ffmpegthumbnailer # Video thumbnails
mediainfo
tree # Folder preview
unrar
p7zip
unzip
progress
tokei # Text file statistics in a project
appimage-run
nvd # nix rebuild diff
file
# spotdl # TODO: Borked
# Hardware/Software info
pciutils # lspci
glxinfo # opengl info
wayland-utils # wayland-info
aha # ansi html adapter? TODO: Why did I install this?
clinfo # OpenCL info
vulkan-tools # vulkaninfo
libva-utils # vainfo
vdpauinfo
hwloc
lm_sensors
acpica-tools # Dump ACPI tables etc.
# Video/Image utils
ffmpeg_7-full # I love ffmpeg (including ffplay)
ffmpeg-normalize
imagemagick # Convert image (magic)
# ueberzugpp # Display images in terminal (alacritty) # TODO: Build failure
# Document utils
# TODO: Latex module with individual packages or HomeManager
texlive.combined.scheme-full
poppler_utils # pdfunite
graphviz # generate graphs from code
plantuml
gnuplot # generate function plots
pdf2svg
pandoc # document converting madness
inkscape # for latex
# Networking
dig
tcpdump
traceroute
wireshark
gping # ping with graph
curlie # curl a'la httpie
wget # download that shit
dogdns # dns client
rsync # cp on steroids
rclone # Rsync for cloud
httpie # Cool http client
# suricata
cifs-utils # Mount samba shares
nfs-utils
sshfs
protonvpn-cli
# protonvpn-gui # NOTE: Doesn't work
# GUI apps
vlc
cool-retro-term
ventoy-full # Bootable USB for many ISOs
sqlitebrowser # To modify tables
dbeaver-bin # To import/export data + diagrams
hoppscotch # Test APIs
# decker # TODO: Build failure
signal-desktop
filezilla
anki
# octave # GNU matlab basically
font-manager
nextcloud-client
keepassxc
protonmail-bridge
thunderbird # TODO: Email module
# xwaylandvideobridge # NOTE: Doesn't work
AusweisApp2
# Office
wacomtablet # For xournalpp/krita
xournalpp # Write with a pen, like old people
# libreoffice-qt
hunspell # I cna't type
hunspellDicts.en_US
hunspellDicts.de_DE
# obsidian # knowledge-base # NOTE: Use flatpak
# logseq # knowledge-base
# TODO: Module, I need to add python packages from multiple modules to the same interpreter
python312
# Use NixCommunity binary cache
cachix
# Generate documentation
# modules-options-doc
];
# Do not change
stateVersion = "22.05";
};
# TODO: Split this more between laptop and desktop...
# TODO: Make a module for standard UNIX replacements
# Add stuff for your user as you see fit:
home.packages = with pkgs; [
# Shell utils
(ripgrep.override {withPCRE2 = true;}) # fast as fuck
gdu # Alternative to du-dust (I like it better)
duf # Disk usage analyzer (for all disk overview)
sd # sed alternative
fclones # duplicate file finder
tealdeer # very fast tldr (so readable man)
atool # Archive preview
ffmpegthumbnailer # Video thumbnails
mediainfo
tree # Folder preview
unrar
p7zip
unzip
progress
tokei # Text file statistics in a project
appimage-run
nvd # nix rebuild diff
file
# spotdl # TODO: Borked
# Hardware/Software info
pciutils # lspci
glxinfo # opengl info
wayland-utils # wayland-info
aha # ansi html adapter? TODO: Why did I install this?
clinfo # OpenCL info
vulkan-tools # vulkaninfo
libva-utils # vainfo
vdpauinfo
hwloc
lm_sensors
acpica-tools # Dump ACPI tables etc.
# Video/Image utils
ffmpeg_5-full # I love ffmpeg (v5, including ffplay)
ffmpeg-normalize
x265
imagemagick # Convert image (magic)
ueberzugpp # Display images in terminal (alacritty)
# Document utils
# TODO: Latex module with individual packages or HomeManager
texlive.combined.scheme-full
poppler_utils # pdfunite
graphviz # generate graphs from code
plantuml
gnuplot # generate function plots
pdf2svg
pandoc # document converting madness
# Networking
dig
tcpdump
traceroute
wireshark
gping # ping with graph
curlie # curl a'la httpie
wget # download that shit
dogdns # dns client
rsync # cp on steroids
rclone # Rsync for cloud
httpie # Cool http client
# suricata
cifs-utils # Mount samba shares
nfs-utils
sshfs
protonvpn-cli
# GUI apps
vlc
cool-retro-term
ventoy-full # Bootable USB for many ISOs
# spotify # Uses flatpak
sqlitebrowser # To modify tables
dbeaver-bin # To import/export data + diagrams
hoppscotch # Test APIs
# decker # TODO: Build failure
signal-desktop
filezilla
# calibre # Do I even read
# virt-manager
# gource # Visualize git commit log, completely useless
# anki-bin # Use anki-bin as anki is some versions behind NOTE: anki-bin doesn't support fcitx5 :(
anki
# inputs.nixos-conf-editor.packages."x86_64-linux".nixos-conf-editor
# octave # GNU matlab basically
# logisim-evolution # Digital circuit simulator
# digital # Digital circuit simulator
# okteta # hex editor
# kdiff3 # diff/patch tool
font-manager
# Office
# sioyek # Scientific pdf reader # HM program
xournalpp # Write with a pen, like old people
# libreoffice-qt
hunspell # I cna't type
hunspellDicts.en_US
hunspellDicts.de_DE
obsidian # knowledge-base
# logseq # knowledge-base
# TODO: Module, I need to add python packages from multiple modules to the same interpreter
python312
jetbrains.clion
jetbrains.rust-rover
jetbrains.pycharm-professional
jetbrains.idea-ultimate
# Media
wacomtablet
# blender
# godot_4
obs-studio
# vlc # Addition to mpv without any shaders etc
kdenlive
krita
inkscape
# handbrake
# makemkv
AusweisApp2
# Use NixCommunity binary cache
cachix
# Generate documentation
# modules-options-doc
];
# home.file.".options-doc".source = "${pkgs.modules-options-doc}";
# Packages with extra options managed by HomeManager natively
@ -627,7 +594,7 @@ rec {
git = {
enable = true;
lfs.enable = true;
delta.enable = true;
delta.enable = false; # TODO: Build failure
userEmail = "christoph.urlacher@protonmail.com";
userName = "Christoph Urlacher";
@ -662,18 +629,20 @@ rec {
# Realtime Motion Interpolation: https://gist.github.com/phiresky/4bfcfbbd05b3c2ed8645
mpv = {
enable = true;
# NOTE: wrapMpv explained here: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/applications/video/mpv/wrapper.nix#L84
# TODO: wrapMpv was removed
# Explained here: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/applications/video/mpv/wrapper.nix#L84
# wrapMpv gets two args: the mpv derivation and some options
# Possible overrides for derivation: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/applications/video/mpv/default.nix#L222
package = pkgs.wrapMpv (pkgs.mpv-unwrapped.override {vapoursynthSupport = true;}) {
youtubeSupport = true;
extraMakeWrapperArgs = [
"--prefix"
"LD_LIBRARY_PATH"
":"
"${pkgs.vapoursynth-mvtools}/lib"
];
};
# package = pkgs.wrapMpv (pkgs.mpv-unwrapped.override {vapoursynthSupport = true;}) {
# youtubeSupport = true;
# extraMakeWrapperArgs = [
# "--prefix"
# "LD_LIBRARY_PATH"
# ":"
# "${pkgs.vapoursynth-mvtools}/lib"
# ];
# };
};
# Interactive Cheatsheets
@ -815,6 +784,8 @@ rec {
"com.discordapp.Discord"
"com.spotify.Client"
"com.google.Chrome"
"md.obsidian.Obsidian"
"dev.vencord.Vesktop"
];
uninstallUnmanaged = true;
@ -826,9 +797,8 @@ rec {
overrides = {
global = {
# NOTE: Makes discord crash
# Force Wayland by default
# Context.sockets = ["wayland" "!x11" "!fallback-x11"];
# Context.sockets = ["wayland" "!x11" "!fallback-x11"]; # NOTE: Makes discord crash
Context.filesystems = ["/nix/store:ro"];
@ -844,6 +814,11 @@ rec {
};
};
# Fix Discord rich presence for Flatpak
systemd.user.tmpfiles.rules = [
"L %t/discord-ipc-0 - - - - app/com.discordapp.Discord/discord-ipc-0"
];
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
}

View File

@ -1,5 +1,5 @@
# Here goes the stuff that will only be enabled on the desktop
{...}: {
{pkgs, ...}: {
imports = [
../../modules
];
@ -48,53 +48,35 @@
];
};
# audio = {
# enable = false;
# carla.enable = false;
# bitwig.enable = true; # TODO: Check what happens when upgrade plan ends, do I need to pin the version then?
# tenacity.enable = true;
# faust.enable = true;
# bottles.enable = false;
# yabridge.enable = true;
# yabridge.autoSync = true;
# noisesuppression = {
# noisetorch.enable = false;
# noisetorch.autostart = false;
# easyeffects.enable = false;
# easyeffects.autostart = false;
# };
# cardinal.enable = true;
# distrho.enable = true;
# };
# gaming = {
# enable = false;
# prism.enable = true;
# bottles.enable = false;
# cemu.enable = true;
# # TODO: Webcord
# # discordChromium.enable = false;
# # discordElectron.enable = false; # This is the nixpkgs version, prefer the one from flatpak module
# # dwarffortress.enable = false;
# steam = {
# enable = true;
# gamescope = true;
# adwaita = false;
# protonup = true;
# };
# };
# TODO: Also set the dunst monitor
waybar.monitor = "HDMI-A-1";
};
# home.packages = with pkgs; [
# quartus-prime-lite # Intel FPGA design software
# ];
home.packages = with pkgs; [
# quartus-prime-lite # Intel FPGA design software
# Don't want heavy IDE's on the laptop
jetbrains.clion
jetbrains.rust-rover
jetbrains.pycharm-professional
jetbrains.idea-ultimate
# unityhub
# jetbrains.rider
# (with dotnetCorePackages;
# combinePackages [
# sdk_6_0_1xx
# sdk_7_0_3xx
# sdk_8_0_2xx
# ]) # For Rider/Unity
# mono # For Rider/Unity
blender
# godot_4
obs-studio
kdenlive
krita
# makemkv
];
};
}

View File

@ -1,20 +1,19 @@
{inputs, ...}: {
imports = [
./audio
# ./audio
./chromium
./emacs
./email
./firefox
./fish
./flatpak
./gaming
# ./flatpak
# ./gaming
./helix
./hyprland
./kitty
./lazyvim
./misc
# ./misc
./neovim
./nextcloud
# ./nextcloud
./nnn
./ranger
./rofi

View File

@ -1,7 +1,8 @@
# Example: https://beb.ninja/post/email/
# Example: https://sbr.pm/configurations/mails.html
# TODO: Protonmail-bridge
# TODO: Change to use thunderbird only
# NOTE: The passwords must exist in kwallet
# TODO: Emacs mail config
{
config,
nixosConfig,

View File

@ -159,19 +159,21 @@ in {
# TODO: Disable and check if it works by default
# "gfx.canvas.accelerated" = true; # Default value
# "gfx.webrender.enabled" = true; # Does not exist?
"gfx.x11-egl.force-enabled" = true;
"layers.acceleration.force-enabled" = true;
"media.av1.enabled" = true;
"media.ffmpeg.vaapi.enabled" = true;
"media.hardware-video-decoding.force-enabled" = true;
"media.rdd-ffmpeg.enabled" = true; # Default value
"media.av1.enabled" = true;
"gfx.x11-egl.force-enabled" = true;
"widget.dmabuf.force-enabled" = true;
# "layers.acceleration.force-enabled" = true;
# "media.hardware-video-decoding.force-enabled" = true;
# "widget.wayland-dmabuf-vaapi.enabled" = true; # Does not exist?
})
(let
# NOTE: This has to be updated when something is changed inside firefox...
customizationState = ''{"placements":{"widget-overflow-fixed-list":["jid1-mnnxcxisbpnsxq_jetpack-browser-action","_74145f27-f039-47ce-a470-a662b129930a_-browser-action","_b86e4813-687a-43e6-ab65-0bde4ab75758_-browser-action","cookieautodelete_kennydo_com-browser-action","skipredirect_sblask-browser-action","_ublacklist-browser-action","umatrix_raymondhill_net-browser-action","_2e5ff8c8-32fe-46d0-9fc8-6b8986621f3c_-browser-action","_287dcf75-bec6-4eec-b4f6-71948a2eea29_-browser-action","_d133e097-46d9-4ecc-9903-fa6a722a6e0e_-browser-action","_f209234a-76f0-4735-9920-eb62507a54cd_-browser-action","dontfuckwithpaste_raim_ist-browser-action","sponsorblocker_ajay_app-browser-action","mogultv_mogultv_org-browser-action","jid1-tsgsxbhncspbwq_jetpack-browser-action","sourcegraph-for-firefox_sourcegraph_com-browser-action","_b11bea1f-a888-4332-8d8a-cec2be7d24b9_-browser-action","_762f9885-5a13-4abd-9c77-433dcd38b8fd_-browser-action","_34daeb50-c2d2-4f14-886a-7160b24d66a4_-browser-action","smart-referer_meh_paranoid_pk-browser-action","jid1-ckhysaadh4nl6q_jetpack-browser-action","_e737d9cb-82de-4f23-83c6-76f70a82229c_-browser-action","_a4c4eda4-fb84-4a84-b4a1-f7c1cbf2a1ad_-browser-action","github-forks-addon_musicallyut_in-browser-action"],"nav-bar":["back-button","forward-button","downloads-button","urlbar-container","save-to-pocket-button","fxa-toolbar-menu-button","treestyletab_piro_sakura_ne_jp-browser-action","ublock0_raymondhill_net-browser-action","_531906d3-e22f-4a6c-a102-8057b88a1a63_-browser-action","display-anchors_robwu_nl-browser-action","tab-session-manager_sienori-browser-action","_d7742d87-e61d-4b78-b8a1-b469842139fa_-browser-action","keepassxc-browser_keepassxc_org-browser-action"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["firefox-view-button","tabbrowser-tabs","new-tab-button","alltabs-button"],"PersonalToolbar":["personal-bookmarks"]},"seen":["developer-button","ublock0_raymondhill_net-browser-action","_287dcf75-bec6-4eec-b4f6-71948a2eea29_-browser-action","_2e5ff8c8-32fe-46d0-9fc8-6b8986621f3c_-browser-action","_531906d3-e22f-4a6c-a102-8057b88a1a63_-browser-action","_74145f27-f039-47ce-a470-a662b129930a_-browser-action","_b86e4813-687a-43e6-ab65-0bde4ab75758_-browser-action","_d133e097-46d9-4ecc-9903-fa6a722a6e0e_-browser-action","_d7742d87-e61d-4b78-b8a1-b469842139fa_-browser-action","_f209234a-76f0-4735-9920-eb62507a54cd_-browser-action","_ublacklist-browser-action","cookieautodelete_kennydo_com-browser-action","dontfuckwithpaste_raim_ist-browser-action","jid1-mnnxcxisbpnsxq_jetpack-browser-action","keepassxc-browser_keepassxc_org-browser-action","skipredirect_sblask-browser-action","sponsorblocker_ajay_app-browser-action","tab-session-manager_sienori-browser-action","treestyletab_piro_sakura_ne_jp-browser-action","umatrix_raymondhill_net-browser-action","mogultv_mogultv_org-browser-action","jid1-tsgsxbhncspbwq_jetpack-browser-action","display-anchors_robwu_nl-browser-action","github-forks-addon_musicallyut_in-browser-action","_a4c4eda4-fb84-4a84-b4a1-f7c1cbf2a1ad_-browser-action","_e737d9cb-82de-4f23-83c6-76f70a82229c_-browser-action","jid1-ckhysaadh4nl6q_jetpack-browser-action","smart-referer_meh_paranoid_pk-browser-action","_34daeb50-c2d2-4f14-886a-7160b24d66a4_-browser-action","_762f9885-5a13-4abd-9c77-433dcd38b8fd_-browser-action","_b11bea1f-a888-4332-8d8a-cec2be7d24b9_-browser-action","sourcegraph-for-firefox_sourcegraph_com-browser-action"],"dirtyAreaCache":["nav-bar","PersonalToolbar","toolbar-menubar","TabsToolbar","widget-overflow-fixed-list"],"currentVersion":18,"newElementCount":6}'';
customizationState = ''{"placements":{"widget-overflow-fixed-list":[],"unified-extensions-area":["jid1-mnnxcxisbpnsxq_jetpack-browser-action","_74145f27-f039-47ce-a470-a662b129930a_-browser-action","_b86e4813-687a-43e6-ab65-0bde4ab75758_-browser-action","cookieautodelete_kennydo_com-browser-action","skipredirect_sblask-browser-action","_ublacklist-browser-action","umatrix_raymondhill_net-browser-action","_2e5ff8c8-32fe-46d0-9fc8-6b8986621f3c_-browser-action","_287dcf75-bec6-4eec-b4f6-71948a2eea29_-browser-action","_d133e097-46d9-4ecc-9903-fa6a722a6e0e_-browser-action","_f209234a-76f0-4735-9920-eb62507a54cd_-browser-action","dontfuckwithpaste_raim_ist-browser-action","sponsorblocker_ajay_app-browser-action","mogultv_mogultv_org-browser-action","jid1-tsgsxbhncspbwq_jetpack-browser-action","sourcegraph-for-firefox_sourcegraph_com-browser-action","_b11bea1f-a888-4332-8d8a-cec2be7d24b9_-browser-action","_762f9885-5a13-4abd-9c77-433dcd38b8fd_-browser-action","_34daeb50-c2d2-4f14-886a-7160b24d66a4_-browser-action","smart-referer_meh_paranoid_pk-browser-action","jid1-ckhysaadh4nl6q_jetpack-browser-action","_e737d9cb-82de-4f23-83c6-76f70a82229c_-browser-action","_a4c4eda4-fb84-4a84-b4a1-f7c1cbf2a1ad_-browser-action","github-forks-addon_musicallyut_in-browser-action","_36bdf805-c6f2-4f41-94d2-9b646342c1dc_-browser-action","_605a075b-09d9-4443-bed6-4baa743f7d79_-browser-action","enhancerforyoutube_maximerf_addons_mozilla_org-browser-action"],"nav-bar":["back-button","forward-button","downloads-button","urlbar-container","save-to-pocket-button","fxa-toolbar-menu-button","treestyletab_piro_sakura_ne_jp-browser-action","ublock0_raymondhill_net-browser-action","_531906d3-e22f-4a6c-a102-8057b88a1a63_-browser-action","display-anchors_robwu_nl-browser-action","tab-session-manager_sienori-browser-action","_d7742d87-e61d-4b78-b8a1-b469842139fa_-browser-action","keepassxc-browser_keepassxc_org-browser-action","reset-pbm-toolbar-button","unified-extensions-button"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["firefox-view-button","tabbrowser-tabs","new-tab-button","alltabs-button"],"PersonalToolbar":["personal-bookmarks"]},"seen":["developer-button","ublock0_raymondhill_net-browser-action","_287dcf75-bec6-4eec-b4f6-71948a2eea29_-browser-action","_2e5ff8c8-32fe-46d0-9fc8-6b8986621f3c_-browser-action","_531906d3-e22f-4a6c-a102-8057b88a1a63_-browser-action","_74145f27-f039-47ce-a470-a662b129930a_-browser-action","_b86e4813-687a-43e6-ab65-0bde4ab75758_-browser-action","_d133e097-46d9-4ecc-9903-fa6a722a6e0e_-browser-action","_d7742d87-e61d-4b78-b8a1-b469842139fa_-browser-action","_f209234a-76f0-4735-9920-eb62507a54cd_-browser-action","_ublacklist-browser-action","cookieautodelete_kennydo_com-browser-action","dontfuckwithpaste_raim_ist-browser-action","jid1-mnnxcxisbpnsxq_jetpack-browser-action","keepassxc-browser_keepassxc_org-browser-action","skipredirect_sblask-browser-action","sponsorblocker_ajay_app-browser-action","tab-session-manager_sienori-browser-action","treestyletab_piro_sakura_ne_jp-browser-action","umatrix_raymondhill_net-browser-action","mogultv_mogultv_org-browser-action","jid1-tsgsxbhncspbwq_jetpack-browser-action","display-anchors_robwu_nl-browser-action","github-forks-addon_musicallyut_in-browser-action","_a4c4eda4-fb84-4a84-b4a1-f7c1cbf2a1ad_-browser-action","_e737d9cb-82de-4f23-83c6-76f70a82229c_-browser-action","jid1-ckhysaadh4nl6q_jetpack-browser-action","smart-referer_meh_paranoid_pk-browser-action","_34daeb50-c2d2-4f14-886a-7160b24d66a4_-browser-action","_762f9885-5a13-4abd-9c77-433dcd38b8fd_-browser-action","_b11bea1f-a888-4332-8d8a-cec2be7d24b9_-browser-action","sourcegraph-for-firefox_sourcegraph_com-browser-action","_36bdf805-c6f2-4f41-94d2-9b646342c1dc_-browser-action","_605a075b-09d9-4443-bed6-4baa743f7d79_-browser-action","enhancerforyoutube_maximerf_addons_mozilla_org-browser-action"],"dirtyAreaCache":["nav-bar","PersonalToolbar","toolbar-menubar","TabsToolbar","widget-overflow-fixed-list","unified-extensions-area"],"currentVersion":20,"newElementCount":6}'';
in {
"accessibility.force_disabled" = 1;
"app.normandy.enabled" = false; # https://mozilla.github.io/normandy/

View File

@ -153,8 +153,10 @@ in {
msusenet = "sudo mount.nfs4 192.168.86.20:/mnt/WD\\ Blue\\ Stripe\\ 2T/Usenet /media/Stash-Usenet";
mspicture = "sudo mount.nfs4 192.168.86.20:/mnt/WD\\ Blue\\ Stripe\\ 2T/Picture /media/Stash-Picture";
msvideo = "sudo mount.nfs4 192.168.86.20:/mnt/WD\\ Blue\\ Stripe\\ 2T/Video /media/Stash-Video";
msclips = "sudo mount.nfs4 192.168.86.20:/mnt/WD\\ Blue\\ Stripe\\ 2T/Clips /media/Stash-Clips";
mmovie = "sudo mount.nfs4 192.168.86.20:/mnt/SG\\ Exos\\ Mirror\\ 18TB/Movie /media/Movie";
mshow = "sudo mount.nfs4 192.168.86.20:/mnt/SG\\ Exos\\ Mirror\\ 18TB/Show /media/Show";
mmusic = "sudo mount.nfs4 192.168.86.20:/mnt/SG\\ Exos\\ Mirror\\ 18TB/Music /media/Music";
musenet = "sudo mount.nfs4 192.168.86.20:/mnt/SG\\ Exos\\ Mirror\\ 18TB/Usenet /media/Usenet";
# disassemble

View File

@ -1,5 +1,6 @@
# TODO: The keys to reset the workspaces need to depend on actual workspace config
# TODO: Many of the text file generations can be made simpler with pipe and concatLines functions...
# TODO: The border color does not fit the current theme
{
config,
nixosConfig,
@ -103,6 +104,8 @@ in {
# xfce.thunar
# xfce.tumbler # Thunar thumbnails
libsForQt5.polkit-kde-agent
libsForQt5.qtwayland
kdePackages.qtwayland
];
sessionVariables = {

View File

@ -1,238 +0,0 @@
{
config,
nixosConfig,
lib,
mylib,
pkgs,
...
}:
with lib;
with mylib.modules; let
cfg = config.modules.lazyvim;
in {
options.modules.lazyvim = import ./options.nix {inherit lib mylib;};
config = mkIf cfg.enable {
home.sessionVariables = {
EDITOR = "nvim";
VISUAL = "nvim";
};
home.packages = with pkgs;
builtins.concatLists [
(optionals cfg.neovide [neovide])
[
(pkgs.ripgrep.override {withPCRE2 = true;})
# Dependencies
lua51Packages.lua-curl # For rest
lua51Packages.xml2lua # For rest
lua51Packages.mimetypes # For rest
lua51Packages.jsregexp # For tree-sitter
# Language servers
clang-tools_18
clojure-lsp
cmake-language-server
haskell-language-server
lua-language-server
nil
pyright
rust-analyzer
texlab
# Linters
checkstyle # java
clippy # rust
clj-kondo # clojure
eslint_d # javascript
python311Packages.flake8
lua51Packages.luacheck
vale # text
statix # nix
# Formatters
alejandra # nix
python311Packages.black
google-java-format
html-tidy
jq # json
prettierd # html/css/js
rustfmt
stylua
]
];
home.file.".config/nvim/parser".source = let
parsers = pkgs.symlinkJoin {
name = "treesitter-parsers";
paths = pkgs.vimPlugins.nvim-treesitter.withAllGrammars.dependencies;
};
in "${parsers}/parser";
home.file.".config/neovide/config.toml".text = ''
fork = true # Start neovide detached
frame = "none" # full, buttonless, none
idle = true # Don't render frames without changes
# maximized = true
title-hidden = true
# vsync = true
'';
home.file.".config/vale/.vale.ini".text = ''
# Core settings appear at the top
# (the "global" section).
[formats]
# Format associations appear under
# the optional "formats" section.
[*]
# Format-specific settings appear
# under a user-provided "glob"
# pattern.
'';
programs.nixvim = {
enable = true;
defaultEditor = true;
enableMan = true;
luaLoader.enable = true;
# colorschemes.catppuccin.enable = true;
viAlias = cfg.alias;
vimAlias = cfg.alias;
globals = {
mapleader = " ";
mallocalleader = " ";
};
opts = import ./vim_opts.nix {inherit lib mylib;};
extraConfigLuaPost = builtins.readFile ./extraConfigLuaPost.lua;
# extraLuaPackages = with pkgs.lua51Packages; [];
# extraPython3Packages = p: [
# # For CHADtree
# p.pyyaml
# p.pynvim-pp
# p.std2
# ];
extraPlugins = with pkgs.vimPlugins; [
lazy-nvim
];
autoCmd = [
{
event = ["BufWritePost"];
# pattern = "*";
callback = {__raw = "function() require('lint').try_lint() end";};
}
{
event = ["BufWritePre"];
callback = {__raw = "function() require('conform').format() end";};
}
];
# TODO: Toggle wrapping
# TODO: Toggle format on save
# TODO: Toggle format on paste
keymaps = import ./keybinds.nix {inherit lib mylib;};
extraConfigLua = let
plugins = with pkgs.vimPlugins; [
LazyVim # Sets many vim options
bufferline-nvim
cmp-buffer
cmp-nvim-lsp
cmp-path
cmp_luasnip
conform-nvim
dashboard-nvim
dressing-nvim
flash-nvim
friendly-snippets
gitsigns-nvim
indent-blankline-nvim
lualine-nvim
neo-tree-nvim
neoconf-nvim
neodev-nvim
noice-nvim
nui-nvim
nvim-cmp
nvim-lint
nvim-lspconfig
nvim-notify
nvim-spectre
nvim-treesitter
nvim-treesitter-context
nvim-treesitter-textobjects
nvim-ts-autotag
nvim-ts-context-commentstring
nvim-web-devicons
persistence-nvim
plenary-nvim
telescope-fzf-native-nvim
telescope-nvim
todo-comments-nvim
tokyonight-nvim
trouble-nvim
vim-illuminate
vim-startuptime
which-key-nvim
{
name = "LuaSnip";
path = luasnip;
}
{
name = "catppuccin";
path = catppuccin-nvim;
}
{
name = "mini.ai";
path = mini-nvim;
}
{
name = "mini.bufremove";
path = mini-nvim;
}
{
name = "mini.comment";
path = mini-nvim;
}
{
name = "mini.indentscope";
path = mini-nvim;
}
{
name = "mini.pairs";
path = mini-nvim;
}
{
name = "mini.surround";
path = mini-nvim;
}
];
mkEntryFromDrv = drv:
if lib.isDerivation drv
then {
name = "${lib.getName drv}";
path = drv;
}
else drv;
lazyPath = pkgs.linkFarm "lazy-plugins" (builtins.map mkEntryFromDrv plugins);
in (
builtins.replaceStrings
["@lazyPath@"]
["${lazyPath}"]
(builtins.readFile ./extraConfigLua.lua)
);
};
};
}

View File

@ -1,58 +0,0 @@
-- Skip loading LazyVim options
package.loaded["lazyvim.config.options"] = true
-- Hide inline diagnostics and show border
vim.diagnostic.config({
virtual_text = false,
float = { border = "rounded" },
})
-- Allow navigating popupmenu completion with Up/Down
vim.api.nvim_set_keymap("c", "<Down>", 'v:lua.get_wildmenu_key("<right>", "<down>")', { expr = true })
vim.api.nvim_set_keymap("c", "<Up>", 'v:lua.get_wildmenu_key("<left>", "<up>")', { expr = true })
function _G.get_wildmenu_key(key_wildmenu, key_regular)
return vim.fn.wildmenumode() ~= 0 and key_wildmenu or key_regular
end
-- Package manager setup
require("lazy").setup({
defaults = {
lazy = true,
},
dev = {
-- reuse files from pkgs.vimPlugins.*
path = "@lazyPath@", -- NOTE: Will be replaced by the nix path
patterns = { "." },
-- fallback to download
fallback = true,
},
spec = {
{
"LazyVim/LazyVim",
import = "lazyvim.plugins",
opts = {
defaults = {
autocmds = false, -- Skip loading LazyVim cmds
keymaps = false, -- Skip loading LazyVim keymaps
},
},
},
-- force enable telescope-fzf-native.nvim on nix
{ "nvim-telescope/telescope-fzf-native.nvim", enabled = true },
-- disable mason.nvim, use config.extraPackages on nix
{ "williamboman/mason-lspconfig.nvim", enabled = false },
{ "williamboman/mason.nvim", enabled = false },
-- uncomment to import/override with your plugins
-- { import = "plugins" },
-- put this line at the end of spec to clear ensure_installed on nix
{ "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } },
},
})

View File

@ -1,24 +0,0 @@
local opt = vim.opt
local g = vim.g
local o = vim.o
-- Neovide
if g.neovide then
-- require("notify").notify("Running in NeoVide")
g.neovide_cursor_animate_command_line = true
g.neovide_cursor_animate_in_insert_mode = true
-- g.neovide_fullscreen = false
g.neovide_hide_mouse_when_typing = true
g.neovide_padding_top = 0
g.neovide_padding_bottom = 0
g.neovide_padding_right = 0
g.neovide_padding_left = 0
g.neovide_refresh_rate = 144
-- g.neovide_theme = "light"
-- Neovide Fonts
o.guifont = "JetBrainsMono Nerd Font:h13:Medium"
else
-- require("notify").notify("Not running in NeoVide")
end

View File

@ -1,493 +0,0 @@
{
lib,
mylib,
...
}: [
# No Leader
{
mode = "n";
key = "<C-s>";
action = "<cmd>w<CR>";
options.desc = "Save current buffer";
}
{
mode = "n";
key = "<C-S-s>";
action = "<cmd>wa<CR>";
options.desc = "Save all buffers";
}
{
mode = "v";
key = "<";
action = "<gv";
options.desc = "Outdent";
}
{
mode = "v";
key = ">";
action = ">gv";
options.desc = "Indent";
}
{
mode = "n";
key = "<";
action = "v<<Esc>";
options.desc = "Outdent";
}
{
mode = "n";
key = ">";
action = "v><Esc>";
options.desc = "Indent";
}
{
mode = "n";
key = "<C-d>";
action = "<C-d>zz";
options.desc = "Jump down";
}
{
mode = "n";
key = "<C-u>";
action = "<C-u>zz";
options.desc = "Jump up";
}
{
mode = "n";
key = "n";
action = "nzzzv";
options.desc = "Next match";
}
{
mode = "n";
key = "N";
action = "Nzzzv";
options.desc = "Previous match";
}
{
mode = "i";
key = "<Tab>";
action = "<cmd>lua require('intellitab').indent()<CR>";
options.desc = "Indent";
}
{
mode = "i";
key = "<C-BS>";
action = "<C-w>";
options.desc = "Delete previous word";
}
{
mode = "i";
key = "<M-BS>";
action = "<C-w>";
options.desc = "Delete previous word";
}
{
mode = "i";
key = "<C-S-v>";
action = "<Esc>\"+pi";
options.desc = "Paste from clipboard";
}
{
mode = "i";
key = "<C-v>";
action = "<Esc>\"+pi";
options.desc = "Paste from clipboard";
}
{
mode = "v";
key = "<C-S-c>";
action = "\"+y";
options.desc = "Copy to clipboard";
}
{
mode = "n";
key = "<C-h>";
action = "<cmd>nohlsearch<CR>";
options.desc = "Clear search highlights";
}
{
mode = "n";
key = "K";
action = "<cmd>lua vim.lsp.buf.hover()<CR>";
options.desc = "Show LSP hover";
}
# General <leader>
{
mode = "n";
key = "<leader>qq";
action = "<cmd>quitall<CR>";
options.desc = "Quit";
}
{
mode = "n";
key = "<leader>q!";
action = "<cmd>quitall!<CR>";
options.desc = "Forceful quit";
}
{
mode = "n";
key = "<leader>L";
action = "<cmd>Lazy<CR>";
options.desc = "Show Lazy";
}
{
mode = "n";
key = "<leader><Space>";
action = "<cmd>Telescope buffers<CR>";
options.desc = "Show open buffers";
}
{
mode = "n";
key = "<leader>S";
action = "<cmd>wa<CR>";
options.desc = "Save all buffers";
}
{
mode = "n";
key = "<leader>f";
action = "<cmd>Telescope find_files<CR>";
options.desc = "Find file";
}
{
mode = "n";
key = "<leader>o";
action = "<cmd>Telescope vim_options<CR>";
options.desc = "Show Vim options";
}
{
mode = "n";
key = "<leader>u";
action = "<cmd>Telescope undo<CR>";
options.desc = "Show undo history";
}
{
mode = "n";
key = "<leader>/";
action = "<cmd>Telescope current_buffer_fuzzy_find<CR>";
options.desc = "Find in current buffer";
}
{
mode = "n";
key = "<leader>n";
action = "<cmd>Telescope notify<CR>";
options.desc = "Show notify history";
}
{
mode = "n";
key = "<leader>s";
action = "<cmd>Telescope live_grep<CR>";
options.desc = "Find in working directory";
}
{
mode = "n";
key = "<leader>r";
action = "<cmd>Telescope resume<CR>";
options.desc = "Show last telescope picker";
}
{
mode = "n";
key = "<leader>?";
action = "<cmd>Telescope keymaps<CR>";
options.desc = "Show keymaps";
}
{
mode = "n";
key = "<leader>:";
action = "<cmd>Telescope commands<CR>";
options.desc = "Execute command";
}
{
mode = "n";
key = "<leader>M";
action = "<cmd>Telescope marks<CR>";
options.desc = "Show marks";
}
{
mode = "n";
key = "<leader>J";
action = "<cmd>Telescope jumplist<CR>";
options.desc = "Show jumplist";
}
{
mode = "n";
key = "<leader>m";
action = "<cmd>Telescope man_pages<CR>";
options.desc = "Show manpages";
}
{
mode = "n";
key = "<leader>h";
action = "<cmd>Telescope help_tags<CR>";
options.desc = "Show help tags";
}
# Quit <leader>q
{
mode = "n";
key = "<leader>q";
action = "+quit";
}
# Buffers <leader>b
{
mode = "n";
key = "<leader>b";
action = "+buffers";
}
{
mode = "n";
key = "<leader>bb";
action = "<cmd>Telescope buffers<CR>";
options.desc = "Show open buffers";
}
{
mode = "n";
key = "<leader>bn";
action = "<cmd>bnext<CR>";
options.desc = "Goto next buffer";
}
{
mode = "n";
key = "<leader>bp";
action = "<cmd>bprevious<CR>";
options.desc = "Goto previous buffer";
}
{
mode = "n";
key = "<leader>bd";
action = "<cmd>Bdelete<CR>";
options.desc = "Close current buffer";
}
# Windows <leader>w
{
mode = "n";
key = "<leader>w";
action = "+windows";
}
{
mode = "n";
key = "<leader>ws";
action = "<C-w>s";
options.desc = "Split window horizontally";
}
{
mode = "n";
key = "<leader>wv";
action = "<C-w>v";
options.desc = "Split window vertically";
}
{
mode = "n";
key = "<leader>wd";
action = "<C-w>c";
options.desc = "Close current window";
}
# {
# mode = "n";
# key = "<leader>wh";
# action = "<C-W>s";
# options.desc = "Split window horizontally";
# }
{
mode = "n";
key = "<leader>wh";
action = "<C-w>h";
options.desc = "Goto left window";
}
{
mode = "n";
key = "<leader>wl";
action = "<C-w>l";
options.desc = "Goto right window";
}
{
mode = "n";
key = "<leader>wj";
action = "<C-w>j";
options.desc = "Goto bottom window";
}
{
mode = "n";
key = "<leader>wk";
action = "<C-w>k";
options.desc = "Goto top window";
}
{
mode = "n";
key = "<leader>ww";
action = "<C-w>p";
options.desc = "Goto other window";
}
# Toggles <leader>t
{
mode = "n";
key = "<leader>t";
action = "+toggle";
}
# {
# mode = "n";
# key = "<leader>tt";
# action = "<cmd>Neotree action=show toggle=true<CR>";
# options.desc = "Toggle NeoTree";
# }
{
mode = "n";
key = "<leader>tt";
action = "<cmd>CHADopen --nofocus<CR>";
options.desc = "Toggle CHADtree";
}
{
mode = "n";
key = "<leader>tn";
action = "<cmd>Navbuddy<CR>";
options.desc = "Toggle NavBuddy";
}
{
mode = "n";
key = "<leader>td";
action = "<cmd>TroubleToggle focus=false<CR>";
options.desc = "Toggle Trouble";
}
# {
# mode = "n";
# key = "<leader>tg";
# action = "<cmd>LazyGit<CR>";
# }
# {
# mode = "n";
# key = "<leader>tp";
# action = "<cmd>TroubleToggle<CR>";
# }
# Git <leader>g
{
mode = "n";
key = "<leader>g";
action = "+git";
}
{
mode = "n";
key = "<leader>gg";
action = "<cmd>LazyGit<CR>";
options.desc = "Show LazyGit";
}
{
mode = "n";
key = "<leader>gm";
action = "<cmd>GitMessenger<CR>";
options.desc = "Show GitMessenger";
}
# {
# mode = "n";
# key = "<leader>gs";
# action = "<cmd>Git status<CR>";
# }
{
mode = "n";
key = "<leader>gs";
action = "<cmd>Telescope git_status<CR>";
options.desc = "Show Git status";
}
{
mode = "n";
key = "<leader>gc";
action = "<cmd>Telescope git_commits<CR>";
options.desc = "Show Git log";
}
{
mode = "n";
key = "<leader>gb";
action = "<cmd>Telescope git_branches<CR>";
options.desc = "Show Git branches";
}
{
mode = "n";
key = "<leader>gf";
action = "<cmd>Telescope git_bcommits<CR>";
options.desc = "Show Git log for current file";
}
# LSP <leader>l
{
mode = "n";
key = "<leader>l";
action = "+lsp";
}
{
mode = "n";
key = "<leader>lr";
action = "<cmd>Telescope lsp_references<CR>";
options.desc = "Goto references";
}
{
mode = "n";
key = "<leader>ld";
action = "<cmd>Telescope lsp_definitions<CR>";
options.desc = "Goto definition";
}
{
mode = "n";
key = "<leader>li";
action = "<cmd>Telescope lsp_implementations<CR>";
options.desc = "Goto implementation";
}
{
mode = "n";
key = "<leader>lt";
action = "<cmd>Telescope lsp_type_definitions<CR>";
options.desc = "Goto type definition";
}
{
mode = "n";
key = "<leader>lI";
action = "<cmd>Telescope lsp_incoming_calls<CR>";
options.desc = "Show incoming calls";
}
{
mode = "n";
key = "<leader>lO";
action = "<cmd>Telescope lsp_outgoing_calls<CR>";
options.desc = "Show outgoing calls";
}
# Code <leader>c
{
mode = "n";
key = "<leader>c";
action = "+code";
}
{
mode = "n";
key = "<leader>cf";
action = "<cmd>lua require('conform').format()<CR>";
options.desc = "Format current buffer";
}
{
mode = "n";
key = "<leader>cd";
action = "<cmd>Telescope diagnostics<CR>";
options.desc = "Show diagnostics";
}
{
mode = "n";
key = "<leader>cr";
action = "<cmd>lua vim.lsp.buf.rename()<CR>";
options.desc = "Rename LSP symbol";
}
{
mode = "n";
key = "<leader>ca";
action = "<cmd>lua vim.lsp.buf.code_action()<CR>";
options.desc = "Show LSP code actions";
}
{
mode = "n";
key = "<leader>cD";
action = "<cmd>lua vim.diagnostic.open_float()<CR>";
options.desc = "Show LSP line diagnostics";
}
]

View File

@ -1,11 +0,0 @@
{
lib,
mylib,
...
}:
with lib;
with mylib.modules; {
enable = mkEnableOpt "LazyVim";
alias = mkBoolOpt false "Link nvim to vim/vi";
neovide = mkEnableOpt "NeoVide";
}

View File

@ -1,64 +0,0 @@
{
lib,
mylib,
...
}: {
showmode = false; # Status line already shows this
backspace = ["indent" "eol" "start"];
termguicolors = true; # Required by multiple plugins
hidden = true; # Don't unload buffers immediately
mouse = "a";
completeopt = ["menuone" "noselect" "noinsert"];
timeoutlen = 50;
pumheight = 0;
formatexpr = "v:lua.require('conform').formatexpr()";
laststatus = 3;
# winblend = 30;
# Cursor
ruler = true; # Show cursor position in status line
number = true;
relativenumber = true;
signcolumn = "yes";
cursorline = true;
scrolloff = 10;
# Folding
foldcolumn = "0";
foldlevel = 99;
foldlevelstart = 99;
foldenable = true;
# foldmethod = "expr";
# foldexpr = "nvim_treesitter#foldexpr()";
# Files
encoding = "utf-8";
fileencoding = "utf-8";
# swapfile = true;
# backup = false;
undofile = true;
undodir = "/home/christoph/.vim/undo";
# autochdir = true;
# Search
incsearch = true; # Already highlight results while typing
hlsearch = true;
ignorecase = true;
smartcase = true;
grepprg = "rg --vimgrep";
grepformat = "%f:%l:%c:%m";
# Indentation
autoindent = false; # Use previous line indentation level - Might mess up comment indentation
smartindent = false; # Like autoindent but recognizes some C syntax - Might mess up comment indentation
cindent = true;
cinkeys = "0{,0},0),0],:,!^F,o,O,e"; # Fix comment (#) indentation and intellitab (somehow)
smarttab = true;
expandtab = true;
shiftwidth = 4;
tabstop = 4;
softtabstop = 4;
splitbelow = true;
splitright = true;
}

View File

@ -6,6 +6,7 @@
pkgs,
...
}:
# TODO: Remove this module, put protonmail into the email module
with lib;
with mylib.modules; let
cfg = config.modules.misc;

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,56 @@
-- Hide inline diagnostics and show border
-- Make Lazy window border rounded
require("lazy.core.config").options.ui.border = "rounded"
require("lazy.core.config").options.rocks.enabled = false
-- Default filetype to tex instead of plaintex
vim.g.tex_flavor = "latex"
-- Toggle inline diagnostics and show border
vim.g.enable_inline_diagnostics = false
vim.diagnostic.config({
virtual_text = false,
virtual_text = vim.g.enable_inline_diagnostics,
float = { border = "rounded" },
})
vim.api.nvim_create_user_command("ToggleInlineDiagnostics", function()
vim.g.enable_inline_diagnostics = not vim.g.enable_inline_diagnostics
vim.diagnostic.config({ virtual_text = vim.g.enable_inline_diagnostics, float = { border = "rounded" } })
require("notify")((vim.g.enable_inline_diagnostics and "Enabled" or "Disabled") .. " inline diagnostics")
end, {
desc = "Toggle inline diagnostics",
})
-- Toggle conform format_on_save
vim.g.disable_autoformat = false
vim.api.nvim_create_user_command("ToggleAutoformat", function()
vim.g.disable_autoformat = not vim.g.disable_autoformat
require("notify")((vim.g.disable_autoformat and "Disabled" or "Enabled") .. " autoformat-on-save")
end, {
desc = "Toggle autoformat-on-save",
})
-- Allow navigating popupmenu completion with Up/Down
vim.api.nvim_set_keymap("c", "<Down>", 'v:lua.get_wildmenu_key("<right>", "<down>")', { expr = true })
vim.api.nvim_set_keymap("c", "<Up>", 'v:lua.get_wildmenu_key("<left>", "<up>")', { expr = true })
function _G.get_wildmenu_key(key_wildmenu, key_regular)
return vim.fn.wildmenumode() ~= 0 and key_wildmenu or key_regular
end
-- Check LSP server config
vim.api.nvim_create_user_command("LspInspect", function()
require("notify")(vim.inspect(vim.lsp.get_active_clients()))
end, {
desc = "Print LSP server configuration",
})
-- Toggle linting
vim.g.disable_autolint = false
vim.api.nvim_create_user_command("ToggleAutoLint", function()
vim.g.disable_autolint = not vim.g.disable_autolint
if vim.g.disable_autolint then
-- vim.diagnostic.reset(vim.api.nvim_get_current_buf())
vim.diagnostic.reset() -- Reset for all buffers
end
require("notify")((vim.g.disable_autolint and "Disabled" or "Enabled") .. " autolint-on-save")
end, {
desc = "Toggle autolint-on-save",
})

View File

@ -18,7 +18,7 @@ if g.neovide then
-- g.neovide_theme = "light"
-- Neovide Fonts
o.guifont = "JetBrainsMono Nerd Font:h13:Medium"
o.guifont = "JetBrainsMono Nerd Font Mono:h12:Medium"
else
-- require("notify").notify("Not running in NeoVide")
end

View File

@ -0,0 +1,38 @@
function(props)
-- local filename = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ":t")
-- if filename == "" then
-- filename = "[No Name]"
-- end
-- local helpers = require("incline.helpers")
-- local devicons = require("nvim-web-devicons")
-- local ft_icon, ft_color = devicons.get_icon_color(filename)
-- local modified = vim.bo[props.buf].modified
-- local result = {
-- ft_icon and { " ", ft_icon, " ", guibg = ft_color, guifg = helpers.contrast_color(ft_color) } or "",
-- " ",
-- { filename, gui = modified and "bold,italic" or "bold" },
-- guibg = "#44406e",
-- }
-- Just print the breadcrumbs, skip the filename for now
local result = {}
-- TODO: This code doesn't respect navic's max_depth, because get_data is used
if props.focused then
local navic = require("nvim-navic")
local bgColor = "Black"
for _, item in ipairs(navic.get_data(props.buf) or {}) do
table.insert(result, {
{ " > ", group = "NavicSeparator", guibg = bgColor },
{ item.icon, group = "NavicIcons" .. item.type, guibg = bgColor },
{ item.name, group = "NavicText", guibg = bgColor },
})
end
end
table.insert(result, " ")
return result
end

View File

@ -1,493 +0,0 @@
{
lib,
mylib,
...
}: [
# No Leader
{
mode = "n";
key = "<C-s>";
action = "<cmd>w<CR>";
options.desc = "Save current buffer";
}
{
mode = "n";
key = "<C-S-s>";
action = "<cmd>wa<CR>";
options.desc = "Save all buffers";
}
{
mode = "v";
key = "<";
action = "<gv";
options.desc = "Outdent";
}
{
mode = "v";
key = ">";
action = ">gv";
options.desc = "Indent";
}
{
mode = "n";
key = "<";
action = "v<<Esc>";
options.desc = "Outdent";
}
{
mode = "n";
key = ">";
action = "v><Esc>";
options.desc = "Indent";
}
{
mode = "n";
key = "<C-d>";
action = "<C-d>zz";
options.desc = "Jump down";
}
{
mode = "n";
key = "<C-u>";
action = "<C-u>zz";
options.desc = "Jump up";
}
{
mode = "n";
key = "n";
action = "nzzzv";
options.desc = "Next match";
}
{
mode = "n";
key = "N";
action = "Nzzzv";
options.desc = "Previous match";
}
{
mode = "i";
key = "<Tab>";
action = "<cmd>lua require('intellitab').indent()<CR>";
options.desc = "Indent";
}
{
mode = "i";
key = "<C-BS>";
action = "<C-w>";
options.desc = "Delete previous word";
}
{
mode = "i";
key = "<M-BS>";
action = "<C-w>";
options.desc = "Delete previous word";
}
{
mode = "i";
key = "<C-S-v>";
action = "<Esc>\"+pi";
options.desc = "Paste from clipboard";
}
{
mode = "i";
key = "<C-v>";
action = "<Esc>\"+pi";
options.desc = "Paste from clipboard";
}
{
mode = "v";
key = "<C-S-c>";
action = "\"+y";
options.desc = "Copy to clipboard";
}
{
mode = "n";
key = "<C-h>";
action = "<cmd>nohlsearch<CR>";
options.desc = "Clear search highlights";
}
{
mode = "n";
key = "K";
action = "<cmd>lua vim.lsp.buf.hover()<CR>";
options.desc = "Show LSP hover";
}
# General <leader>
{
mode = "n";
key = "<leader>qq";
action = "<cmd>quitall<CR>";
options.desc = "Quit";
}
{
mode = "n";
key = "<leader>q!";
action = "<cmd>quitall!<CR>";
options.desc = "Forceful quit";
}
{
mode = "n";
key = "<leader>L";
action = "<cmd>Lazy<CR>";
options.desc = "Show Lazy";
}
{
mode = "n";
key = "<leader><Space>";
action = "<cmd>Telescope buffers<CR>";
options.desc = "Show open buffers";
}
{
mode = "n";
key = "<leader>S";
action = "<cmd>wa<CR>";
options.desc = "Save all buffers";
}
{
mode = "n";
key = "<leader>f";
action = "<cmd>Telescope find_files<CR>";
options.desc = "Find file";
}
{
mode = "n";
key = "<leader>o";
action = "<cmd>Telescope vim_options<CR>";
options.desc = "Show Vim options";
}
{
mode = "n";
key = "<leader>u";
action = "<cmd>Telescope undo<CR>";
options.desc = "Show undo history";
}
{
mode = "n";
key = "<leader>/";
action = "<cmd>Telescope current_buffer_fuzzy_find<CR>";
options.desc = "Find in current buffer";
}
{
mode = "n";
key = "<leader>n";
action = "<cmd>Telescope notify<CR>";
options.desc = "Show notify history";
}
{
mode = "n";
key = "<leader>s";
action = "<cmd>Telescope live_grep<CR>";
options.desc = "Find in working directory";
}
{
mode = "n";
key = "<leader>r";
action = "<cmd>Telescope resume<CR>";
options.desc = "Show last telescope picker";
}
{
mode = "n";
key = "<leader>?";
action = "<cmd>Telescope keymaps<CR>";
options.desc = "Show keymaps";
}
{
mode = "n";
key = "<leader>:";
action = "<cmd>Telescope commands<CR>";
options.desc = "Execute command";
}
{
mode = "n";
key = "<leader>M";
action = "<cmd>Telescope marks<CR>";
options.desc = "Show marks";
}
{
mode = "n";
key = "<leader>J";
action = "<cmd>Telescope jumplist<CR>";
options.desc = "Show jumplist";
}
{
mode = "n";
key = "<leader>m";
action = "<cmd>Telescope man_pages<CR>";
options.desc = "Show manpages";
}
{
mode = "n";
key = "<leader>h";
action = "<cmd>Telescope help_tags<CR>";
options.desc = "Show help tags";
}
# Quit <leader>q
{
mode = "n";
key = "<leader>q";
action = "+quit";
}
# Buffers <leader>b
{
mode = "n";
key = "<leader>b";
action = "+buffers";
}
{
mode = "n";
key = "<leader>bb";
action = "<cmd>Telescope buffers<CR>";
options.desc = "Show open buffers";
}
{
mode = "n";
key = "<leader>bn";
action = "<cmd>bnext<CR>";
options.desc = "Goto next buffer";
}
{
mode = "n";
key = "<leader>bp";
action = "<cmd>bprevious<CR>";
options.desc = "Goto previous buffer";
}
{
mode = "n";
key = "<leader>bd";
action = "<cmd>Bdelete<CR>";
options.desc = "Close current buffer";
}
# Windows <leader>w
{
mode = "n";
key = "<leader>w";
action = "+windows";
}
{
mode = "n";
key = "<leader>ws";
action = "<C-w>s";
options.desc = "Split window horizontally";
}
{
mode = "n";
key = "<leader>wv";
action = "<C-w>v";
options.desc = "Split window vertically";
}
{
mode = "n";
key = "<leader>wd";
action = "<C-w>c";
options.desc = "Close current window";
}
# {
# mode = "n";
# key = "<leader>wh";
# action = "<C-W>s";
# options.desc = "Split window horizontally";
# }
{
mode = "n";
key = "<leader>wh";
action = "<C-w>h";
options.desc = "Goto left window";
}
{
mode = "n";
key = "<leader>wl";
action = "<C-w>l";
options.desc = "Goto right window";
}
{
mode = "n";
key = "<leader>wj";
action = "<C-w>j";
options.desc = "Goto bottom window";
}
{
mode = "n";
key = "<leader>wk";
action = "<C-w>k";
options.desc = "Goto top window";
}
{
mode = "n";
key = "<leader>ww";
action = "<C-w>p";
options.desc = "Goto other window";
}
# Toggles <leader>t
{
mode = "n";
key = "<leader>t";
action = "+toggle";
}
# {
# mode = "n";
# key = "<leader>tt";
# action = "<cmd>Neotree action=show toggle=true<CR>";
# options.desc = "Toggle NeoTree";
# }
{
mode = "n";
key = "<leader>tt";
action = "<cmd>CHADopen --nofocus<CR>";
options.desc = "Toggle CHADtree";
}
{
mode = "n";
key = "<leader>tn";
action = "<cmd>Navbuddy<CR>";
options.desc = "Toggle NavBuddy";
}
{
mode = "n";
key = "<leader>td";
action = "<cmd>TroubleToggle focus=false<CR>";
options.desc = "Toggle Trouble";
}
# {
# mode = "n";
# key = "<leader>tg";
# action = "<cmd>LazyGit<CR>";
# }
# {
# mode = "n";
# key = "<leader>tp";
# action = "<cmd>TroubleToggle<CR>";
# }
# Git <leader>g
{
mode = "n";
key = "<leader>g";
action = "+git";
}
{
mode = "n";
key = "<leader>gg";
action = "<cmd>LazyGit<CR>";
options.desc = "Show LazyGit";
}
{
mode = "n";
key = "<leader>gm";
action = "<cmd>GitMessenger<CR>";
options.desc = "Show GitMessenger";
}
# {
# mode = "n";
# key = "<leader>gs";
# action = "<cmd>Git status<CR>";
# }
{
mode = "n";
key = "<leader>gs";
action = "<cmd>Telescope git_status<CR>";
options.desc = "Show Git status";
}
{
mode = "n";
key = "<leader>gc";
action = "<cmd>Telescope git_commits<CR>";
options.desc = "Show Git log";
}
{
mode = "n";
key = "<leader>gb";
action = "<cmd>Telescope git_branches<CR>";
options.desc = "Show Git branches";
}
{
mode = "n";
key = "<leader>gf";
action = "<cmd>Telescope git_bcommits<CR>";
options.desc = "Show Git log for current file";
}
# LSP <leader>l
{
mode = "n";
key = "<leader>l";
action = "+lsp";
}
{
mode = "n";
key = "<leader>lr";
action = "<cmd>Telescope lsp_references<CR>";
options.desc = "Goto references";
}
{
mode = "n";
key = "<leader>ld";
action = "<cmd>Telescope lsp_definitions<CR>";
options.desc = "Goto definition";
}
{
mode = "n";
key = "<leader>li";
action = "<cmd>Telescope lsp_implementations<CR>";
options.desc = "Goto implementation";
}
{
mode = "n";
key = "<leader>lt";
action = "<cmd>Telescope lsp_type_definitions<CR>";
options.desc = "Goto type definition";
}
{
mode = "n";
key = "<leader>lI";
action = "<cmd>Telescope lsp_incoming_calls<CR>";
options.desc = "Show incoming calls";
}
{
mode = "n";
key = "<leader>lO";
action = "<cmd>Telescope lsp_outgoing_calls<CR>";
options.desc = "Show outgoing calls";
}
# Code <leader>c
{
mode = "n";
key = "<leader>c";
action = "+code";
}
{
mode = "n";
key = "<leader>cf";
action = "<cmd>lua require('conform').format()<CR>";
options.desc = "Format current buffer";
}
{
mode = "n";
key = "<leader>cd";
action = "<cmd>Telescope diagnostics<CR>";
options.desc = "Show diagnostics";
}
{
mode = "n";
key = "<leader>cr";
action = "<cmd>lua vim.lsp.buf.rename()<CR>";
options.desc = "Rename LSP symbol";
}
{
mode = "n";
key = "<leader>ca";
action = "<cmd>lua vim.lsp.buf.code_action()<CR>";
options.desc = "Show LSP code actions";
}
{
mode = "n";
key = "<leader>cD";
action = "<cmd>lua vim.diagnostic.open_float()<CR>";
options.desc = "Show LSP line diagnostics";
}
]

View File

@ -0,0 +1,803 @@
{...}: let
# TODO: Doesn't work reliably. I think they are rebound by plugins after? Try setting in extraConfigLuaPost...
disabled-mappings = let
mkDisabledMapping = mapping: {
mode = ["n" "v"];
key = mapping;
action = "<Nop>";
};
disableMappings = [
# I only use f/F with flash
"s"
"S"
"t"
"T"
# Use flash to repeat f/F instead of ;/,
# ;/, are now free for localleader and exiting visual mode like helix
","
";"
# Use Telescope on "/", I don't want backwards search
"?"
];
in
builtins.map mkDisabledMapping disableMappings;
no-leader = [
# Cursor movement
{
mode = "n";
key = "j";
action = "v:count == 0 ? 'gj' : 'j'";
options.desc = "Move Cursor Down";
options.expr = true;
}
{
mode = "n";
key = "<Down>";
action = "v:count == 0 ? 'gj' : 'j'";
options.desc = "Move Cursor Down";
options.expr = true;
}
{
mode = "n";
key = "k";
action = "v:count == 0 ? 'gk' : 'k'";
options.desc = "Move Cursor Up";
options.expr = true;
}
{
mode = "n";
key = "<Up>";
action = "v:count == 0 ? 'gk' : 'k'";
options.desc = "Move Cursor Up";
options.expr = true;
}
# Window resize
{
mode = "n";
key = "<C-h>";
action = "<cmd>vertical resize -2<cr>";
options.desc = "Decrease Window Width";
}
{
mode = "n";
key = "<C-l>";
action = "<cmd>vertical resize +2<cr>";
options.desc = "Increase Window Width";
}
{
mode = "n";
key = "<C-j>";
action = "<cmd>resize -2<cr>";
options.desc = "Decrease Window Height";
}
{
mode = "n";
key = "<C-k>";
action = "<cmd>resize +2<cr>";
options.desc = "Increase Window Height";
}
# Move lines
{
mode = "n";
key = "<M-j>";
action = "<cmd>m .+1<cr>==";
options.desc = "Move Line Down";
}
{
mode = "i";
key = "<M-j>";
action = "<Esc><cmd>m .+1<cr>==gi";
options.desc = "Move Line Down";
}
{
mode = "v";
key = "<M-j>";
action = ":m '>+1<cr>gv=gv";
options.desc = "Move Line Down";
}
{
mode = "n";
key = "<M-k>";
action = "<cmd>m .-2<cr>==";
options.desc = "Move Line Up";
}
{
mode = "i";
key = "<M-k>";
action = "<Esc><cmd>m .-2<cr>==gi";
options.desc = "Move Line Up";
}
{
mode = "v";
key = "<M-k>";
action = ":m '<-2<cr>gv=gv";
options.desc = "Move Line Up";
}
# Save buffers
{
mode = ["n" "i" "v"];
key = "<C-s>";
action = "<cmd>w<cr>";
options.desc = "Save Buffer";
}
{
mode = ["n" "i" "v"];
key = "<C-S-s>";
action = "<cmd>wa<cr>";
options.desc = "Save All Buffers";
}
# Indentation
{
mode = "v";
key = "<";
action = "<gv";
options.desc = "Outdent";
}
{
mode = "n";
key = "<";
action = "v<<Esc>";
options.desc = "Outdent";
}
{
mode = "v";
key = ">";
action = ">gv";
options.desc = "Indent";
}
{
mode = "n";
key = ">";
action = "v><Esc>";
options.desc = "Indent";
}
{
mode = "i";
key = "<Tab>";
action = "<cmd>lua require('intellitab').indent()<cr>";
options.desc = "Indent (IntelliTab)";
}
# Centered jumping
{
mode = "n";
key = "<C-d>";
action = "<C-d>zz";
options.desc = "Jump Down (Centered)";
}
{
mode = "n";
key = "<C-u>";
action = "<C-u>zz";
options.desc = "Jump Up (Centered)";
}
{
mode = "n";
key = "n";
action = "nzzzv";
options.desc = "Next Match (Centered)";
}
{
mode = "n";
key = "N";
action = "Nzzzv";
options.desc = "Previous Match (Centered)";
}
# Delete word
{
mode = "i";
key = "<C-BS>";
action = "<C-w>";
options.desc = "Delete Previous Word"; # TODO: Breaks backspace <C-v><S-i> multiline cursor?
}
{
mode = "i";
key = "<M-BS>";
action = "<C-w>";
options.desc = "Delete Previous Word"; # TODO: Breaks backspace <C-v><S-i> multiline cursor?
}
# Clipboard
{
mode = "i";
key = "<C-S-v>";
action = "<Esc>\"+pi";
options.desc = "Paste";
}
{
mode = "i";
key = "<C-v>";
action = "<Esc>\"+pi";
options.desc = "Paste";
}
{
mode = "v";
key = "<C-S-c>";
action = "\"+y";
options.desc = "Copy";
}
{
mode = "n";
key = "<C-p>";
action = "<cmd>YankyRingHistory<cr>";
options.desc = "Paste (Yanky)";
}
{
mode = "n";
key = "<C-S-p>";
action = "<cmd>YankyClearHistory<cr>";
options.desc = "Clear Yanky History";
}
# Various
{
mode = "n";
key = "<C-S-h>";
action = "<cmd>nohlsearch<cr>";
options.desc = "Clear Search Highlights";
}
{
mode = "n";
key = "K";
action = "<cmd>lua vim.lsp.buf.hover()<cr>";
options.desc = "LSP Hover";
}
{
mode = "n";
key = "/";
action = "<cmd>Telescope current_buffer_fuzzy_find<cr>";
options.desc = "Grep Buffer";
}
{
mode = "v";
key = ";";
action = "<Esc>";
options.desc = "Exit Visual Mode";
}
];
leader = [
{
mode = "n";
key = "<leader>L";
action = "<cmd>Lazy<cr>";
options.desc = "Lazy";
}
{
mode = "n";
key = "<leader>f";
action = "<cmd>Telescope find_files<cr>";
options.desc = "Find File";
}
# {
# mode = "v";
# key = "<leader>n";
# action = ":NR!<cr>";
# options.desc = "Narrow region";
# }
{
mode = "n";
key = "<leader>N";
action = "<cmd>Telescope notify<cr>";
options.desc = "Notication History";
}
{
mode = "n";
key = "<leader>r";
action = "<cmd>Telescope resume<cr>";
options.desc = "Last Telescope Picker";
}
{
mode = "n";
key = "<leader>:";
action = "<cmd>Telescope commands<cr>";
options.desc = "Find Command";
}
# {
# mode = "n";
# key = "<leader>M";
# action = "<cmd>Telescope marks<cr>";
# options.desc = "Show marks";
# }
# {
# mode = "n";
# key = "<leader>J";
# action = "<cmd>Telescope jumplist<cr>";
# options.desc = "Show jumplist";
# }
{
mode = "n";
key = "<leader>T";
action = "<cmd>TodoTelescope<cr>";
options.desc = "List TODOs";
}
{
mode = "n";
key = "<leader>u";
action = "<cmd>Telescope undo<cr>";
options.desc = "Undo History";
}
{
mode = "n";
key = "<leader>/";
action = "<cmd>Telescope live_grep<cr>";
options.desc = "Grep Directory";
}
{
mode = "n";
key = "<leader>o";
action = "<cmd>ObsidianSearch<cr>";
options.desc = "Obsidian Note";
}
];
leader-help = [
{
mode = "n";
key = "<leader>h";
action = "+help";
}
{
mode = "n";
key = "<leader>hv";
action = "<cmd>Telescope vim_options<cr>";
options.desc = "Vim Options";
}
{
mode = "n";
key = "<leader>hk";
action = "<cmd>Telescope keymaps<cr>";
options.desc = "Keymaps";
}
{
mode = "n";
key = "<leader>hm";
action = "<cmd>Telescope man_pages<cr>";
options.desc = "Manpages";
}
{
mode = "n";
key = "<leader>hh";
action = "<cmd>Telescope help_tags<cr>";
options.desc = "Vim Help";
}
];
leader-quit = [
{
mode = "n";
key = "<leader>q";
action = "+quit";
}
{
mode = "n";
key = "<leader>qq";
action = "<cmd>quitall<cr>";
options.desc = "Quit";
}
{
mode = "n";
key = "<leader>q!";
action = "<cmd>quitall!<cr>";
options.desc = "Force Quit";
}
];
leader-session = [
{
mode = "n";
key = "<leader>s";
action = "+session";
}
{
mode = "n";
key = "<leader>sl";
action = "<cmd>Telescope persisted<cr>";
options.desc = "Restore";
}
{
mode = "n";
key = "<leader>ss";
action = "<cmd>SessionSave<cr>";
options.desc = "Save";
}
{
mode = "n";
key = "<leader>sd";
action = "<cmd>SessionDelete<cr>";
options.desc = "Delete";
}
];
leader-buffers = [
{
mode = "n";
key = "<leader>b";
action = "+buffers";
}
{
mode = "n";
key = "<leader>bb";
action = "<cmd>Telescope buffers sort_lastused=true<cr>"; # There is also sort_mru=true
options.desc = "List Buffers";
}
{
mode = "n";
key = "<leader><Space>";
action = "<cmd>Telescope buffers sort_lastused=true<cr>";
options.desc = "List Buffers";
}
{
mode = "n";
key = "<leader>R";
action = "<cmd>edit!<cr>";
options.desc = "Reload Buffer";
}
{
mode = "n";
key = "<leader>bn";
action = "<cmd>bnext<cr>";
options.desc = "Next Buffer";
}
{
mode = "n";
key = "<leader>bp";
action = "<cmd>bprevious<cr>";
options.desc = "Previous Buffer";
}
{
mode = "n";
key = "<leader>bd";
action = "<cmd>Bdelete<cr>";
options.desc = "Close Buffer";
}
];
leader-windows = [
{
mode = "n";
key = "<leader>w";
action = "+windows";
}
{
mode = "n";
key = "<leader>wd";
action = "<C-w>c";
options.desc = "Close Window";
}
{
mode = "n";
key = "<leader>ws";
action = "<C-w>s";
options.desc = "Split Horizontally";
}
{
mode = "n";
key = "<leader>wv";
action = "<C-w>v";
options.desc = "Split Vertically";
}
{
mode = "n";
key = "<leader>w=";
action = "<C-w>=";
options.desc = "Balance Windows";
}
{
mode = "n";
key = "<leader>wh";
action = "<C-w>h";
options.desc = "Goto Left Window";
}
{
mode = "n";
key = "<leader>wl";
action = "<C-w>l";
options.desc = "Goto Wight Window";
}
{
mode = "n";
key = "<leader>wj";
action = "<C-w>j";
options.desc = "Goto Bottom Window";
}
{
mode = "n";
key = "<leader>wk";
action = "<C-w>k";
options.desc = "Goto Top Window";
}
{
mode = "n";
key = "<leader>ww";
action = "<C-w>p";
options.desc = "Goto Other Window";
}
{
mode = "n";
key = "<leader>wm";
action = "<cmd>WinShift<cr>";
options.desc = "Move Window";
}
];
leader-toggles = [
{
mode = "n";
key = "<leader>t";
action = "+toggle";
}
{
mode = "n";
key = "<leader>tt";
action = "<cmd>Neotree action=show toggle=true<cr><C-w>=";
options.desc = "NeoTree";
}
{
mode = "n";
key = "<leader>to";
action = "<cmd>Oil<cr>";
options.desc = "Oil";
}
{
mode = "n";
key = "<leader>tn";
action = "<cmd>Navbuddy<cr>";
options.desc = "NavBuddy";
}
{
mode = "n";
key = "<leader>td";
action = "<cmd>Trouble diagnostics toggle focus=false win.position=bottom<cr>";
options.desc = "Trouble Diagnostics";
}
{
mode = "n";
key = "<leader>tT";
action = "<cmd>Trouble todo toggle focus=false win.position=right<cr>";
options.desc = "Trouble TODOs";
}
{
mode = "n";
key = "<leader>ts";
action = "<cmd>Trouble symbols toggle focus=false win.position=right<cr>";
options.desc = "Trouble Symbols";
}
{
mode = "n";
key = "<leader>tf";
action = "<cmd>ToggleAutoformat<cr>";
options.desc = "Format on Save";
}
{
mode = "n";
key = "<leader>tl";
action = "<cmd>ToggleAutoLint<cr>";
options.desc = "Lint on Save";
}
{
mode = "n";
key = "<leader>tD";
action = "<cmd>ToggleInlineDiagnostics<cr>";
options.desc = "Inline Diagnostics";
}
{
mode = "n";
key = "<leader>tw";
action = "<cmd>:set wrap!<cr>";
options.desc = "Word Wrapping";
}
# {
# mode = "n";
# key = "<leader>tv";
# action = "<cmd>VimtexTocToggle<cr>";
# options.desc = "VimTex ToC";
# }
];
leader-git = [
{
mode = "n";
key = "<leader>g";
action = "+git";
}
{
mode = "n";
key = "<leader>gg";
action = "<cmd>LazyGit<cr>";
options.desc = "LazyGit";
}
{
mode = "n";
key = "<leader>gm";
action = "<cmd>GitMessenger<cr>";
options.desc = "GitMessenger";
}
{
mode = "n";
key = "<leader>gs";
action = "<cmd>Telescope git_status<cr>";
options.desc = "Status";
}
{
mode = "n";
key = "<leader>gl";
action = "<cmd>Telescope git_commits<cr>";
options.desc = "Log";
}
{
mode = "n";
key = "<leader>gb";
action = "<cmd>Telescope git_branches<cr>";
options.desc = "Branches";
}
{
mode = "n";
key = "<leader>gf";
action = "<cmd>Telescope git_bcommits<cr>";
options.desc = "File History";
}
{
mode = "n";
key = "<leader>gd";
action = "<cmd>DiffviewOpen<cr>";
options.desc = "DiffView";
}
];
leader-code = [
{
mode = "n";
key = "<leader>c";
action = "+code";
}
{
mode = "n";
key = "<leader>cf";
action = "<cmd>lua require('conform').format()<cr>";
options.desc = "Format Buffer";
}
{
mode = "n";
key = "<leader>cd";
action = "<cmd>lua vim.diagnostic.open_float()<cr>";
options.desc = "Line Diagnostics";
}
{
mode = "n";
key = "<leader>cD";
action = "<cmd>Telescope diagnostics<cr>";
options.desc = "List Diagnostics";
}
{
mode = "n";
key = "<leader>cr";
action = "<cmd>lua vim.lsp.buf.rename()<cr>";
options.desc = "Rename Symbol";
}
# {
# mode = "n";
# key = "<leader>cr";
# action = ":IncRename ";
# options.desc = "Rename LSP symbol";
# }
{
mode = "n";
key = "<leader>ca";
action = "<cmd>lua vim.lsp.buf.code_action()<cr>";
options.desc = "Code Actions";
}
{
mode = "n";
key = "<leader>cI";
action = "<cmd>Telescope lsp_incoming_calls<cr>";
options.desc = "Incoming Calls";
}
{
mode = "n";
key = "<leader>cO";
action = "<cmd>Telescope lsp_outgoing_calls<cr>";
options.desc = "Outgoing Calls";
}
# GoTo
{
mode = "n";
key = "<leader>cg";
action = "+goto";
}
{
mode = "n";
key = "<leader>cgh";
action = "<cmd>ClangdSwitchSourceHeader<cr>";
options.desc = "Switch C/C++ Source/Header";
}
{
mode = "n";
key = "<leader>cgr";
action = "<cmd>Telescope lsp_references<cr>";
options.desc = "Symbol References";
}
{
mode = "n";
key = "<leader>cgd";
action = "<cmd>Telescope lsp_definitions<cr>";
options.desc = "Symbol Definition";
}
{
mode = "n";
key = "<leader>cgi";
action = "<cmd>Telescope lsp_implementations<cr>";
options.desc = "Symbol Implementation";
}
{
mode = "n";
key = "<leader>cgt";
action = "<cmd>Telescope lsp_type_definitions<cr>";
options.desc = "Type Definition";
}
{
mode = "n";
key = "<leader>cge";
action = "<cmd>lua vim.diagnostic.goto_next()<cr>";
options.desc = "Next Error";
}
{
mode = "n";
key = "<C-e>";
action = "<cmd>lua vim.diagnostic.goto_next()<cr>";
options.desc = "Next Error";
}
{
mode = "n";
key = "<leader>cgE";
action = "<cmd>lua vim.diagnostic.goto_prev()<cr>";
options.desc = "Previous Error";
}
{
mode = "n";
key = "<C-S-e>";
action = "<cmd>lua vim.diagnostic.goto_prev()<cr>";
options.desc = "Previous Error";
}
];
localleader-latex = [
];
in
builtins.concatLists [
disabled-mappings
no-leader
leader
leader-help
leader-quit
leader-session
leader-buffers
leader-windows
leader-toggles
leader-git
leader-code
localleader-latex
]

View File

@ -0,0 +1,50 @@
{...}: [
{
mode = "n";
key = "<localleader>t";
action = "<cmd>VimtexTocToggle<cr>";
options.desc = "Vimtex ToC";
}
{
mode = "n";
key = "<localleader>c";
action = "<cmd>VimtexCompile<cr>";
options.desc = "Vimtex Compile";
}
{
mode = "n";
key = "<localleader>C";
action = "<cmd>VimtexClean!<cr>";
options.desc = "Vimtex Clean";
}
{
mode = "n";
key = "<localleader>v";
action = "<cmd>VimtexView<cr>";
options.desc = "Vimtex View";
}
{
mode = "n";
key = "<localleader>I";
action = "<cmd>VimtexInfo<cr>";
options.desc = "Vimtex Info";
}
{
mode = "n";
key = "<localleader>,";
action = "<cmd>VimtexContextMenu<cr>";
options.desc = "Vimtex Context Menu";
}
{
mode = "n";
key = "<localleader>e";
action = "<cmd>VimtexErrors<cr>";
options.desc = "Vimtex Errors";
}
{
mode = "n";
key = "<localleader>p";
action = "<cmd>VimtexDocPackage<cr>";
options.desc = "Vimtex Package Docs";
}
]

View File

@ -1,6 +1,7 @@
fork = true # Start neovide detached
frame = "none" # full, buttonless, none
idle = true # Don't render frames without changes
# maximized = true
title-hidden = true
tabs = false
# maximized = true
# vsync = true

View File

@ -6,20 +6,22 @@
showmode = false; # Status line already shows this
backspace = ["indent" "eol" "start"];
termguicolors = true; # Required by multiple plugins
hidden = true; # Don't unload buffers immediately
hidden = true; # Don't unload buffers immediately (required for terminal persistence)
mouse = "a";
completeopt = ["menuone" "noselect" "noinsert"];
timeoutlen = 50;
timeoutlen = 50; # Controls which-key delay
pumheight = 0;
formatexpr = "v:lua.require('conform').formatexpr()";
laststatus = 3;
# winblend = 30;
laststatus = 3; # Global statusline
winblend = 30; # Floating popup transparency
sessionoptions = ["buffers" "curdir" "tabpages" "winsize" "help" "globals" "skiprtp" "folds"];
showtabline = 0; # Disable tabline
# Cursor
ruler = true; # Show cursor position in status line
number = true;
relativenumber = true;
signcolumn = "yes";
signcolumn = "yes"; # Always show to reduce window jumping
cursorline = true;
scrolloff = 10;
@ -38,7 +40,9 @@
# backup = false;
undofile = true;
undodir = "/home/christoph/.vim/undo";
undolevels = 10000;
# autochdir = true;
confirm = true;
# Search
incsearch = true; # Already highlight results while typing

View File

@ -1,5 +1,6 @@
# Changed from https://github.com/nix-community/home-manager/blob/master/modules/services/nextcloud-client.nix
# I use this instead of the HM module as the autostart wasn't working there
# TODO: Remove this module
# TODO: Check the HM module again if anything changed, as this has also stopped working
# Nextcloud immediately crashes on start, autostart isn't working either...
{

View File

@ -46,4 +46,17 @@
else if (args == null)
then "nil"
else "";
toLuaKeymap = args: let
removeDeprecatedMapAttrs = v: builtins.removeAttrs v ["lua"];
in ''
-- Set up keybinds using mylib.generators.toLuaKeymap {{{
do
local __nixvim_binds = ${toLuaObject (map removeDeprecatedMapAttrs args)}
for i, map in ipairs(__nixvim_binds) do
vim.keymap.set(map.mode, map.key, map.action, map.options)
end
end
-- }}}
'';
}

View File

@ -18,7 +18,7 @@ in {
# Make our inputs available to the configuration.nix (for importing modules)
# specialArgs are propagated to all modules
specialArgs = {inherit inputs hostname username mylib;};
specialArgs = {inherit inputs hostname username mylib system;};
modules = builtins.concatLists [
[

View File

@ -62,12 +62,12 @@ pkgs.devshell.mkShell {
}
# Nix Store
{
name = "store-gc";
help = "Run NixOS garbage collector";
# command = "nix-store --gc && sudo nix-collect-garbage -d && flatpak uninstall --unused";
command = "nh clean all";
}
# {
# name = "store-gc";
# help = "Run NixOS garbage collector";
# # command = "nix-store --gc && sudo nix-collect-garbage -d && flatpak uninstall --unused";
# command = "nh clean all";
# }
{
name = "store-optimise";
help = "Run NixOS store optimization (slow)";

View File

@ -8,6 +8,7 @@
mylib,
config,
pkgs,
system,
...
}:
with mylib.networking; {
@ -79,11 +80,15 @@ with mylib.networking; {
# as nix shell nixpkgs#name) consistent with your flake inputs.
# (Registry contains flakes)
registry = lib.mapAttrs' (n: v: lib.nameValuePair n {flake = v;}) inputs;
# Set NIX_PATH to find nixpgks
nixPath = ["nixpkgs=${inputs.nixpkgs.outPath}" "home-manager=${inputs.home-manager.outPath}"];
};
# Bootloader/Kernel stuff
boot = {
kernelPackages = pkgs.linuxPackages_zen;
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
# kernelPackages = pkgs.linuxPackages_zen; # NOTE: Only set for nixinator
# kernelPackages = pkgs.linuxPackages_latest; # The package set that includes the kernel and modules
kernelParams = ["mitigations=off"]; # I don't care about security regarding spectre/meltdown
@ -307,6 +312,7 @@ with mylib.networking; {
# iPhone tethering + mounting
libimobiledevice
ifuse
usbmuxd
mprocs # run multiple processes in single terminal window, screen alternative
parted # partition manager
@ -317,6 +323,10 @@ with mylib.networking; {
man-pages
man-pages-posix
# Sets NIX_LD_LIBRARY_PATH and NIX_LD variables for nix-ld
# Start dynamically linked executable using "nix-alien-ld -- <Executable>"
inputs.nix-alien.packages.${system}.nix-alien
# egl-wayland
];
@ -342,18 +352,13 @@ with mylib.networking; {
fish.enable = true;
firejail.enable = true; # Use to run app in network namespace (e.g. through vpn)
git.enable = true;
kdeconnect.enable = true; # Use this instead of HM for firewall setup
kdeconnect.enable = false; # Use this instead of HM for firewall setup
neovim.enable = true;
starship.enable = true;
thefuck.enable = true;
xwayland.enable = true;
fuse.userAllowOther = true; # Allow users to mount e.g. samba shares (cifs)
hyprland = {
enable = true;
# enableNvidiaPatches = false; # NOTE: Enabled only in nixinator config
};
nix-ld.enable = true; # Load dynamically linked executables
hyprland.enable = true;
nh = {
enable = true;
@ -362,10 +367,11 @@ with mylib.networking; {
flake = "/home/christoph/NixFlake";
};
fuse.userAllowOther = true; # Allow users to mount e.g. samba shares (cifs)
# ausweisapp.openFirewall = true; # Directly set port in firewall
};
sound.enable = false; # Alsa, seems to conflict with PipeWire
# sound.enable = false; # Alsa, seems to conflict with PipeWire # NOTE: Deprecated
hardware.pulseaudio.enable = false; # Get off my lawn
# List services that you want to enable:
@ -379,7 +385,7 @@ with mylib.networking; {
jack.enable = false;
wireplumber.enable = true; # Probably the default
# media-session.enable = false; # Removed upstream
# media-session.enable = false; # NOTE: Deprecated
};
# Enable the X11 windowing system.

View File

@ -88,6 +88,7 @@ in {
};
# Open Ports
nftables.enable = true;
firewall = {
enable = true;
# networking.firewall.checkReversePath = "loose";

View File

@ -38,6 +38,18 @@
# "10-ether-1G" = mylib.networking.mkStaticSystemdNetwork {...};
};
allowedTCPPorts = [
# AvaTalk ports
7777
12777
];
allowedUDPPorts = [
# AvaTalk ports
7777
12777
];
wireguard-tunnels = {
wg0-de-115 =
mylib.networking.mkWireguardService
@ -70,16 +82,16 @@
};
};
programs.hyprland = {
# enableNvidiaPatches = true; # NOTE: Deprecated
};
# Low latency audio
# musnix = {
# enable = true;
# # musnix.soundcardPciId = ;
# };
boot = {
kernelPackages = pkgs.linuxPackages_zen;
};
services.xserver = {
# Configure keymap in X11
xkb.layout = "us";
@ -89,18 +101,23 @@
# videoDrivers = ["amdgpu"];
};
# NOTE: This has been relocated here from the default config, because it forces en-US keyboard layout
# NOTE: This has been relocated here from the default config, because it forces en-US keyboard layout.
# The laptop needs de-DE...
# Chinese Input
i18n.inputMethod.enabled = "fcitx5";
i18n.inputMethod.fcitx5 = {
waylandFrontend = true;
i18n.inputMethod = {
enable = true;
type = "fcitx5";
addons = with pkgs; [
fcitx5-gtk
libsForQt5.fcitx5-qt
fcitx5-chinese-addons
fcitx5-configtool # TODO: Remove this and set config through HomeManager
];
fcitx5 = {
waylandFrontend = true;
addons = with pkgs; [
fcitx5-gtk
libsForQt5.fcitx5-qt # QT5
kdePackages.fcitx5-qt # QT6
fcitx5-chinese-addons
fcitx5-configtool # TODO: Remove this and set config through HomeManager
];
};
};
}

View File

@ -73,8 +73,8 @@
cpu.amd.updateMicrocode = true;
nvidia = {
# package = config.boot.kernelPackages.nvidiaPackages.stable;
package = config.boot.kernelPackages.nvidiaPackages.beta;
package = config.boot.kernelPackages.nvidiaPackages.stable;
# package = config.boot.kernelPackages.nvidiaPackages.beta; # NOTE: Beta, might (?) prevent discord screen-share
modesetting.enable = true; # Not officially supported by NVidia but needed for wayland
open = false; # TODO: Build failure on 2024-18-01
@ -82,12 +82,12 @@
};
# video.hidpi.enable = lib.mkDefault true; # No longer has any effect
opengl = {
graphics = {
enable = true;
# Vulkan
driSupport = true;
driSupport32Bit = true;
# driSupport = true; # NOTE: Deprecated
enable32Bit = true;
# AMD: https://nixos.wiki/wiki/AMD_GPU
extraPackages = with pkgs; [
@ -97,8 +97,8 @@
vaapiVdpau # Taken from wiki, this is also part of nixos-hardware/common/gpu/nvidia
libvdpau-va-gl # Taken from wiki
# libvdpau # NOTE: Don't know if needed/where it belongs...
# libva # NOTE: Don't know if needed/where it belongs...
libvdpau # NOTE: Don't know if needed/where it belongs...
libva # NOTE: Don't know if needed/where it belongs...
nvidia-vaapi-driver # Experimental, doesn't work with chromium
];
@ -110,8 +110,11 @@
# environment.variables.AMD_VULKAN_ICD = "RADV"; # Choose mesa driver by default
environment.variables = {
LIBVA_DRIVER_NAME = "nvidia";
GBM_BACKEND = "nvidia-drm";
# https://github.com/elFarto/nvidia-vaapi-driver?tab=readme-ov-file#environment-variables
LIBVA_DRIVER_NAME = "nvidia";
NVD_BACKEND = "egl";
};
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";

View File

@ -27,10 +27,6 @@
programs.light.enable = true;
programs.hyprland = {
# enableNvidiaPatches = false; # NOTE: Deprecated
};
services.xserver = {
# Configure keymap in X11
xkb.layout = "de";

View File

@ -16,8 +16,17 @@
initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
initrd.kernelModules = [];
kernelModules = ["kvm-intel"];
extraModulePackages = with config.boot.kernelPackages; [
];
extraModulePackages = with config.boot.kernelPackages; [];
# NOTE: Didn't work with Zen, switched to regular kernel instead
# kernelPatches = [
# {
# name = "ipeth";
# patch = null;
# extraConfig = ''
# USB_IPHETH y
# '';
# }
# ];
};
fileSystems."/" = {
@ -45,9 +54,9 @@
enableRedistributableFirmware = true;
cpu.intel.updateMicrocode = true;
opengl = {
graphics = {
enable = true;
driSupport = true;
# driSupport = true; # NOTE: Deprecated
extraPackages = with pkgs; [
intel-media-driver
vaapiIntel