Compare commits
97 Commits
aa1271c42c
...
75098bcba0
| Author | SHA1 | Date | |
|---|---|---|---|
| 75098bcba0 | |||
| dc8e2a619b | |||
| ffd8a0fba5 | |||
| a4b9f013b2 | |||
| 3a8833525a | |||
| b0dc048d2a | |||
| 5e56b4fe06 | |||
| a34daea3e5 | |||
| 2f49d62b87 | |||
| 280acc9318 | |||
| d60081ed0d | |||
| 95586c0122 | |||
| a5d157b1e2 | |||
| 3cbe3f5d6d | |||
| 573e806998 | |||
| ecc2c24c22 | |||
| ec9b9e8c2b | |||
| b2408e55ce | |||
| 3b37c0e989 | |||
| 4b67d8889f | |||
| 01a8c4f417 | |||
| eed6e50ad8 | |||
| 80299b6fd5 | |||
| f975f6ddfb | |||
| 4f3a1fc1b7 | |||
| 853ae42851 | |||
| 045cf3c6ea | |||
| ea787861d9 | |||
| 165408a4c7 | |||
| 2b1f5d7be8 | |||
| c29c159ecf | |||
| 72e6d5b2b9 | |||
| 0437534655 | |||
| aad25a0d57 | |||
| d5135f2f19 | |||
| 3c4f2faa92 | |||
| cae0426db0 | |||
| e8f30f4beb | |||
| d63226a205 | |||
| 56b5821458 | |||
| 47ed10c720 | |||
| fd77105b9a | |||
| cf95882979 | |||
| c0a61ededb | |||
| ea993c146b | |||
| 7f5f726eee | |||
| b27bc82249 | |||
| 0933a14304 | |||
| 65c2092be6 | |||
| 2e9ccc2e58 | |||
| b5ab792fde | |||
| 4b88b4e69f | |||
| 533f21c02a | |||
| e34ac0e562 | |||
| 6c03d6b720 | |||
| 8d68a49cc5 | |||
| 5821220f03 | |||
| 6ef030e91e | |||
| 520f0692c7 | |||
| 687280d4e8 | |||
| 492658a444 | |||
| 952af352e1 | |||
| 5d1da7818b | |||
| 6b858163f2 | |||
| d04089f74e | |||
| 883f74fbf8 | |||
| 36e04daa30 | |||
| 721d93fde8 | |||
| f613298369 | |||
| 355dc6d1d2 | |||
| 843c4b19f6 | |||
| d4cf0aa04a | |||
| f6249cb0d0 | |||
| cee408a975 | |||
| 217ff0efe1 | |||
| 73749f9df1 | |||
| 9209d9098a | |||
| 7fb6de903e | |||
| eb364fb8d6 | |||
| a9e1e8fc1d | |||
| 9c2d40b4ac | |||
| 7f7d58a8e9 | |||
| 3fc2028805 | |||
| 546fd6234c | |||
| cfda5847e1 | |||
| ba650bf89f | |||
| a314915c52 | |||
| e9700cf5b4 | |||
| 39c877d653 | |||
| 102cdf499d | |||
| 48b06a2ba9 | |||
| 20cc941580 | |||
| e63e48da36 | |||
| b5229f2f79 | |||
| 244af9f806 | |||
| 465ce0f3aa | |||
| 2a2b3385e1 |
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,8 +1,10 @@
|
|||||||
.owncloudsync.log
|
.owncloudsync.log
|
||||||
|
.nextcloudsync.log
|
||||||
.sync_*
|
.sync_*
|
||||||
result
|
.directory
|
||||||
.direnv
|
.direnv
|
||||||
.idea
|
.idea
|
||||||
/.directory
|
|
||||||
.nextcloudsync.log
|
|
||||||
.docs
|
.docs
|
||||||
|
result
|
||||||
|
|
||||||
|
config/neovim/store
|
||||||
|
|||||||
BIN
NixVim.png
Normal file
BIN
NixVim.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 MiB |
40
README.md
40
README.md
@ -1,44 +1,42 @@
|
|||||||
# NixOS Configuration
|
# NixOS Configuration
|
||||||
|
|
||||||
This is my modular NixOS configuration, using Hyprland for a lightweight desktop.
|
Modular NixOS configuration, using Hyprland for a lightweight desktop.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
To install, run ``nixos-rebuild`` with the ``--flake`` parameter from the ``NixFlake`` directory: ``nixos-rebuild switch --flake .#nixinator``.
|

|
||||||
|
|
||||||
|
To install, run `nixos-rebuild` with the `--flake` parameter from the `NixFlake` directory: `nixos-rebuild switch --flake .#nixinator`.
|
||||||
|
|
||||||
## NixFlake/system
|
## 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``
|
- 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``
|
- Every system has its own special configuration: `NixFlake/system/<hostname>/default.nix`
|
||||||
- System modules are located in ``NixFlake/system/modules``
|
- 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.
|
Because the hostname is propagated to the common configuration, it can import the host-specific config by itself.
|
||||||
|
|
||||||
## NixFlake/home
|
## 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 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``
|
- 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``
|
- 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.
|
Because the hostname is propagated to the common configuration, it can import the host-specific config by itself.
|
||||||
|
|
||||||
## NixFlake/derivations
|
## NixFlake/derivations
|
||||||
|
|
||||||
This folder contains all the stuff I packaged.
|
Contains all the stuff I packaged.
|
||||||
Each derivation is loaded into ``NixFlake/derivations/default.nix``.
|
Each derivation is loaded into `NixFlake/derivations/default.nix`.
|
||||||
|
|
||||||
## NixFlake/overlays
|
## NixFlake/overlays
|
||||||
|
|
||||||
This folder contains (not at the moment) all overlays.
|
Contains (not at the moment) all overlays.
|
||||||
The ``NixFlake/overlays/default.nix`` imports all of the overlays and all of the derivations.
|
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.
|
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.
|
|
||||||
|
|||||||
@ -77,7 +77,7 @@ dwindle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
master {
|
master {
|
||||||
new_is_master = true
|
new_status = master
|
||||||
}
|
}
|
||||||
|
|
||||||
gestures {
|
gestures {
|
||||||
@ -130,16 +130,16 @@ bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
|||||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||||
|
|
||||||
# Reset the workspace positions after disabling and reenabling a monitor
|
# Reset the workspace positions after disabling and reenabling a monitor
|
||||||
bind = CTRL ALT, R, moveworkspacetomonitor, 1 DP-1
|
bind = CTRL ALT, R, moveworkspacetomonitor, 1 HDMI-A-1
|
||||||
bind = CTRL ALT, R, moveworkspacetomonitor, 2 DP-1
|
bind = CTRL ALT, R, moveworkspacetomonitor, 2 HDMI-A-1
|
||||||
bind = CTRL ALT, R, moveworkspacetomonitor, 3 DP-1
|
bind = CTRL ALT, R, moveworkspacetomonitor, 3 HDMI-A-1
|
||||||
bind = CTRL ALT, R, moveworkspacetomonitor, 4 DP-1
|
bind = CTRL ALT, R, moveworkspacetomonitor, 4 HDMI-A-1
|
||||||
bind = CTRL ALT, R, moveworkspacetomonitor, 5 DP-1
|
bind = CTRL ALT, R, moveworkspacetomonitor, 5 HDMI-A-1
|
||||||
bind = CTRL ALT, R, moveworkspacetomonitor, 6 DP-1
|
bind = CTRL ALT, R, moveworkspacetomonitor, 6 HDMI-A-1
|
||||||
bind = CTRL ALT, R, moveworkspacetomonitor, 7 DP-1
|
bind = CTRL ALT, R, moveworkspacetomonitor, 7 HDMI-A-1
|
||||||
bind = CTRL ALT, R, moveworkspacetomonitor, 8 DP-1
|
bind = CTRL ALT, R, moveworkspacetomonitor, 8 HDMI-A-1
|
||||||
bind = CTRL ALT, R, moveworkspacetomonitor, 9 DP-1
|
bind = CTRL ALT, R, moveworkspacetomonitor, 9 HDMI-A-1
|
||||||
bind = CTRL ALT, R, moveworkspacetomonitor, 10 HDMI-A-1
|
bind = CTRL ALT, R, moveworkspacetomonitor, 10 DP-1
|
||||||
|
|
||||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||||
bindm = $mainMod, mouse:272, movewindow
|
bindm = $mainMod, mouse:272, movewindow
|
||||||
|
|||||||
@ -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
|
# 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;};
|
# adwaita-for-steam = pkgs.callPackage ./adwaita-for-steam {src = inputs.adwaita-for-steam;};
|
||||||
dconf-editor-wrapped = pkgs.callPackage ./dconf-editor-wrapped {};
|
# dconf-editor-wrapped = pkgs.callPackage ./dconf-editor-wrapped {};
|
||||||
dell-b1160w = pkgs.callPackage ./dell-b1160w {};
|
dell-b1160w = pkgs.callPackage ./dell-b1160w {};
|
||||||
firefox-gnome-theme = pkgs.callPackage ./firefox-gnome-theme {src = inputs.firefox-gnome-theme;};
|
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
|
# modules-options-doc = pkgs.callPackage ./modules-options-doc {mylib = mylib;}; # TODO: Borked
|
||||||
# spotdl-4_1_6 = pkgs.callPackage ./spotdl-4_1_6 {}; # TODO: Old
|
# spotdl-4_1_6 = pkgs.callPackage ./spotdl-4_1_6 {}; # TODO: Old
|
||||||
xdg-desktop-portal-termfilechooser = pkgs.callPackage ./xdg-desktop-portal-termfilechooser {};
|
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 {};
|
decker = pkgs.callPackage ./decker {};
|
||||||
}
|
}
|
||||||
|
|||||||
33
env/flake_java.nix
vendored
Normal file
33
env/flake_java.nix
vendored
Normal 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
276
flake.lock
generated
@ -2,15 +2,14 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"devshell": {
|
"devshell": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713532798,
|
"lastModified": 1722113426,
|
||||||
"narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=",
|
"narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "devshell",
|
"repo": "devshell",
|
||||||
"rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40",
|
"rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -21,18 +20,17 @@
|
|||||||
},
|
},
|
||||||
"devshell_2": {
|
"devshell_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_3",
|
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixvim",
|
"nixvim",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713532798,
|
"lastModified": 1722113426,
|
||||||
"narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=",
|
"narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "devshell",
|
"repo": "devshell",
|
||||||
"rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40",
|
"rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -43,16 +41,16 @@
|
|||||||
},
|
},
|
||||||
"emacs-overlay": {
|
"emacs-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717033835,
|
"lastModified": 1727021989,
|
||||||
"narHash": "sha256-m+5EQOjc7AKKrPYD+GkAn2W52z92+9IBdIVtTu0WJTY=",
|
"narHash": "sha256-UnGVpO2bTMPSAvc3KoA2Z75Ey5Bezg7oo0h5QTjK/ZE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "emacs-overlay",
|
"repo": "emacs-overlay",
|
||||||
"rev": "441ed86922224973b0853255785d3ce88b683b1a",
|
"rev": "6ae6f2b182f996c14df856ddb8ec68269d04f403",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -64,11 +62,11 @@
|
|||||||
"firefox-gnome-theme": {
|
"firefox-gnome-theme": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716813977,
|
"lastModified": 1723137499,
|
||||||
"narHash": "sha256-8fabA8OY1n2OcJFbbE03+bMydVANSBrNGo8hkzhXxxU=",
|
"narHash": "sha256-MOE9NeU2i6Ws1GhGmppMnjOHkNLl2MQMJmGhaMzdoJM=",
|
||||||
"owner": "rafaelmardojai",
|
"owner": "rafaelmardojai",
|
||||||
"repo": "firefox-gnome-theme",
|
"repo": "firefox-gnome-theme",
|
||||||
"rev": "8171c0578feb835ce66d49edba7429f46b7ac3f6",
|
"rev": "fb5b578a4f49ae8705e5fea0419242ed1b8dba70",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -78,6 +76,21 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat": {
|
"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": {
|
"locked": {
|
||||||
"lastModified": 1696426674,
|
"lastModified": 1696426674,
|
||||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||||
@ -91,22 +104,6 @@
|
|||||||
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
|
"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": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
@ -115,11 +112,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715865404,
|
"lastModified": 1726153070,
|
||||||
"narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=",
|
"narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9",
|
"rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -128,31 +125,16 @@
|
|||||||
"type": "github"
|
"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": {
|
"flake-utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701680307,
|
"lastModified": 1726560853,
|
||||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -184,11 +166,11 @@
|
|||||||
"systems": "systems_3"
|
"systems": "systems_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701680307,
|
"lastModified": 1710146030,
|
||||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -199,7 +181,10 @@
|
|||||||
},
|
},
|
||||||
"git-hooks": {
|
"git-hooks": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": [
|
||||||
|
"nixvim",
|
||||||
|
"flake-compat"
|
||||||
|
],
|
||||||
"gitignore": "gitignore",
|
"gitignore": "gitignore",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixvim",
|
"nixvim",
|
||||||
@ -211,11 +196,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716213921,
|
"lastModified": 1726745158,
|
||||||
"narHash": "sha256-xrsYFST8ij4QWaV6HEokCUNIZLjjLP1bYC60K8XiBVA=",
|
"narHash": "sha256-D5AegvGoEjt4rkKedmxlSEmC+nNLMBPWFxvmYnVLhjk=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "git-hooks.nix",
|
"repo": "git-hooks.nix",
|
||||||
"rev": "0e8fcc54b842ad8428c9e705cb5994eaf05c26a0",
|
"rev": "4e743a6920eab45e8ba0fbe49dc459f1423a4b74",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -248,11 +233,11 @@
|
|||||||
},
|
},
|
||||||
"hardware": {
|
"hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716987116,
|
"lastModified": 1726905744,
|
||||||
"narHash": "sha256-uuEkErFVsFdg2K0cKbNQ9JlFSAm/xYqPr4rbPLI91Y8=",
|
"narHash": "sha256-xyNtG5C+xvfsnOVEamFe9zCCnuNwk93K/TlFC/4DmCI=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "8251761f93d6f5b91cee45ac09edb6e382641009",
|
"rev": "b493dfd4a8cf9552932179e56ff3b5819a9b8381",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -268,11 +253,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717052710,
|
"lastModified": 1726985855,
|
||||||
"narHash": "sha256-LRhOxzXmOza5SymhOgnEzA8EAQp+94kkeUYWKKpLJ/U=",
|
"narHash": "sha256-NJPGK030Y3qETpWBhj9oobDQRbXdXOPxtu+YgGvZ84o=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "29c69d9a466e41d46fd3a7a9d0591ef9c113c2ae",
|
"rev": "04213d1ce4221f5d9b40bcee30706ce9a91d148d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -289,11 +274,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716457508,
|
"lastModified": 1726902823,
|
||||||
"narHash": "sha256-ZxzffLuWRyuMrkVVq7wastNUqeO0HJL9xqfY1QsYaqo=",
|
"narHash": "sha256-Gkc7pwTVLKj4HSvRt8tXNvosl8RS9hrBAEhOjAE0Tt4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "850cb322046ef1a268449cf1ceda5fd24d930b05",
|
"rev": "14929f7089268481d86b83ed31ffd88713dcd415",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -302,6 +287,28 @@
|
|||||||
"type": "github"
|
"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": {
|
"nix-darwin": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@ -310,11 +317,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716511055,
|
"lastModified": 1726742753,
|
||||||
"narHash": "sha256-5Fe/DGgvMhPEMl9VdVxv3zvwRcwNDmW5eRJ0gk72w7U=",
|
"narHash": "sha256-QclpWrIFIg/yvWRiOUaMp1WR+TGUE9tb7RE31xHlxWc=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "0bea8222f6e83247dd13b055d83e64bce02ee532",
|
"rev": "c03f85fa42d68d1056ca1740f3113b04f3addff2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -323,6 +330,21 @@
|
|||||||
"type": "github"
|
"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": {
|
"nix-flatpak": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1711997201,
|
"lastModified": 1711997201,
|
||||||
@ -339,13 +361,34 @@
|
|||||||
"type": "github"
|
"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": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1704161960,
|
"lastModified": 1722073938,
|
||||||
"narHash": "sha256-QGua89Pmq+FBAro8NriTuoO/wNaUtugt29/qqA8zeeM=",
|
"narHash": "sha256-OpX0StkL8vpXyWOGUD6G+MA26wAXK6SpT94kLJXo6B4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "63143ac2c9186be6d9da6035fa22620018c85932",
|
"rev": "e36e9f57337d0ff0cf77aceb58af4c805472bfae",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -357,27 +400,27 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716633019,
|
"lastModified": 1726838390,
|
||||||
"narHash": "sha256-xim1b5/HZYbWaZKyI7cn9TJCM6ewNVZnesRr00mXeS4=",
|
"narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "9d29cd266cebf80234c98dd0b87256b6be0af44e",
|
"rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-23.11",
|
"ref": "nixos-24.05",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716769173,
|
"lastModified": 1726755586,
|
||||||
"narHash": "sha256-7EXDb5WBw+d004Agt+JHC/Oyh/KTUglOaQ4MNjBbo5w=",
|
"narHash": "sha256-PmUr/2GQGvFTIJ6/Tvsins7Q43KTMvMFhvG6oaYK+Wk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "9ca3f649614213b2aaf5f1e16ec06952fe4c2632",
|
"rev": "c04d5652cfa9742b1d519688f65d1bbccea9eb7e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -389,15 +432,15 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716769173,
|
"lastModified": 1726062873,
|
||||||
"narHash": "sha256-7EXDb5WBw+d004Agt+JHC/Oyh/KTUglOaQ4MNjBbo5w=",
|
"narHash": "sha256-IiA3jfbR7K/B5+9byVi9BZGWTD4VSbWe8VLpp9B/iYk=",
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "9ca3f649614213b2aaf5f1e16ec06952fe4c2632",
|
"rev": "4f807e8940284ad7925ebd0a0993d2a1791acb2f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
@ -405,15 +448,15 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716509168,
|
"lastModified": 1726755586,
|
||||||
"narHash": "sha256-4zSIhSRRIoEBwjbPm3YiGtbd8HDWzFxJjw5DYSDy1n8=",
|
"narHash": "sha256-PmUr/2GQGvFTIJ6/Tvsins7Q43KTMvMFhvG6oaYK+Wk=",
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "bfb7a882678e518398ce9a31a881538679f6f092",
|
"rev": "c04d5652cfa9742b1d519688f65d1bbccea9eb7e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
@ -422,21 +465,23 @@
|
|||||||
"nixvim": {
|
"nixvim": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"devshell": "devshell_2",
|
"devshell": "devshell_2",
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat_2",
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"flake-root": "flake-root",
|
|
||||||
"git-hooks": "git-hooks",
|
"git-hooks": "git-hooks",
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
"nix-darwin": "nix-darwin",
|
"nix-darwin": "nix-darwin",
|
||||||
"nixpkgs": "nixpkgs_4",
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"nuschtosSearch": "nuschtosSearch",
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717012327,
|
"lastModified": 1727021727,
|
||||||
"narHash": "sha256-hmm9DA0+7RSbxudrscrjKJ3EGSwxvrkpjpCEAa+GtT8=",
|
"narHash": "sha256-Jz+idyFzP5Gkk1dBMVQp72VKb4Uufibmm/AWDqV3/L8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"rev": "2031a09b36c19526aa82d27167942edf62915b66",
|
"rev": "d2f9e011d9c6e3d765422b78039e61ddf9e69749",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -447,11 +492,11 @@
|
|||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717054761,
|
"lastModified": 1727017850,
|
||||||
"narHash": "sha256-LBrHEBC0S7C6zjQTsjahAvxxlDH3cbZmEgHiri9o4SM=",
|
"narHash": "sha256-C361iPL0hyKNbCRpkU4MbaoGCN2Z1Tc3dqfO/0sbnKk=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "a4eff07f9bbcf74522c642c72047ed03c3831501",
|
"rev": "d65b8378613424be887a23730febc25a7a06c337",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -460,6 +505,28 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nuschtosSearch": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils_3",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726816132,
|
||||||
|
"narHash": "sha256-AbB0lgc0IbzLIxj1O3cosiMNAVQak4KJtvq9q8MjHhs=",
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "search",
|
||||||
|
"rev": "7733a39a1321057172d87e6251ded7cdeb67171e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "search",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"devshell": "devshell",
|
"devshell": "devshell",
|
||||||
@ -467,8 +534,9 @@
|
|||||||
"firefox-gnome-theme": "firefox-gnome-theme",
|
"firefox-gnome-theme": "firefox-gnome-theme",
|
||||||
"hardware": "hardware",
|
"hardware": "hardware",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"nix-alien": "nix-alien",
|
||||||
"nix-flatpak": "nix-flatpak",
|
"nix-flatpak": "nix-flatpak",
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nixpkgs": "nixpkgs_4",
|
||||||
"nixvim": "nixvim",
|
"nixvim": "nixvim",
|
||||||
"nur": "nur"
|
"nur": "nur"
|
||||||
}
|
}
|
||||||
@ -526,11 +594,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715940852,
|
"lastModified": 1726734507,
|
||||||
"narHash": "sha256-wJqHMg/K6X3JGAE9YLM0LsuKrKb4XiBeVaoeMNlReZg=",
|
"narHash": "sha256-VUH5O5AcOSxb0uL/m34dDkxFKP6WLQ6y4I1B4+N3L2w=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "2fba33a182602b9d49f0b2440513e5ee091d838b",
|
"rev": "ee41a466c2255a3abe6bc50fc6be927cdee57a9f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
16
flake.nix
16
flake.nix
@ -20,7 +20,9 @@
|
|||||||
nur.url = "github:nix-community/NUR";
|
nur.url = "github:nix-community/NUR";
|
||||||
devshell.url = "github:numtide/devshell";
|
devshell.url = "github:numtide/devshell";
|
||||||
nixvim.url = "github:nix-community/nixvim";
|
nixvim.url = "github:nix-community/nixvim";
|
||||||
|
nixvim.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1";
|
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1";
|
||||||
|
nix-alien.url = "github:thiagokokada/nix-alien";
|
||||||
# musnix.url = "github:musnix/musnix";
|
# musnix.url = "github:musnix/musnix";
|
||||||
# nixified-ai.url = "github:nixified-ai/flake";
|
# nixified-ai.url = "github:nixified-ai/flake";
|
||||||
# nixos-conf-editor.url = "github:vlinkz/nixos-conf-editor";
|
# nixos-conf-editor.url = "github:vlinkz/nixos-conf-editor";
|
||||||
@ -35,10 +37,6 @@
|
|||||||
|
|
||||||
# adwaita-for-steam.url = "github:tkashkin/Adwaita-for-Steam";
|
# adwaita-for-steam.url = "github:tkashkin/Adwaita-for-Steam";
|
||||||
# adwaita-for-steam.flake = false;
|
# adwaita-for-steam.flake = false;
|
||||||
|
|
||||||
# hyprland.url = "github:hyprwm/Hyprland"; # NOTE: only for Home-Manager, NixOS includes hyprland
|
|
||||||
# hyprpaper.url = "github:hyprwm/hyprpaper"; # NOTE: replaced with hyprpaper package
|
|
||||||
# hyprpicker.url = "github:hyprwm/hyprpicker"; # NOTE: replaced with hyprpicker package
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Outputs is a function that takes the inputs as arguments.
|
# Outputs is a function that takes the inputs as arguments.
|
||||||
@ -57,7 +55,7 @@
|
|||||||
# I don't know how to extend the nixpkgs.lib directly so just propagate mylib to the config modules as argument
|
# I don't know how to extend the nixpkgs.lib directly so just propagate mylib to the config modules as argument
|
||||||
mylib = import ./lib {
|
mylib = import ./lib {
|
||||||
inherit inputs pkgs;
|
inherit inputs pkgs;
|
||||||
lib = nixpkgs.lib;
|
inherit (nixpkgs) lib; # Equal to "lib = nixpkgs.lib;"
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set overlays + unfree globally
|
# Set overlays + unfree globally
|
||||||
@ -68,7 +66,7 @@
|
|||||||
|
|
||||||
# NOTE: Obsidian 1.5.3 depends on an unsupported Electron version. As long as Obsidian isn't updated, allow this version.
|
# NOTE: Obsidian 1.5.3 depends on an unsupported Electron version. As long as Obsidian isn't updated, allow this version.
|
||||||
config.permittedInsecurePackages = pkgs.lib.optional (pkgs.obsidian.version == "1.5.3") "electron-25.9.0";
|
config.permittedInsecurePackages = pkgs.lib.optional (pkgs.obsidian.version == "1.5.3") "electron-25.9.0";
|
||||||
|
|
||||||
# NOTE: Probably shouldn't enable CUDA globally, but in the environment flakes where it is needed?
|
# NOTE: Probably shouldn't enable CUDA globally, but in the environment flakes where it is needed?
|
||||||
# Would it even work here? Since the flake imports its own nixpkgs...
|
# Would it even work here? Since the flake imports its own nixpkgs...
|
||||||
# config.cudaSupport = true;
|
# config.cudaSupport = true;
|
||||||
@ -86,7 +84,7 @@
|
|||||||
};
|
};
|
||||||
# The rec expression turns a basic set into a set where self-referencing is possible.
|
# The rec expression turns a basic set into a set where self-referencing is possible.
|
||||||
# It is a shorthand for recursive and allows to use the values defined in this set from its own scope.
|
# It is a shorthand for recursive and allows to use the values defined in this set from its own scope.
|
||||||
in rec {
|
in {
|
||||||
# Local shell for NixFlake directory
|
# Local shell for NixFlake directory
|
||||||
devShells."${system}".default = import ./shell.nix {inherit pkgs;};
|
devShells."${system}".default = import ./shell.nix {inherit pkgs;};
|
||||||
|
|
||||||
@ -103,8 +101,6 @@
|
|||||||
username = "christoph";
|
username = "christoph";
|
||||||
|
|
||||||
extraModules = [
|
extraModules = [
|
||||||
# hyprland.nixosModules.default # NOTE: NixOS includes system module
|
|
||||||
# inputs.nix-flatpak.nixosModules.nix-flatpak
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -116,8 +112,6 @@
|
|||||||
username = "christoph";
|
username = "christoph";
|
||||||
|
|
||||||
extraModules = [
|
extraModules = [
|
||||||
# hyprland.nixosModules.default # NOTE: NixOS includes system module
|
|
||||||
# inputs.nix-flatpak.nixosModules.nix-flatpak
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,7 +3,6 @@
|
|||||||
# The nixosConfig allows to access the toplevel system configuration from within home manager
|
# The nixosConfig allows to access the toplevel system configuration from within home manager
|
||||||
# https://github.com/nix-community/home-manager/blob/586ac1fd58d2de10b926ce3d544b3179891e58cb/nixos/default.nix#L19
|
# https://github.com/nix-community/home-manager/blob/586ac1fd58d2de10b926ce3d544b3179891e58cb/nixos/default.nix#L19
|
||||||
{
|
{
|
||||||
inputs,
|
|
||||||
hostname,
|
hostname,
|
||||||
username,
|
username,
|
||||||
lib,
|
lib,
|
||||||
@ -16,6 +15,7 @@
|
|||||||
# This is a module
|
# This is a module
|
||||||
# Because no imports/options/config is defined explicitly, everything is treated as config
|
# Because no imports/options/config is defined explicitly, everything is treated as config
|
||||||
# { inputs, lib, ... }: { ... } gets turned into { inputs, lib, ... }: { config = { ... }; } implicitly
|
# { inputs, lib, ... }: { ... } gets turned into { inputs, lib, ... }: { config = { ... }; } implicitly
|
||||||
|
# TODO: Add nixified.ai module
|
||||||
rec {
|
rec {
|
||||||
# Every module is a nix expression, specifically a function { inputs, lib, ... }: { ... }
|
# 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)
|
# Every module (/function) is called with the same arguments as this module (home.nix)
|
||||||
@ -32,7 +32,10 @@ rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
modules = {
|
modules = {
|
||||||
chromium.enable = true;
|
chromium = {
|
||||||
|
enable = true;
|
||||||
|
google = false;
|
||||||
|
};
|
||||||
|
|
||||||
# emacs = {
|
# emacs = {
|
||||||
# enable = false;
|
# enable = false;
|
||||||
@ -97,6 +100,7 @@ rec {
|
|||||||
bindings = {
|
bindings = {
|
||||||
"$mainMod, T" = ["exec, kitty"];
|
"$mainMod, T" = ["exec, kitty"];
|
||||||
"$mainMod, E" = ["exec, kitty"];
|
"$mainMod, E" = ["exec, kitty"];
|
||||||
|
"$mainMod, N" = ["exec, neovide"];
|
||||||
# "$mainMod, T" = ["exec, alacritty -o font.size=12 -e tmux"];
|
# "$mainMod, T" = ["exec, alacritty -o font.size=12 -e tmux"];
|
||||||
# "$mainMod, E" = ["exec, alacritty -o font.size=12 -e tmux"];
|
# "$mainMod, E" = ["exec, alacritty -o font.size=12 -e tmux"];
|
||||||
|
|
||||||
@ -109,33 +113,47 @@ rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
autostart = [
|
autostart = {
|
||||||
# NOTE: The sleep 15s is a hack for tray icons,
|
# immediate = [];
|
||||||
# they need to be launched after waybar
|
|
||||||
"hyprctl dispatch exec \"sleep 15s && kdeconnect-indicator\""
|
delayed = [
|
||||||
"hyprctl dispatch exec \"sleep 15s && nextcloud --background\""
|
# "kdeconnect-indicator"
|
||||||
"hyprctl dispatch exec \"sleep 15s && keepassxc\""
|
"kitty"
|
||||||
# "alacritty -o font.size=12 -e tmux"
|
"nextcloud --background"
|
||||||
"kitty"
|
"keepassxc"
|
||||||
# "md.obsidian.Obsidian"
|
];
|
||||||
# "firefox"
|
};
|
||||||
];
|
|
||||||
|
|
||||||
workspacerules = {
|
workspacerules = {
|
||||||
"2" = [
|
"2" = [
|
||||||
|
"neovide"
|
||||||
"jetbrains-clion"
|
"jetbrains-clion"
|
||||||
|
"jetbrains-idea"
|
||||||
|
"jetbrains-pycharm"
|
||||||
|
"jetbrains-rustrover"
|
||||||
|
"jetbrains-rider"
|
||||||
"code-url-handler"
|
"code-url-handler"
|
||||||
];
|
];
|
||||||
"3" = [
|
"3" = [
|
||||||
"obsidian"
|
"obsidian"
|
||||||
|
"unityhub"
|
||||||
|
"Unity"
|
||||||
|
"chromium-browser"
|
||||||
];
|
];
|
||||||
"4" = [
|
"4" = [
|
||||||
"firefox"
|
"firefox"
|
||||||
|
"Google-chrome"
|
||||||
];
|
];
|
||||||
"10" = [
|
"7" = [
|
||||||
"discord"
|
"signal"
|
||||||
|
];
|
||||||
|
"8" = [
|
||||||
"Spotify"
|
"Spotify"
|
||||||
];
|
];
|
||||||
|
"9" = [
|
||||||
|
"discord"
|
||||||
|
"vesktop"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
floating = [
|
floating = [
|
||||||
@ -152,42 +170,26 @@ rec {
|
|||||||
"kitty"
|
"kitty"
|
||||||
"Alacritty"
|
"Alacritty"
|
||||||
"discord"
|
"discord"
|
||||||
|
"signal"
|
||||||
|
"vesktop"
|
||||||
"Spotify"
|
"Spotify"
|
||||||
"obsidian"
|
"obsidian"
|
||||||
"jetbrains-clion"
|
"jetbrains-clion"
|
||||||
|
"jetbrains-idea"
|
||||||
|
"jetbrains-pycharm"
|
||||||
|
"jetbrains-rustrover"
|
||||||
|
"jetbrains-rider"
|
||||||
"code-url-handler"
|
"code-url-handler"
|
||||||
|
"neovide"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
kitty.enable = true;
|
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 = {
|
neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
alias = true;
|
alias = true;
|
||||||
};
|
neovide = true;
|
||||||
|
|
||||||
# lazyvim = {
|
|
||||||
# enable = true;
|
|
||||||
# alias = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
nextcloud = {
|
|
||||||
enable = true;
|
|
||||||
autostart = false; # TODO: This option should use hyprland module
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nnn.enable = true;
|
nnn.enable = true;
|
||||||
@ -203,62 +205,35 @@ rec {
|
|||||||
theme = "Foggy-Lake";
|
theme = "Foggy-Lake";
|
||||||
};
|
};
|
||||||
|
|
||||||
vscode.enable = true;
|
vscode.enable = false; # TODO: Had broken package ms-vscode-cpptools
|
||||||
|
|
||||||
waybar = {
|
waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
manual.manpages.enable = true;
|
manual = {
|
||||||
manual.html.enable = true;
|
manpages.enable = true;
|
||||||
|
html.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
# Make fonts installed through user packages available to applications
|
# 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
|
# 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
|
fonts.fontconfig.enable = true; # Also updates the font-cache
|
||||||
|
|
||||||
# Generate a list of installed user packages in ~/.local/share/current-user-packages
|
xdg = {
|
||||||
home.file.".local/share/current-user-packages".text = let
|
mime.enable = true;
|
||||||
packages = builtins.map (p: "${p.name}") home.packages;
|
mimeApps = {
|
||||||
sortedUnique = builtins.sort builtins.lessThan (lib.unique packages);
|
enable = true;
|
||||||
formatted = builtins.concatStringsSep "\n" sortedUnique;
|
associations.added = nixosConfig.xdg.mime.addedAssociations;
|
||||||
in
|
associations.removed = nixosConfig.xdg.mime.removedAssociations;
|
||||||
formatted;
|
inherit (nixosConfig.xdg.mime) defaultApplications; # Equal to "defaultApplications = nixosConfig.xdg.mime.defaultApplications"
|
||||||
|
};
|
||||||
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;
|
|
||||||
defaultApplications = nixosConfig.xdg.mime.defaultApplications;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
username = username; # Inherited from flake.nix
|
inherit username; # Inherited from flake.nix
|
||||||
|
|
||||||
homeDirectory = "/home/${home.username}";
|
homeDirectory = "/home/${home.username}";
|
||||||
enableNixpkgsReleaseCheck = true;
|
enableNixpkgsReleaseCheck = true;
|
||||||
|
|
||||||
@ -268,10 +243,6 @@ rec {
|
|||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
LANG = "en_US.UTF-8";
|
LANG = "en_US.UTF-8";
|
||||||
|
|
||||||
# TODO: Configure in neovim/helix modules and choose a winner
|
|
||||||
# EDITOR = "hx";
|
|
||||||
# VISUAL = "hx";
|
|
||||||
|
|
||||||
# TERMINAL = "alacritty -o font.size=12";
|
# TERMINAL = "alacritty -o font.size=12";
|
||||||
TERMINAL = "kitty";
|
TERMINAL = "kitty";
|
||||||
BROWSER = "firefox";
|
BROWSER = "firefox";
|
||||||
@ -289,210 +260,160 @@ rec {
|
|||||||
# WINEFSYNC = 1;
|
# WINEFSYNC = 1;
|
||||||
# WINEPREFIX = "/home/christoph/.wine";
|
# 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
|
# Do not change
|
||||||
stateVersion = "22.05";
|
stateVersion = "22.05";
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO: Split this more between laptop and desktop...
|
|
||||||
# TODO: Check what packages are installed here and in modules and check if there is already a service/hm-module for it
|
|
||||||
# TODO: If so use this or adapt the config from there (example gnome.sushi is also added to dbus packages in services.sushi)
|
|
||||||
# TODO: Make a module for standard UNIX replacements
|
|
||||||
# TODO: Make a video player module
|
|
||||||
# Add stuff for your user as you see fit:
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
# CLI Tools
|
|
||||||
# bat # cat with wings (enabled as program)
|
|
||||||
# exa # ls in cool (enabled as program) # NOTE: Unmaintained
|
|
||||||
eza
|
|
||||||
# delta # diffier diff differ (enabled as program)
|
|
||||||
# fzf # fuzzy find (enabled as program in fish module)
|
|
||||||
tokei # Text file statistics in a project
|
|
||||||
poppler_utils # pdfunite
|
|
||||||
# ffmpeg # Convert video (magic), v4
|
|
||||||
ffmpeg_5-full # I love ffmpeg (v5, including ffplay)
|
|
||||||
ffmpeg-normalize
|
|
||||||
x265
|
|
||||||
imagemagick # Convert image (magic)
|
|
||||||
vlc
|
|
||||||
ueberzugpp # Display images in terminal (alacritty)
|
|
||||||
(ripgrep.override {withPCRE2 = true;}) # fast as fuck
|
|
||||||
nvd # nix rebuild diff
|
|
||||||
# du-dust # Disk usage analyzer (for directories)
|
|
||||||
gdu # Alternative to du-dust (I like it better)
|
|
||||||
duf # Disk usage analyzer (for all disk overview)
|
|
||||||
fd # find alternative
|
|
||||||
sd # sed alternative
|
|
||||||
tealdeer # very fast tldr (so readable man)
|
|
||||||
# gtop # graphic top # We have btop already...
|
|
||||||
fclones # duplicate file finder
|
|
||||||
gum # nice shell scripts
|
|
||||||
geteltorito # extreact boot image from iso
|
|
||||||
gitbatch # overview over multiple repos
|
|
||||||
# TODO: Maybe general document/typesetting module?
|
|
||||||
graphviz # generate graphs from code
|
|
||||||
xdot # .dot file viewer
|
|
||||||
kgraphviewer # dot graph viewer
|
|
||||||
d2 # generate diagrams from code
|
|
||||||
plantuml
|
|
||||||
gnuplot # generate function plots
|
|
||||||
pdf2svg
|
|
||||||
# TODO: Latex module with individual packages
|
|
||||||
texlive.combined.scheme-full
|
|
||||||
# tikzit
|
|
||||||
# texlab # Incredibly lag
|
|
||||||
pandoc # document converting madness
|
|
||||||
# TODO: Programming languages module
|
|
||||||
alejandra # nix code formatter
|
|
||||||
nil # nix language server
|
|
||||||
libnotify
|
|
||||||
inotifyTools # inotifywait etc.
|
|
||||||
atool # Archive preview
|
|
||||||
ffmpegthumbnailer # Video thumbnails
|
|
||||||
mediainfo
|
|
||||||
tree # Folder preview
|
|
||||||
# gnome.zenity # Popups from terminal
|
|
||||||
unrar
|
|
||||||
p7zip
|
|
||||||
unzip
|
|
||||||
progress
|
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
appimage-run
|
|
||||||
# decker # TODO: Build failure
|
|
||||||
google-chrome # Trash, but required for decker pdf export
|
|
||||||
(pkgs.writeShellScriptBin "chrome" "exec -a $0 ${google-chrome}/bin/google-chrome-stable $@")
|
|
||||||
|
|
||||||
cool-retro-term
|
|
||||||
ventoy-full # Bootable USB for many ISOs
|
|
||||||
# geekbench
|
|
||||||
# spotify # NOTE: Uses flatpak
|
|
||||||
neovide
|
|
||||||
|
|
||||||
sqlitebrowser # To modify tables
|
|
||||||
dbeaver-bin # To import/export data + diagrams
|
|
||||||
hoppscotch # Test APIs
|
|
||||||
|
|
||||||
# Xooooorg/Desktop environment stuff
|
|
||||||
# xclip
|
|
||||||
xorg.xwininfo # See what apps run in XWayland
|
|
||||||
# xdotool
|
|
||||||
|
|
||||||
# Hardware/Software info
|
|
||||||
neofetch # Easily see interesting package versions/kernel
|
|
||||||
pciutils # lspci
|
|
||||||
glxinfo # opengl info
|
|
||||||
wayland-utils # wayland-info
|
|
||||||
aha # ansi html adapter? TODO: Why did I install this?
|
|
||||||
# radeontop
|
|
||||||
clinfo # OpenCL info
|
|
||||||
vulkan-tools # vulkaninfo
|
|
||||||
libva-utils # vainfo
|
|
||||||
vdpauinfo
|
|
||||||
# rocminfo # radeon comptute platform info
|
|
||||||
hwloc
|
|
||||||
lm_sensors
|
|
||||||
acpica-tools # Dump ACPI tables etc.
|
|
||||||
|
|
||||||
python311
|
|
||||||
|
|
||||||
# Web stuff
|
|
||||||
signal-desktop
|
|
||||||
# element-desktop # matrix client
|
|
||||||
# webcord # Unshitted discord? Well, except Krisp of course
|
|
||||||
# ncspot # Spotify in cool (but slow)?
|
|
||||||
protonvpn-cli
|
|
||||||
# yt-dlp # download videos (from almost anywhere) # HM program
|
|
||||||
filezilla
|
|
||||||
# dnsmasq # For Access Point/Hotspot
|
|
||||||
# linux-wifi-hotspot
|
|
||||||
# spotdl-4_1_6 # My derivation as temporary fix
|
|
||||||
# spotdl # TODO: Borked
|
|
||||||
|
|
||||||
# Tools
|
|
||||||
# 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 # Use flatpak for now, as I can't use window splitting with this version for some reason
|
|
||||||
# logseq # knowledge-base
|
|
||||||
# zotero # Citation/source research assistant
|
|
||||||
# jabref # manage bibilography # NOTE: Uses jdk18 which is EOL, so can't build, use flatpak instead
|
|
||||||
# kbibtex # bibtex editor
|
|
||||||
# vale # Why not lint everything (including english)?
|
|
||||||
|
|
||||||
# TODO: Development module
|
|
||||||
# TODO: Does this conflict with devshell pythons? If so, use lowPrio
|
|
||||||
# TODO: Merge this somehow? I want multiple pythons to merge to one with all the packages...
|
|
||||||
# (python310.withPackages (p: with p; [
|
|
||||||
# p.rich
|
|
||||||
# p.numpy
|
|
||||||
# p.scipy
|
|
||||||
# p.matplotlib
|
|
||||||
# p.pillow # for ranger
|
|
||||||
# p.pygments # for emacs
|
|
||||||
# ]))
|
|
||||||
jetbrains.clion
|
|
||||||
jetbrains.rust-rover
|
|
||||||
jetbrains.pycharm-professional
|
|
||||||
jetbrains.idea-ultimate
|
|
||||||
# jetbrains-toolbox # TODO: Difficult to make work
|
|
||||||
|
|
||||||
# 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}";
|
# home.file.".options-doc".source = "${pkgs.modules-options-doc}";
|
||||||
|
|
||||||
# Packages with extra options managed by HomeManager natively
|
# Packages with extra options managed by HomeManager natively
|
||||||
@ -500,7 +421,7 @@ rec {
|
|||||||
home-manager.enable = true;
|
home-manager.enable = true;
|
||||||
|
|
||||||
alacritty = {
|
alacritty = {
|
||||||
enable = true;
|
enable = false;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
window = {
|
window = {
|
||||||
@ -643,11 +564,6 @@ rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
broot = {
|
|
||||||
enable = true;
|
|
||||||
enableFishIntegration = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
btop.enable = true;
|
btop.enable = true;
|
||||||
|
|
||||||
direnv = {
|
direnv = {
|
||||||
@ -655,64 +571,35 @@ rec {
|
|||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# exa.enable = true; # NOTE: Unmaintained
|
eza = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = config.modules.fish.enable;
|
||||||
|
};
|
||||||
|
|
||||||
|
fastfetch = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
fd = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
fzf = {
|
fzf = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableFishIntegration = config.modules.fish.enable;
|
enableFishIntegration = config.modules.fish.enable;
|
||||||
};
|
};
|
||||||
|
|
||||||
gallery-dl.enable = true; # TODO: Alternative to cyberdrop-dl?
|
gallery-dl.enable = false; # TODO: Alternative to cyberdrop-dl?
|
||||||
|
|
||||||
git = {
|
git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
delta.enable = true;
|
delta.enable = false; # TODO: Build failure
|
||||||
|
|
||||||
userEmail = "christoph.urlacher@protonmail.com";
|
userEmail = "christoph.urlacher@protonmail.com";
|
||||||
userName = "Christoph Urlacher";
|
userName = "Christoph Urlacher";
|
||||||
};
|
};
|
||||||
|
|
||||||
# helix = {
|
|
||||||
# enable = true;
|
|
||||||
|
|
||||||
# # NOTE: Syntax changed
|
|
||||||
# # languages = [
|
|
||||||
# # {
|
|
||||||
# # name = "verilog";
|
|
||||||
# # roots = [
|
|
||||||
# # ".svls.toml"
|
|
||||||
# # ".svlint.toml"
|
|
||||||
# # ];
|
|
||||||
# # language-server = {
|
|
||||||
# # command = "svls";
|
|
||||||
# # args = [];
|
|
||||||
# # };
|
|
||||||
# # }
|
|
||||||
# # ];
|
|
||||||
|
|
||||||
# # https://docs.helix-editor.com/configuration.html
|
|
||||||
# settings = {
|
|
||||||
# # theme = "base16_terminal";
|
|
||||||
# editor = {
|
|
||||||
# scrolloff = 10;
|
|
||||||
# mouse = false; # Default true
|
|
||||||
# middle-click-paste = false; # Default true
|
|
||||||
# line-number = "relative";
|
|
||||||
# cursorline = true;
|
|
||||||
# auto-completion = true; # Default
|
|
||||||
# bufferline = "multiple";
|
|
||||||
# cursor-shape = {
|
|
||||||
# normal = "block";
|
|
||||||
# insert = "bar";
|
|
||||||
# select = "underline";
|
|
||||||
# };
|
|
||||||
# lsp.display-messages = true;
|
|
||||||
# indent-guides.render = false;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# }; # NOTE: If error occurs after system update on fish init run "ssh-add"
|
|
||||||
|
|
||||||
keychain = {
|
keychain = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableFishIntegration = config.modules.fish.enable;
|
enableFishIntegration = config.modules.fish.enable;
|
||||||
@ -742,18 +629,20 @@ rec {
|
|||||||
# Realtime Motion Interpolation: https://gist.github.com/phiresky/4bfcfbbd05b3c2ed8645
|
# Realtime Motion Interpolation: https://gist.github.com/phiresky/4bfcfbbd05b3c2ed8645
|
||||||
mpv = {
|
mpv = {
|
||||||
enable = true;
|
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
|
# 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
|
# 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;}) {
|
# package = pkgs.wrapMpv (pkgs.mpv-unwrapped.override {vapoursynthSupport = true;}) {
|
||||||
youtubeSupport = true;
|
# youtubeSupport = true;
|
||||||
extraMakeWrapperArgs = [
|
# extraMakeWrapperArgs = [
|
||||||
"--prefix"
|
# "--prefix"
|
||||||
"LD_LIBRARY_PATH"
|
# "LD_LIBRARY_PATH"
|
||||||
":"
|
# ":"
|
||||||
"${pkgs.vapoursynth-mvtools}/lib"
|
# "${pkgs.vapoursynth-mvtools}/lib"
|
||||||
];
|
# ];
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
# Interactive Cheatsheets
|
# Interactive Cheatsheets
|
||||||
@ -768,7 +657,7 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nushell = {
|
nushell = {
|
||||||
enable = true;
|
enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Git status replacement with file selection by number
|
# Git status replacement with file selection by number
|
||||||
@ -894,20 +783,22 @@ rec {
|
|||||||
"com.github.tchx84.Flatseal"
|
"com.github.tchx84.Flatseal"
|
||||||
"com.discordapp.Discord"
|
"com.discordapp.Discord"
|
||||||
"com.spotify.Client"
|
"com.spotify.Client"
|
||||||
|
"com.google.Chrome"
|
||||||
|
"md.obsidian.Obsidian"
|
||||||
|
"dev.vencord.Vesktop"
|
||||||
];
|
];
|
||||||
|
|
||||||
uninstallUnmanaged = true;
|
uninstallUnmanaged = true;
|
||||||
|
|
||||||
update.auto = {
|
update.auto = {
|
||||||
enable = true;
|
enable = true;
|
||||||
onCalendar = "weekly"; # Default value
|
onCalendar = "daily"; # Default value: weekly
|
||||||
};
|
};
|
||||||
|
|
||||||
overrides = {
|
overrides = {
|
||||||
global = {
|
global = {
|
||||||
# TODO: Makes discord crash
|
|
||||||
# Force Wayland by default
|
# 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"];
|
Context.filesystems = ["/nix/store:ro"];
|
||||||
|
|
||||||
@ -916,13 +807,18 @@ rec {
|
|||||||
XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons";
|
XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons";
|
||||||
|
|
||||||
# Force correct theme for some GTK apps
|
# Force correct theme for some GTK apps
|
||||||
# GTK_THEME = "Adwaita:dark";
|
GTK_THEME = "Adwaita:light";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# 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
|
# Nicely reload system units when changing configs
|
||||||
systemd.user.startServices = "sd-switch";
|
systemd.user.startServices = "sd-switch";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +1,5 @@
|
|||||||
{
|
|
||||||
inputs,
|
|
||||||
hostname,
|
|
||||||
username,
|
|
||||||
lib,
|
|
||||||
mylib,
|
|
||||||
config,
|
|
||||||
nixosConfig,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
# Here goes the stuff that will only be enabled on the desktop
|
# Here goes the stuff that will only be enabled on the desktop
|
||||||
rec {
|
{pkgs, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
../../modules
|
../../modules
|
||||||
];
|
];
|
||||||
@ -46,9 +35,11 @@ rec {
|
|||||||
"DP-1" = [10];
|
"DP-1" = [10];
|
||||||
};
|
};
|
||||||
|
|
||||||
autostart = [
|
autostart = {
|
||||||
"hyprctl dispatch exec \"sleep 15s && fcitx5\""
|
delayed = [
|
||||||
];
|
"fcitx5"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
floating = [
|
floating = [
|
||||||
{
|
{
|
||||||
@ -57,53 +48,35 @@ rec {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# audio = {
|
# TODO: Also set the dunst monitor
|
||||||
# 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;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
waybar.monitor = "HDMI-A-1";
|
waybar.monitor = "HDMI-A-1";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# quartus-prime-lite # Intel FPGA design software
|
# 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
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +1,5 @@
|
|||||||
{
|
|
||||||
inputs,
|
|
||||||
hostname,
|
|
||||||
username,
|
|
||||||
lib,
|
|
||||||
mylib,
|
|
||||||
config,
|
|
||||||
nixosConfig,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
# Here goes the stuff that will only be enabled on the laptop
|
# Here goes the stuff that will only be enabled on the laptop
|
||||||
rec {
|
{...}: {
|
||||||
imports = [
|
imports = [
|
||||||
../../modules
|
../../modules
|
||||||
];
|
];
|
||||||
@ -42,7 +31,6 @@ rec {
|
|||||||
waybar.monitor = "eDP-1";
|
waybar.monitor = "eDP-1";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
# home.packages = with pkgs; [];
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,9 +14,25 @@ in {
|
|||||||
options.modules.chromium = import ./options.nix {inherit lib mylib;};
|
options.modules.chromium = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = with pkgs;
|
||||||
|
builtins.concatLists [
|
||||||
|
(optionals cfg.google [
|
||||||
|
google-chrome # Trash, but required for decker pdf export
|
||||||
|
|
||||||
|
# Required for some flatpak compatibility
|
||||||
|
(pkgs.writeShellScriptBin "chrome" "exec -a $0 ${google-chrome}/bin/google-chrome-stable $@")
|
||||||
|
])
|
||||||
|
];
|
||||||
|
|
||||||
programs.chromium = {
|
programs.chromium = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
commandLineArgs = [
|
||||||
|
"--ignore-gpu-blocklist"
|
||||||
|
"--use-angle=" # Prevents chromium from spamming stdout and crashing
|
||||||
|
"--ozone-platform=wayland"
|
||||||
|
];
|
||||||
|
|
||||||
# TODO: Extensions for ungoogled, see https://discourse.nixos.org/t/home-manager-ungoogled-chromium-with-extensions/15214
|
# TODO: Extensions for ungoogled, see https://discourse.nixos.org/t/home-manager-ungoogled-chromium-with-extensions/15214
|
||||||
# package = pkgs.ungoogled-chromium;
|
# package = pkgs.ungoogled-chromium;
|
||||||
|
|
||||||
|
|||||||
@ -6,4 +6,5 @@
|
|||||||
with lib;
|
with lib;
|
||||||
with mylib.modules; {
|
with mylib.modules; {
|
||||||
enable = mkEnableOpt "Chromium";
|
enable = mkEnableOpt "Chromium";
|
||||||
|
google = mkEnableOpt "Google Chrome";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,28 +1,19 @@
|
|||||||
{
|
{inputs, ...}: {
|
||||||
inputs,
|
|
||||||
config,
|
|
||||||
nixosConfig,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
mylib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
imports = [
|
||||||
./audio
|
# ./audio
|
||||||
./chromium
|
./chromium
|
||||||
./emacs
|
./emacs
|
||||||
./email
|
./email
|
||||||
./firefox
|
./firefox
|
||||||
./fish
|
./fish
|
||||||
./flatpak
|
# ./flatpak
|
||||||
./gaming
|
# ./gaming
|
||||||
./helix
|
./helix
|
||||||
./hyprland
|
./hyprland
|
||||||
./kitty
|
./kitty
|
||||||
./lazyvim
|
# ./misc
|
||||||
./misc
|
|
||||||
./neovim
|
./neovim
|
||||||
./nextcloud
|
# ./nextcloud
|
||||||
./nnn
|
./nnn
|
||||||
./ranger
|
./ranger
|
||||||
./rofi
|
./rofi
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
# Example: https://beb.ninja/post/email/
|
# Example: https://beb.ninja/post/email/
|
||||||
# Example: https://sbr.pm/configurations/mails.html
|
# Example: https://sbr.pm/configurations/mails.html
|
||||||
|
# TODO: Protonmail-bridge
|
||||||
|
# TODO: Change to use thunderbird only
|
||||||
# NOTE: The passwords must exist in kwallet
|
# NOTE: The passwords must exist in kwallet
|
||||||
# TODO: Emacs mail config
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
nixosConfig,
|
nixosConfig,
|
||||||
|
|||||||
@ -40,19 +40,20 @@ in {
|
|||||||
|
|
||||||
(optionalAttrs cfg.vaapi {
|
(optionalAttrs cfg.vaapi {
|
||||||
# LIBVA_DRIVER_NAME = "radeonsi"; # "nvidia" for Nvidia card
|
# LIBVA_DRIVER_NAME = "radeonsi"; # "nvidia" for Nvidia card
|
||||||
LIBVA_DRIVER_NAME = "nvidia";
|
# LIBVA_DRIVER_NAME = "nvidia"; # Specified in hardware-configuration
|
||||||
MOZ_DISABLE_RDD_SANDBOX = 1;
|
MOZ_DISABLE_RDD_SANDBOX = 1;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
xdg.desktopEntries.firefox-private = {
|
# Not required with rofi -drun-show-actions
|
||||||
name = "Firefox (Incognito)";
|
# xdg.desktopEntries.firefox-private = {
|
||||||
genericName = "Private web browser";
|
# name = "Firefox (Incognito)";
|
||||||
icon = "firefox";
|
# genericName = "Private web browser";
|
||||||
exec = "firefox --private-window %U";
|
# icon = "firefox";
|
||||||
terminal = false;
|
# exec = "firefox --private-window %U";
|
||||||
categories = ["Network" "WebBrowser"];
|
# terminal = false;
|
||||||
};
|
# categories = ["Network" "WebBrowser"];
|
||||||
|
# };
|
||||||
|
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -158,13 +159,15 @@ in {
|
|||||||
# TODO: Disable and check if it works by default
|
# TODO: Disable and check if it works by default
|
||||||
# "gfx.canvas.accelerated" = true; # Default value
|
# "gfx.canvas.accelerated" = true; # Default value
|
||||||
# "gfx.webrender.enabled" = true; # Does not exist?
|
# "gfx.webrender.enabled" = true; # Does not exist?
|
||||||
|
|
||||||
"gfx.x11-egl.force-enabled" = true;
|
"gfx.x11-egl.force-enabled" = true;
|
||||||
"layers.acceleration.force-enabled" = true;
|
"layers.acceleration.force-enabled" = true;
|
||||||
# "media.av1.enabled" = false;
|
# "media.av1.enabled" = true;
|
||||||
"media.ffmpeg.vaapi.enabled" = true;
|
"media.ffmpeg.vaapi.enabled" = true;
|
||||||
"media.hardware-video-decoding.force-enabled" = true;
|
"media.hardware-video-decoding.force-enabled" = true;
|
||||||
# "media.rdd-ffmpeg.enabled" = true; # Default value
|
# "media.rdd-ffmpeg.enabled" = true; # Default value
|
||||||
# "widget.dmabuf.force-enabled" = true;
|
# "widget.dmabuf.force-enabled" = true;
|
||||||
|
|
||||||
# "widget.wayland-dmabuf-vaapi.enabled" = true; # Does not exist?
|
# "widget.wayland-dmabuf-vaapi.enabled" = true; # Does not exist?
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -137,8 +137,8 @@ in {
|
|||||||
blk = batify "lsblk -o NAME,LABEL,UUID,FSTYPE,SIZE,FSUSE%,MOUNTPOINT,MODEL";
|
blk = batify "lsblk -o NAME,LABEL,UUID,FSTYPE,SIZE,FSUSE%,MOUNTPOINT,MODEL";
|
||||||
grep = "grep --color=auto -E"; # grep with extended regex
|
grep = "grep --color=auto -E"; # grep with extended regex
|
||||||
watch = "watch -d -c -n 0.5";
|
watch = "watch -d -c -n 0.5";
|
||||||
n = "nnncd -a -e"; # Doesn't work with abbrify because I have nnn.override?
|
n = "nnncd -a"; # Doesn't work with abbrify because I have nnn.override?
|
||||||
np = "nnncd -a -P p -e";
|
np = "nnncd -a -P p";
|
||||||
ssh = "kitty +kitten ssh";
|
ssh = "kitty +kitten ssh";
|
||||||
|
|
||||||
# systemd
|
# systemd
|
||||||
@ -153,8 +153,10 @@ in {
|
|||||||
msusenet = "sudo mount.nfs4 192.168.86.20:/mnt/WD\\ Blue\\ Stripe\\ 2T/Usenet /media/Stash-Usenet";
|
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";
|
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";
|
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";
|
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";
|
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";
|
musenet = "sudo mount.nfs4 192.168.86.20:/mnt/SG\\ Exos\\ Mirror\\ 18TB/Usenet /media/Usenet";
|
||||||
|
|
||||||
# disassemble
|
# disassemble
|
||||||
@ -205,7 +207,7 @@ in {
|
|||||||
})
|
})
|
||||||
(abbrify pkgs.ranger {r = "ranger --choosedir=$HOME/.rangerdir; set LASTDIR (cat $HOME/.rangerdir); cd $LASTDIR";})
|
(abbrify pkgs.ranger {r = "ranger --choosedir=$HOME/.rangerdir; set LASTDIR (cat $HOME/.rangerdir); cd $LASTDIR";})
|
||||||
(abbrify pkgs.rsync {
|
(abbrify pkgs.rsync {
|
||||||
cp = "rsync -ahv --inplace --partial --info=progress2";
|
# cp = "rsync -ahv --inplace --partial --info=progress2";
|
||||||
rsync = "rsync -ahv --inplace --partial --info=progress2";
|
rsync = "rsync -ahv --inplace --partial --info=progress2";
|
||||||
})
|
})
|
||||||
(abbrify pkgs.sd {sed = "sd";})
|
(abbrify pkgs.sd {sed = "sd";})
|
||||||
|
|||||||
@ -15,6 +15,11 @@ in {
|
|||||||
options.modules.helix = import ./options.nix {inherit lib mylib;};
|
options.modules.helix = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
home.sessionVariables = {
|
||||||
|
EDITOR = "hx";
|
||||||
|
VISUAL = "hx";
|
||||||
|
};
|
||||||
|
|
||||||
programs.helix = {
|
programs.helix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
# TODO: The keys to reset the workspaces need to depend on actual workspace config
|
# 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: 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,
|
config,
|
||||||
nixosConfig,
|
nixosConfig,
|
||||||
@ -26,34 +27,6 @@ in {
|
|||||||
iconTheme.name = "Papirus";
|
iconTheme.name = "Papirus";
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO: catppuccin-cursors
|
|
||||||
home.pointerCursor = {
|
|
||||||
gtk.enable = true;
|
|
||||||
x11.enable = true;
|
|
||||||
package = pkgs.bibata-cursors;
|
|
||||||
name = "Bibata-Modern-Classic";
|
|
||||||
# package = pkgs.catppuccin-cursors.latteMauve;
|
|
||||||
# name = "Catppuccin-Latte-Mauve-Cursors";
|
|
||||||
size = 16;
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
hyprpaper # Wallpaper setter
|
|
||||||
hyprpicker # Color picker
|
|
||||||
|
|
||||||
wl-clipboard
|
|
||||||
clipman # Clipboard manager (wl-paste)
|
|
||||||
|
|
||||||
moc # Audio player
|
|
||||||
ncpamixer # ncurses pavucontrol
|
|
||||||
slurp # Region selector for screensharing
|
|
||||||
grim # Grab images from compositor
|
|
||||||
|
|
||||||
xfce.thunar
|
|
||||||
xfce.tumbler # Thunar thumbnails
|
|
||||||
libsForQt5.polkit-kde-agent
|
|
||||||
];
|
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
imv = {
|
imv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -102,155 +75,196 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionVariables = {
|
home = {
|
||||||
};
|
# TODO: catppuccin-cursors
|
||||||
|
pointerCursor = {
|
||||||
#
|
gtk.enable = true;
|
||||||
# Generate many individual config files from the options
|
x11.enable = true;
|
||||||
#
|
package = pkgs.bibata-cursors;
|
||||||
|
name = "Bibata-Modern-Classic";
|
||||||
# Polkit
|
# package = pkgs.catppuccin-cursors.latteMauve;
|
||||||
home.file.".config/hypr/polkit.conf".text = ''
|
# name = "Catppuccin-Latte-Mauve-Cursors";
|
||||||
exec-once = ${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1
|
size = 16;
|
||||||
'';
|
|
||||||
|
|
||||||
# Monitors for different systems
|
|
||||||
home.file.".config/hypr/monitors.conf".text = let
|
|
||||||
mkMonitor = name: conf: "monitor = ${name}, ${toString conf.width}x${toString conf.height}@${toString conf.rate}, ${toString conf.x}x${toString conf.y}, ${toString conf.scale}";
|
|
||||||
in
|
|
||||||
lib.pipe cfg.monitors [
|
|
||||||
(builtins.mapAttrs mkMonitor)
|
|
||||||
builtins.attrValues
|
|
||||||
(builtins.concatStringsSep "\n")
|
|
||||||
];
|
|
||||||
|
|
||||||
# Bind workspaces to monitors
|
|
||||||
home.file.".config/hypr/workspaces.conf".text = let
|
|
||||||
mkWorkspace = monitor: workspace: "workspace = ${toString workspace}, monitor:${toString monitor}";
|
|
||||||
mkWorkspaces = monitor: workspace-list: map (mkWorkspace monitor) workspace-list;
|
|
||||||
in
|
|
||||||
lib.pipe cfg.workspaces [
|
|
||||||
(builtins.mapAttrs mkWorkspaces)
|
|
||||||
builtins.attrValues
|
|
||||||
builtins.concatLists
|
|
||||||
(builtins.concatStringsSep "\n")
|
|
||||||
];
|
|
||||||
|
|
||||||
# Keybindings
|
|
||||||
home.file.".config/hypr/keybindings.conf".text = let
|
|
||||||
always-bind = {
|
|
||||||
# Hyprland control
|
|
||||||
"$mainMod, Q" = ["killactive"];
|
|
||||||
"$mainMod, V" = ["togglefloating"];
|
|
||||||
"$mainMod, F" = ["fullscreen"];
|
|
||||||
"$mainMod, C" = ["exec, clipman pick --tool=rofi"];
|
|
||||||
"$mainMod, G" = ["togglegroup"];
|
|
||||||
"ALT, tab" = ["changegroupactive"];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
mkBind = key: action: "bind = ${key}, ${action}";
|
packages = with pkgs; [
|
||||||
mkBinds = key: actions: builtins.map (mkBind key) actions;
|
hyprpaper # Wallpaper setter
|
||||||
binds = lib.pipe (lib.mergeAttrs cfg.keybindings.bindings always-bind) [
|
hyprpicker # Color picker
|
||||||
(builtins.mapAttrs mkBinds)
|
|
||||||
builtins.attrValues
|
|
||||||
builtins.concatLists
|
|
||||||
(builtins.concatStringsSep "\n")
|
|
||||||
];
|
|
||||||
in ''
|
|
||||||
$mainMod = ${cfg.keybindings.main-mod}
|
|
||||||
${binds}
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Autostart applications
|
wl-clipboard
|
||||||
home.file.".config/hypr/autostart.conf".text = let
|
clipman # Clipboard manager (wl-paste)
|
||||||
# Stuff that is not negotiable
|
libnotify
|
||||||
always-exec = [
|
inotifyTools # inotifywait etc.
|
||||||
"dunst" # Notifications
|
|
||||||
"hyprpaper"
|
moc # Audio player
|
||||||
"wl-paste -t text --watch clipman store --no-persist"
|
ncpamixer # ncurses pavucontrol
|
||||||
"wl-paste -p -t text --watch clipman store -P --histpath=\"~/.local/share/clipman-primary.json\""
|
slurp # Region selector for screensharing
|
||||||
"hyprctl setcursor Bibata-Modern-Classic 16"
|
grim # Grab images from compositor
|
||||||
|
|
||||||
|
# xfce.thunar
|
||||||
|
# xfce.tumbler # Thunar thumbnails
|
||||||
|
libsForQt5.polkit-kde-agent
|
||||||
|
libsForQt5.qtwayland
|
||||||
|
kdePackages.qtwayland
|
||||||
];
|
];
|
||||||
|
|
||||||
mkExec = prog: "exec-once = ${prog}";
|
sessionVariables = {
|
||||||
in
|
};
|
||||||
lib.pipe (cfg.autostart ++ always-exec) [
|
|
||||||
(builtins.map mkExec)
|
|
||||||
(builtins.concatStringsSep "\n")
|
|
||||||
];
|
|
||||||
|
|
||||||
# Assign windows to workspaces
|
#
|
||||||
home.file.".config/hypr/workspacerules.conf".text = let
|
# Generate many individual config files from the options
|
||||||
mkWorkspaceRule = workspace: class: "windowrulev2 = workspace ${workspace}, class:^(${class})$";
|
#
|
||||||
mkWorkspaceRules = workspace: class-list: map (mkWorkspaceRule workspace) class-list;
|
|
||||||
in
|
|
||||||
lib.pipe cfg.workspacerules [
|
|
||||||
(builtins.mapAttrs mkWorkspaceRules)
|
|
||||||
builtins.attrValues
|
|
||||||
builtins.concatLists
|
|
||||||
(builtins.concatStringsSep "\n")
|
|
||||||
];
|
|
||||||
|
|
||||||
# Make windows float
|
file = {
|
||||||
home.file.".config/hypr/floatingrules.conf".text = let
|
# Polkit
|
||||||
mkFloatingRule = attrs:
|
".config/hypr/polkit.conf".text = ''
|
||||||
"windowrulev2 = float"
|
exec-once = ${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1
|
||||||
+ (lib.optionalString (builtins.hasAttr "class" attrs) ", class:^(${attrs.class})$")
|
'';
|
||||||
+ (lib.optionalString (builtins.hasAttr "title" attrs) ", title:^(${attrs.title})$");
|
|
||||||
in
|
|
||||||
lib.pipe cfg.floating [
|
|
||||||
(builtins.map mkFloatingRule)
|
|
||||||
(builtins.concatStringsSep "\n")
|
|
||||||
];
|
|
||||||
|
|
||||||
# Make windows translucent
|
# Monitors for different systems
|
||||||
home.file.".config/hypr/translucentrules.conf".text = let
|
".config/hypr/monitors.conf".text = let
|
||||||
opacity = 0.8;
|
mkMonitor = name: conf: "monitor = ${name}, ${toString conf.width}x${toString conf.height}@${toString conf.rate}, ${toString conf.x}x${toString conf.y}, ${toString conf.scale}";
|
||||||
mkTranslucentRule = class: "windowrulev2 = opacity ${toString opacity} ${toString opacity}, class:^(${class})$";
|
in
|
||||||
in
|
lib.pipe cfg.monitors [
|
||||||
lib.pipe cfg.transparent [
|
(builtins.mapAttrs mkMonitor)
|
||||||
(builtins.map mkTranslucentRule)
|
builtins.attrValues
|
||||||
(builtins.concatStringsSep "\n")
|
(builtins.concatStringsSep "\n")
|
||||||
];
|
];
|
||||||
|
|
||||||
# Set wallpaper for each configured monitor
|
# Bind workspaces to monitors
|
||||||
home.file.".config/hypr/hyprpaper.conf".text = let
|
".config/hypr/workspaces.conf".text = let
|
||||||
mkWallpaper = monitor: "wallpaper = ${monitor}, ${config.home.homeDirectory}/NixFlake/wallpapers/${cfg.theme}.png";
|
mkWorkspace = monitor: workspace: "workspace = ${toString workspace}, monitor:${toString monitor}";
|
||||||
wallpapers = lib.pipe cfg.monitors [
|
mkWorkspaces = monitor: workspace-list: map (mkWorkspace monitor) workspace-list;
|
||||||
builtins.attrNames
|
in
|
||||||
(builtins.map mkWallpaper)
|
lib.pipe cfg.workspaces [
|
||||||
(builtins.concatStringsSep "\n")
|
(builtins.mapAttrs mkWorkspaces)
|
||||||
];
|
builtins.attrValues
|
||||||
in ''
|
builtins.concatLists
|
||||||
preload = ~/NixFlake/wallpapers/${cfg.theme}.png
|
(builtins.concatStringsSep "\n")
|
||||||
${wallpapers}
|
];
|
||||||
'';
|
|
||||||
|
|
||||||
# Keyboard layout
|
# Keybindings
|
||||||
home.file.".config/hypr/input.conf".text = ''
|
".config/hypr/keybindings.conf".text = let
|
||||||
input {
|
always-bind = {
|
||||||
kb_layout = ${cfg.kb-layout}
|
# Hyprland control
|
||||||
kb_variant = ${cfg.kb-variant}
|
"$mainMod, Q" = ["killactive"];
|
||||||
kb_model = pc104
|
"$mainMod, V" = ["togglefloating"];
|
||||||
kb_options =
|
"$mainMod, F" = ["fullscreen"];
|
||||||
kb_rules =
|
"$mainMod, C" = ["exec, clipman pick --tool=rofi"];
|
||||||
|
"$mainMod, G" = ["togglegroup"];
|
||||||
|
"ALT, tab" = ["changegroupactive"];
|
||||||
|
};
|
||||||
|
|
||||||
follow_mouse = 1
|
mkBind = key: action: "bind = ${key}, ${action}";
|
||||||
|
mkBinds = key: actions: builtins.map (mkBind key) actions;
|
||||||
|
binds = lib.pipe (lib.mergeAttrs cfg.keybindings.bindings always-bind) [
|
||||||
|
(builtins.mapAttrs mkBinds)
|
||||||
|
builtins.attrValues
|
||||||
|
builtins.concatLists
|
||||||
|
(builtins.concatStringsSep "\n")
|
||||||
|
];
|
||||||
|
in ''
|
||||||
|
$mainMod = ${cfg.keybindings.main-mod}
|
||||||
|
${binds}
|
||||||
|
'';
|
||||||
|
|
||||||
touchpad {
|
# Autostart applications
|
||||||
natural_scroll = no
|
".config/hypr/autostart.conf".text = let
|
||||||
|
# Stuff that is not negotiable
|
||||||
|
always-exec = [
|
||||||
|
"dunst" # Notifications
|
||||||
|
"hyprpaper"
|
||||||
|
"wl-paste -t text --watch clipman store --no-persist"
|
||||||
|
"wl-paste -p -t text --watch clipman store -P --histpath=\"~/.local/share/clipman-primary.json\""
|
||||||
|
"hyprctl setcursor Bibata-Modern-Classic 16"
|
||||||
|
];
|
||||||
|
|
||||||
|
# NOTE: The sleep is a hack for tray icons, they need to be launched after waybar
|
||||||
|
sleepTime = 5;
|
||||||
|
mkDelayedStart = str: "hyprctl dispatch exec \"sleep ${builtins.toString sleepTime}s && ${str}\"";
|
||||||
|
delayed-exec = builtins.map mkDelayedStart cfg.autostart.delayed;
|
||||||
|
|
||||||
|
mkExec = prog: "exec-once = ${prog}";
|
||||||
|
in
|
||||||
|
lib.pipe (always-exec ++ cfg.autostart.immediate ++ delayed-exec) [
|
||||||
|
(builtins.map mkExec)
|
||||||
|
(builtins.concatStringsSep "\n")
|
||||||
|
];
|
||||||
|
|
||||||
|
# Assign windows to workspaces
|
||||||
|
".config/hypr/workspacerules.conf".text = let
|
||||||
|
mkWorkspaceRule = workspace: class: "windowrulev2 = workspace ${workspace}, class:^(${class})$";
|
||||||
|
mkWorkspaceRules = workspace: class-list: builtins.map (mkWorkspaceRule workspace) class-list;
|
||||||
|
in
|
||||||
|
lib.pipe cfg.workspacerules [
|
||||||
|
(builtins.mapAttrs mkWorkspaceRules)
|
||||||
|
builtins.attrValues
|
||||||
|
builtins.concatLists
|
||||||
|
(builtins.concatStringsSep "\n")
|
||||||
|
];
|
||||||
|
|
||||||
|
# Make windows float
|
||||||
|
".config/hypr/floatingrules.conf".text = let
|
||||||
|
mkFloatingRule = attrs:
|
||||||
|
"windowrulev2 = float"
|
||||||
|
+ (lib.optionalString (builtins.hasAttr "class" attrs) ", class:^(${attrs.class})$")
|
||||||
|
+ (lib.optionalString (builtins.hasAttr "title" attrs) ", title:^(${attrs.title})$");
|
||||||
|
in
|
||||||
|
lib.pipe cfg.floating [
|
||||||
|
(builtins.map mkFloatingRule)
|
||||||
|
(builtins.concatStringsSep "\n")
|
||||||
|
];
|
||||||
|
|
||||||
|
# Make windows translucent
|
||||||
|
".config/hypr/translucentrules.conf".text = let
|
||||||
|
opacity = 0.8;
|
||||||
|
mkTranslucentRule = class: "windowrulev2 = opacity ${toString opacity} ${toString opacity}, class:^(${class})$";
|
||||||
|
in
|
||||||
|
lib.pipe cfg.transparent [
|
||||||
|
(builtins.map mkTranslucentRule)
|
||||||
|
(builtins.concatStringsSep "\n")
|
||||||
|
];
|
||||||
|
|
||||||
|
# Set wallpaper for each configured monitor
|
||||||
|
".config/hypr/hyprpaper.conf".text = let
|
||||||
|
mkWallpaper = monitor: "wallpaper = ${monitor}, ${config.home.homeDirectory}/NixFlake/wallpapers/${cfg.theme}.png";
|
||||||
|
wallpapers = lib.pipe cfg.monitors [
|
||||||
|
builtins.attrNames
|
||||||
|
(builtins.map mkWallpaper)
|
||||||
|
(builtins.concatStringsSep "\n")
|
||||||
|
];
|
||||||
|
in ''
|
||||||
|
preload = ~/NixFlake/wallpapers/${cfg.theme}.png
|
||||||
|
${wallpapers}
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Keyboard layout
|
||||||
|
".config/hypr/input.conf".text = ''
|
||||||
|
input {
|
||||||
|
kb_layout = ${cfg.kb-layout}
|
||||||
|
kb_variant = ${cfg.kb-variant}
|
||||||
|
kb_model = pc104
|
||||||
|
kb_options =
|
||||||
|
kb_rules =
|
||||||
|
|
||||||
|
follow_mouse = 1
|
||||||
|
|
||||||
|
touchpad {
|
||||||
|
natural_scroll = no
|
||||||
|
}
|
||||||
|
|
||||||
|
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||||
}
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
activation = {
|
||||||
}
|
# TODO: Don't symlink at all, why not just tell Hyprland where the config is? Much easier
|
||||||
'';
|
# NOTE: Keep the hyprland config symlinked, to allow easy changes with hotreload
|
||||||
|
linkHyprlandConfig =
|
||||||
home.activation = {
|
lib.hm.dag.entryAfter ["writeBoundary"]
|
||||||
# NOTE: Keep the hyprland config symlinked, to allow easy changes with hotreload
|
(mylib.modules.mkLink "~/NixFlake/config/hyprland/hyprland.conf" "~/.config/hypr/hyprland.conf");
|
||||||
# TODO: Don't symlink at all, why not just tell Hyprland where the config is? Much easier
|
};
|
||||||
linkHyprlandConfig =
|
|
||||||
lib.hm.dag.entryAfter ["writeBoundary"]
|
|
||||||
(mylib.modules.mkLink "~/NixFlake/config/hyprland/hyprland.conf" "~/.config/hypr/hyprland.conf");
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,15 +53,27 @@ with mylib.modules; {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
autostart = mkOption {
|
autostart = {
|
||||||
type = types.listOf types.str;
|
immediate = mkOption {
|
||||||
description = "Programs to launch when Hyprland starts";
|
type = types.listOf types.str;
|
||||||
example = ''
|
description = "Programs to launch when Hyprland starts";
|
||||||
[
|
example = ''
|
||||||
"keepassxc"
|
[
|
||||||
"nextcloud --background"
|
"kitty"
|
||||||
]
|
]
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
delayed = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
description = "Programs to launch with a delay when Hyprland starts (e.g. to wait for the waybar tray)";
|
||||||
|
example = ''
|
||||||
|
[
|
||||||
|
"keepassxc"
|
||||||
|
"nextcloud --background"
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
workspacerules = mkOption {
|
workspacerules = mkOption {
|
||||||
|
|||||||
@ -1,191 +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 {
|
|
||||||
# TODO: Configure by option
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "nvim";
|
|
||||||
VISUAL = "nvim";
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
(pkgs.ripgrep.override {withPCRE2 = true;})
|
|
||||||
|
|
||||||
# Linters
|
|
||||||
vale
|
|
||||||
|
|
||||||
# Formatters
|
|
||||||
alejandra # nix
|
|
||||||
jq # json
|
|
||||||
html-tidy # html
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.nixvim = {
|
|
||||||
enable = true;
|
|
||||||
defaultEditor = true;
|
|
||||||
enableMan = true;
|
|
||||||
colorschemes.catppuccin.enable = true;
|
|
||||||
|
|
||||||
opts = {
|
|
||||||
ruler = true; # Show cursor position in status line
|
|
||||||
number = true;
|
|
||||||
relativenumber = false;
|
|
||||||
showmode = false; # Status line already shows this
|
|
||||||
backspace = ["indent" "eol" "start"];
|
|
||||||
undofile = true;
|
|
||||||
undodir = "/home/christoph/.vim/undo"; # TODO: Use username variable
|
|
||||||
encoding = "utf-8";
|
|
||||||
|
|
||||||
# Search
|
|
||||||
incsearch = true; # Already highlight results while typing
|
|
||||||
hlsearch = true;
|
|
||||||
ignorecase = true;
|
|
||||||
laststatus = 2;
|
|
||||||
hidden = true; # Don't unload buffers immediately
|
|
||||||
|
|
||||||
# Indentation
|
|
||||||
autoindent = true;
|
|
||||||
expandtab = true;
|
|
||||||
smartindent = true;
|
|
||||||
smarttab = true;
|
|
||||||
shiftwidth = 4;
|
|
||||||
softtabstop = 4;
|
|
||||||
|
|
||||||
termguicolors = true; # For bufferline
|
|
||||||
};
|
|
||||||
|
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
|
||||||
lazy-nvim
|
|
||||||
vim-airline-themes
|
|
||||||
nvim-web-devicons
|
|
||||||
# nvim-nio # For rest
|
|
||||||
];
|
|
||||||
|
|
||||||
extraConfigLua = let
|
|
||||||
plugins = with pkgs.vimPlugins; [
|
|
||||||
# LazyVim
|
|
||||||
LazyVim
|
|
||||||
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 ''
|
|
||||||
require("lazy").setup({
|
|
||||||
defaults = {
|
|
||||||
lazy = true,
|
|
||||||
},
|
|
||||||
dev = {
|
|
||||||
-- reuse files from pkgs.vimPlugins.*
|
|
||||||
path = "${lazyPath}",
|
|
||||||
patterns = { "." },
|
|
||||||
-- fallback to download
|
|
||||||
fallback = true,
|
|
||||||
},
|
|
||||||
spec = {
|
|
||||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
|
||||||
-- The following configs are needed for fixing lazyvim on nix
|
|
||||||
-- force enable telescope-fzf-native.nvim
|
|
||||||
{ "nvim-telescope/telescope-fzf-native.nvim", enabled = true },
|
|
||||||
-- disable mason.nvim, use config.extraPackages
|
|
||||||
{ "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
|
|
||||||
{ "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
'';
|
|
||||||
|
|
||||||
viAlias = cfg.alias;
|
|
||||||
vimAlias = cfg.alias;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
mylib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib;
|
|
||||||
with mylib.modules; {
|
|
||||||
enable = mkEnableOpt "LazyVim";
|
|
||||||
alias = mkBoolOpt false "Link nvim to vim/vi";
|
|
||||||
}
|
|
||||||
@ -6,6 +6,7 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
# TODO: Remove this module, put protonmail into the email module
|
||||||
with lib;
|
with lib;
|
||||||
with mylib.modules; let
|
with mylib.modules; let
|
||||||
cfg = config.modules.misc;
|
cfg = config.modules.misc;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
53
home/modules/neovim/extraConfigLua.lua
Normal file
53
home/modules/neovim/extraConfigLua.lua
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
-- Make Lazy window border rounded
|
||||||
|
require("lazy.core.config").options.ui.border = "rounded"
|
||||||
|
require("lazy.core.config").options.rocks.enabled = false
|
||||||
|
|
||||||
|
-- Toggle inline diagnostics and show border
|
||||||
|
vim.g.enable_inline_diagnostics = false
|
||||||
|
vim.diagnostic.config({
|
||||||
|
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",
|
||||||
|
})
|
||||||
24
home/modules/neovim/extraConfigLuaPost.lua
Normal file
24
home/modules/neovim/extraConfigLuaPost.lua
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
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
|
||||||
38
home/modules/neovim/inclineNavic.lua
Normal file
38
home/modules/neovim/inclineNavic.lua
Normal 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
|
||||||
760
home/modules/neovim/mappings.nix
Normal file
760
home/modules/neovim/mappings.nix
Normal file
@ -0,0 +1,760 @@
|
|||||||
|
{...}: let
|
||||||
|
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 current 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 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";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Flash/Search
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "s";
|
||||||
|
action = "<cmd>lua require('flash').jump()<cr>";
|
||||||
|
options.desc = "Flash jump";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "S";
|
||||||
|
action = "<cmd>lua require('flash').treesitter()<cr>";
|
||||||
|
options.desc = "Flash treesitter";
|
||||||
|
}
|
||||||
|
|
||||||
|
# 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 = "Show LSP hover";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "/";
|
||||||
|
action = "<cmd>Telescope current_buffer_fuzzy_find<cr>";
|
||||||
|
options.desc = "Find in current buffer";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "v";
|
||||||
|
key = ";";
|
||||||
|
action = "<Esc>";
|
||||||
|
options.desc = "Exit visual mode";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
leader = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>L";
|
||||||
|
action = "<cmd>Lazy<cr>";
|
||||||
|
options.desc = "Show Lazy";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Already have <C-s> and <C-S-s>
|
||||||
|
# {
|
||||||
|
# mode = "n";
|
||||||
|
# key = "<leader>s";
|
||||||
|
# action = "<cmd>w<cr>";
|
||||||
|
# options.desc = "Save current buffer";
|
||||||
|
# }
|
||||||
|
# {
|
||||||
|
# mode = "n";
|
||||||
|
# key = "<leader>S";
|
||||||
|
# action = "<cmd>wa<cr>";
|
||||||
|
# options.desc = "Save all buffers";
|
||||||
|
# }
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>R";
|
||||||
|
action = "<cmd>edit!<cr>";
|
||||||
|
options.desc = "Reload current buffer";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader><Space>";
|
||||||
|
action = "<cmd>Telescope buffers<cr>";
|
||||||
|
options.desc = "Show open buffers";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>f";
|
||||||
|
action = "<cmd>Telescope find_files<cr>";
|
||||||
|
options.desc = "Find file";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>p";
|
||||||
|
action = "<cmd>Telescope projects<cr>";
|
||||||
|
options.desc = "Open project";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
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 live_grep<cr>";
|
||||||
|
options.desc = "Find in working directory";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "v";
|
||||||
|
key = "<leader>n";
|
||||||
|
action = ":NR!<cr>";
|
||||||
|
options.desc = "Narrow region";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>N";
|
||||||
|
action = "<cmd>Telescope notify<cr>";
|
||||||
|
options.desc = "Show notify history";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
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";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>T";
|
||||||
|
action = "<cmd>TodoTelescope<cr>";
|
||||||
|
options.desc = "Show TODOs";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
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 = "Quit forcefully";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
leader-session = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>s";
|
||||||
|
action = "+session";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>sl";
|
||||||
|
action = "<cmd>Telescope persisted<cr>";
|
||||||
|
options.desc = "Restore session";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ss";
|
||||||
|
action = "<cmd>SessionSave<cr>";
|
||||||
|
options.desc = "Save session";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>sd";
|
||||||
|
action = "<cmd>SessionDelete<cr>";
|
||||||
|
options.desc = "Delete current session";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
leader-buffers = [
|
||||||
|
{
|
||||||
|
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";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
leader-windows = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>w";
|
||||||
|
action = "+windows";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>wd";
|
||||||
|
action = "<C-w>c";
|
||||||
|
options.desc = "Close current window";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
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>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 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";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
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 = "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>Trouble diagnostics toggle focus=false win.position=bottom<cr>";
|
||||||
|
options.desc = "Toggle Trouble diagnostics";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>tT";
|
||||||
|
action = "<cmd>Trouble todo toggle focus=false win.position=right<cr>";
|
||||||
|
options.desc = "Toggle Trouble TODOs";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ts";
|
||||||
|
action = "<cmd>Trouble symbols toggle focus=false win.position=right<cr>";
|
||||||
|
options.desc = "Toggle Trouble symbols";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>tf";
|
||||||
|
action = "<cmd>ToggleAutoformat<cr>";
|
||||||
|
options.desc = "Toggle autoformat-on-save";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>tl";
|
||||||
|
action = "<cmd>ToggleAutoLint<cr>";
|
||||||
|
options.desc = "Toggle autolint-on-save";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>tD";
|
||||||
|
action = "<cmd>ToggleInlineDiagnostics<cr>";
|
||||||
|
options.desc = "Toggle inline diagnostics";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>tw";
|
||||||
|
action = "<cmd>:set wrap!<cr>";
|
||||||
|
options.desc = "Toggle word-wrap";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>tv";
|
||||||
|
action = "<cmd>VimtexTocToggle<cr>";
|
||||||
|
options.desc = "Toggle Vimtex ToC";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
leader-git = [
|
||||||
|
{
|
||||||
|
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>Telescope git_status<cr>";
|
||||||
|
options.desc = "Show Git status";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>gl";
|
||||||
|
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";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>gd";
|
||||||
|
action = "<cmd>DiffviewOpen<cr>";
|
||||||
|
options.desc = "Show Git diff for current worktree";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
leader-lsp = [
|
||||||
|
{
|
||||||
|
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";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
leader-code = [
|
||||||
|
{
|
||||||
|
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>lua vim.diagnostic.open_float()<cr>";
|
||||||
|
options.desc = "Show LSP line diagnostics";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
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>cr";
|
||||||
|
# action = ":IncRename ";
|
||||||
|
# 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>ch";
|
||||||
|
action = "<cmd>ClangdSwitchSourceHeader<cr>";
|
||||||
|
options.desc = "Switch C/C++ source/header";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
in
|
||||||
|
builtins.concatLists [
|
||||||
|
no-leader
|
||||||
|
leader
|
||||||
|
leader-quit
|
||||||
|
leader-session
|
||||||
|
leader-buffers
|
||||||
|
leader-windows
|
||||||
|
leader-toggles
|
||||||
|
leader-git
|
||||||
|
leader-lsp
|
||||||
|
leader-code
|
||||||
|
]
|
||||||
7
home/modules/neovim/neovide_config.ini
Normal file
7
home/modules/neovim/neovide_config.ini
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fork = true # Start neovide detached
|
||||||
|
frame = "none" # full, buttonless, none
|
||||||
|
idle = true # Don't render frames without changes
|
||||||
|
title-hidden = true
|
||||||
|
tabs = false
|
||||||
|
# maximized = true
|
||||||
|
# vsync = true
|
||||||
@ -7,4 +7,5 @@ with lib;
|
|||||||
with mylib.modules; {
|
with mylib.modules; {
|
||||||
enable = mkEnableOpt "NeoVim";
|
enable = mkEnableOpt "NeoVim";
|
||||||
alias = mkBoolOpt false "Link nvim to vim/vi";
|
alias = mkBoolOpt false "Link nvim to vim/vi";
|
||||||
|
neovide = mkEnableOpt "NeoVide";
|
||||||
}
|
}
|
||||||
|
|||||||
11
home/modules/neovim/vale_config.ini
Normal file
11
home/modules/neovim/vale_config.ini
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# 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.
|
||||||
68
home/modules/neovim/vim_opts.nix
Normal file
68
home/modules/neovim/vim_opts.nix
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
{
|
||||||
|
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 (required for terminal persistence)
|
||||||
|
mouse = "a";
|
||||||
|
completeopt = ["menuone" "noselect" "noinsert"];
|
||||||
|
timeoutlen = 50; # Controls which-key delay
|
||||||
|
pumheight = 0;
|
||||||
|
formatexpr = "v:lua.require('conform').formatexpr()";
|
||||||
|
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"; # Always show to reduce window jumping
|
||||||
|
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";
|
||||||
|
undolevels = 10000;
|
||||||
|
# autochdir = true;
|
||||||
|
confirm = 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;
|
||||||
|
}
|
||||||
@ -1,5 +1,6 @@
|
|||||||
# Changed from https://github.com/nix-community/home-manager/blob/master/modules/services/nextcloud-client.nix
|
# 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
|
# 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
|
# 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...
|
# Nextcloud immediately crashes on start, autostart isn't working either...
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,8 +16,11 @@ in {
|
|||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
# NNN_TERMINAL = "alacritty";
|
# NNN_TERMINAL = "alacritty";
|
||||||
NNN_PAGER = "bat";
|
|
||||||
# NNN_FIFO = "/tmp/nnn.fifo"; # For nnn preview
|
# NNN_FIFO = "/tmp/nnn.fifo"; # For nnn preview
|
||||||
|
|
||||||
|
NNN_PAGER = "bat";
|
||||||
|
NNN_OPENER = "xdg-open";
|
||||||
|
NNN_ARCHIVE = "\\.(7z|a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|rar|rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)$";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.nnn = {
|
programs.nnn = {
|
||||||
@ -33,26 +36,27 @@ in {
|
|||||||
];
|
];
|
||||||
|
|
||||||
bookmarks = {
|
bookmarks = {
|
||||||
|
b = "~/";
|
||||||
c = "~/.config";
|
c = "~/.config";
|
||||||
d = "~/Documents";
|
d = "~/Documents";
|
||||||
D = "~/Downloads";
|
D = "~/Downloads";
|
||||||
h = "~/Notes/HHU";
|
# h = "~/Notes/HHU";
|
||||||
l = "~/Local";
|
# l = "~/Local";
|
||||||
m = "~/Mount";
|
# m = "~/Mount";
|
||||||
n = "~/Notes";
|
# n = "~/Notes";
|
||||||
N = "~/NixFlake";
|
N = "~/NixFlake";
|
||||||
p = "~/Pictures";
|
# p = "~/Pictures";
|
||||||
t = "~/Notes/TU";
|
t = "~/Notes/TU";
|
||||||
v = "~/Videos";
|
# v = "~/Videos";
|
||||||
};
|
};
|
||||||
|
|
||||||
plugins = {
|
plugins = {
|
||||||
mappings = {
|
mappings = {
|
||||||
c = "fzcd";
|
c = "fzcd";
|
||||||
d = "dragdrop";
|
d = "dragdrop";
|
||||||
f = "finder";
|
# f = "finder";
|
||||||
j = "autojump";
|
j = "autojump";
|
||||||
k = "kdeconnect";
|
# k = "kdeconnect";
|
||||||
p = "preview-tui";
|
p = "preview-tui";
|
||||||
# s = "suedit";
|
# s = "suedit";
|
||||||
# s = "x2sel";
|
# s = "x2sel";
|
||||||
@ -63,8 +67,8 @@ in {
|
|||||||
(pkgs.fetchFromGitHub {
|
(pkgs.fetchFromGitHub {
|
||||||
owner = "jarun";
|
owner = "jarun";
|
||||||
repo = "nnn";
|
repo = "nnn";
|
||||||
rev = "26d5b5c6141f0424869db8ca47e1d370f7b898d5";
|
rev = "33126ee813ed92726aa66295b9771ffe93e7ff0a";
|
||||||
sha256 = "sha256-a2Fq17mS/m7wRvPc1EkUun198SoeRZtJEABGjPWW+6E=";
|
sha256 = "sha256-g19uI36HyzTF2YUQKFP4DE2ZBsArGryVHhX79Y0XzhU=";
|
||||||
})
|
})
|
||||||
+ "/plugins";
|
+ "/plugins";
|
||||||
};
|
};
|
||||||
|
|||||||
@ -29,7 +29,7 @@ in {
|
|||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
bindings = {
|
bindings = {
|
||||||
"$mainMod, A" = ["exec, rofi -show drun"];
|
"$mainMod, A" = ["exec, rofi -drun-show-actions -show drun"];
|
||||||
"$mainMod, escape" = ["exec, \"${power-menu}\""];
|
"$mainMod, escape" = ["exec, \"${power-menu}\""];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
# - It should especially be possible to set styling programatically, for themes
|
# - It should especially be possible to set styling programatically, for themes
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
nixosConfig,
|
|
||||||
lib,
|
lib,
|
||||||
mylib,
|
mylib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -14,65 +13,67 @@ with mylib.modules; let
|
|||||||
in {
|
in {
|
||||||
options.modules.waybar = import ./options.nix {inherit lib mylib;};
|
options.modules.waybar = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
config = let
|
/*
|
||||||
|
config = let
|
||||||
# Taken from https://github.com/Ruixi-rebirth/flakes/blob/main/modules/programs/wayland/waybar/workspace-patch.nix
|
# Taken from https://github.com/Ruixi-rebirth/flakes/blob/main/modules/programs/wayland/waybar/workspace-patch.nix
|
||||||
# hyprctl = "${pkgs.hyprland}/bin/hyprctl";
|
hyprctl = "${pkgs.hyprland}/bin/hyprctl";
|
||||||
# workspaces-patch = pkgs.writeTextFile {
|
workspaces-patch = pkgs.writeTextFile {
|
||||||
# name = "waybar-hyprctl.diff";
|
name = "waybar-hyprctl.diff";
|
||||||
# text = ''
|
text = ''
|
||||||
# diff --git a/src/modules/wlr/workspace_manager.cpp b/src/modules/wlr/workspace_manager.cpp
|
diff --git a/src/modules/wlr/workspace_manager.cpp b/src/modules/wlr/workspace_manager.cpp
|
||||||
# index 6a496e6..a689be0 100644
|
index 6a496e6..a689be0 100644
|
||||||
# --- a/src/modules/wlr/workspace_manager.cpp
|
--- a/src/modules/wlr/workspace_manager.cpp
|
||||||
# +++ b/src/modules/wlr/workspace_manager.cpp
|
+++ b/src/modules/wlr/workspace_manager.cpp
|
||||||
# @@ -511,7 +511,9 @@ auto Workspace::handle_clicked(GdkEventButton *bt) -> bool {
|
@@ -511,7 +511,9 @@ auto Workspace::handle_clicked(GdkEventButton *bt) -> bool {
|
||||||
# if (action.empty())
|
if (action.empty())
|
||||||
# return true;
|
return true;
|
||||||
# else if (action == "activate") {
|
else if (action == "activate") {
|
||||||
# - zext_workspace_handle_v1_activate(workspace_handle_);
|
- zext_workspace_handle_v1_activate(workspace_handle_);
|
||||||
# + // zext_workspace_handle_v1_activate(workspace_handle_);
|
+ // zext_workspace_handle_v1_activate(workspace_handle_);
|
||||||
# + const std::string command = "${hyprctl} dispatch workspace " + name_;
|
+ const std::string command = "${hyprctl} dispatch workspace " + name_;
|
||||||
# + system(command.c_str());
|
+ system(command.c_str());
|
||||||
# } else if (action == "close") {
|
} else if (action == "close") {
|
||||||
# zext_workspace_handle_v1_remove(workspace_handle_);
|
zext_workspace_handle_v1_remove(workspace_handle_);
|
||||||
# } else {
|
} else {
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
# waybar-hyprland = pkgs.waybar.overrideAttrs (oldAttrs: {
|
|
||||||
# mesonFlags = oldAttrs.mesonFlags ++ ["-Dexperimental=true"];
|
|
||||||
# patches = (oldAttrs.patches or []) ++ [workspaces-patch];
|
|
||||||
# });
|
|
||||||
in
|
|
||||||
mkIf cfg.enable {
|
|
||||||
programs.waybar = {
|
|
||||||
enable = true;
|
|
||||||
# package = waybar-hyprland;
|
|
||||||
package = pkgs.waybar;
|
|
||||||
|
|
||||||
systemd = {
|
|
||||||
enable = false; # Gets started by hyprland
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
modules.hyprland.autostart = let
|
|
||||||
waybar-reload = pkgs.writeScript "waybar-reload" ''
|
|
||||||
#! ${pkgs.bash}/bin/bash
|
|
||||||
|
|
||||||
trap "${pkgs.procps}/bin/pkill waybar" EXIT
|
|
||||||
|
|
||||||
while true; do
|
|
||||||
${pkgs.waybar}/bin/waybar -c $HOME/NixFlake/config/waybar/config.json -s $HOME/NixFlake/config/waybar/style.css &
|
|
||||||
${pkgs.inotifyTools}/bin/inotifywait -e create,modify $HOME/NixFlake/config/waybar/config.json $HOME/NixFlake/config/waybar/style.css
|
|
||||||
${pkgs.procps}/bin/pkill waybar
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
in [
|
|
||||||
"${waybar-reload}"
|
|
||||||
];
|
|
||||||
|
|
||||||
home.file.".config/waybar/monitor.json".text = ''
|
|
||||||
{
|
|
||||||
"output": "${cfg.monitor}"
|
|
||||||
}
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
waybar-hyprland = pkgs.waybar.overrideAttrs (oldAttrs: {
|
||||||
|
mesonFlags = oldAttrs.mesonFlags ++ ["-Dexperimental=true"];
|
||||||
|
patches = (oldAttrs.patches or []) ++ [workspaces-patch];
|
||||||
|
});
|
||||||
|
in
|
||||||
|
*/
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
# package = waybar-hyprland;
|
||||||
|
package = pkgs.waybar;
|
||||||
|
|
||||||
|
systemd = {
|
||||||
|
enable = false; # Gets started by hyprland
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
modules.hyprland.autostart.immediate = let
|
||||||
|
waybar-reload = pkgs.writeScript "waybar-reload" ''
|
||||||
|
#! ${pkgs.bash}/bin/bash
|
||||||
|
|
||||||
|
trap "${pkgs.procps}/bin/pkill waybar" EXIT
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
${pkgs.waybar}/bin/waybar -c $HOME/NixFlake/config/waybar/config.json -s $HOME/NixFlake/config/waybar/style.css &
|
||||||
|
${pkgs.inotifyTools}/bin/inotifywait -e create,modify $HOME/NixFlake/config/waybar/config.json $HOME/NixFlake/config/waybar/style.css
|
||||||
|
${pkgs.procps}/bin/pkill waybar
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
in [
|
||||||
|
"${waybar-reload}"
|
||||||
|
];
|
||||||
|
|
||||||
|
home.file.".config/waybar/monitor.json".text = ''
|
||||||
|
{
|
||||||
|
"output": "${cfg.monitor}"
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,4 +9,5 @@
|
|||||||
networking = import ./networking.nix {inherit inputs pkgs lib;};
|
networking = import ./networking.nix {inherit inputs pkgs lib;};
|
||||||
virtualisation = import ./virtualisation.nix {inherit inputs pkgs lib;};
|
virtualisation = import ./virtualisation.nix {inherit inputs pkgs lib;};
|
||||||
rofi = import ./rofi.nix {inherit inputs pkgs lib;};
|
rofi = import ./rofi.nix {inherit inputs pkgs lib;};
|
||||||
|
generators = import ./generators.nix {inherit inputs pkgs lib;};
|
||||||
}
|
}
|
||||||
|
|||||||
49
lib/generators.nix
Normal file
49
lib/generators.nix
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: rec {
|
||||||
|
# NOTE: Taken from NixVim https://github.com/nix-community/nixvim/blob/main/lib/to-lua.nix
|
||||||
|
toLuaObject = args:
|
||||||
|
if builtins.isAttrs args
|
||||||
|
then
|
||||||
|
if lib.hasAttr "__raw" args
|
||||||
|
then args.__raw
|
||||||
|
else if lib.hasAttr "__empty" args
|
||||||
|
then "{ }"
|
||||||
|
else
|
||||||
|
"{"
|
||||||
|
+ (lib.concatStringsSep "," (
|
||||||
|
lib.mapAttrsToList (
|
||||||
|
n: v: let
|
||||||
|
valueString = toLuaObject v;
|
||||||
|
in
|
||||||
|
if lib.hasPrefix "__unkeyed" n
|
||||||
|
then valueString
|
||||||
|
else if lib.hasPrefix "__rawKey__" n
|
||||||
|
then ''[${lib.removePrefix "__rawKey__" n}] = '' + valueString
|
||||||
|
else if n == "__emptyString"
|
||||||
|
then "[''] = " + valueString
|
||||||
|
else "[${toLuaObject n}] = " + valueString
|
||||||
|
) (lib.filterAttrs (n: v: v != null && (toLuaObject v != "{}")) args)
|
||||||
|
))
|
||||||
|
+ "}"
|
||||||
|
else if builtins.isList args
|
||||||
|
then "{" + lib.concatMapStringsSep "," toLuaObject args + "}"
|
||||||
|
else if builtins.isString args
|
||||||
|
then
|
||||||
|
# This should be enough!
|
||||||
|
builtins.toJSON args
|
||||||
|
else if builtins.isPath args
|
||||||
|
then builtins.toJSON (toString args)
|
||||||
|
else if builtins.isBool args
|
||||||
|
then "${lib.boolToString args}"
|
||||||
|
else if builtins.isFloat args
|
||||||
|
then "${toString args}"
|
||||||
|
else if builtins.isInt args
|
||||||
|
then "${toString args}"
|
||||||
|
else if (args == null)
|
||||||
|
then "nil"
|
||||||
|
else "";
|
||||||
|
}
|
||||||
@ -30,7 +30,10 @@
|
|||||||
linkConfig = {
|
linkConfig = {
|
||||||
# This corresponds to the [LINK] section
|
# This corresponds to the [LINK] section
|
||||||
# RequiredForOnline = "routable";
|
# RequiredForOnline = "routable";
|
||||||
RequiredForOnline = if routable then "routable" else "no"; # Don't make nixos-rebuild wait for systemd-networkd-wait-online.service
|
RequiredForOnline =
|
||||||
|
if routable
|
||||||
|
then "routable"
|
||||||
|
else "no"; # Don't make nixos-rebuild wait for systemd-networkd-wait-online.service
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -76,7 +79,10 @@
|
|||||||
linkConfig = {
|
linkConfig = {
|
||||||
# This corresponds to the [LINK] section
|
# This corresponds to the [LINK] section
|
||||||
# RequiredForOnline = "routable";
|
# RequiredForOnline = "routable";
|
||||||
RequiredForOnline = if routable then "routable" else "no"; # Don't make nixos-rebuild wait for systemd-networkd-wait-online.service
|
RequiredForOnline =
|
||||||
|
if routable
|
||||||
|
then "routable"
|
||||||
|
else "no"; # Don't make nixos-rebuild wait for systemd-networkd-wait-online.service
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@ in {
|
|||||||
|
|
||||||
# Make our inputs available to the configuration.nix (for importing modules)
|
# Make our inputs available to the configuration.nix (for importing modules)
|
||||||
# specialArgs are propagated to all modules
|
# specialArgs are propagated to all modules
|
||||||
specialArgs = {inherit inputs hostname username mylib;};
|
specialArgs = {inherit inputs hostname username mylib system;};
|
||||||
|
|
||||||
modules = builtins.concatLists [
|
modules = builtins.concatLists [
|
||||||
[
|
[
|
||||||
|
|||||||
136
shell.nix
136
shell.nix
@ -13,16 +13,16 @@ pkgs.devshell.mkShell {
|
|||||||
# help = "Launch clion in this folder";
|
# help = "Launch clion in this folder";
|
||||||
# command = "clion ./ &>/dev/null &";
|
# command = "clion ./ &>/dev/null &";
|
||||||
# }
|
# }
|
||||||
{
|
# {
|
||||||
name = "util-watch-flatpak";
|
# name = "util-watch-flatpak";
|
||||||
help = "Show running flatpak operations";
|
# help = "Show running flatpak operations";
|
||||||
command = "watch -n 0.5 -d procs flatpak";
|
# command = "watch -n 0.5 -d procs flatpak";
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
name = "util-watch-doom";
|
# name = "util-watch-doom";
|
||||||
help = "Show running doom operations";
|
# help = "Show running doom operations";
|
||||||
command = "watch -n 0.5 -d procs doom";
|
# command = "watch -n 0.5 -d procs doom";
|
||||||
}
|
# }
|
||||||
{
|
{
|
||||||
name = "util-pkgs-sys";
|
name = "util-pkgs-sys";
|
||||||
help = "List currently installed system packages";
|
help = "List currently installed system packages";
|
||||||
@ -33,11 +33,11 @@ pkgs.devshell.mkShell {
|
|||||||
help = "List currently installed user packages";
|
help = "List currently installed user packages";
|
||||||
command = "bat ~/.local/share/current-user-packages";
|
command = "bat ~/.local/share/current-user-packages";
|
||||||
}
|
}
|
||||||
{
|
# {
|
||||||
name = "util-diff-system";
|
# name = "util-diff-system";
|
||||||
help = "Compare current system to ./result";
|
# help = "Compare current system to ./result";
|
||||||
command = "nvd diff /run/current-system result";
|
# command = "nvd diff /run/current-system result";
|
||||||
}
|
# }
|
||||||
{
|
{
|
||||||
name = "util-data-dirs";
|
name = "util-data-dirs";
|
||||||
help = "List XDG_DATA_DIRS in a readable format";
|
help = "List XDG_DATA_DIRS in a readable format";
|
||||||
@ -62,11 +62,12 @@ pkgs.devshell.mkShell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Nix Store
|
# Nix Store
|
||||||
{
|
# {
|
||||||
name = "store-gc";
|
# name = "store-gc";
|
||||||
help = "Run NixOS garbage collector";
|
# help = "Run NixOS garbage collector";
|
||||||
command = "nix-store --gc && sudo nix-collect-garbage -d && flatpak uninstall --unused";
|
# # command = "nix-store --gc && sudo nix-collect-garbage -d && flatpak uninstall --unused";
|
||||||
}
|
# command = "nh clean all";
|
||||||
|
# }
|
||||||
{
|
{
|
||||||
name = "store-optimise";
|
name = "store-optimise";
|
||||||
help = "Run NixOS store optimization (slow)";
|
help = "Run NixOS store optimization (slow)";
|
||||||
@ -79,51 +80,51 @@ pkgs.devshell.mkShell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Rebuild
|
# Rebuild
|
||||||
{
|
# {
|
||||||
name = "rebuild-switch-nixinator";
|
# name = "rebuild-switch-nixinator";
|
||||||
help = "Rebuild and activate the nixinator config";
|
# help = "Rebuild and activate the nixinator config";
|
||||||
command = "sudo nixos-rebuild switch --flake .#nixinator";
|
# command = "sudo nixos-rebuild switch --flake .#nixinator";
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
name = "rebuild-build-nixinator";
|
# name = "rebuild-build-nixinator";
|
||||||
help = "Rebuild the nixinator config (to diff systems)";
|
# help = "Rebuild the nixinator config (to diff systems)";
|
||||||
command = "sudo nixos-rebuild build --flake .#nixinator";
|
# command = "sudo nixos-rebuild build --flake .#nixinator";
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
name = "rebuild-boot-nixinator";
|
# name = "rebuild-boot-nixinator";
|
||||||
help = "Rebuild and activate config on next boot";
|
# help = "Rebuild and activate config on next boot";
|
||||||
command = "sudo nixos-rebuild boot --flake .#nixinator";
|
# command = "sudo nixos-rebuild boot --flake .#nixinator";
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
name = "rebuild-switch-nixtop";
|
# name = "rebuild-switch-nixtop";
|
||||||
help = "Rebuild and activate the nixtop config";
|
# help = "Rebuild and activate the nixtop config";
|
||||||
command = "sudo nixos-rebuild switch --flake .#nixtop";
|
# command = "sudo nixos-rebuild switch --flake .#nixtop";
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
name = "rebuild-build-nixtop";
|
# name = "rebuild-build-nixtop";
|
||||||
help = "Rebuild and diff the nixtop config (to diff systems)";
|
# help = "Rebuild and diff the nixtop config (to diff systems)";
|
||||||
command = "sudo nixos-rebuild build --flake .#nixtop";
|
# command = "sudo nixos-rebuild build --flake .#nixtop";
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
name = "rebuild-boot-nixtop";
|
# name = "rebuild-boot-nixtop";
|
||||||
help = "Rebuild and activate config on next boot";
|
# help = "Rebuild and activate config on next boot";
|
||||||
command = "sudo nixos-rebuild boot --flake .#nixtop";
|
# command = "sudo nixos-rebuild boot --flake .#nixtop";
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
name = "rebuild-switch-servenix";
|
# name = "rebuild-switch-servenix";
|
||||||
help = "Rebuild and activate the servenix config";
|
# help = "Rebuild and activate the servenix config";
|
||||||
command = "sudo nixos-rebuild switch --flake .#servenix";
|
# command = "sudo nixos-rebuild switch --flake .#servenix";
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
name = "rebuild-build-servenix";
|
# name = "rebuild-build-servenix";
|
||||||
help = "Rebuild and diff the servenix config (to diff systems)";
|
# help = "Rebuild and diff the servenix config (to diff systems)";
|
||||||
command = "sudo nixos-rebuild build --flake .#servenix";
|
# command = "sudo nixos-rebuild build --flake .#servenix";
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
name = "rebuild-boot-servenix";
|
# name = "rebuild-boot-servenix";
|
||||||
help = "Rebuild and activate config on next boot";
|
# help = "Rebuild and activate config on next boot";
|
||||||
command = "sudo nixos-rebuild boot --flake .#servenix";
|
# command = "sudo nixos-rebuild boot --flake .#servenix";
|
||||||
}
|
# }
|
||||||
|
|
||||||
# Help text (this is pretty stupid)
|
# Help text (this is pretty stupid)
|
||||||
{
|
{
|
||||||
@ -136,5 +137,10 @@ pkgs.devshell.mkShell {
|
|||||||
help = "Display the wanted dynamic libraries by a binary";
|
help = "Display the wanted dynamic libraries by a binary";
|
||||||
command = "echo 'ldd (readlink -f (which <arg>))'";
|
command = "echo 'ldd (readlink -f (which <arg>))'";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "help-closure";
|
||||||
|
help = "Display the closure of a package";
|
||||||
|
command = "echo 'nix path-info --recursive --size --closure-size --human-readable (readlink -f (which <arg>))'";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
mylib,
|
mylib,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
system,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with mylib.networking; {
|
with mylib.networking; {
|
||||||
@ -25,8 +26,8 @@ with mylib.networking; {
|
|||||||
polkit.enable = true;
|
polkit.enable = true;
|
||||||
|
|
||||||
systemd-networkd = {
|
systemd-networkd = {
|
||||||
|
inherit hostname;
|
||||||
enable = true;
|
enable = true;
|
||||||
hostname = hostname;
|
|
||||||
|
|
||||||
networks = {
|
networks = {
|
||||||
# Default wildcard ethernet network for all hosts
|
# Default wildcard ethernet network for all hosts
|
||||||
@ -69,7 +70,7 @@ with mylib.networking; {
|
|||||||
# keep-derivations = true
|
# keep-derivations = true
|
||||||
|
|
||||||
# Auto garbage-collect and optimize store
|
# Auto garbage-collect and optimize store
|
||||||
gc.automatic = true;
|
# gc.automatic = true; # NOTE: Disabled for "nh clean"
|
||||||
gc.options = "--delete-older-than 5d";
|
gc.options = "--delete-older-than 5d";
|
||||||
settings.auto-optimise-store = true;
|
settings.auto-optimise-store = true;
|
||||||
optimise.automatic = true;
|
optimise.automatic = true;
|
||||||
@ -79,21 +80,27 @@ with mylib.networking; {
|
|||||||
# as nix shell nixpkgs#name) consistent with your flake inputs.
|
# as nix shell nixpkgs#name) consistent with your flake inputs.
|
||||||
# (Registry contains flakes)
|
# (Registry contains flakes)
|
||||||
registry = lib.mapAttrs' (n: v: lib.nameValuePair n {flake = v;}) inputs;
|
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
|
# Bootloader/Kernel stuff
|
||||||
boot = {
|
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
|
# 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
|
kernelParams = ["mitigations=off"]; # I don't care about security regarding spectre/meltdown
|
||||||
|
|
||||||
# plymouth.enable = true;
|
# plymouth.enable = true;
|
||||||
loader = {
|
loader = {
|
||||||
timeout = 120;
|
timeout = 120;
|
||||||
systemd-boot.enable = true;
|
systemd-boot = {
|
||||||
systemd-boot.configurationLimit = 5;
|
enable = true;
|
||||||
systemd-boot.editor = false;
|
configurationLimit = 5;
|
||||||
systemd-boot.consoleMode = "max";
|
editor = false;
|
||||||
|
consoleMode = "max";
|
||||||
|
};
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
efi.efiSysMountPoint = "/boot/efi";
|
efi.efiSysMountPoint = "/boot/efi";
|
||||||
};
|
};
|
||||||
@ -132,62 +139,33 @@ with mylib.networking; {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
documentation.enable = true;
|
documentation = {
|
||||||
documentation.man.enable = true;
|
enable = true;
|
||||||
documentation.dev.enable = true;
|
man.enable = true;
|
||||||
|
dev.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
# Select internationalisation properties.
|
# Select internationalisation properties.
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n = {
|
||||||
|
defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
extraLocaleSettings = {
|
||||||
LC_ADDRESS = "de_DE.UTF-8";
|
LC_ADDRESS = "de_DE.UTF-8";
|
||||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||||
LC_MONETARY = "de_DE.UTF-8";
|
LC_MONETARY = "de_DE.UTF-8";
|
||||||
LC_NAME = "de_DE.UTF-8";
|
LC_NAME = "de_DE.UTF-8";
|
||||||
LC_NUMERIC = "de_DE.UTF-8";
|
LC_NUMERIC = "de_DE.UTF-8";
|
||||||
LC_PAPER = "de_DE.UTF-8";
|
LC_PAPER = "de_DE.UTF-8";
|
||||||
LC_TELEPHONE = "de_DE.UTF-8";
|
LC_TELEPHONE = "de_DE.UTF-8";
|
||||||
LC_TIME = "de_DE.UTF-8";
|
LC_TIME = "de_DE.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/179486
|
# https://github.com/NixOS/nixpkgs/issues/179486
|
||||||
i18n.supportedLocales = ["en_US.UTF-8/UTF-8" "de_DE.UTF-8/UTF-8"];
|
supportedLocales = ["en_US.UTF-8/UTF-8" "de_DE.UTF-8/UTF-8"];
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
|
||||||
services.xserver = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
# Startx replaces the displaymanager so default (lightdm) isn't used, start to shell
|
|
||||||
# Sadly using this with gnome-session doesn't really work
|
|
||||||
displayManager.startx.enable = true;
|
|
||||||
|
|
||||||
# Plasma
|
|
||||||
# TODO: Had problems with wayland last time, hopefully I get it to work now
|
|
||||||
# displayManager.sddm.enable = true;
|
|
||||||
# desktopManager.plasma5.enable = true;
|
|
||||||
# desktopManager.plasma5.runUsingSystemd = true;
|
|
||||||
|
|
||||||
# Gnome (Wayland)
|
|
||||||
# NOTE: Not a fan of the overly simplistic nature, also made problems with the audio devices...
|
|
||||||
# displayManager.gdm.enable = true;
|
|
||||||
# I had problems with gdm defaulting to X11, after I added this it stopped although I don't know if this was the sole reason
|
|
||||||
# displayManager.defaultSession = "gnome";
|
|
||||||
# displayManager.gdm.wayland = true; # This is actually the default
|
|
||||||
# desktopManager.gnome.enable = true;
|
|
||||||
|
|
||||||
wacom.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
|
||||||
services.libinput.enable = true;
|
|
||||||
|
|
||||||
programs.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
# enableNvidiaPatches = false; # NOTE: Enabled only in nixinator config
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# XDG
|
# XDG
|
||||||
@ -208,64 +186,56 @@ with mylib.networking; {
|
|||||||
|
|
||||||
removedAssociations = {
|
removedAssociations = {
|
||||||
"application/pdf" = "chromium-browser.desktop";
|
"application/pdf" = "chromium-browser.desktop";
|
||||||
|
"text/plain" = "code.desktop";
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultApplications = {
|
defaultApplications = let
|
||||||
|
textEditor = "neovide.desktop"; # Helix.desktop
|
||||||
|
videoPlayer = "mpv.desktop";
|
||||||
|
imageViewer = "imv.desktop";
|
||||||
|
audioPlayer = "vlc.desktop"; # mov.desktop
|
||||||
|
in {
|
||||||
"inode/directory" = "nnn.desktop";
|
"inode/directory" = "nnn.desktop";
|
||||||
|
|
||||||
"application/pdf" = "org.pwmt.zathura.desktop";
|
"application/pdf" = "org.pwmt.zathura.desktop";
|
||||||
"application/x-sh" = "Helix.desktop";
|
"application/x-sh" = "${textEditor}";
|
||||||
"application/xhtml+xml" = "Helix.desktop";
|
"application/xhtml+xml" = "${textEditor}";
|
||||||
"application/xml" = "Helix.desktop";
|
"application/xml" = "${textEditor}";
|
||||||
|
|
||||||
"image/bmp" = "imv.desktop";
|
"image/bmp" = "${imageViewer}";
|
||||||
"image/jpeg" = "imv.desktop";
|
"image/jpeg" = "${imageViewer}";
|
||||||
"image/png" = "imv.desktop";
|
"image/png" = "${imageViewer}";
|
||||||
"image/svg+xml" = "imv.desktop";
|
"image/svg+xml" = "${imageViewer}";
|
||||||
"image/tiff" = "imv.desktop";
|
"image/tiff" = "${imageViewer}";
|
||||||
"image/webp" = "imv.desktop";
|
"image/webp" = "${imageViewer}";
|
||||||
|
|
||||||
"video/mp2t" = "mpv.desktop";
|
"video/mp2t" = "${videoPlayer}";
|
||||||
"video/mp4" = "mpv.desktop";
|
"video/mp4" = "${videoPlayer}";
|
||||||
"video/mpeg" = "mpv.desktop";
|
"video/mpeg" = "${videoPlayer}";
|
||||||
"video/ogg" = "mpv.desktop";
|
"video/ogg" = "${videoPlayer}";
|
||||||
"video/quicktime" = "mpv.desktop";
|
"video/quicktime" = "${videoPlayer}";
|
||||||
"video/webm" = "mpv.desktop";
|
"video/webm" = "${videoPlayer}";
|
||||||
"video/x-matroska" = "mpv.desktop";
|
"video/x-matroska" = "${videoPlayer}";
|
||||||
"video/x-msvideo" = "mpv.desktop";
|
"video/x-msvideo" = "${videoPlayer}";
|
||||||
"video/x-ms-wmv" = "mpv.desktop";
|
"video/x-ms-wmv" = "${videoPlayer}";
|
||||||
|
|
||||||
"text/css" = "Helix.desktop";
|
"text/css" = "${textEditor}";
|
||||||
"text/csv" = "Helix.desktop";
|
"text/csv" = "${textEditor}";
|
||||||
"text/javascript" = "Helix.desktop";
|
"text/javascript" = "${textEditor}";
|
||||||
"text/json" = "Helix.desktop";
|
"text/json" = "${textEditor}";
|
||||||
"text/plain" = "Helix.desktop";
|
"text/plain" = "${textEditor}";
|
||||||
"text/xml" = "Helix.desktop";
|
"text/xml" = "${textEditor}";
|
||||||
|
|
||||||
# "audio/mpeg" = "moc.desktop";
|
"audio/mpeg" = "${audioPlayer}";
|
||||||
# "audio/ogg" = "moc.desktop";
|
"audio/ogg" = "${audioPlayer}";
|
||||||
# "audio/opus" = "moc.desktop";
|
"audio/opus" = "${audioPlayer}";
|
||||||
# "audio/wav" = "moc.desktop";
|
"audio/wav" = "${audioPlayer}";
|
||||||
# "audio/webm" = "moc.desktop";
|
"audio/webm" = "${audioPlayer}";
|
||||||
};
|
};
|
||||||
|
|
||||||
addedAssociations = defaultApplications;
|
addedAssociations = defaultApplications;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable sound with pipewire.
|
|
||||||
sound.enable = false; # Alsa, seems to conflict with PipeWire
|
|
||||||
hardware.pulseaudio.enable = false; # Get off my lawn
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
jack.enable = false; # TODO: Was needed for low latency but probably not anymore (?) as Bitwig supports Pipewire now
|
|
||||||
|
|
||||||
wireplumber.enable = true; # Probably the default
|
|
||||||
# media-session.enable = false; # Removed upstream
|
|
||||||
};
|
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
enableDefaultPackages = true; # Some default fonts for unicode coverage
|
enableDefaultPackages = true; # Some default fonts for unicode coverage
|
||||||
fontDir.enable = true; # Puts fonts to /run/current-system/sw/share/X11/fonts
|
fontDir.enable = true; # Puts fonts to /run/current-system/sw/share/X11/fonts
|
||||||
@ -342,6 +312,7 @@ with mylib.networking; {
|
|||||||
# iPhone tethering + mounting
|
# iPhone tethering + mounting
|
||||||
libimobiledevice
|
libimobiledevice
|
||||||
ifuse
|
ifuse
|
||||||
|
usbmuxd
|
||||||
|
|
||||||
mprocs # run multiple processes in single terminal window, screen alternative
|
mprocs # run multiple processes in single terminal window, screen alternative
|
||||||
parted # partition manager
|
parted # partition manager
|
||||||
@ -351,6 +322,12 @@ with mylib.networking; {
|
|||||||
wireguard-tools
|
wireguard-tools
|
||||||
man-pages
|
man-pages
|
||||||
man-pages-posix
|
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
|
||||||
];
|
];
|
||||||
|
|
||||||
# NOTE: Gnome
|
# NOTE: Gnome
|
||||||
@ -375,29 +352,70 @@ with mylib.networking; {
|
|||||||
fish.enable = true;
|
fish.enable = true;
|
||||||
firejail.enable = true; # Use to run app in network namespace (e.g. through vpn)
|
firejail.enable = true; # Use to run app in network namespace (e.g. through vpn)
|
||||||
git.enable = true;
|
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;
|
neovim.enable = true;
|
||||||
starship.enable = true;
|
starship.enable = true;
|
||||||
thefuck.enable = true;
|
thefuck.enable = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
|
nix-ld.enable = true; # Load dynamically linked executables
|
||||||
|
hyprland.enable = true;
|
||||||
|
|
||||||
|
nh = {
|
||||||
|
enable = true;
|
||||||
|
clean.enable = true;
|
||||||
|
clean.extraArgs = "--keep 3";
|
||||||
|
flake = "/home/christoph/NixFlake";
|
||||||
|
};
|
||||||
|
|
||||||
fuse.userAllowOther = true; # Allow users to mount e.g. samba shares (cifs)
|
fuse.userAllowOther = true; # Allow users to mount e.g. samba shares (cifs)
|
||||||
|
|
||||||
# ausweisapp.openFirewall = true; # Directly set port in firewall
|
# ausweisapp.openFirewall = true; # Directly set port in firewall
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# 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:
|
# List services that you want to enable:
|
||||||
services = {
|
services = {
|
||||||
|
# Enable sound with pipewire.
|
||||||
|
pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
jack.enable = false;
|
||||||
|
|
||||||
|
wireplumber.enable = true; # Probably the default
|
||||||
|
# media-session.enable = false; # NOTE: Deprecated
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable the X11 windowing system.
|
||||||
|
xserver = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# Startx replaces the displaymanager so default (lightdm) isn't used, start to shell
|
||||||
|
# Sadly using this with gnome-session doesn't really work
|
||||||
|
displayManager.startx.enable = true;
|
||||||
|
|
||||||
|
wacom.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
|
libinput.enable = true;
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
printing.enable = true;
|
printing = {
|
||||||
printing.drivers = with pkgs; [
|
enable = false;
|
||||||
# gutenprint
|
drivers = with pkgs; [
|
||||||
# gutenprintBin
|
gutenprint
|
||||||
# foomatic-db-ppds-withNonfreeDb
|
gutenprintBin
|
||||||
# dell-b1160w # TODO: Broken
|
foomatic-db-ppds-withNonfreeDb
|
||||||
];
|
dell-b1160w # TODO: Broken
|
||||||
avahi.enable = true; # Network printers
|
];
|
||||||
avahi.nssmdns4 = true;
|
};
|
||||||
|
avahi = {
|
||||||
|
enable = false; # Network printers
|
||||||
|
nssmdns4 = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
# Enable the OpenSSH daemon.
|
||||||
openssh.enable = true;
|
openssh.enable = true;
|
||||||
@ -433,7 +451,6 @@ with mylib.networking; {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO: Find a way to organize this better as it's split from the Gnome module, Gnome system module?
|
|
||||||
gnome.gnome-keyring.enable = true; # TODO: Is probably also needed for Plasma (some apps require it)
|
gnome.gnome-keyring.enable = true; # TODO: Is probably also needed for Plasma (some apps require it)
|
||||||
# gnome.sushi.enable = true;
|
# gnome.sushi.enable = true;
|
||||||
# gnome.gnome-settings-daemon.enable = true;
|
# gnome.gnome-settings-daemon.enable = true;
|
||||||
|
|||||||
@ -26,7 +26,7 @@ in {
|
|||||||
wait-online.timeout = 10;
|
wait-online.timeout = 10;
|
||||||
|
|
||||||
# Don't wait for all networks to be configured, as e.g. wg0 will only be upon manual activation
|
# Don't wait for all networks to be configured, as e.g. wg0 will only be upon manual activation
|
||||||
wait-online.anyInterface = true;
|
wait-online.anyInterface = true;
|
||||||
|
|
||||||
# TODO: Apparently anyInterface doesn't work?
|
# TODO: Apparently anyInterface doesn't work?
|
||||||
# wait-online.ignoredInterfaces = [
|
# wait-online.ignoredInterfaces = [
|
||||||
@ -88,6 +88,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Open Ports
|
# Open Ports
|
||||||
|
nftables.enable = true;
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# networking.firewall.checkReversePath = "loose";
|
# networking.firewall.checkReversePath = "loose";
|
||||||
|
|||||||
@ -1,11 +1,8 @@
|
|||||||
{
|
{
|
||||||
inputs,
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
mylib,
|
mylib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: rec {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
@ -41,52 +38,60 @@
|
|||||||
# "10-ether-1G" = mylib.networking.mkStaticSystemdNetwork {...};
|
# "10-ether-1G" = mylib.networking.mkStaticSystemdNetwork {...};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
allowedTCPPorts = [
|
||||||
|
# AvaTalk ports
|
||||||
|
7777
|
||||||
|
12777
|
||||||
|
];
|
||||||
|
|
||||||
|
allowedUDPPorts = [
|
||||||
|
# AvaTalk ports
|
||||||
|
7777
|
||||||
|
12777
|
||||||
|
];
|
||||||
|
|
||||||
wireguard-tunnels = {
|
wireguard-tunnels = {
|
||||||
wg0-de-115 = (
|
wg0-de-115 =
|
||||||
mylib.networking.mkWireguardService
|
mylib.networking.mkWireguardService
|
||||||
"wg0-de-115"
|
"wg0-de-115"
|
||||||
"proton-de-115.key"
|
"proton-de-115.key"
|
||||||
"9+CorlxrTsQR7qjIOVKsEkk8Z7UUS5WT3R1ccF7a0ic="
|
"9+CorlxrTsQR7qjIOVKsEkk8Z7UUS5WT3R1ccF7a0ic="
|
||||||
"194.126.177.14"
|
"194.126.177.14";
|
||||||
);
|
|
||||||
|
|
||||||
wg0-lu-16 = (
|
wg0-lu-16 =
|
||||||
mylib.networking.mkWireguardService
|
mylib.networking.mkWireguardService
|
||||||
"wg0-lu-16"
|
"wg0-lu-16"
|
||||||
"proton-lu-16.key"
|
"proton-lu-16.key"
|
||||||
"asu9KtQoZ3iKwELsDTgjPEiFNcD1XtgGgy3O4CZFg2w="
|
"asu9KtQoZ3iKwELsDTgjPEiFNcD1XtgGgy3O4CZFg2w="
|
||||||
"92.223.89.133"
|
"92.223.89.133";
|
||||||
);
|
|
||||||
|
|
||||||
wg0-kh-8 = (
|
wg0-kh-8 =
|
||||||
mylib.networking.mkWireguardService
|
mylib.networking.mkWireguardService
|
||||||
"wg0-kh-8"
|
"wg0-kh-8"
|
||||||
"proton-kh-8.key"
|
"proton-kh-8.key"
|
||||||
"D4M0O60wCBf1nYWOmXRfK7IpgG7VBBwQLeWVFLIqFG4="
|
"D4M0O60wCBf1nYWOmXRfK7IpgG7VBBwQLeWVFLIqFG4="
|
||||||
"188.215.235.82"
|
"188.215.235.82";
|
||||||
);
|
|
||||||
|
|
||||||
wg0-ch-70 = (
|
wg0-ch-70 =
|
||||||
mylib.networking.mkWireguardService
|
mylib.networking.mkWireguardService
|
||||||
"wg0-ch-70"
|
"wg0-ch-70"
|
||||||
"proton-ch-70.key"
|
"proton-ch-70.key"
|
||||||
"17I34jHOMcmI7LKBqxosTfLgwGjO5OKApLcRSPlyymM="
|
"17I34jHOMcmI7LKBqxosTfLgwGjO5OKApLcRSPlyymM="
|
||||||
"185.159.157.13"
|
"185.159.157.13";
|
||||||
);
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.hyprland = {
|
|
||||||
# enableNvidiaPatches = true; # NOTE: Deprecated
|
|
||||||
};
|
|
||||||
|
|
||||||
# Low latency audio
|
# Low latency audio
|
||||||
# musnix = {
|
# musnix = {
|
||||||
# enable = true;
|
# enable = true;
|
||||||
# # musnix.soundcardPciId = ;
|
# # musnix.soundcardPciId = ;
|
||||||
# };
|
# };
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
kernelPackages = pkgs.linuxPackages_zen;
|
||||||
|
};
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
# Configure keymap in X11
|
# Configure keymap in X11
|
||||||
xkb.layout = "us";
|
xkb.layout = "us";
|
||||||
@ -96,18 +101,23 @@
|
|||||||
# videoDrivers = ["amdgpu"];
|
# 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...
|
# The laptop needs de-DE...
|
||||||
# Chinese Input
|
# Chinese Input
|
||||||
i18n.inputMethod.enabled = "fcitx5";
|
i18n.inputMethod = {
|
||||||
i18n.inputMethod.fcitx5 = {
|
enable = true;
|
||||||
|
type = "fcitx5";
|
||||||
|
|
||||||
|
fcitx5 = {
|
||||||
waylandFrontend = true;
|
waylandFrontend = true;
|
||||||
|
|
||||||
addons = with pkgs; [
|
addons = with pkgs; [
|
||||||
fcitx5-gtk
|
fcitx5-gtk
|
||||||
libsForQt5.fcitx5-qt
|
libsForQt5.fcitx5-qt # QT5
|
||||||
|
kdePackages.fcitx5-qt # QT6
|
||||||
fcitx5-chinese-addons
|
fcitx5-chinese-addons
|
||||||
fcitx5-configtool # TODO: Remove this and set config through HomeManager
|
fcitx5-configtool # TODO: Remove this and set config through HomeManager
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
swapDevices = lib.mkForce [
|
swapDevices = lib.mkForce [
|
||||||
# {
|
# {
|
||||||
# device = "/var/swap";
|
# device = "/var/swap";
|
||||||
# # size = 1024 * 16 * 2; # twice the RAM for hibernation
|
# # size = 1024 * 32 * 2; # twice the RAM for hibernation
|
||||||
# size = 1024 * 8; # Without hibernation 4.0 GB to 0.5 x RAM
|
# size = 1024 * 8; # Without hibernation 4.0 GB to 0.5 x RAM
|
||||||
# }
|
# }
|
||||||
];
|
];
|
||||||
@ -73,39 +73,46 @@
|
|||||||
cpu.amd.updateMicrocode = true;
|
cpu.amd.updateMicrocode = true;
|
||||||
|
|
||||||
nvidia = {
|
nvidia = {
|
||||||
|
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
|
modesetting.enable = true; # Not officially supported by NVidia but needed for wayland
|
||||||
open = false; # TODO: Build failure on 2024-18-01
|
open = false; # TODO: Build failure on 2024-18-01
|
||||||
nvidiaSettings = true;
|
nvidiaSettings = false; # Those are for x-server
|
||||||
};
|
};
|
||||||
|
|
||||||
# video.hidpi.enable = lib.mkDefault true; # No longer has any effect
|
# video.hidpi.enable = lib.mkDefault true; # No longer has any effect
|
||||||
opengl = {
|
graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# Vulkan
|
# Vulkan
|
||||||
driSupport = true;
|
# driSupport = true; # NOTE: Deprecated
|
||||||
driSupport32Bit = true;
|
enable32Bit = true;
|
||||||
|
|
||||||
# AMD: https://nixos.wiki/wiki/AMD_GPU
|
# AMD: https://nixos.wiki/wiki/AMD_GPU
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
# amdvlk # RADV (mesa) and AMDVLK (amd) can be used simultaneously
|
# amdvlk # RADV (mesa) and AMDVLK (amd) can be used simultaneously
|
||||||
|
|
||||||
# VAAPI/VDPAU: https://nixos.wiki/wiki/Accelerated_Video_Playback
|
# VAAPI/VDPAU: https://nixos.wiki/wiki/Accelerated_Video_Playback
|
||||||
vaapiVdpau # Taken from wiki
|
vaapiVdpau # Taken from wiki, this is also part of nixos-hardware/common/gpu/nvidia
|
||||||
libvdpau-va-gl # Taken from wiki
|
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...
|
|
||||||
|
|
||||||
nvidia-vaapi-driver
|
# 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
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
sane.enable = true; # Scanning
|
# sane.enable = true; # Scanning
|
||||||
|
# xpadneo.enable = true; # Xbox Controller
|
||||||
xpadneo.enable = true; # Xbox Controller
|
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.variables.AMD_VULKAN_ICD = "RADV"; # Choose mesa driver by default
|
# environment.variables.AMD_VULKAN_ICD = "RADV"; # Choose mesa driver by default
|
||||||
|
environment.variables = {
|
||||||
|
LIBVA_DRIVER_NAME = "nvidia";
|
||||||
|
GBM_BACKEND = "nvidia-drm";
|
||||||
|
};
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +1,4 @@
|
|||||||
{
|
{mylib, ...}: {
|
||||||
inputs,
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
mylib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: rec {
|
|
||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
@ -15,31 +8,25 @@
|
|||||||
modules = {
|
modules = {
|
||||||
systemd-networkd = {
|
systemd-networkd = {
|
||||||
wireguard-tunnels = {
|
wireguard-tunnels = {
|
||||||
wg0-de-74 = (
|
wg0-de-74 =
|
||||||
mylib.networking.mkWireguardService
|
mylib.networking.mkWireguardService
|
||||||
"wg0-de-74"
|
"wg0-de-74"
|
||||||
"proton-de-74.key"
|
"proton-de-74.key"
|
||||||
"fvHmPj3wAKolN80+/KJ3a/DFjMToCsr3iPGwX8+og1g="
|
"fvHmPj3wAKolN80+/KJ3a/DFjMToCsr3iPGwX8+og1g="
|
||||||
"194.126.177.7"
|
"194.126.177.7";
|
||||||
);
|
|
||||||
|
|
||||||
wg0-lu-6 = (
|
wg0-lu-6 =
|
||||||
mylib.networking.mkWireguardService
|
mylib.networking.mkWireguardService
|
||||||
"wg0-lu-6"
|
"wg0-lu-6"
|
||||||
"proton-lu-6.key"
|
"proton-lu-6.key"
|
||||||
"EAZS8FTE2sXm8NFD8ViqcO5PMzvnyIHD1ScxX8UxIzE="
|
"EAZS8FTE2sXm8NFD8ViqcO5PMzvnyIHD1ScxX8UxIzE="
|
||||||
"92.223.89.141"
|
"92.223.89.141";
|
||||||
);
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.light.enable = true;
|
programs.light.enable = true;
|
||||||
|
|
||||||
programs.hyprland = {
|
|
||||||
# enableNvidiaPatches = false; # NOTE: Deprecated
|
|
||||||
};
|
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
# Configure keymap in X11
|
# Configure keymap in X11
|
||||||
xkb.layout = "de";
|
xkb.layout = "de";
|
||||||
|
|||||||
@ -16,8 +16,17 @@
|
|||||||
initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
||||||
initrd.kernelModules = [];
|
initrd.kernelModules = [];
|
||||||
kernelModules = ["kvm-intel"];
|
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."/" = {
|
fileSystems."/" = {
|
||||||
@ -45,9 +54,9 @@
|
|||||||
enableRedistributableFirmware = true;
|
enableRedistributableFirmware = true;
|
||||||
cpu.intel.updateMicrocode = true;
|
cpu.intel.updateMicrocode = true;
|
||||||
|
|
||||||
opengl = {
|
graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
driSupport = true;
|
# driSupport = true; # NOTE: Deprecated
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
intel-media-driver
|
intel-media-driver
|
||||||
vaapiIntel
|
vaapiIntel
|
||||||
|
|||||||
Reference in New Issue
Block a user