Compare commits
265 Commits
bc6f7f8101
...
422c7c50f7
Author | SHA1 | Date | |
---|---|---|---|
422c7c50f7 | |||
3108fe8da8 | |||
f3d4eea2d3 | |||
d50b07e1b4 | |||
e73d4cb442 | |||
877a149127 | |||
7a381aa807 | |||
88f4b1b6c4 | |||
9214e48791 | |||
a1e088fb35 | |||
b4ea5e4085 | |||
3fe1ca3cce | |||
0db64b9a93 | |||
efe3619c3d | |||
fa9f5cf943 | |||
aedbd9e196 | |||
c4178a70b7 | |||
1542463b39 | |||
7a7cc45082 | |||
791d764ff6 | |||
b518a4dc85 | |||
f356dd720d | |||
06c3702067 | |||
8ef4737491 | |||
ec6cceb9ae | |||
f78d27890f | |||
224b97e6aa | |||
15974e98d3 | |||
bee3f439db | |||
be818373d5 | |||
33e4d5b28b | |||
9716079bb9 | |||
64a8b8cde2 | |||
a2654d7fdd | |||
b80a9583ef | |||
b4f42c62ce | |||
b605f49af6 | |||
454081de9e | |||
aaeabb1f3f | |||
05531ae666 | |||
98dc94d2a7 | |||
eabc8c0582 | |||
fb4a7ee2a3 | |||
030cbaf9ba | |||
d2ebcb83de | |||
01ed5d6093 | |||
da87dc6380 | |||
cd971466a2 | |||
8496a112ba | |||
10a5f8e136 | |||
739b1ae6c5 | |||
722f98834a | |||
2eb6fd6341 | |||
a051d107da | |||
e7c5986b79 | |||
cd45accb8a | |||
3d9bab034b | |||
faa11b525a | |||
c887677560 | |||
c843170b5d | |||
2ed0bfc81a | |||
8da217aee3 | |||
eb0b879bea | |||
aa240a91d1 | |||
5f6b41face | |||
7bbc60225f | |||
7d06a33d77 | |||
8a9b7280c6 | |||
573020d857 | |||
bf813fab5b | |||
1251761da2 | |||
7ed2e62180 | |||
e23da5d12c | |||
ee47690a8f | |||
0c4d9ea95f | |||
60a95afd3b | |||
b2e61f97f1 | |||
2977e8319a | |||
8e4958ef0a | |||
18e7c1ccda | |||
777d9ed9d7 | |||
30085af9c1 | |||
f32dcf243a | |||
a12483560a | |||
2449eabf7c | |||
9bba7b5da5 | |||
bde31cc496 | |||
70132fb2ab | |||
9da230845a | |||
f49de13212 | |||
c1e881e49a | |||
48e223e5f0 | |||
3420f6aa04 | |||
e22a20f503 | |||
84179a714d | |||
2a456cf0ea | |||
1a73589d28 | |||
a8a7ac2f89 | |||
45d5270526 | |||
41122b7b5f | |||
caf74e5636 | |||
30fc7bf0a8 | |||
5bb8c34862 | |||
8463239b39 | |||
b68ab3883d | |||
147b659960 | |||
8446d263da | |||
40722d84c5 | |||
fb42002a18 | |||
785cf77e89 | |||
5c816c5b0a | |||
976942c353 | |||
6fd64b0a68 | |||
b746ec813f | |||
26d749fa04 | |||
9059e76b26 | |||
068376e3a6 | |||
e7d91950d2 | |||
b8efbc8f7d | |||
629b5ce741 | |||
43e6060c90 | |||
69b0d77b38 | |||
962917fd6c | |||
0257c9f30b | |||
553a0f269c | |||
f5b275385c | |||
7908f337e3 | |||
4281afe9cf | |||
b64dd718c1 | |||
18ba939e26 | |||
04fa8c1ab2 | |||
b25a89b471 | |||
730b589fd1 | |||
d04ce5cca4 | |||
063cf3e619 | |||
4f3c9ee48f | |||
b6f165fd3d | |||
e0bf71ef63 | |||
26abc8c1f3 | |||
ff29e743d9 | |||
52922f8efa | |||
898f440a69 | |||
e4d7402948 | |||
b9955a947f | |||
5c50fa6379 | |||
4d876ac1cf | |||
3162e64534 | |||
1b8b451999 | |||
e413da516b | |||
82479daa4c | |||
6f61595b35 | |||
e64b39b896 | |||
a4947f9b71 | |||
5814fa8ec1 | |||
febc9ee925 | |||
9c9960d630 | |||
a9dc2f0f4b | |||
ece337586c | |||
c6cc3d79b8 | |||
66b68354e0 | |||
1bf2f49707 | |||
b4b50ab8ae | |||
f4c8294ded | |||
780ef66712 | |||
63ac50fa23 | |||
0bb07cba5a | |||
f09894d0dc | |||
d855614811 | |||
f5ca1dd665 | |||
28cc9c48b2 | |||
ac6c8ef84d | |||
42fe45ad98 | |||
363a40a814 | |||
678563cffe | |||
7b20ca3586 | |||
62b7e88709 | |||
daeb06b7a2 | |||
809f3267e1 | |||
d554c8fbf2 | |||
7bcda9193b | |||
33866181e7 | |||
03377050f6 | |||
6d6252c5f8 | |||
6f5fd7b0d3 | |||
a976e9ed8e | |||
1c3fcb00b2 | |||
4482f8aaa8 | |||
1ecaac36e4 | |||
6f29e619bf | |||
6646e8f99d | |||
d9743ef273 | |||
d3e4d34ea6 | |||
6b07f32e6c | |||
cd2f42a344 | |||
ef434f6dcf | |||
d1ef7bc3ea | |||
117c5d6ef9 | |||
c8d2a40b01 | |||
b73ee34bef | |||
fc16b83011 | |||
75eb7da5a7 | |||
5c6270a5d7 | |||
3fd4e28a2e | |||
646d15f8ee | |||
f65babd85a | |||
0da02d747a | |||
129531432f | |||
7e6b142517 | |||
a345fb7849 | |||
5cf5528307 | |||
b34a820a9e | |||
c849583f7a | |||
1cf1717608 | |||
23fdaae3e5 | |||
6b9ca1f09d | |||
815cc42d75 | |||
1e2ed24b4f | |||
0421364706 | |||
b03c42e9dd | |||
0870c20e4e | |||
af4e9f6de4 | |||
f372494546 | |||
09fa25b88f | |||
f716ef2719 | |||
9392a7904a | |||
05212ed159 | |||
451df03f73 | |||
ef506252b9 | |||
9bd4e580c7 | |||
72c91a682a | |||
4f2121798e | |||
6d620fe0cd | |||
49832454dc | |||
d71614ac07 | |||
3067d96eba | |||
bf7cc65df3 | |||
32a7404a02 | |||
5d0d5f7fb1 | |||
71f2e67235 | |||
e0a19056d2 | |||
a487049887 | |||
d90a4fb372 | |||
440fd28d28 | |||
86679ffcc8 | |||
007969cdb5 | |||
99dde2f4f2 | |||
0ed08e8f0c | |||
0691019f49 | |||
c59cebdc32 | |||
392e4ed24d | |||
77eac934bf | |||
8754bea418 | |||
e3020dd7b5 | |||
f413a786b8 | |||
7af13cdccb | |||
1ed8d522ae | |||
680c0d90fb | |||
f6c8c07a75 | |||
ab6070b63b | |||
70116909c6 | |||
7b1a8d3afc | |||
640fe6418b | |||
1ca1f7edac | |||
d5adb7f0b1 | |||
6db28375b8 |
@ -1,5 +1,6 @@
|
||||
root=true
|
||||
|
||||
[*]
|
||||
indent_style: tab
|
||||
indent_style: space
|
||||
indent_size: 2
|
||||
end_of_line: lf
|
||||
|
23
common/default.nix
Normal file
23
common/default.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[
|
||||
(lib.mkAliasOptionModule ["hm"] [
|
||||
"home-manager"
|
||||
"users"
|
||||
config.my.user
|
||||
])
|
||||
]
|
||||
++ lib.my.getModules [./.];
|
||||
|
||||
hm.imports = [./home.nix];
|
||||
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
home-manager.useGlobalPkgs = true;
|
||||
}
|
18
common/home.nix
Normal file
18
common/home.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = lib.my.getHmModules [./.];
|
||||
|
||||
my = {
|
||||
nushell.enable = true;
|
||||
};
|
||||
|
||||
# let standalone home-manager and home-manager in nixos/nix-darwin use the same derivation
|
||||
home.packages = [
|
||||
(pkgs.callPackage (inputs.home-manager + /home-manager) {path = inputs.home-manager;})
|
||||
];
|
||||
# home.stateVersion = "23.11";
|
||||
}
|
26
common/my/default.nix
Normal file
26
common/my/default.nix
Normal file
@ -0,0 +1,26 @@
|
||||
{lib, ...}: let
|
||||
inherit (lib) mkOption types;
|
||||
in {
|
||||
options.my = {
|
||||
user = mkOption {type = types.str;};
|
||||
name = mkOption {type = types.str;};
|
||||
email = mkOption {type = types.str;};
|
||||
uid = mkOption {type = types.int;};
|
||||
keys = mkOption {type = types.listOf types.singleLineStr;};
|
||||
};
|
||||
|
||||
config = {
|
||||
my = {
|
||||
user = "michael";
|
||||
name = "Michael Thomas";
|
||||
email = "michaelhthomas@outlook.com";
|
||||
uid = 1000;
|
||||
keys = [
|
||||
# Neptune
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDUYHiTel+RDzygCeNwV25cnBBNioM19EQWqxPC+xq7lNlNcAQ4wi9JIOONVGkshxPXzKZyR3F53Igs9JZr1E9088L52eUp35JhW1pthai82cw1jGkj9wxcKJnU6b7QNDKA+ejPTC/ciFFKytMyPgID0ICzBRQsnj15i4lGvGDgfTQ7qfI2J855H7S7qOpY7cbsGfeoz3f8Ye1FspJFDsNu9QhX05iunBcbni0uLoTtgS5cEBRr7H9RkKR7GCfd4Ae/sp+aeDkLU4aBkEi+A8VLfR74Juia1j/3mAAmkgJKGcBCKUv0ixBGd6XclZmkF8f2Hx0z8mDxJ7U8lsDUSKdvxK7fecsM4F/GTvjrUxV1nLD4SRQ06GtBmGQGDzIn3Nm1URd6gGT9W3486XJsqmGzjuHa5o4WhmBgh/Gs8xUcv7kWD5enrYacBr+HKVJWnnLFp+XfAYaMCT6j/4jc4D9/9hijRbhboICTDxWCWtFgz7QpsO6BQpi/wkR4Ql61vPc= michael@neptune"
|
||||
# Oracle
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPc/HYsbpVsyoU2n0EiqQ4+3aSiFPtddjPCGK187W24f michael@oracle"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
1
common/my/home.nix
Symbolic link
1
common/my/home.nix
Symbolic link
@ -0,0 +1 @@
|
||||
default.nix
|
23
common/nushell/home.nix
Normal file
23
common/nushell/home.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.my.nushell;
|
||||
in {
|
||||
options.my.nushell = {
|
||||
enable = mkEnableOption "nushell";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
$env.config = {
|
||||
edit_mode: vi
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
27
common/system/default.nix
Normal file
27
common/system/default.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
nix.optimise.automatic = true;
|
||||
nix.settings = {
|
||||
extra-experimental-features = [
|
||||
"flakes"
|
||||
"nix-command"
|
||||
];
|
||||
keep-outputs = true;
|
||||
log-lines = 25;
|
||||
tarball-ttl = 43200;
|
||||
trusted-users = [
|
||||
"root"
|
||||
config.my.user
|
||||
];
|
||||
};
|
||||
nix.package = pkgs.nix;
|
||||
programs.zsh.enable = true;
|
||||
time.timeZone = "America/New_York";
|
||||
}
|
25
common/zsh/default.nix
Normal file
25
common/zsh/default.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.my.zsh;
|
||||
in {
|
||||
options.my.zsh = {
|
||||
enable = mkEnableOption "zsh";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hm.my.zsh.enable = true;
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
environment.variables.EDITOR = "nvim";
|
||||
|
||||
users.users."${config.my.user}".shell = pkgs.zsh;
|
||||
};
|
||||
}
|
64
common/zsh/home.nix
Normal file
64
common/zsh/home.nix
Normal file
@ -0,0 +1,64 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.my.zsh;
|
||||
in {
|
||||
options.my.zsh = {
|
||||
enable = mkEnableOption "zsh";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
historySubstringSearch.enable = true;
|
||||
autocd = true;
|
||||
enableCompletion = true;
|
||||
|
||||
# Enable pure prompt
|
||||
initExtra = ''
|
||||
fpath+=${pkgs.pure-prompt}/share/zsh/site-functions
|
||||
autoload -U promptinit;
|
||||
promptinit
|
||||
prompt pure
|
||||
'';
|
||||
|
||||
envExtra = ''
|
||||
# Do not load global configuration
|
||||
setopt no_global_rcs
|
||||
'';
|
||||
|
||||
loginExtra = ''
|
||||
setopt correct
|
||||
'';
|
||||
|
||||
sessionVariables = {
|
||||
# Make ls colorful on MacOS
|
||||
CLICOLOR = 1;
|
||||
};
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
file = "nix-shell.plugin.zsh";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "chisui";
|
||||
repo = "zsh-nix-shell";
|
||||
rev = "v0.8.0";
|
||||
sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
18
darwin/default.nix
Normal file
18
darwin/default.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
inputs,
|
||||
inputs',
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[
|
||||
inputs.agenix.darwinModules.default
|
||||
inputs.home-manager.darwinModules.home-manager
|
||||
../common
|
||||
]
|
||||
++ lib.my.getModules [./.];
|
||||
|
||||
hm.imports = [./home.nix];
|
||||
|
||||
environment.systemPackages = [inputs'.agenix.packages.default];
|
||||
}
|
3
darwin/home.nix
Normal file
3
darwin/home.nix
Normal file
@ -0,0 +1,3 @@
|
||||
{lib, ...}: {
|
||||
imports = lib.my.getHmModules [./.];
|
||||
}
|
716
flake.lock
generated
716
flake.lock
generated
@ -1,17 +1,81 @@
|
||||
{
|
||||
"nodes": {
|
||||
"darwin": {
|
||||
"agenix": {
|
||||
"inputs": {
|
||||
"darwin": "darwin",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723293904,
|
||||
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ags": {
|
||||
"inputs": {
|
||||
"astal": "astal",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734091628,
|
||||
"narHash": "sha256-8O3i8zESjHVsGzyXb8gEpLztvANq3Ot5bwo60YKJc7k=",
|
||||
"owner": "Aylur",
|
||||
"repo": "ags",
|
||||
"rev": "27cd93147aba09142fa585fd16f13c56268b696c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Aylur",
|
||||
"repo": "ags",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"astal": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"ags",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1706581965,
|
||||
"narHash": "sha256-1H7dRdK9LJ7+2X1XQtbwXr+QMqtVVo/ZF0/LIvkjdK8=",
|
||||
"lastModified": 1733520119,
|
||||
"narHash": "sha256-6K07ZJTnFu1xASBCMtVc9cFTbBEauwSc7gGBmjLkLSk=",
|
||||
"owner": "aylur",
|
||||
"repo": "astal",
|
||||
"rev": "4c19d8d06fa25cc6389f37abe8839b4d8be5c0d6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "aylur",
|
||||
"repo": "astal",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"agenix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1700795494,
|
||||
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "91b9daf672c957ef95a05491a75f62e6a01d5aaf",
|
||||
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -21,23 +85,49 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"darwin_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1673956053,
|
||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
||||
"lastModified": 1733570843,
|
||||
"narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "a35b08d09efda83625bef267eb24347b446c80b8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"owner": "lnl7",
|
||||
"ref": "master",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"devshell": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1728330715,
|
||||
"narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
@ -53,16 +143,106 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1733328505,
|
||||
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_3": {
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"revCount": 57,
|
||||
"type": "tarball",
|
||||
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681202837,
|
||||
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
||||
"lastModified": 1733312601,
|
||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733312601,
|
||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_3": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nur",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733312601,
|
||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -73,14 +253,14 @@
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705309234,
|
||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -91,14 +271,14 @@
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
"systems": "systems_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705309234,
|
||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -107,57 +287,197 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_4": {
|
||||
"git-hooks": {
|
||||
"inputs": {
|
||||
"systems": "systems_5"
|
||||
"flake-compat": [
|
||||
"nixvim",
|
||||
"flake-compat"
|
||||
],
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681202837,
|
||||
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
|
||||
"lastModified": 1734797603,
|
||||
"narHash": "sha256-ulZN7ps8nBV31SE+dwkDvKIzvN6hroRY8sYOT0w+E28=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "f0f0dc4920a903c3e08f5bdb9246bb572fcae498",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"git-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"agenix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705659542,
|
||||
"narHash": "sha256-WA3xVfAk1AYmFdwghT7mt/erYpsU6JPu9mdTEP/e9HQ=",
|
||||
"lastModified": 1703113217,
|
||||
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734366194,
|
||||
"narHash": "sha256-vykpJ1xsdkv0j8WOVXrRFHUAdp9NXHpxdnn1F4pYgSw=",
|
||||
"owner": "rycee",
|
||||
"repo": "home-manager",
|
||||
"rev": "10cd9c53115061aa6a0a90aad0b0dde6a999cdb9",
|
||||
"rev": "80b0fdf483c5d1cb75aaad909bd390d48673857f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rycee",
|
||||
"ref": "release-23.11",
|
||||
"ref": "release-24.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_3": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734862405,
|
||||
"narHash": "sha256-bXZJvUMJ2A6sIpYcCUAGjYCD5UDzmpmQCdmJSkPhleU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "cb27edb5221d2f2920a03155f8becc502cf60e35",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ixx": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"nixvim",
|
||||
"nuschtosSearch",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nuschtosSearch",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1729958008,
|
||||
"narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "ixx",
|
||||
"rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NuschtOS",
|
||||
"ref": "v0.0.6",
|
||||
"repo": "ixx",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"master": {
|
||||
"locked": {
|
||||
"lastModified": 1734892047,
|
||||
"narHash": "sha256-85aPEsOxviepQc526USyeqpQQQE3F9u9LpiPCGWGRnM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2cf41595ff64bcda9e3e1ed1cac217b5a023a82d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733570843,
|
||||
"narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "a35b08d09efda83625bef267eb24347b446c80b8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-vscode-extensions": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1706663720,
|
||||
"narHash": "sha256-nPstfigc9FdWIwbtZcwfAjEP5fsI171CDMQ7rJdg0ok=",
|
||||
"lastModified": 1734832456,
|
||||
"narHash": "sha256-gyp5aVMSA83OV8kP/a1FBA6KGJqNkswUK9VdAh1hLS4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-vscode-extensions",
|
||||
"rev": "129d9ddaf92f8a0942037aebf99dfa09d31e0dde",
|
||||
"rev": "c567c5f3bc53723d726f286ea94d5aebac55d4c5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -170,62 +490,58 @@
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1706608109,
|
||||
"narHash": "sha256-Yc7pmonKJX/dOFm+qEInE+JlskMiN9OmOwUd/EKp4a0=",
|
||||
"lastModified": 1733854371,
|
||||
"narHash": "sha256-K9qGHniYBbjqVcEiwXyiofj/IFf78L5F0/FCf+CKyr0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NixOS-WSL",
|
||||
"rev": "0b52d9e7a6c779f8b88c6e3bdfe6064fad648dcf",
|
||||
"rev": "dee4425dcee3149475ead0cb6a616b8a028c5888",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "main",
|
||||
"repo": "NixOS-WSL",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1684570954,
|
||||
"narHash": "sha256-FX5y4Sm87RWwfu9PI71XFvuRpZLowh00FQpIJ1WfXqE=",
|
||||
"owner": "NixOS",
|
||||
"lastModified": 1733581040,
|
||||
"narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3005f20ce0aaa58169cdee57c8aa12e5f1b6e1b3",
|
||||
"rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1706515015,
|
||||
"narHash": "sha256-eFfY5A7wlYy3jD/75lx6IJRueg4noE+jowl0a8lIlVo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f4a8d6d5324c327dcc2d863eb7f3cc06ad630df4",
|
||||
"type": "github"
|
||||
"lastModified": 1733096140,
|
||||
"narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-23.11",
|
||||
"type": "indirect"
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1706487304,
|
||||
"narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=",
|
||||
"lastModified": 1713805509,
|
||||
"narHash": "sha256-YgSEan4CcrjivCNO5ZNzhg7/8ViLkZ4CB/GrGBVSudo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "90f456026d284c22b3e3497be980b2e47d0b28ac",
|
||||
"rev": "1e1dc66fe68972a76679644a5577828b6a7e8be4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -235,13 +551,125 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1706665018,
|
||||
"narHash": "sha256-NtvxIQhRxavrL7PQ1ZURqWr15XM1Dc98yv4U5gTbJhk=",
|
||||
"lastModified": 1733384649,
|
||||
"narHash": "sha256-K5DJ2LpPqht7K76bsxetI+YHhGGRyVteTPRQaIIKJpw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "190c31a89e5eec80dd6604d7f9e5af3802a58a13",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1734737257,
|
||||
"narHash": "sha256-GIMyMt1pkkoXdCq9un859bX6YQZ/iYtukb9R5luazLM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1c6e20d41d6a9c1d737945962160e8571df55daa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-24.11",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1734649271,
|
||||
"narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1728538411,
|
||||
"narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_7": {
|
||||
"locked": {
|
||||
"lastModified": 1733097829,
|
||||
"narHash": "sha256-9hbb1rqGelllb4kVUCZ307G2k3/UhmA8PPGBoyuWaSw=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2c15aa59df0017ca140d9ba302412298ab4bf22a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
"flake-compat": "flake-compat_3",
|
||||
"flake-parts": "flake-parts_2",
|
||||
"git-hooks": "git-hooks",
|
||||
"home-manager": "home-manager_3",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nixpkgs": [
|
||||
"unstable"
|
||||
],
|
||||
"nuschtosSearch": "nuschtosSearch",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734880727,
|
||||
"narHash": "sha256-bQfaaYoH8kSdw2UWb8RLZoa/2jPvDjaw87nvj+pO5lE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "450cccf472f40ae8e3b92eec9e5f4b071693ac85",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_3",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"treefmt-nix": "treefmt-nix_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734891997,
|
||||
"narHash": "sha256-MXE+6AV6HJfUTwKAaNPR5+WsejO02Q5JNNhz0yMUyVw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "98930fb5cf79e652111ed531e6ce777618b1c898",
|
||||
"rev": "b8deab92e4f1bc950ef7b2273b8b5c3a764c2e77",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -250,31 +678,58 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nuschtosSearch": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3",
|
||||
"ixx": "ixx",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733773348,
|
||||
"narHash": "sha256-Y47y+LesOCkJaLvj+dI/Oa6FAKj/T9sKVKDXLNsViPw=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"rev": "3051be7f403bff1d1d380e4612f0c70675b44fc9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"darwin": "darwin",
|
||||
"home-manager": "home-manager",
|
||||
"agenix": "agenix",
|
||||
"ags": "ags",
|
||||
"darwin": "darwin_2",
|
||||
"flake-parts": "flake-parts",
|
||||
"home-manager": "home-manager_2",
|
||||
"master": "master",
|
||||
"nix-vscode-extensions": "nix-vscode-extensions",
|
||||
"nixos-wsl": "nixos-wsl",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"nixvim": "nixvim",
|
||||
"nur": "nur",
|
||||
"rust-overlay": "rust-overlay",
|
||||
"treefmt-nix": "treefmt-nix_3",
|
||||
"unstable": "unstable",
|
||||
"utils": "utils",
|
||||
"vscode-server": "vscode-server"
|
||||
"utils": "utils"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
"nixpkgs": "nixpkgs_6"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1706634984,
|
||||
"narHash": "sha256-xn7lGPE8gRGBe3Lt8ESoN/uUHm7IrbiV7siupwjHX1o=",
|
||||
"lastModified": 1734834660,
|
||||
"narHash": "sha256-bm8V+Cu8rWJA+vKQnc94mXTpSDgvedyoDKxTVi/uJfw=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "883b84c426107a8ec020e7124f263d7c35a5bb9f",
|
||||
"rev": "b070e6030118680977bc2388868c4b3963872134",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -358,13 +813,73 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734704479,
|
||||
"narHash": "sha256-MMi74+WckoyEWBRcg/oaGRvXC9BVVxDZNRMpL+72wBI=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "65712f5af67234dad91a5a4baee986a8b62dbf8f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nur",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733222881,
|
||||
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix_3": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_7"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734704479,
|
||||
"narHash": "sha256-MMi74+WckoyEWBRcg/oaGRvXC9BVVxDZNRMpL+72wBI=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "65712f5af67234dad91a5a4baee986a8b62dbf8f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1706371002,
|
||||
"narHash": "sha256-dwuorKimqSYgyu8Cw6ncKhyQjUDOyuXoxDTVmAXq88s=",
|
||||
"lastModified": 1734649271,
|
||||
"narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c002c6aa977ad22c60398daaa9be52f2203d0006",
|
||||
"rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -375,14 +890,14 @@
|
||||
},
|
||||
"utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_4"
|
||||
"systems": "systems_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705309234,
|
||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -390,27 +905,6 @@
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"vscode-server": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_4",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1684517665,
|
||||
"narHash": "sha256-SaAr66uCQ8CF75jIr23FZjk1+9Kfwm5sQnwV25206Gs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-vscode-server",
|
||||
"rev": "1e1358493df6529d4c7bc4cc3066f76fd16d4ae6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-vscode-server",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
229
flake.nix
229
flake.nix
@ -2,219 +2,50 @@
|
||||
description = "Michael Thomas's NixOS configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-23.11";
|
||||
nixpkgs.url = "nixpkgs/nixos-24.11";
|
||||
unstable.url = "nixpkgs/nixos-unstable";
|
||||
master.url = "github:NixOS/nixpkgs";
|
||||
nur.url = "github:nix-community/NUR";
|
||||
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
|
||||
|
||||
nixos-wsl = {
|
||||
url = "github:nix-community/NixOS-WSL";
|
||||
home-manager = {
|
||||
url = "github:rycee/home-manager/release-24.11";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
vscode-server = {
|
||||
url = "github:nix-community/nixos-vscode-server";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
darwin = {
|
||||
url = "github:lnl7/nix-darwin/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
|
||||
|
||||
home-manager = {
|
||||
url = "github:rycee/home-manager/release-23.11";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
inputs.nixpkgs.follows = "unstable";
|
||||
};
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
|
||||
ags.url = "github:Aylur/ags";
|
||||
agenix = {
|
||||
url = "github:ryantm/agenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
unstable,
|
||||
nur,
|
||||
utils,
|
||||
rust-overlay,
|
||||
nix-vscode-extensions,
|
||||
nixos-wsl,
|
||||
vscode-server,
|
||||
darwin,
|
||||
home-manager,
|
||||
...
|
||||
} @ inputs: {
|
||||
# This repo's overlay plus any other overlays you use
|
||||
# If you want to use packages from flakes that are not nixpkgs (such as NUR), add their overlays here.\
|
||||
overlays = {
|
||||
default = import ./overlays inputs;
|
||||
pkg-sets = (
|
||||
final: prev: {
|
||||
unstable = import inputs.unstable {system = final.system;};
|
||||
trunk = import inputs.trunk {system = final.system;};
|
||||
}
|
||||
);
|
||||
rust-overlay = rust-overlay.overlays.default;
|
||||
vscode-extensions = nix-vscode-extensions.overlays.default;
|
||||
outputs = inputs @ {flake-parts, ...}:
|
||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
flake = {
|
||||
overlays = import ./overlays {inherit inputs;};
|
||||
};
|
||||
|
||||
systems = [
|
||||
"aarch64-darwin"
|
||||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
imports = [./flakes];
|
||||
};
|
||||
|
||||
overlaysModule = {
|
||||
nixpkgs.overlays = builtins.attrValues self.overlays;
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
loft = nixpkgs.lib.nixosSystem {
|
||||
system = utils.lib.system.x86_64-linux;
|
||||
modules = [
|
||||
self.overlaysModule
|
||||
home-manager.nixosModules.home-manager
|
||||
./modules/common.nix
|
||||
./modules/containers.nix
|
||||
|
||||
./machines/loft/configuration.nix
|
||||
];
|
||||
specialArgs = {inherit inputs;};
|
||||
};
|
||||
|
||||
kitchen = nixpkgs.lib.nixosSystem {
|
||||
system = utils.lib.system.x86_64-linux;
|
||||
modules = [
|
||||
self.overlaysModule
|
||||
home-manager.nixosModules.home-manager
|
||||
./modules/common.nix
|
||||
./modules/containers.nix
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.michael = import ./user/environments/nixos/home.nix;
|
||||
}
|
||||
|
||||
./machines/kitchen/configuration.nix
|
||||
];
|
||||
specialArgs = {inherit inputs;};
|
||||
};
|
||||
|
||||
thinkcentre = nixpkgs.lib.nixosSystem {
|
||||
system = utils.lib.system.x86_64-linux;
|
||||
modules = [
|
||||
self.overlaysModule
|
||||
home-manager.nixosModules.home-manager
|
||||
./modules/common.nix
|
||||
./modules/hyprland.nix
|
||||
./modules/containers.nix
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.michael = import ./user/environments/nixos/home.nix;
|
||||
}
|
||||
|
||||
./machines/thinkcentre/configuration.nix
|
||||
];
|
||||
specialArgs = {inherit inputs;};
|
||||
};
|
||||
|
||||
# WSL environment
|
||||
work = inputs.nixpkgs.lib.nixosSystem {
|
||||
system = utils.lib.system.x86_64-linux;
|
||||
modules = [
|
||||
self.overlaysModule
|
||||
home-manager.nixosModules.home-manager
|
||||
vscode-server.nixosModules.default
|
||||
./modules/containers.nix
|
||||
./modules/nix.nix
|
||||
|
||||
./machines/work/configuration.nix
|
||||
];
|
||||
specialArgs = {inherit inputs;};
|
||||
};
|
||||
};
|
||||
|
||||
darwinConfigurations = {
|
||||
mac = darwin.lib.darwinSystem {
|
||||
system = "aarch64-darwin";
|
||||
specialArgs = {inherit inputs;};
|
||||
modules = [
|
||||
self.overlaysModule
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.michael = import ./user/environments/mac/home.nix;
|
||||
}
|
||||
|
||||
./modules/yabai.nix
|
||||
./machines/mac/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
nixos = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
system = "x86_64-linux";
|
||||
homeDirectory = "/home/michael";
|
||||
username = "michael";
|
||||
stateVersion = "21.05";
|
||||
configuration = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
imports = [
|
||||
./user/environments/nixos/home.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
wsl = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
system = "x86_64-linux";
|
||||
homeDirectory = "/home/michael";
|
||||
username = "michael";
|
||||
stateVersion = "21.05";
|
||||
configuration = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
imports = [
|
||||
./user/environments/wsl/home.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
mac = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
system = "aarch64-darwin";
|
||||
homeDirectory = "/Users/michael";
|
||||
username = "michael";
|
||||
stateVersion = "22.05";
|
||||
configuration = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
imports = [
|
||||
./user/environments/mac/home.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
# // utils.lib.eachSystem [ "aarch64-linux" "x86_64-darwin" "x86_64-linux" ] (system: {
|
||||
# nixpkgs = import nixpkgs {
|
||||
# inherit system;
|
||||
# overlays = [
|
||||
# self.overlays.default
|
||||
# ];
|
||||
# config.allowUnfree = true;
|
||||
# };
|
||||
# });
|
||||
}
|
||||
|
44
flakes/darwin.nix
Normal file
44
flakes/darwin.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
inputs,
|
||||
withSystem,
|
||||
...
|
||||
}: let
|
||||
mkDarwin = {
|
||||
system ? "aarch64-darwin",
|
||||
modules ? [],
|
||||
}:
|
||||
withSystem system (
|
||||
{
|
||||
inputs',
|
||||
lib,
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
inputs.darwin.lib.darwinSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit
|
||||
inputs
|
||||
inputs'
|
||||
lib
|
||||
pkgs
|
||||
;
|
||||
};
|
||||
modules = [../darwin] ++ modules;
|
||||
}
|
||||
);
|
||||
in {
|
||||
flake.darwinConfigurations = {
|
||||
mac = mkDarwin {
|
||||
modules = [
|
||||
{
|
||||
hm = import ../user/environments/mac/home.nix;
|
||||
}
|
||||
|
||||
../modules/yabai.nix
|
||||
../machines/mac/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
9
flakes/default.nix
Normal file
9
flakes/default.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
imports = [
|
||||
./lib.nix
|
||||
./darwin.nix
|
||||
./nixos.nix
|
||||
./packages.nix
|
||||
./treefmt.nix
|
||||
];
|
||||
}
|
30
flakes/lib.nix
Normal file
30
flakes/lib.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
perSystem = {
|
||||
inputs',
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
# use nixpkgs lib instead of flake-parts lib
|
||||
# avoids home-manager warning about version mismatch
|
||||
inherit (pkgs) lib;
|
||||
in {
|
||||
_module.args.lib = lib.extend (
|
||||
final: prev: {
|
||||
my = let
|
||||
lib = final;
|
||||
getPaths = file: root:
|
||||
builtins.filter builtins.pathExists (
|
||||
map (dir: root + "/${dir}/${file}") (
|
||||
lib.attrNames (lib.filterAttrs (name: type: type == "directory") (builtins.readDir root))
|
||||
)
|
||||
);
|
||||
in {
|
||||
inherit getPaths;
|
||||
getModules = builtins.concatMap (getPaths "default.nix");
|
||||
getHmModules = builtins.concatMap (getPaths "home.nix");
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
126
flakes/nixos.nix
Normal file
126
flakes/nixos.nix
Normal file
@ -0,0 +1,126 @@
|
||||
{
|
||||
inputs,
|
||||
self,
|
||||
withSystem,
|
||||
...
|
||||
}: let
|
||||
mkNixos = {
|
||||
system ? "x86_64-linux",
|
||||
nixpkgs ? inputs.nixpkgs,
|
||||
config ? {},
|
||||
overlays ? [],
|
||||
modules ? [],
|
||||
}:
|
||||
withSystem system (
|
||||
{
|
||||
inputs',
|
||||
lib,
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}: let
|
||||
customPkgs = import nixpkgs (
|
||||
lib.recursiveUpdate {
|
||||
inherit system;
|
||||
overlays = (builtins.attrValues self.overlays) ++ overlays;
|
||||
config.allowUnfree = true;
|
||||
} {inherit config;}
|
||||
);
|
||||
in
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit inputs inputs' lib;
|
||||
pkgs =
|
||||
if (nixpkgs != inputs.nixpkgs || config != {} || overlays != [])
|
||||
then customPkgs
|
||||
else pkgs;
|
||||
};
|
||||
modules = [../nixos] ++ modules;
|
||||
}
|
||||
);
|
||||
in {
|
||||
flake.nixosConfigurations = let
|
||||
defaultModules = [
|
||||
../modules
|
||||
inputs.agenix.nixosModules.default
|
||||
{
|
||||
environment.systemPackages = [
|
||||
inputs.agenix.packages.x86_64-linux.default
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
fullNixOSModules =
|
||||
defaultModules
|
||||
++ [
|
||||
{
|
||||
home-manager.users.michael = import ../user/environments/nixos/home.nix;
|
||||
}
|
||||
];
|
||||
in {
|
||||
kitchen = mkNixos {
|
||||
modules =
|
||||
fullNixOSModules
|
||||
++ [
|
||||
../modules/common.nix
|
||||
../modules/containers.nix
|
||||
|
||||
../machines/kitchen/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
thinkcentre = mkNixos {
|
||||
modules =
|
||||
fullNixOSModules
|
||||
++ [
|
||||
../modules/common.nix
|
||||
../modules/containers.nix
|
||||
|
||||
../machines/thinkcentre/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
terra = mkNixos {
|
||||
modules =
|
||||
fullNixOSModules
|
||||
++ [
|
||||
../modules/common.nix
|
||||
../modules/containers.nix
|
||||
|
||||
../machines/terra/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
oracle = mkNixos {
|
||||
modules =
|
||||
defaultModules
|
||||
++ [
|
||||
{
|
||||
home-manager.users.michael = import ../user/environments/nixos-server/home.nix;
|
||||
}
|
||||
|
||||
../machines/oracle/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
nova = mkNixos {
|
||||
modules =
|
||||
defaultModules
|
||||
++ [
|
||||
{
|
||||
home-manager.users.michael = import ../user/environments/nixos-server/home.nix;
|
||||
}
|
||||
|
||||
../machines/nova/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
work = mkNixos {
|
||||
modules = [
|
||||
inputs.nixos-wsl.nixosModules.default
|
||||
../machines/work/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
23
flakes/packages.nix
Normal file
23
flakes/packages.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
perSystem = {
|
||||
lib,
|
||||
system,
|
||||
...
|
||||
}: let
|
||||
pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = builtins.attrValues self.overlays;
|
||||
};
|
||||
in {
|
||||
_module.args.pkgs = pkgs;
|
||||
|
||||
packages = import ../pkgs {
|
||||
inherit inputs pkgs;
|
||||
};
|
||||
};
|
||||
}
|
8
flakes/treefmt.nix
Normal file
8
flakes/treefmt.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{inputs, ...}: {
|
||||
imports = [inputs.treefmt-nix.flakeModule];
|
||||
|
||||
perSystem.treefmt = {
|
||||
projectRootFile = "flake.nix";
|
||||
programs.alejandra.enable = true;
|
||||
};
|
||||
}
|
@ -19,8 +19,6 @@
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
micro
|
||||
gnome.gnome-tweaks
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
@ -46,6 +44,8 @@
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
my.hyprland.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.michael = {
|
||||
isNormalUser = true;
|
||||
|
@ -27,7 +27,7 @@
|
||||
# Video
|
||||
ffmpeg
|
||||
# Spotify
|
||||
unstable.spicetify-cli
|
||||
master.spicetify-cli
|
||||
# Java
|
||||
checkstyle
|
||||
# XCode
|
||||
@ -46,6 +46,7 @@
|
||||
eval `/usr/libexec/path_helper -s`
|
||||
fi
|
||||
'';
|
||||
enableGlobalCompInit = false;
|
||||
};
|
||||
};
|
||||
|
||||
@ -55,24 +56,6 @@
|
||||
nix-daemon.enable = true;
|
||||
};
|
||||
|
||||
nixpkgs = {
|
||||
# Workaround for pyopenssl being marked broken
|
||||
config.allowBroken = true;
|
||||
};
|
||||
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
gc = {
|
||||
automatic = true;
|
||||
interval.Day = 7;
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
settings.auto-optimise-store = false;
|
||||
};
|
||||
|
||||
system = {
|
||||
# Since it's not possible to declare default shell, run this command after build
|
||||
activationScripts.postActivation.text = ''sudo chsh -s ${pkgs.zsh}/bin/zsh'';
|
||||
|
106
machines/nova/configuration.nix
Normal file
106
machines/nova/configuration.nix
Normal file
@ -0,0 +1,106 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "nova"; # Define your hostname.
|
||||
|
||||
# Enable networking
|
||||
networking.useDHCP = false;
|
||||
systemd.network.enable = true;
|
||||
systemd.network.networks."10-wired" = {
|
||||
matchConfig.Name = "enp1s0";
|
||||
networkConfig = {
|
||||
Address = "192.168.1.11/24";
|
||||
Gateway = "192.168.1.1";
|
||||
DNS = "192.168.1.1";
|
||||
};
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/New_York";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
my.services.mealie.enable = true;
|
||||
my.services.nextcloud.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.michael = {
|
||||
isNormalUser = true;
|
||||
description = "Michael Thomas";
|
||||
extraGroups = ["networkmanager" "wheel"];
|
||||
shell = pkgs.zsh;
|
||||
packages = with pkgs; [];
|
||||
openssh.authorizedKeys.keys = [
|
||||
# Neptune
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDUYHiTel+RDzygCeNwV25cnBBNioM19EQWqxPC+xq7lNlNcAQ4wi9JIOONVGkshxPXzKZyR3F53Igs9JZr1E9088L52eUp35JhW1pthai82cw1jGkj9wxcKJnU6b7QNDKA+ejPTC/ciFFKytMyPgID0ICzBRQsnj15i4lGvGDgfTQ7qfI2J855H7S7qOpY7cbsGfeoz3f8Ye1FspJFDsNu9QhX05iunBcbni0uLoTtgS5cEBRr7H9RkKR7GCfd4Ae/sp+aeDkLU4aBkEi+A8VLfR74Juia1j/3mAAmkgJKGcBCKUv0ixBGd6XclZmkF8f2Hx0z8mDxJ7U8lsDUSKdvxK7fecsM4F/GTvjrUxV1nLD4SRQ06GtBmGQGDzIn3Nm1URd6gGT9W3486XJsqmGzjuHa5o4WhmBgh/Gs8xUcv7kWD5enrYacBr+HKVJWnnLFp+XfAYaMCT6j/4jc4D9/9hijRbhboICTDxWCWtFgz7QpsO6BQpi/wkR4Ql61vPc= michael@neptune"
|
||||
# Oracle
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPc/HYsbpVsyoU2n0EiqQ4+3aSiFPtddjPCGK187W24f michael@oracle"
|
||||
];
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
}
|
39
machines/nova/hardware-configuration.nix
Normal file
39
machines/nova/hardware-configuration.nix
Normal file
@ -0,0 +1,39 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "sr_mod" "virtio_blk"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/51a7185f-56b6-4589-8a57-4543bae6e19d";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/41B1-929E";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0022" "dmask=0022"];
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
123
machines/oracle/configuration.nix
Normal file
123
machines/oracle/configuration.nix
Normal file
@ -0,0 +1,123 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
zramSwap.enable = true;
|
||||
|
||||
networking.hostName = "oracle";
|
||||
networking.domain = "subnet08161027.vcn08161027.oraclevcn.com";
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedUDPPorts = [51820];
|
||||
};
|
||||
|
||||
services.openssh.enable = true;
|
||||
services.openssh.settings = {
|
||||
PasswordAuthentication = false;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [wireguard-tools];
|
||||
|
||||
# Wireguard tunnel
|
||||
age.secrets.wireguardOracle.file = ../../secrets/wireguard-oracle.age;
|
||||
networking.wg-quick.interfaces = {
|
||||
wg0 = {
|
||||
address = ["10.0.10.1/24"];
|
||||
listenPort = 51820;
|
||||
privateKeyFile = config.age.secrets.wireguardOracle.path;
|
||||
|
||||
peers = [
|
||||
{
|
||||
publicKey = "iKJO9Q8LsdCdApapTX9CJmrtAKn1TYhg4YUiBUBPzmo=";
|
||||
allowedIPs = ["10.0.10.2/32"];
|
||||
}
|
||||
{
|
||||
publicKey = "IM7i+2BFsa+XyA4V4jd8iM+jpW307rDEkPOGdSddfzI=";
|
||||
allowedIPs = ["10.0.10.3/32"];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
environment.variables.EDITOR = "nvim";
|
||||
|
||||
users.users.michael = {
|
||||
isNormalUser = true;
|
||||
home = "/home/michael";
|
||||
description = "Michael Thomas";
|
||||
extraGroups = ["wheel" "networkmanager"];
|
||||
shell = pkgs.zsh;
|
||||
openssh.authorizedKeys.keys = [
|
||||
''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDUYHiTel+RDzygCeNwV25cnBBNioM19EQWqxPC+xq7lNlNcAQ4wi9JIOONVGkshxPXzKZyR3F53Igs9JZr1E9088L52eUp35JhW1pthai82cw1jGkj9wxcKJnU6b7QNDKA+ejPTC/ciFFKytMyPgID0ICzBRQsnj15i4lGvGDgfTQ7qfI2J855H7S7qOpY7cbsGfeoz3f8Ye1FspJFDsNu9QhX05iunBcbni0uLoTtgS5cEBRr7H9RkKR7GCfd4Ae/sp+aeDkLU4aBkEi+A8VLfR74Juia1j/3mAAmkgJKGcBCKUv0ixBGd6XclZmkF8f2Hx0z8mDxJ7U8lsDUSKdvxK7fecsM4F/GTvjrUxV1nLD4SRQ06GtBmGQGDzIn3Nm1URd6gGT9W3486XJsqmGzjuHa5o4WhmBgh/Gs8xUcv7kWD5enrYacBr+HKVJWnnLFp+XfAYaMCT6j/4jc4D9/9hijRbhboICTDxWCWtFgz7QpsO6BQpi/wkR4Ql61vPc= michael@neptune''
|
||||
|
||||
''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQr9lluvuGk3qU1bE7HrrZcE36x5hhD5Dat+E4My55aoh+Df/JeuWMPvzS4zLKMsIIZCUX6kbjvTtvWe7gPLflhDOUGI947MK9B01pojDn0LBugz57Ai9fPlG5+AlMWaxWitmP8JB637oxBpqesqxHdiEKW25u9t2qOvjX3kCdcoSYDlW72Xm8ZI9+qKcAlGLnFhiQxM18rjHcZYdn9ZyWRRSC1ocuTqnbh5lsYoMhD+4QWo5LmwMVjr5uix0i+ktqKzENaiDgA/MQIWQrHqUavfjvMRyyQO7bScVTe/PllKFpLOBym2SLC5hD7vG69BBo0dQUto8tAbIgI9Tmv1dx michael@venus''
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 4 * 1024;
|
||||
}
|
||||
];
|
||||
|
||||
# Services
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
package = let
|
||||
caddyWithPlugins = builtins.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/jpds/nixpkgs/a33b02fa9d664f31dadc8a874eb1a5dbaa9f4ecf/pkgs/servers/caddy/default.nix";
|
||||
sha256 = "sha256:1x1g6qyhmclz2jyc5nmfjsri3xx4pw5rd15n2xjkxlgdcvywcv5f";
|
||||
};
|
||||
in (pkgs.callPackage "${caddyWithPlugins}" {
|
||||
externalPlugins = [
|
||||
{
|
||||
name = "greenpau/caddy-security";
|
||||
repo = "github.com/greenpau/caddy-security";
|
||||
version = "v1.1.23";
|
||||
}
|
||||
];
|
||||
vendorHash = "sha256-rGNyeHZZBxVM8GMUQMV/JzkK9S/l8tefaQde/d4x9LA=";
|
||||
});
|
||||
globalConfig = ''
|
||||
email michaelhthomas@outlook.com
|
||||
'';
|
||||
virtualHosts = {
|
||||
"auth.s.michaelt.xyz".extraConfig = ''
|
||||
reverse_proxy http://10.0.10.2:7654
|
||||
'';
|
||||
"traggo.s.michaelt.xyz".extraConfig = ''
|
||||
reverse_proxy http://10.0.10.2:3030
|
||||
'';
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [80 443];
|
||||
|
||||
my.server = {
|
||||
domain = "s.michaelt.xyz";
|
||||
proxyIP = "10.0.10.2";
|
||||
};
|
||||
my.services.homer.enable = true;
|
||||
my.services.forgejo.proxy = true;
|
||||
|
||||
services.uptime-kuma = {
|
||||
enable = true;
|
||||
settings = {
|
||||
port = "3001";
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."status.gringotts.michaelt.xyz".extraConfig = ''
|
||||
reverse_proxy http://localhost:${config.services.uptime-kuma.settings.PORT}
|
||||
'';
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
18
machines/oracle/hardware-configuration.nix
Normal file
18
machines/oracle/hardware-configuration.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{modulesPath, ...}: {
|
||||
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
|
||||
boot.loader.grub = {
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
device = "nodev";
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/97E5-76C2";
|
||||
fsType = "vfat";
|
||||
};
|
||||
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi"];
|
||||
boot.initrd.kernelModules = ["nvme"];
|
||||
fileSystems."/" = {
|
||||
device = "/dev/mapper/centosvolume-root";
|
||||
fsType = "xfs";
|
||||
};
|
||||
}
|
97
machines/terra/configuration.nix
Normal file
97
machines/terra/configuration.nix
Normal file
@ -0,0 +1,97 @@
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
networking.hostName = "terra"; # Define your hostname.
|
||||
networking.nameservers = ["1.1.1.1" "8.8.8.8"];
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
};
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/New_York";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
AllowUsers = ["michael"];
|
||||
};
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
environment.variables.EDITOR = "nvim";
|
||||
|
||||
my.hyprland.enable = true;
|
||||
my.libreoffice.enable = true;
|
||||
my.steam.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.michael = {
|
||||
isNormalUser = true;
|
||||
description = "Michael Thomas";
|
||||
extraGroups = ["wheel" "docker" "podman" "adbusers" "dialout" "libvirtd" "networkmanager"];
|
||||
shell = pkgs.zsh;
|
||||
openssh.authorizedKeys.keys = [
|
||||
# Neptune
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDUYHiTel+RDzygCeNwV25cnBBNioM19EQWqxPC+xq7lNlNcAQ4wi9JIOONVGkshxPXzKZyR3F53Igs9JZr1E9088L52eUp35JhW1pthai82cw1jGkj9wxcKJnU6b7QNDKA+ejPTC/ciFFKytMyPgID0ICzBRQsnj15i4lGvGDgfTQ7qfI2J855H7S7qOpY7cbsGfeoz3f8Ye1FspJFDsNu9QhX05iunBcbni0uLoTtgS5cEBRr7H9RkKR7GCfd4Ae/sp+aeDkLU4aBkEi+A8VLfR74Juia1j/3mAAmkgJKGcBCKUv0ixBGd6XclZmkF8f2Hx0z8mDxJ7U8lsDUSKdvxK7fecsM4F/GTvjrUxV1nLD4SRQ06GtBmGQGDzIn3Nm1URd6gGT9W3486XJsqmGzjuHa5o4WhmBgh/Gs8xUcv7kWD5enrYacBr+HKVJWnnLFp+XfAYaMCT6j/4jc4D9/9hijRbhboICTDxWCWtFgz7QpsO6BQpi/wkR4Ql61vPc= michael@neptune"
|
||||
# Oracle
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPc/HYsbpVsyoU2n0EiqQ4+3aSiFPtddjPCGK187W24f michael@oracle"
|
||||
];
|
||||
};
|
||||
|
||||
# Enablle libvirtd
|
||||
virtualisation.libvirtd.enable = true;
|
||||
boot.kernelModules = ["kvm-amd" "kvm-intel"];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
obs-studio
|
||||
kdenlive
|
||||
inkscape
|
||||
thunderbird
|
||||
|
||||
virt-manager
|
||||
virtiofsd
|
||||
|
||||
# GTK Discord Client
|
||||
unstable.dissent
|
||||
|
||||
prismlauncher
|
||||
lutris
|
||||
|
||||
android-studio
|
||||
];
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
}
|
50
machines/terra/hardware-configuration.nix
Normal file
50
machines/terra/hardware-configuration.nix
Normal file
@ -0,0 +1,50 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = ["amdgpu"];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_8;
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
hardware.opengl.driSupport = true;
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
services.xserver.videoDrivers = ["amdgpu"];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/fa11ad2d-97d9-4e87-8fe9-f2cae0d9894e";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/2FCC-48ED";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/b378f2ec-0bbb-4896-92b5-ef08c707555d";}
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp8s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp9s0u4u4.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp7s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
@ -1,10 +1,40 @@
|
||||
{pkgs, ...}: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
networking.hostName = "venus"; # Define your hostname.
|
||||
networking.nameservers = ["1.1.1.1" "8.8.8.8"];
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
interfaces."wg0" = {
|
||||
allowedTCPPorts = [7654 3030];
|
||||
};
|
||||
};
|
||||
|
||||
# Wireguard tunnel to oracle
|
||||
age.secrets.wireguardThinkcentre.file = ../../secrets/wireguard-thinkcentre.age;
|
||||
networking.wg-quick.interfaces = {
|
||||
wg0 = {
|
||||
address = ["10.0.10.2/32"];
|
||||
listenPort = 51820;
|
||||
privateKeyFile = config.age.secrets.wireguardThinkcentre.path;
|
||||
|
||||
peers = [
|
||||
{
|
||||
publicKey = "sdqT2l1HRe9rDYejJ+luQK8zdC+/KqDuQ1rpvZq/KlQ=";
|
||||
endpoint = "150.136.162.107:51820";
|
||||
allowedIPs = ["10.0.10.1/24"];
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/New_York";
|
||||
@ -25,9 +55,72 @@
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
xkbVariant = "";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
AllowUsers = ["michael"];
|
||||
};
|
||||
};
|
||||
|
||||
my.services.homepage-dashboard = {
|
||||
enable = true;
|
||||
port = 8082;
|
||||
};
|
||||
|
||||
age.secrets.keycloakDb.file = ../../secrets/keycloak-db.age;
|
||||
services.keycloak = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.keycloak;
|
||||
settings = {
|
||||
hostname-url = "https://auth.s.michaelt.xyz";
|
||||
hostname-admin-url = "https://auth.s.michaelt.xyz";
|
||||
hostname-strict = false;
|
||||
hostname-strict-https = false;
|
||||
# proxy-headers = "xforwarded";
|
||||
proxy = "edge";
|
||||
http-enabled = true;
|
||||
http-port = 7654;
|
||||
};
|
||||
database.passwordFile = config.age.secrets.keycloakDb.path;
|
||||
themes = with pkgs; {
|
||||
keywind = keycloak-theme-keywind;
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.backend = "podman";
|
||||
|
||||
virtualisation.oci-containers.containers.traggo = {
|
||||
image = "traggo/server:latest";
|
||||
autoStart = true;
|
||||
ports = ["3030:3030"];
|
||||
volumes = [
|
||||
"/var/lib/traggo/data:/opt/traggo/data"
|
||||
];
|
||||
environment = {
|
||||
TRAGGO_DEFAULT_USER_NAME = "michael";
|
||||
TRAGGO_DEFAULT_USER_PASS = "NfvzH2H5eNJLAJb6";
|
||||
};
|
||||
};
|
||||
|
||||
my.server = {
|
||||
domain = "s.michaelt.xyz";
|
||||
firewallInterface = "wg0";
|
||||
};
|
||||
|
||||
# TODO: Disable desktop
|
||||
my.hyprland.enable = true;
|
||||
|
||||
my.services.forgejo = {
|
||||
enable = true;
|
||||
port = 3000;
|
||||
actions.enable = true;
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
@ -46,6 +139,12 @@
|
||||
description = "Michael Thomas";
|
||||
extraGroups = ["wheel" "docker" "podman" "adbusers" "dialout"];
|
||||
shell = pkgs.zsh;
|
||||
openssh.authorizedKeys.keys = [
|
||||
# Neptune
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDUYHiTel+RDzygCeNwV25cnBBNioM19EQWqxPC+xq7lNlNcAQ4wi9JIOONVGkshxPXzKZyR3F53Igs9JZr1E9088L52eUp35JhW1pthai82cw1jGkj9wxcKJnU6b7QNDKA+ejPTC/ciFFKytMyPgID0ICzBRQsnj15i4lGvGDgfTQ7qfI2J855H7S7qOpY7cbsGfeoz3f8Ye1FspJFDsNu9QhX05iunBcbni0uLoTtgS5cEBRr7H9RkKR7GCfd4Ae/sp+aeDkLU4aBkEi+A8VLfR74Juia1j/3mAAmkgJKGcBCKUv0ixBGd6XclZmkF8f2Hx0z8mDxJ7U8lsDUSKdvxK7fecsM4F/GTvjrUxV1nLD4SRQ06GtBmGQGDzIn3Nm1URd6gGT9W3486XJsqmGzjuHa5o4WhmBgh/Gs8xUcv7kWD5enrYacBr+HKVJWnnLFp+XfAYaMCT6j/4jc4D9/9hijRbhboICTDxWCWtFgz7QpsO6BQpi/wkR4Ql61vPc= michael@neptune"
|
||||
# Oracle
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPc/HYsbpVsyoU2n0EiqQ4+3aSiFPtddjPCGK187W24f michael@oracle"
|
||||
];
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
|
@ -1,29 +1,33 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/2b1793d6-feff-48df-9180-03e8c2bef7bf";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/2b1793d6-feff-48df-9180-03e8c2bef7bf";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/2082-08EF";
|
||||
fsType = "vfat";
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/2082-08EF";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
@ -1,57 +1,16 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
defaultUser = "michael";
|
||||
in {
|
||||
imports = [
|
||||
"${modulesPath}/profiles/minimal.nix"
|
||||
|
||||
inputs.nixos-wsl.nixosModules.wsl
|
||||
];
|
||||
|
||||
{pkgs, ...}: {
|
||||
wsl = {
|
||||
enable = true;
|
||||
wslConf = {
|
||||
automount.root = "/mnt";
|
||||
interop.appendWindowsPath = false;
|
||||
};
|
||||
defaultUser = defaultUser;
|
||||
startMenuLaunchers = true;
|
||||
|
||||
# Enable integration with Docker Desktop (needs to be installed)
|
||||
# docker.enable = true;
|
||||
};
|
||||
|
||||
time.timeZone = "America/New_York";
|
||||
|
||||
programs.adb.enable = true;
|
||||
|
||||
# Required because for some reason WSL kernel doesn't play well with nftables
|
||||
networking.firewall.package = pkgs.iptables-legacy;
|
||||
|
||||
home-manager = {
|
||||
users.michael = import ../../user/environments/wsl/home.nix pkgs;
|
||||
useGlobalPkgs = true;
|
||||
defaultUser = "michael";
|
||||
interop.includePath = false;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
nvim-custom
|
||||
];
|
||||
|
||||
services.vscode-server.enable = true;
|
||||
my.zsh.enable = true;
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
users.users.${defaultUser} = {
|
||||
uid = pkgs.lib.mkForce 1001;
|
||||
extraGroups = ["wheel" "docker" "podman"];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
system.stateVersion = "22.05";
|
||||
system.stateVersion = "24.05";
|
||||
hm.home.stateVersion = "24.05";
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Enable Avahi Network Discovery
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns = true;
|
||||
nssmdns4 = true;
|
||||
publish.enable = true;
|
||||
publish.addresses = true;
|
||||
};
|
||||
|
@ -4,9 +4,8 @@
|
||||
./bluetooth.nix
|
||||
./bootloader.nix
|
||||
./cups.nix
|
||||
./flatpak.nix
|
||||
./fonts.nix
|
||||
./nix.nix
|
||||
./hosts.nix
|
||||
./sound.nix
|
||||
];
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
{pkgs, ...}: {
|
||||
virtualisation.containers.enable = true;
|
||||
|
||||
# Enable Podman w/ docker compose compatibility
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
|
5
modules/default.nix
Normal file
5
modules/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
./services
|
||||
];
|
||||
}
|
5
modules/hosts.nix
Normal file
5
modules/hosts.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
networking.hosts = {
|
||||
"150.136.162.107" = ["oracle"];
|
||||
};
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.hyprland;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Theme
|
||||
adw-gtk3
|
||||
|
||||
# Greeter
|
||||
cage
|
||||
greetd.gtkgreet
|
||||
|
||||
# Applications
|
||||
gnome.nautilus
|
||||
gnome.sushi
|
||||
gnome.eog
|
||||
gnome.totem
|
||||
gnome.cheese
|
||||
gnome.file-roller
|
||||
gnome.gnome-weather
|
||||
gnome.gnome-contacts
|
||||
gnome.gnome-calendar
|
||||
gnome.gnome-screenshot
|
||||
gnome.gnome-dictionary
|
||||
gnome.gnome-font-viewer
|
||||
gnome.gnome-system-monitor
|
||||
];
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "cage -s -- gtkgreet --command=Hyprland";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
nix = {
|
||||
extraOptions = ''
|
||||
experimental-features = flakes nix-command
|
||||
'';
|
||||
# this is required until nix 2.4 is released
|
||||
package = pkgs.nixFlakes;
|
||||
|
||||
settings.auto-optimise-store = true;
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
}
|
9
modules/services/default.nix
Normal file
9
modules/services/default.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
imports = [
|
||||
./forgejo
|
||||
./homepage-dashboard
|
||||
./homer
|
||||
./mealie
|
||||
./nextcloud
|
||||
];
|
||||
}
|
234
modules/services/forgejo/default.nix
Normal file
234
modules/services/forgejo/default.nix
Normal file
@ -0,0 +1,234 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.my.services.forgejo;
|
||||
inherit (config.my.server) domain proxyIP firewallInterface;
|
||||
forgejoDomain = "git.${domain}";
|
||||
forgejoUrl = "https://${forgejoDomain}";
|
||||
|
||||
# for nix actions runner
|
||||
storeDeps = pkgs.runCommand "store-deps" {} ''
|
||||
mkdir -p $out/bin
|
||||
for dir in ${
|
||||
toString [
|
||||
pkgs.coreutils
|
||||
pkgs.findutils
|
||||
pkgs.gnugrep
|
||||
pkgs.gawk
|
||||
pkgs.git
|
||||
pkgs.nix
|
||||
pkgs.bash
|
||||
pkgs.jq
|
||||
pkgs.nodejs
|
||||
pkgs.devenv
|
||||
]
|
||||
}; do
|
||||
for bin in "$dir"/bin/*; do
|
||||
ln -s "$bin" "$out/bin/$(basename "$bin")"
|
||||
done
|
||||
done
|
||||
|
||||
# Add SSL CA certs
|
||||
mkdir -p $out/etc/ssl/certs
|
||||
cp -a "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" $out/etc/ssl/certs/ca-bundle.crt
|
||||
'';
|
||||
in {
|
||||
options.my.services.forgejo = {
|
||||
enable = mkEnableOption "Forgejo";
|
||||
proxy = mkEnableOption "Forgejo reverse proxy entry";
|
||||
actions = mkOption {
|
||||
type = types.submodule (_: {
|
||||
options.enable = mkEnableOption "Forgejo Actions";
|
||||
});
|
||||
default = {};
|
||||
};
|
||||
subdomain = mkOption {
|
||||
type = types.str;
|
||||
default = "git";
|
||||
example = "git";
|
||||
description = "Subdomain to use for the service.";
|
||||
};
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 3000;
|
||||
example = 8080;
|
||||
description = "HTTP port for the Forgejo service.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf cfg.enable {
|
||||
age.secrets.forgejoSendgridKey = {
|
||||
file = ../../../secrets/sendgrid-key.age;
|
||||
owner = "forgejo";
|
||||
group = "forgejo";
|
||||
};
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.forgejo;
|
||||
settings.server = {
|
||||
DOMAIN = forgejoDomain;
|
||||
ROOT_URL = forgejoUrl;
|
||||
DISABLE_SSH = true;
|
||||
HTTP_PORT = cfg.port;
|
||||
};
|
||||
settings.session = {
|
||||
COOKIE_SECURE = true;
|
||||
};
|
||||
settings.service = {
|
||||
DISABLE_REGISTRATION = true;
|
||||
ENABLE_NOTIFY_MAIL = true;
|
||||
};
|
||||
settings.admin = {
|
||||
DEFAULT_EMAIL_NOTIFICATIONS = "onmention";
|
||||
};
|
||||
settings.openid = {
|
||||
ENABLE_OPENID_SIGNIN = true;
|
||||
ENABLE_OPENID_SIGNUP = true;
|
||||
};
|
||||
settings.oauth2_client = {
|
||||
ENABLE_AUTO_REGISTRATION = true;
|
||||
};
|
||||
settings.mailer = {
|
||||
ENABLED = true;
|
||||
FROM = "forgejo@michaelt.xyz";
|
||||
PROTOCOL = "starttls";
|
||||
SMTP_ADDR = "smtp.sendgrid.net";
|
||||
SMTP_PORT = 587;
|
||||
USER = "apikey";
|
||||
};
|
||||
mailerPasswordFile = config.age.secrets.forgejoSendgridKey.path;
|
||||
};
|
||||
|
||||
networking.firewall.interfaces."${firewallInterface}".allowedTCPPorts = [cfg.port];
|
||||
})
|
||||
(mkIf cfg.actions.enable {
|
||||
# build image // taken from https://git.clan.lol/clan/clan-infra/src/branch/main/modules/web01/gitea/actions-runner.nix
|
||||
# everything here has no dependencies on the store
|
||||
systemd.services.forgejo-runner-nix-image = {
|
||||
wantedBy = ["multi-user.target"];
|
||||
after = ["podman.service"];
|
||||
requires = ["podman.service"];
|
||||
path = [
|
||||
config.virtualisation.podman.package
|
||||
pkgs.gnutar
|
||||
pkgs.shadow
|
||||
pkgs.getent
|
||||
];
|
||||
# we also include etc here because the cleanup job also wants the nixuser to be present
|
||||
script = ''
|
||||
set -eux -o pipefail
|
||||
mkdir -p etc/nix
|
||||
|
||||
# Create an unpriveleged user that we can use also without the run-as-user.sh script
|
||||
touch etc/passwd etc/group
|
||||
groupid=$(cut -d: -f3 < <(getent group nixuser))
|
||||
userid=$(cut -d: -f3 < <(getent passwd nixuser))
|
||||
groupadd --prefix $(pwd) --gid "$groupid" nixuser
|
||||
emptypassword='$6$1ero.LwbisiU.h3D$GGmnmECbPotJoPQ5eoSTD6tTjKnSWZcjHoVTkxFLZP17W9hRi/XkmCiAMOfWruUwy8gMjINrBMNODc7cYEo4K.'
|
||||
useradd --prefix $(pwd) -p "$emptypassword" -m -d /tmp -u "$userid" -g "$groupid" -G nixuser nixuser
|
||||
|
||||
cat <<NIX_CONFIG > etc/nix/nix.conf
|
||||
accept-flake-config = true
|
||||
experimental-features = nix-command flakes
|
||||
NIX_CONFIG
|
||||
|
||||
cat <<NSSWITCH > etc/nsswitch.conf
|
||||
passwd: files mymachines systemd
|
||||
group: files mymachines systemd
|
||||
shadow: files
|
||||
|
||||
hosts: files mymachines dns myhostname
|
||||
networks: files
|
||||
|
||||
ethers: files
|
||||
services: files
|
||||
protocols: files
|
||||
rpc: files
|
||||
NSSWITCH
|
||||
|
||||
# list the content as it will be imported into the container
|
||||
tar -cv . | tar -tvf -
|
||||
tar -cv . | podman import - forgejo-runner-nix
|
||||
'';
|
||||
serviceConfig = {
|
||||
RuntimeDirectory = "forgejo-runner-nix-image";
|
||||
WorkingDirectory = "/run/forgejo-runner-nix-image";
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
};
|
||||
|
||||
users.users.nixuser = {
|
||||
group = "nixuser";
|
||||
description = "Used for running nix ci jobs";
|
||||
home = "/var/empty";
|
||||
isSystemUser = true;
|
||||
};
|
||||
users.groups.nixuser = {};
|
||||
|
||||
# configure the actions runner itself
|
||||
age.secrets.forgejoActions.file = ../../../secrets/forgejo-actions.age;
|
||||
services.gitea-actions-runner = mkIf cfg.actions.enable {
|
||||
package = pkgs.unstable.forgejo-runner;
|
||||
instances.venus = {
|
||||
enable = true;
|
||||
name = "venus-nix-runner";
|
||||
url = forgejoUrl;
|
||||
settings = {
|
||||
# options = "-v /var/run/podman/podman.sock:/var/run/podman/podman.sock";
|
||||
runner = {
|
||||
capacity = 1;
|
||||
timeout = "45m";
|
||||
};
|
||||
container = {
|
||||
options = "-e NIX_BUILD_SHELL=/bin/bash -e PAGER=cat -e PATH=/bin -e SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt --device /dev/kvm -v /nix:/nix -v ${storeDeps}/bin:/bin -v ${storeDeps}/etc/ssl:/etc/ssl --user nixuser --device=/dev/kvm";
|
||||
# privileged = true;
|
||||
valid_volumes = [
|
||||
"/nix"
|
||||
"${storeDeps}/bin"
|
||||
"${storeDeps}/etc/ssl"
|
||||
];
|
||||
# force_pull = false;
|
||||
network = "bridge";
|
||||
};
|
||||
};
|
||||
labels = [
|
||||
"nix:docker://forgejo-runner-nix"
|
||||
];
|
||||
tokenFile = config.age.secrets.forgejoActions.path;
|
||||
};
|
||||
};
|
||||
})
|
||||
(mkIf cfg.proxy {
|
||||
services.caddy.virtualHosts."${forgejoDomain}".extraConfig = ''
|
||||
handle_errors {
|
||||
respond "This server is currently unavailable." 502
|
||||
}
|
||||
|
||||
redir /user/login /user/oauth2/Keycloak?{query}
|
||||
|
||||
reverse_proxy http://${proxyIP}:${toString cfg.port}
|
||||
'';
|
||||
|
||||
webapps.dashboardCategories = [
|
||||
{
|
||||
name = "Git";
|
||||
tag = "git";
|
||||
}
|
||||
];
|
||||
|
||||
webapps.apps.forgejo.dashboard = {
|
||||
name = "Forgejo";
|
||||
category = "git";
|
||||
icon = "git-alt";
|
||||
url = forgejoUrl;
|
||||
description = "Beyond coding. We forge.";
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
73
modules/services/homepage-dashboard/default.nix
Normal file
73
modules/services/homepage-dashboard/default.nix
Normal file
@ -0,0 +1,73 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.my.services.homepage-dashboard;
|
||||
inherit (config.my.server) domain proxyIP firewallInterface;
|
||||
in {
|
||||
disabledModules = ["services/misc/homepage-dashboard.nix"];
|
||||
|
||||
imports = [
|
||||
# Use homepage-dashboard service from nixos-unstable channel.
|
||||
"${inputs.unstable}/nixos/modules/services/misc/homepage-dashboard.nix"
|
||||
];
|
||||
|
||||
options.my.services.homepage-dashboard = {
|
||||
enable = mkEnableOption "Homepage Dashboard";
|
||||
proxy = mkEnableOption "Homepage Dashboard reverse proxy entry";
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 8082;
|
||||
description = "HTTP port for the homepage-dashboard service.";
|
||||
};
|
||||
services = mkOption {
|
||||
type = types.attrs;
|
||||
default = {};
|
||||
description = "Attrset of services by group.";
|
||||
example = ''
|
||||
{
|
||||
Group = {
|
||||
App = {
|
||||
href = "https://example.com";
|
||||
description = "An amazing app!";
|
||||
};
|
||||
};
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf cfg.enable {
|
||||
services.homepage-dashboard = {
|
||||
enable = true;
|
||||
listenPort = cfg.port;
|
||||
settings.logpath = "/var/log/homepage-dashboard";
|
||||
# Convert services to YAML format
|
||||
services =
|
||||
lib.mapAttrsToList (
|
||||
groupName: groupAttrs: {
|
||||
${groupName} = (
|
||||
lib.mapAttrsToList (
|
||||
serviceName: serviceAttrs: {${serviceName} = serviceAttrs;}
|
||||
)
|
||||
groupAttrs
|
||||
);
|
||||
}
|
||||
)
|
||||
cfg.services;
|
||||
};
|
||||
systemd.services.homepage-dashboard.environment.LOG_TARGETS = "stdout";
|
||||
|
||||
networking.firewall.interfaces."${firewallInterface}".allowedTCPPorts = [cfg.port];
|
||||
})
|
||||
(mkIf cfg.proxy {
|
||||
services.caddy.virtualHosts."${domain}".extraConfig = ''
|
||||
reverse_proxy http://${proxyIP}:${toString cfg.port}
|
||||
'';
|
||||
})
|
||||
];
|
||||
}
|
139
modules/services/homer/config.nix
Normal file
139
modules/services/homer/config.nix
Normal file
@ -0,0 +1,139 @@
|
||||
# Heavily inspired by https://github.com/Stunkymonkey/nixos/blob/b061b1785b4d07f9032b8cf17e866ff9dbc947b0/modules/services/homer/config.nix
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.webapps = {
|
||||
dashboardCategories = lib.mkOption {
|
||||
type = lib.types.listOf (lib.types.submodule {
|
||||
options = {
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
Category name.
|
||||
'';
|
||||
example = "Applications";
|
||||
};
|
||||
tag = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
Category tag.
|
||||
'';
|
||||
example = "app";
|
||||
};
|
||||
};
|
||||
});
|
||||
description = ''
|
||||
App categories to display on the dashboard.
|
||||
'';
|
||||
example = [
|
||||
{
|
||||
name = "Application";
|
||||
tag = "app";
|
||||
}
|
||||
];
|
||||
default = [];
|
||||
};
|
||||
|
||||
apps = lib.mkOption {
|
||||
type =
|
||||
lib.types.attrsOf
|
||||
(lib.types.submodule {
|
||||
options = {
|
||||
dashboard = {
|
||||
url = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = ''
|
||||
Url to webapp
|
||||
'';
|
||||
example = "http://192.168.1.10:1234";
|
||||
default = null;
|
||||
};
|
||||
name = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = ''
|
||||
Application name.
|
||||
'';
|
||||
example = "App";
|
||||
default = null;
|
||||
};
|
||||
description = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = ''
|
||||
Application description.
|
||||
'';
|
||||
example = "An amazing app!";
|
||||
default = null;
|
||||
};
|
||||
category = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = ''
|
||||
App category tag.
|
||||
'';
|
||||
example = "app";
|
||||
default = null;
|
||||
};
|
||||
icon = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = ''
|
||||
Font Awesome application icon.
|
||||
'';
|
||||
example = "rss";
|
||||
default = null;
|
||||
};
|
||||
type = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = ''
|
||||
application type.
|
||||
'';
|
||||
example = "Ping";
|
||||
default = "Ping";
|
||||
};
|
||||
method = lib.mkOption {
|
||||
type = lib.types.enum ["get" "head"];
|
||||
description = ''
|
||||
method of request used
|
||||
'';
|
||||
example = "get";
|
||||
default = "head";
|
||||
};
|
||||
};
|
||||
};
|
||||
});
|
||||
description = ''
|
||||
Defines a web application.
|
||||
'';
|
||||
default = {};
|
||||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
cfg = config.webapps;
|
||||
in {
|
||||
lib.webapps.homerServices = let
|
||||
apps = builtins.filter (a: a.dashboard.name != null) (lib.attrValues cfg.apps);
|
||||
in
|
||||
lib.forEach cfg.dashboardCategories (
|
||||
cat: let
|
||||
catApps = lib.sort (a: b: a.dashboard.name < b.dashboard.name) (
|
||||
builtins.filter
|
||||
(a:
|
||||
a.dashboard.category
|
||||
!= null
|
||||
&& a.dashboard.category == cat.tag
|
||||
|| a.dashboard.category == null && cat.tag == "misc")
|
||||
apps
|
||||
);
|
||||
in {
|
||||
inherit (cat) name;
|
||||
items = lib.forEach catApps (a: {
|
||||
inherit (a.dashboard) method name type url;
|
||||
subtitle = a.dashboard.description;
|
||||
icon = lib.optionalString (a.dashboard.icon != null) "fas fa-${a.dashboard.icon}";
|
||||
target = "_blank";
|
||||
});
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
56
modules/services/homer/default.nix
Normal file
56
modules/services/homer/default.nix
Normal file
@ -0,0 +1,56 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.my.services.homer;
|
||||
inherit (config.my.server) domain;
|
||||
homeConfig = {
|
||||
title = "Dashboard";
|
||||
header = false;
|
||||
footer = false;
|
||||
colors = {
|
||||
dark = {
|
||||
highlight-primary = "#cc241d";
|
||||
highlight-secondary = "#8ec07c";
|
||||
highlight-hover = "#d79921";
|
||||
background = "rgb(40,36,34)";
|
||||
card-background = "#3c3836";
|
||||
text = "#eaeaea";
|
||||
text-header = "#ffffff";
|
||||
text-title = "#fafafa";
|
||||
text-subtitle = "#f5f5f5";
|
||||
card-shadow = "rgba(0, 0, 0, 0.4)";
|
||||
link = "#3273dc";
|
||||
link-hover = "#ffdd57";
|
||||
};
|
||||
};
|
||||
connectivityCheck = true;
|
||||
columns = "auto";
|
||||
services = config.lib.webapps.homerServices;
|
||||
};
|
||||
in {
|
||||
imports = [
|
||||
./config.nix
|
||||
];
|
||||
|
||||
options.my.services.homer = {
|
||||
enable = mkEnableOption "Homer Dashboard";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.caddy.virtualHosts."${domain}".extraConfig = ''
|
||||
handle_path /assets/config.yml {
|
||||
root * ${pkgs.writeText "homerConfig.yml" (builtins.toJSON homeConfig)}
|
||||
file_server
|
||||
}
|
||||
|
||||
root * ${pkgs.homer}
|
||||
file_server {
|
||||
hide .git
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
45
modules/services/mealie/default.nix
Normal file
45
modules/services/mealie/default.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.my.services.mealie;
|
||||
in {
|
||||
disabledModules = ["services/web-apps/mealie.nix"];
|
||||
imports = ["${inputs.unstable}/nixos/modules/services/web-apps/mealie.nix"];
|
||||
|
||||
options.my.services.mealie = {
|
||||
enable = mkEnableOption "Mealie";
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 3123;
|
||||
example = 8080;
|
||||
description = "HTTP port for the Mealie service.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.mealie = {
|
||||
enable = true;
|
||||
inherit (cfg) port;
|
||||
package = pkgs.unstable.mealie;
|
||||
settings = {
|
||||
BASE_URL = "https://recipes.thomasfmly.org";
|
||||
|
||||
# OIDC
|
||||
OIDC_AUTH_ENABLED = true;
|
||||
OIDC_CONFIGURATION_URL = "https://authentik.thomasfmly.org/application/o/mealie/.well-known/openid-configuration";
|
||||
OIDC_CLIENT_ID = "FLFfJCP0nWsxGfHpAf26XfoqMaIoUuaVdODJLW28";
|
||||
OIDC_CLIENT_SECRET = "YSEfBhGQUmzAKnrAEi9413NM4m8juF8u7e8zOLzfCA1JXZdRsgj8WWXTKLqEeGhCiQsVvD1iX52sFcWqOWo2r7tpolpUUVymj8O4kfMWampO1Nn65K2aPFtuXu3soUwB";
|
||||
OIDC_ADMIN_GROUP = "Administrators";
|
||||
OIDC_AUTO_REDIRECT = true;
|
||||
OIDC_PROVIDER_NAME = "Authentik";
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [cfg.port];
|
||||
};
|
||||
}
|
75
modules/services/nextcloud/default.nix
Normal file
75
modules/services/nextcloud/default.nix
Normal file
@ -0,0 +1,75 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.my.services.nextcloud;
|
||||
in {
|
||||
options.my.services.nextcloud = {
|
||||
enable = mkEnableOption "Nextcloud";
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 9090;
|
||||
example = 8080;
|
||||
description = "HTTP port for the Nextcloud service.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud29;
|
||||
hostName = "cloud.thomasfmly.org";
|
||||
phpExtraExtensions = ext: with ext; [smbclient];
|
||||
|
||||
database.createLocally = true;
|
||||
configureRedis = true;
|
||||
|
||||
maxUploadSize = "16G";
|
||||
|
||||
autoUpdateApps.enable = true;
|
||||
extraAppsEnable = true;
|
||||
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/nextcloud/packages/nextcloud-apps.json
|
||||
extraApps = with config.services.nextcloud.package.packages.apps; {
|
||||
inherit calendar notes user_oidc;
|
||||
};
|
||||
|
||||
config = {
|
||||
dbtype = "pgsql";
|
||||
adminuser = "michael";
|
||||
adminpassFile = config.age.secrets.nextcloudAdminpass.path;
|
||||
};
|
||||
|
||||
settings = {
|
||||
# Proxy Settings
|
||||
overwriteprotocol = "https";
|
||||
trusted_proxies = ["192.168.1.10"];
|
||||
|
||||
# Configuration Settings
|
||||
default_phone_region = "US";
|
||||
maintenance_window_start = 1;
|
||||
};
|
||||
|
||||
phpOptions = {
|
||||
"opcache.interned_strings_buffer" = "23";
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets.nextcloudAdminpass = {
|
||||
file = ../../../secrets/nextcloud-adminpass.age;
|
||||
owner = "nextcloud";
|
||||
group = "nextcloud";
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${config.services.nextcloud.hostName}".listen = [
|
||||
{
|
||||
addr = "0.0.0.0";
|
||||
inherit (cfg) port;
|
||||
}
|
||||
];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [cfg.port];
|
||||
};
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
# Enable sound.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
|
||||
|
@ -18,11 +18,11 @@
|
||||
split_ratio = 0;
|
||||
split_type = "auto";
|
||||
auto_balance = "off";
|
||||
top_padding = 12;
|
||||
bottom_padding = 12;
|
||||
left_padding = 12;
|
||||
right_padding = 12;
|
||||
window_gap = 06;
|
||||
top_padding = 0;
|
||||
bottom_padding = 0;
|
||||
left_padding = 0;
|
||||
right_padding = 0;
|
||||
window_gap = 6;
|
||||
layout = "bsp";
|
||||
mouse_modifier = "fn";
|
||||
mouse_action1 = "move";
|
||||
@ -34,42 +34,49 @@
|
||||
services.skhd = {
|
||||
enable = true;
|
||||
skhdConfig = ''
|
||||
ctrl + alt - h: yabai -m window --focus west
|
||||
ctrl + alt - j: yabai -m window --focus south
|
||||
ctrl + alt - k: yabai -m window --focus north
|
||||
ctrl + alt - l: yabai -m window --focus east
|
||||
ctrl + alt - h: yabai -m window --focus west
|
||||
ctrl + alt - j: yabai -m window --focus south
|
||||
ctrl + alt - k: yabai -m window --focus north
|
||||
ctrl + alt - l: yabai -m window --focus east
|
||||
|
||||
cmd + ctrl + alt - h : yabai -m window --warp west
|
||||
cmd + ctrl + alt - j : yabai -m window --warp south
|
||||
cmd + ctrl + alt - k : yabai -m window --warp north
|
||||
cmd + ctrl + alt - l : yabai -m window --warp east
|
||||
cmd + ctrl + alt - h : yabai -m window --warp west
|
||||
cmd + ctrl + alt - j : yabai -m window --warp south
|
||||
cmd + ctrl + alt - k : yabai -m window --warp north
|
||||
cmd + ctrl + alt - l : yabai -m window --warp east
|
||||
|
||||
ctrl + alt - 1 : yabai -m space --focus 1
|
||||
ctrl + alt - 2 : yabai -m space --focus 2
|
||||
ctrl + alt - 3 : yabai -m space --focus 3
|
||||
ctrl + alt - 4 : yabai -m space --focus 4
|
||||
ctrl + alt - 5 : yabai -m space --focus 5
|
||||
ctrl + alt - 6 : yabai -m space --focus 6
|
||||
ctrl + alt - 7 : yabai -m space --focus 7
|
||||
ctrl + alt - 8 : yabai -m space --focus 8
|
||||
ctrl + alt - 9 : yabai -m space --focus 9
|
||||
ctrl + alt - 1 : yabai -m space --focus 1
|
||||
ctrl + alt - 2 : yabai -m space --focus 2
|
||||
ctrl + alt - 3 : yabai -m space --focus 3
|
||||
ctrl + alt - 4 : yabai -m space --focus 4
|
||||
ctrl + alt - 5 : yabai -m space --focus 5
|
||||
ctrl + alt - 6 : yabai -m space --focus 6
|
||||
ctrl + alt - 7 : yabai -m space --focus 7
|
||||
ctrl + alt - 8 : yabai -m space --focus 8
|
||||
ctrl + alt - 9 : yabai -m space --focus 9
|
||||
|
||||
ctrl + alt - q: yabai -m window --close
|
||||
ctrl + alt - q: yabai -m window --close
|
||||
|
||||
## stack window
|
||||
# Note that this only works when the active window does *not* already belong to a stack
|
||||
shift + alt + cmd - left : yabai -m window west --stack $(yabai -m query --windows --window | jq -r '.id')
|
||||
shift + alt + cmd - right : yabai -m window east --stack $(yabai -m query --windows --window | jq -r '.id')
|
||||
|
||||
# 0x21 - [
|
||||
# 0x1E - ]
|
||||
ctrl + alt - 0x21 : yabai -m query --spaces --space \
|
||||
| jq -re ".index" \
|
||||
| xargs -I{} yabai -m query --windows --space {} \
|
||||
| jq -sre "add | map(select(.minimized != 1)) | sort_by(.display, .frame.y, .frame.y, .id) | nth(index(map(select(.focused == 1))) - 1).id" \
|
||||
| xargs -I{} yabai -m window --focus {}
|
||||
ctrl + alt - 0x21 : yabai -m query --spaces --space \
|
||||
| jq -re ".index" \
|
||||
| xargs -I{} yabai -m query --windows --space {} \
|
||||
| jq -sre "add | map(select(.minimized != 1)) | sort_by(.display, .frame.y, .frame.y, .id) | nth(index(map(select(.focused == 1))) - 1).id" \
|
||||
| xargs -I{} yabai -m window --focus {}
|
||||
|
||||
ctrl + alt - 0x1E : yabai -m query --spaces --space \
|
||||
| jq -re ".index" \
|
||||
| xargs -I{} yabai -m query --windows --space {} \
|
||||
| jq -sre "add | map(select(.minimized != 1)) | sort_by(.display, .frame.y, .frame.x, .id) | reverse | nth(index(map(select(.focused == 1))) - 1).id" \
|
||||
| xargs -I{} yabai -m window --focus {}
|
||||
ctrl + alt - 0x1E : yabai -m query --spaces --space \
|
||||
| jq -re ".index" \
|
||||
| xargs -I{} yabai -m query --windows --space {} \
|
||||
| jq -sre "add | map(select(.minimized != 1)) | sort_by(.display, .frame.y, .frame.x, .id) | reverse | nth(index(map(select(.focused == 1))) - 1).id" \
|
||||
| xargs -I{} yabai -m window --focus {}
|
||||
|
||||
# applications
|
||||
ctrl + alt - t: open -n -a 'Alacritty.app'
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
45
nixos/ags/home.nix
Normal file
45
nixos/ags/home.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.my.ags;
|
||||
in {
|
||||
imports = [inputs.ags.homeManagerModules.default];
|
||||
|
||||
options.my.ags = {
|
||||
enable = mkEnableOption "ags";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.ags = {
|
||||
enable = true;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
bun
|
||||
which
|
||||
fzf
|
||||
# inputs.matugen.packages.${system}.default
|
||||
slurp
|
||||
wf-recorder
|
||||
wl-clipboard
|
||||
wayshot
|
||||
swappy
|
||||
pavucontrol
|
||||
networkmanager
|
||||
gtk3
|
||||
];
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
brightnessctl
|
||||
fd
|
||||
dart-sass
|
||||
hyprpicker
|
||||
swww
|
||||
];
|
||||
};
|
||||
}
|
14
nixos/default.nix
Normal file
14
nixos/default.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
../common
|
||||
]
|
||||
++ lib.my.getModules [./.];
|
||||
|
||||
hm.imports = lib.my.getHmModules [./.];
|
||||
}
|
75
nixos/hyprland/default.nix
Normal file
75
nixos/hyprland/default.nix
Normal file
@ -0,0 +1,75 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.my.hyprland;
|
||||
in {
|
||||
options.my.hyprland = {
|
||||
enable = mkEnableOption "hyprland";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hm.my.hyprland.enable = true;
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Hint electron apps to use wayland
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
security.pam.services.greetd.enableGnomeKeyring = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Theme
|
||||
adw-gtk3
|
||||
|
||||
# Applications
|
||||
nautilus
|
||||
sushi
|
||||
eog
|
||||
totem
|
||||
cheese
|
||||
file-roller
|
||||
gnome-weather
|
||||
gnome-contacts
|
||||
gnome-calendar
|
||||
gnome-screenshot
|
||||
wordbook
|
||||
gnome-font-viewer
|
||||
gnome-system-monitor
|
||||
monophony # music player
|
||||
|
||||
# Nvim clipboard
|
||||
wl-clipboard
|
||||
];
|
||||
|
||||
# Required for Nautilus to work outside GNOME
|
||||
services.gvfs.enable = true;
|
||||
|
||||
# Use CAPSLOCK as Hyper key
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards.default = {
|
||||
ids = ["*"];
|
||||
settings.main = {
|
||||
capslock = "overload(meta, esc)";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
238
nixos/hyprland/home.nix
Normal file
238
nixos/hyprland/home.nix
Normal file
@ -0,0 +1,238 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.my.hyprland;
|
||||
in {
|
||||
options.my.hyprland = {
|
||||
enable = mkEnableOption "hyprland";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
my.ags.enable = true;
|
||||
|
||||
programs.fuzzel.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
pavucontrol
|
||||
swaybg
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"$mod" = "SUPER";
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 10;
|
||||
};
|
||||
input = {
|
||||
follow_mouse = 2;
|
||||
sensitivity = -0.2;
|
||||
};
|
||||
exec-once = [
|
||||
"hyprctl setcursor Adwaita 24"
|
||||
"ags"
|
||||
"swaybg -i /home/michael/Photos/wallpaper.jpg"
|
||||
"hypridle"
|
||||
];
|
||||
bind =
|
||||
[
|
||||
# Program launcher
|
||||
"$mod, SPACE, exec, fuzzel"
|
||||
# Program shortcuts
|
||||
"$mod, F, exec, firefox"
|
||||
"$mod, Q, killactive"
|
||||
"$mod, T, exec, foot"
|
||||
", Print, exec, grimblast copy area"
|
||||
# Windows
|
||||
"$mod, H, movefocus, l"
|
||||
"$mod, J, movefocus, d"
|
||||
"$mod, K, movefocus, u"
|
||||
"$mod, L, movefocus, r"
|
||||
# Moving windows
|
||||
"$mod SHIFT, H, movewindow, l"
|
||||
"$mod SHIFT, J, movewindow, d"
|
||||
"$mod SHIFT, K, movewindow, u"
|
||||
"$mod SHIFT, L, movewindow, r"
|
||||
]
|
||||
++ (
|
||||
# workspaces
|
||||
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
||||
builtins.concatLists (builtins.genList (
|
||||
x: let
|
||||
ws = let
|
||||
c = (x + 1) / 10;
|
||||
in
|
||||
builtins.toString (x + 1 - (c * 10));
|
||||
in [
|
||||
"$mod, ${ws}, workspace, ${toString (x + 1)}"
|
||||
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
|
||||
]
|
||||
)
|
||||
10)
|
||||
);
|
||||
};
|
||||
extraConfig = ''
|
||||
# will switch to a submap called resize
|
||||
bind=$mod,R,submap,resize
|
||||
|
||||
# media controls
|
||||
bindel=, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
|
||||
bindel=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
||||
bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
|
||||
# will start a submap called "resize"
|
||||
submap=resize
|
||||
|
||||
# sets repeatable binds for resizing the active window
|
||||
binde=,h,resizeactive,-10 0
|
||||
binde=,j,resizeactive,0 10
|
||||
binde=,k,resizeactive,0 -10
|
||||
binde=,l,resizeactive,10 0
|
||||
|
||||
# use reset to go back to the global submap
|
||||
bind=,escape,submap,reset
|
||||
|
||||
# will reset the submap, meaning end the current one and return to the global one
|
||||
submap=reset
|
||||
|
||||
# mouse bindings
|
||||
bindm=ALT,mouse:272,movewindow
|
||||
bindm=ALT,mouse:273,resizewindow
|
||||
|
||||
# no gaps when only window
|
||||
workspace = w[t1], gapsout:0, gapsin:0
|
||||
workspace = w[tg1], gapsout:0, gapsin:0
|
||||
workspace = f[1], gapsout:0, gapsin:0
|
||||
windowrulev2 = bordersize 0, floating:0, onworkspace:w[t1]
|
||||
windowrulev2 = rounding 0, floating:0, onworkspace:w[t1]
|
||||
windowrulev2 = bordersize 0, floating:0, onworkspace:w[tg1]
|
||||
windowrulev2 = rounding 0, floating:0, onworkspace:w[tg1]
|
||||
windowrulev2 = bordersize 0, floating:0, onworkspace:f[1]
|
||||
windowrulev2 = rounding 0, floating:0, onworkspace:f[1]
|
||||
'';
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
font.name = "Inter 11";
|
||||
theme = {
|
||||
name = "adw-gtk3-dark";
|
||||
package = pkgs.adw-gtk3;
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Papirus";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
};
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
name = "Adwaita";
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
size = 24;
|
||||
};
|
||||
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
no_fade_in = false;
|
||||
grace = 0;
|
||||
disable_loading_bar = true;
|
||||
};
|
||||
background = {
|
||||
monitor = "";
|
||||
path = "~/Photos/wallpaper.jpg";
|
||||
blur_passes = 3;
|
||||
contrast = 0.8916;
|
||||
brightness = 0.8172;
|
||||
vibrancy = 0.1696;
|
||||
vibrancy_darkness = 0.0;
|
||||
};
|
||||
input-field = {
|
||||
monitor = "";
|
||||
size = "250, 60";
|
||||
outline_thickness = 2;
|
||||
dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
|
||||
dots_spacing = 0.2; # Scale of dots' absolute size, 0.0 - 1.0
|
||||
dots_center = true;
|
||||
outer_color = "rgba(0, 0, 0, 0)";
|
||||
inner_color = "rgba(0, 0, 0, 0.5)";
|
||||
font_color = "rgb(200, 200, 200)";
|
||||
fade_on_empty = false;
|
||||
font_family = "Inter";
|
||||
placeholder_text = "Enter Password";
|
||||
hide_input = false;
|
||||
position = "0, 375";
|
||||
halign = "center";
|
||||
valign = "bottom";
|
||||
};
|
||||
label = [
|
||||
# Time
|
||||
{
|
||||
monitor = "";
|
||||
text = "cmd[update:1000] echo \"$(date +\"%-I:%M %P\")\"";
|
||||
color = "rgba(255, 255, 255, 0.6)";
|
||||
font_size = 120;
|
||||
font_family = "Inter ExtraBold";
|
||||
position = "0, -300";
|
||||
halign = "center";
|
||||
valign = "top";
|
||||
}
|
||||
# User
|
||||
{
|
||||
monitor = "";
|
||||
text = config.my.name;
|
||||
color = "rgba(255, 255, 255, 0.6)";
|
||||
font_size = 24;
|
||||
font_family = "Inter Semibold";
|
||||
position = "0, 450";
|
||||
halign = "center";
|
||||
valign = "bottom";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
|
||||
listener = [
|
||||
# Dim screen
|
||||
{
|
||||
timeout = 150; # 2.5 min
|
||||
on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
|
||||
on-resume = "brightnessctl -r"; # monitor backlight restore.
|
||||
}
|
||||
# Lock
|
||||
{
|
||||
timeout = 300; # 5 min
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
# Turn off screen
|
||||
{
|
||||
timeout = 330; # 5.5 min
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
# Suspend
|
||||
{
|
||||
timeout = 1800; # 30 min
|
||||
on-timeout = "systemctl suspend";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
22
nixos/libreoffice/default.nix
Normal file
22
nixos/libreoffice/default.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.my.libreoffice;
|
||||
in {
|
||||
options.my.libreoffice = {
|
||||
enable = mkEnableOption "libreoffice";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
libreoffice-qt
|
||||
hunspell
|
||||
hunspellDicts.uk_UA
|
||||
hunspellDicts.th_TH
|
||||
];
|
||||
};
|
||||
}
|
28
nixos/server/default.nix
Normal file
28
nixos/server/default.nix
Normal file
@ -0,0 +1,28 @@
|
||||
{lib, ...}:
|
||||
with lib; {
|
||||
options.my.server = {
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "Server";
|
||||
example = "Venus";
|
||||
description = "User-facing name of the server.";
|
||||
};
|
||||
domain = mkOption {
|
||||
type = types.str;
|
||||
example = "example.com";
|
||||
description = "Full domain name of the server.";
|
||||
};
|
||||
proxyIP = mkOption {
|
||||
type = types.str;
|
||||
default = "127.0.0.1";
|
||||
example = "127.0.0.1";
|
||||
description = "IP address of server hosting services behind reverse proxy.";
|
||||
};
|
||||
firewallInterface = mkOption {
|
||||
type = types.str;
|
||||
default = "eth0";
|
||||
example = "wg0";
|
||||
description = "Network interface to expose services on.";
|
||||
};
|
||||
};
|
||||
}
|
21
nixos/steam/default.nix
Normal file
21
nixos/steam/default.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.my.steam;
|
||||
in {
|
||||
options.my.steam = {
|
||||
enable = mkEnableOption "steam";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.steam;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
@ -1,13 +1,33 @@
|
||||
{
|
||||
nixpkgs,
|
||||
unstable,
|
||||
...
|
||||
}: let
|
||||
inherit (nixpkgs.lib) composeManyExtensions;
|
||||
inherit (builtins) attrNames readDir;
|
||||
localOverlays =
|
||||
map
|
||||
(f: import (./default + "/${f}"))
|
||||
(attrNames (readDir ./default));
|
||||
in
|
||||
composeManyExtensions localOverlays
|
||||
{inputs, ...}: {
|
||||
rust-overlay = inputs.rust-overlay.overlays.default;
|
||||
vscode-extensions = inputs.nix-vscode-extensions.overlays.default;
|
||||
|
||||
# This one brings our custom packages from the 'pkgs' directory
|
||||
additions = final: _prev:
|
||||
import ../pkgs {
|
||||
inherit (final) pkgs;
|
||||
inherit inputs;
|
||||
};
|
||||
|
||||
# This one contains whatever you want to overlay
|
||||
# You can change versions, add patches, set compilation flags, anything really.
|
||||
# https://nixos.wiki/wiki/Overlays
|
||||
modifications = final: prev: {
|
||||
# avoid build failure on darwin
|
||||
inherit (final.unstable) ghostscript;
|
||||
};
|
||||
|
||||
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
|
||||
# be accessible through 'pkgs.unstable'
|
||||
unstable-packages = final: _prev: {
|
||||
unstable = import inputs.unstable {
|
||||
inherit (final) system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
master = import inputs.master {
|
||||
inherit (final) system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1 +0,0 @@
|
||||
import ./firebird-emu/default.nix
|
@ -1,3 +0,0 @@
|
||||
self: super: {
|
||||
firebird-emu = self.libsForQt5.callPackage ./package.nix {};
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
qmake,
|
||||
qtbase,
|
||||
qtdeclarative,
|
||||
qtquickcontrols,
|
||||
wrapQtAppsHook,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "firebird-emu";
|
||||
version = "1.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nspire-emus";
|
||||
repo = "firebird";
|
||||
rev = "v${version}";
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-ZptjlnOiF+hKuKYvBFJL95H5YQuR99d4biOco/MVEmE=";
|
||||
};
|
||||
|
||||
NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isClang && stdenv.isDarwin) [
|
||||
"-fno-lto" # work around https://github.com/NixOS/nixpkgs/issues/19098
|
||||
];
|
||||
|
||||
nativeBuildInputs = [qmake wrapQtAppsHook];
|
||||
|
||||
buildInputs = [qtbase qtdeclarative qtquickcontrols];
|
||||
|
||||
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
mkdir $out/Applications
|
||||
mv $out/bin/${pname}.app $out/Applications/
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/nspire-emus/firebird";
|
||||
description = "Third-party multi-platform emulator of the ARM-based TI-Nspire™ calculators";
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = with lib.maintainers; [pneumaticat];
|
||||
# Only tested on Linux, but likely possible to build on, e.g. macOS
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
self: super: {
|
||||
gnomeExtensions =
|
||||
super.gnomeExtensions
|
||||
// {
|
||||
paperwm = super.gnomeExtensions.paperwm.overrideDerivation (old: {
|
||||
version = "43.0";
|
||||
src = super.fetchFromGitHub {
|
||||
owner = "paperwm";
|
||||
repo = "PaperWM";
|
||||
rev = "64960df6cde10bcf47c33ce56a2d35e99d8d02bf";
|
||||
sha256 = "sha256-ejyWIa4HX1lEIHc9qax8jgrgi992W6rkTK60FGzKI/E=";
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
self: super: {
|
||||
iptables = super.iptables.override {
|
||||
nftablesCompat = false;
|
||||
};
|
||||
}
|
5
pkgs/default.nix
Normal file
5
pkgs/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{pkgs, ...} @ args: {
|
||||
homer = pkgs.callPackage ./homer {};
|
||||
keycloak-theme-keywind = pkgs.callPackage ./keywind {};
|
||||
nvim-custom = import ./nvim/default.nix args;
|
||||
}
|
19
pkgs/homer/default.nix
Normal file
19
pkgs/homer/default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
stdenv,
|
||||
fetchzip,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "homer";
|
||||
version = "24.04.1";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/bastienwirtz/homer/releases/download/v${version}/homer.zip";
|
||||
hash = "sha256-BWQMBQn/bnRQdhJpgn9sIeiybdzT7c9c9h9toNGx48k=";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
cp -r $src $out/
|
||||
'';
|
||||
sourceRoot = ".";
|
||||
}
|
20
pkgs/keywind/default.nix
Normal file
20
pkgs/keywind/default.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "keycloak-theme-keywind";
|
||||
version = "0.0.1-dev";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "michaelhthomas";
|
||||
repo = "keywind";
|
||||
rev = "f3f016ab34ac9731ef8dadd6e79406a3c2433a34";
|
||||
hash = "sha256-wronX44qyUIuoTSdKj01UlLrwH9U5qNkUuSouV+xSUU=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -a theme/keywind/login $out
|
||||
'';
|
||||
}
|
144
pkgs/nvim/config/bufferlines/bufferline.nix
Normal file
144
pkgs/nvim/config/bufferlines/bufferline.nix
Normal file
@ -0,0 +1,144 @@
|
||||
{
|
||||
pkgs,
|
||||
helpers,
|
||||
icons,
|
||||
...
|
||||
}: {
|
||||
plugins = {
|
||||
bufferline = {
|
||||
enable = true;
|
||||
settings.options = {
|
||||
always_show_bufferline = false;
|
||||
offsets = [
|
||||
{
|
||||
filetype = "neo-tree";
|
||||
text = "Neo-tree";
|
||||
highlight = "Directory";
|
||||
text_align = "left";
|
||||
}
|
||||
];
|
||||
diagnostics = "nvim_lsp";
|
||||
diagnostics_indicator = ''
|
||||
function(_, _, diag)
|
||||
local icons = ${helpers.toLuaObject icons.diagnostics}
|
||||
local ret = (diag.error and icons.Error .. diag.error .. " " or "")
|
||||
.. (diag.warning and icons.Warn .. diag.warning or "")
|
||||
return vim.trim(ret)
|
||||
end
|
||||
'';
|
||||
separator_style = "thin"; # “slant”, “padded_slant”, “slope”, “padded_slope”, “thick”, “thin”
|
||||
close_command = "Bdelete! %d";
|
||||
};
|
||||
};
|
||||
};
|
||||
extraPlugins = with pkgs.vimPlugins; [bufdelete-nvim];
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<Tab>";
|
||||
action = "<cmd>BufferLineCycleNext<cr>";
|
||||
options = {
|
||||
desc = "Cycle to next buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<S-Tab>";
|
||||
action = "<cmd>BufferLineCyclePrev<cr>";
|
||||
options = {
|
||||
desc = "Cycle to previous buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<S-l>";
|
||||
action = "<cmd>BufferLineCycleNext<cr>";
|
||||
options = {
|
||||
desc = "Cycle to next buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<S-h>";
|
||||
action = "<cmd>BufferLineCyclePrev<cr>";
|
||||
options = {
|
||||
desc = "Cycle to previous buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bd";
|
||||
action = "<cmd>Bdelete<cr>";
|
||||
options = {
|
||||
desc = "Delete buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bb";
|
||||
action = "<cmd>e #<cr>";
|
||||
options = {
|
||||
desc = "Switch to Other Buffer";
|
||||
};
|
||||
}
|
||||
|
||||
# {
|
||||
# mode = "n";
|
||||
# key = "<leader>`";
|
||||
# action = "<cmd>e #<cr>";
|
||||
# options = {
|
||||
# desc = "Switch to Other Buffer";
|
||||
# };
|
||||
# }
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>br";
|
||||
action = "<cmd>BufferLineCloseRight<cr>";
|
||||
options = {
|
||||
desc = "Delete buffers to the right";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bl";
|
||||
action = "<cmd>BufferLineCloseLeft<cr>";
|
||||
options = {
|
||||
desc = "Delete buffers to the left";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bo";
|
||||
action = "<cmd>BufferLineCloseOthers<cr>";
|
||||
options = {
|
||||
desc = "Delete other buffers";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bp";
|
||||
action = "<cmd>BufferLineTogglePin<cr>";
|
||||
options = {
|
||||
desc = "Toggle pin";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bP";
|
||||
action = "<Cmd>BufferLineGroupClose ungrouped<CR>";
|
||||
options = {
|
||||
desc = "Delete non-pinned buffers";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
8
pkgs/nvim/config/colorschemes/base16.nix
Normal file
8
pkgs/nvim/config/colorschemes/base16.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
colorschemes = {
|
||||
base16 = {
|
||||
enable = false;
|
||||
colorscheme = "mountain";
|
||||
};
|
||||
};
|
||||
}
|
48
pkgs/nvim/config/colorschemes/catppuccin.nix
Normal file
48
pkgs/nvim/config/colorschemes/catppuccin.nix
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
colorschemes = {
|
||||
catppuccin = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background = {
|
||||
light = "macchiato";
|
||||
dark = "mocha";
|
||||
};
|
||||
flavour = "mocha"; # "latte", "mocha", "frappe", "macchiato" or raw lua code
|
||||
disable_bold = false;
|
||||
disable_italic = false;
|
||||
disable_underline = false;
|
||||
transparent_background = true;
|
||||
term_colors = true;
|
||||
integrations = {
|
||||
cmp = true;
|
||||
noice = true;
|
||||
notify = true;
|
||||
neotree = true;
|
||||
harpoon = true;
|
||||
gitsigns = true;
|
||||
which_key = true;
|
||||
illuminate = {
|
||||
enabled = true;
|
||||
};
|
||||
treesitter = true;
|
||||
treesitter_context = true;
|
||||
telescope.enabled = true;
|
||||
indent_blankline.enabled = true;
|
||||
mini.enabled = true;
|
||||
native_lsp = {
|
||||
enabled = true;
|
||||
inlay_hints = {
|
||||
background = true;
|
||||
};
|
||||
underlines = {
|
||||
errors = ["underline"];
|
||||
hints = ["underline"];
|
||||
information = ["underline"];
|
||||
warnings = ["underline"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
5
pkgs/nvim/config/colorschemes/gruvbox.nix
Normal file
5
pkgs/nvim/config/colorschemes/gruvbox.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
colorschemes.gruvbox = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
14
pkgs/nvim/config/colorschemes/rose-pine.nix
Normal file
14
pkgs/nvim/config/colorschemes/rose-pine.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
colorschemes = {
|
||||
rose-pine = {
|
||||
enable = false;
|
||||
settings = {
|
||||
styles = {
|
||||
italic = true;
|
||||
bold = true;
|
||||
transparency = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
131
pkgs/nvim/config/completion/cmp.nix
Normal file
131
pkgs/nvim/config/completion/cmp.nix
Normal file
@ -0,0 +1,131 @@
|
||||
{
|
||||
plugins = {
|
||||
cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = false;
|
||||
settings = {
|
||||
experimental = {
|
||||
ghost_text = true;
|
||||
};
|
||||
};
|
||||
settings = {
|
||||
mapping = {
|
||||
__raw = ''
|
||||
cmp.mapping.preset.insert({
|
||||
['<C-j>'] = cmp.mapping.select_next_item(),
|
||||
['<C-k>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
|
||||
['<S-CR>'] = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
|
||||
})
|
||||
'';
|
||||
};
|
||||
snippet = {
|
||||
expand = "function(args) require('luasnip').lsp_expand(args.body) end";
|
||||
};
|
||||
sources = {
|
||||
__raw = ''
|
||||
cmp.config.sources({
|
||||
{name = 'nvim_lsp'},
|
||||
{name = 'copilot'},
|
||||
{name = 'path'},
|
||||
{name = 'luasnip'},
|
||||
{name = 'cmdline'},
|
||||
}, {
|
||||
{name = 'buffer'},
|
||||
})
|
||||
'';
|
||||
};
|
||||
performance = {
|
||||
debounce = 60;
|
||||
fetching_timeout = 200;
|
||||
max_view_entries = 30;
|
||||
};
|
||||
window = {
|
||||
completion = {
|
||||
border = "rounded";
|
||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder,CursorLine:Visual,Search:None";
|
||||
};
|
||||
documentation = {
|
||||
border = "rounded";
|
||||
};
|
||||
};
|
||||
formatting = {
|
||||
fields = ["kind" "abbr" "menu"];
|
||||
expandable_indicator = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Completion from Language Server
|
||||
cmp-nvim-lsp.enable = true; # lsp
|
||||
# Completion for buffer words
|
||||
cmp-buffer.enable = true;
|
||||
# Completion for file system paths
|
||||
cmp-path.enable = true;
|
||||
};
|
||||
extraConfigLua = ''
|
||||
luasnip = require("luasnip")
|
||||
kind_icons = {
|
||||
Text = "",
|
||||
Method = "",
|
||||
Function = "",
|
||||
Constructor = "",
|
||||
Field = "",
|
||||
Variable = "",
|
||||
Class = "",
|
||||
Interface = "",
|
||||
Module = "",
|
||||
Property = "",
|
||||
Unit = "",
|
||||
Value = "",
|
||||
Enum = "",
|
||||
Keyword = "",
|
||||
Snippet = "",
|
||||
Color = "",
|
||||
File = "",
|
||||
Reference = "",
|
||||
Folder = "",
|
||||
EnumMember = "",
|
||||
Constant = "",
|
||||
Struct = "",
|
||||
Event = "",
|
||||
Operator = "",
|
||||
TypeParameter = "",
|
||||
}
|
||||
|
||||
local cmp = require'cmp'
|
||||
|
||||
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline({'/', "?" }, {
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
})
|
||||
|
||||
-- Set configuration for specific filetype.
|
||||
cmp.setup.filetype('gitcommit', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(':', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
}),
|
||||
}) '';
|
||||
}
|
222
pkgs/nvim/config/dap/dap.nix
Normal file
222
pkgs/nvim/config/dap/dap.nix
Normal file
@ -0,0 +1,222 @@
|
||||
{
|
||||
plugins.dap = {
|
||||
enable = true;
|
||||
signs = {
|
||||
dapBreakpoint = {
|
||||
text = "●";
|
||||
texthl = "DapBreakpoint";
|
||||
};
|
||||
dapBreakpointCondition = {
|
||||
text = "●";
|
||||
texthl = "DapBreakpointCondition";
|
||||
};
|
||||
dapLogPoint = {
|
||||
text = "◆";
|
||||
texthl = "DapLogPoint";
|
||||
};
|
||||
};
|
||||
extensions = {
|
||||
dap-python = {
|
||||
enable = true;
|
||||
};
|
||||
dap-ui = {
|
||||
enable = true;
|
||||
floating.mappings = {
|
||||
close = ["<ESC>" "q"];
|
||||
};
|
||||
};
|
||||
dap-virtual-text = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
configurations = {
|
||||
java = [
|
||||
{
|
||||
type = "java";
|
||||
request = "launch";
|
||||
name = "Debug (Attach) - Remote";
|
||||
hostName = "127.0.0.1";
|
||||
port = 5005;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>dB";
|
||||
action = "
|
||||
<cmd>lua require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))<cr>
|
||||
";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Breakpoint Condition";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>db";
|
||||
action = ":DapToggleBreakpoint<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Toggle Breakpoint";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>dc";
|
||||
action = ":DapContinue<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Continue";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>da";
|
||||
action = "<cmd>lua require('dap').continue({ before = get_args })<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Run with Args";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>dC";
|
||||
action = "<cmd>lua require('dap').run_to_cursor()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Run to cursor";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>dg";
|
||||
action = "<cmd>lua require('dap').goto_()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Go to line (no execute)";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>di";
|
||||
action = ":DapStepInto<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Step into";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>dj";
|
||||
action = "
|
||||
<cmd>lua require('dap').down()<cr>
|
||||
";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Down";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>dk";
|
||||
action = "<cmd>lua require('dap').up()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Up";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>dl";
|
||||
action = "<cmd>lua require('dap').run_last()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Run Last";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>do";
|
||||
action = ":DapStepOut<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Step Out";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>dO";
|
||||
action = ":DapStepOver<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Step Over";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>dp";
|
||||
action = "<cmd>lua require('dap').pause()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Pause";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>dr";
|
||||
action = ":DapToggleRepl<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Toggle REPL";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ds";
|
||||
action = "<cmd>lua require('dap').session()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Session";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>dt";
|
||||
action = ":DapTerminate<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Terminate";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>du";
|
||||
action = "<cmd>lua require('dapui').toggle()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Dap UI";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>dw";
|
||||
action = "<cmd>lua require('dap.ui.widgets').hover()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Widgets";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>de";
|
||||
action = "<cmd>lua require('dapui').eval()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Eval";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
85
pkgs/nvim/config/default.nix
Normal file
85
pkgs/nvim/config/default.nix
Normal file
@ -0,0 +1,85 @@
|
||||
{
|
||||
# Import all your configuration modules here
|
||||
imports = [
|
||||
./sets.nix
|
||||
./keymaps.nix
|
||||
|
||||
./bufferlines/bufferline.nix
|
||||
|
||||
# ./colorschemes/base16.nix
|
||||
# ./colorschemes/catppuccin.nix
|
||||
# ./colorschemes/rose-pine.nix
|
||||
./colorschemes/gruvbox.nix
|
||||
|
||||
./completion/cmp.nix
|
||||
|
||||
./dap/dap.nix
|
||||
|
||||
./filetrees/neo-tree.nix
|
||||
./git/gitsigns.nix
|
||||
./git/diffview.nix
|
||||
./git/lazygit.nix
|
||||
# ./git/neogit.nix
|
||||
|
||||
./languages/nvim-jdtls.nix
|
||||
./languages/nvim-lint.nix
|
||||
./languages/typescript-tools-nvim.nix
|
||||
./languages/treesitter/treesitter.nix
|
||||
./languages/treesitter/mdx.nix
|
||||
./languages/treesitter/treesitter-context.nix
|
||||
./languages/treesitter/treesitter-textobjects.nix
|
||||
./languages/treesitter/ts-autotag.nix
|
||||
./languages/treesitter/ts-context-commentstring.nix
|
||||
./languages/latex
|
||||
|
||||
./lsp/conform.nix
|
||||
./lsp/fidget.nix
|
||||
./lsp/lsp.nix
|
||||
./lsp/lspsaga.nix
|
||||
./lsp/trouble.nix
|
||||
|
||||
./none-ls/none-ls.nix
|
||||
|
||||
./snippets/luasnip.nix
|
||||
|
||||
./statusline/lualine.nix
|
||||
|
||||
./telescope/telescope.nix
|
||||
|
||||
./ui/alpha.nix
|
||||
# ./ui/dressing-nvim.nix
|
||||
./ui/indent-blankline.nix
|
||||
./ui/noice.nix
|
||||
./ui/nvim-notify.nix
|
||||
./ui/nui.nix
|
||||
./ui/statuscol.nix
|
||||
|
||||
# ./utils/better-escape.nix
|
||||
./utils/flash.nix # better search labels
|
||||
./utils/flutter-tools.nix
|
||||
# ./utils/hardtime.nix # hints to get better at vim
|
||||
# ./utils/harpoon.nix # better navigation between files & terminals
|
||||
./utils/illuminate.nix # highlight other uses of current word
|
||||
./utils/markdown-preview.nix
|
||||
./utils/mini.nix # lots of utilities
|
||||
./utils/neoconf.nix
|
||||
# ./utils/neodev.nix # lua development
|
||||
./utils/neotest.nix # test runner
|
||||
./utils/colorizer.nix
|
||||
./utils/nvim-surround.nix # surrounds
|
||||
# ./utils/oil.nix # file explorer as buffer
|
||||
./utils/persistence.nix # session management / restore
|
||||
./utils/plenary.nix # utility library for other plugins
|
||||
# ./utils/project-nvim.nix # project management
|
||||
# ./utils/sidebar.nix # sidebar
|
||||
# ./utils/tmux-navigator.nix
|
||||
./utils/todo-comments.nix
|
||||
./utils/toggleterm.nix
|
||||
# ./utils/ultimate-autopair.nix # auto pairs (ew)
|
||||
./utils/undotree.nix # browse undo history
|
||||
./utils/vim-be-good.nix # game to get better at vim
|
||||
./utils/web-devicons.nix # required for other packages
|
||||
./utils/whichkey.nix # help with keybindings
|
||||
./utils/wilder.nix # better wildmenu suggestions
|
||||
];
|
||||
}
|
81
pkgs/nvim/config/filetrees/neo-tree.nix
Normal file
81
pkgs/nvim/config/filetrees/neo-tree.nix
Normal file
@ -0,0 +1,81 @@
|
||||
{
|
||||
plugins.neo-tree = {
|
||||
enable = true;
|
||||
enableDiagnostics = true;
|
||||
enableGitStatus = true;
|
||||
enableModifiedMarkers = true;
|
||||
enableRefreshOnWrite = true;
|
||||
closeIfLastWindow = true;
|
||||
popupBorderStyle = "rounded"; # Type: null or one of “NC”, “double”, “none”, “rounded”, “shadow”, “single”, “solid” or raw lua code
|
||||
buffers = {
|
||||
bindToCwd = false;
|
||||
followCurrentFile.enabled = true;
|
||||
};
|
||||
window = {
|
||||
width = 40;
|
||||
height = 15;
|
||||
autoExpandWidth = false;
|
||||
mappings = {
|
||||
"<space>" = "none";
|
||||
};
|
||||
};
|
||||
filesystem = {
|
||||
bindToCwd = false;
|
||||
followCurrentFile.enabled = true;
|
||||
useLibuvFileWatcher = true;
|
||||
};
|
||||
defaultComponentConfigs = {
|
||||
indent = {
|
||||
withExpanders = true; # if nil and file nesting is enabled, will enable expanders
|
||||
expanderCollapsed = "";
|
||||
expanderExpanded = "";
|
||||
expanderHighlight = "NeoTreeExpander";
|
||||
};
|
||||
gitStatus = {
|
||||
symbols = {
|
||||
unstaged = "";
|
||||
staged = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>e";
|
||||
action = ":Neotree toggle reveal_force_cwd<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Explorer NeoTree (root dir)";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>E";
|
||||
action = "<cmd>Neotree toggle<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Explorer NeoTree (cwd)";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>be";
|
||||
action = ":Neotree buffers<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Buffer explorer";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ge";
|
||||
action = ":Neotree git_status<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Git explorer";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
5
pkgs/nvim/config/git/diffview.nix
Normal file
5
pkgs/nvim/config/git/diffview.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
plugins.diffview = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
92
pkgs/nvim/config/git/gitsigns.nix
Normal file
92
pkgs/nvim/config/git/gitsigns.nix
Normal file
@ -0,0 +1,92 @@
|
||||
{
|
||||
plugins.gitsigns = {
|
||||
enable = true;
|
||||
settings = {
|
||||
trouble = true;
|
||||
current_line_blame = false;
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>gh";
|
||||
action = "gitsigns";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "+hunks";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ghb";
|
||||
action = ":Gitsigns blame_line<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Blame line";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ghd";
|
||||
action = ":Gitsigns diffthis<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Diff This";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ghp";
|
||||
action = ":Gitsigns preview_hunk<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Preview hunk";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ghR";
|
||||
action = ":Gitsigns reset_buffer<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Reset Buffer";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>ghr";
|
||||
action = ":Gitsigns reset_hunk<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Reset Hunk";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>ghs";
|
||||
action = ":Gitsigns stage_hunk<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Stage Hunk";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ghS";
|
||||
action = ":Gitsigns stage_buffer<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Stage Buffer";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ghu";
|
||||
action = ":Gitsigns undo_stage_hunk<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Undo Stage Hunk";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
22
pkgs/nvim/config/git/lazygit.nix
Normal file
22
pkgs/nvim/config/git/lazygit.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{pkgs, ...}: {
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
lazygit-nvim
|
||||
];
|
||||
|
||||
extraPackages = with pkgs; [lazygit];
|
||||
|
||||
extraConfigLua = ''
|
||||
require("telescope").load_extension("lazygit")
|
||||
'';
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>gg";
|
||||
action = "<cmd>LazyGit<CR>";
|
||||
options = {
|
||||
desc = "LazyGit (root dir)";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
12
pkgs/nvim/config/git/neogit.nix
Normal file
12
pkgs/nvim/config/git/neogit.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
plugins.neogit = {
|
||||
enable = true;
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>gg";
|
||||
action = "<cmd>Neogit<CR>";
|
||||
}
|
||||
];
|
||||
}
|
26
pkgs/nvim/config/helpers.lua
Normal file
26
pkgs/nvim/config/helpers.lua
Normal file
@ -0,0 +1,26 @@
|
||||
if MVim then return end -- avoid loading twice the same module
|
||||
MVim = {}
|
||||
|
||||
---@return {fg?:string}?
|
||||
function MVim.fg(name)
|
||||
local color = MVim.color(name)
|
||||
return color and { fg = color } or nil
|
||||
end
|
||||
|
||||
---@param name string
|
||||
---@param bg? boolean
|
||||
---@return string?
|
||||
function MVim.color(name, bg)
|
||||
---@type {fg?:number, bg?:number}?
|
||||
local hl = vim.api.nvim_get_hl(0, { name = name, link = false })
|
||||
---@type number?
|
||||
local color = nil
|
||||
if hl then
|
||||
if bg then
|
||||
color = hl.bg
|
||||
else
|
||||
color = hl.fg
|
||||
end
|
||||
end
|
||||
return color and string.format("#%06x", color) or nil
|
||||
end
|
64
pkgs/nvim/config/icons.nix
Normal file
64
pkgs/nvim/config/icons.nix
Normal file
@ -0,0 +1,64 @@
|
||||
{
|
||||
misc = {
|
||||
dots = "";
|
||||
};
|
||||
dap = {
|
||||
Stopped = [" " "DiagnosticWarn" "DapStoppedLine"];
|
||||
Breakpoint = " ";
|
||||
BreakpointCondition = " ";
|
||||
BreakpointRejected = [" " "DiagnosticError"];
|
||||
LogPoint = ".>";
|
||||
};
|
||||
diagnostics = {
|
||||
Error = " ";
|
||||
Warn = " ";
|
||||
Hint = " ";
|
||||
Info = " ";
|
||||
};
|
||||
git = {
|
||||
added = " ";
|
||||
modified = " ";
|
||||
removed = " ";
|
||||
};
|
||||
kinds = {
|
||||
Array = " ";
|
||||
Boolean = " ";
|
||||
Class = " ";
|
||||
Codeium = " ";
|
||||
Color = " ";
|
||||
Control = " ";
|
||||
Collapsed = " ";
|
||||
Constant = " ";
|
||||
Constructor = " ";
|
||||
Copilot = " ";
|
||||
Enum = " ";
|
||||
EnumMember = " ";
|
||||
Event = " ";
|
||||
Field = " ";
|
||||
File = " ";
|
||||
Folder = " ";
|
||||
Function = " ";
|
||||
Interface = " ";
|
||||
Key = " ";
|
||||
Keyword = " ";
|
||||
Method = " ";
|
||||
Module = " ";
|
||||
Namespace = " ";
|
||||
Null = " ";
|
||||
Number = " ";
|
||||
Object = " ";
|
||||
Operator = " ";
|
||||
Package = " ";
|
||||
Property = " ";
|
||||
Reference = " ";
|
||||
Snippet = " ";
|
||||
String = " ";
|
||||
Struct = " ";
|
||||
TabNine = " ";
|
||||
Text = " ";
|
||||
TypeParameter = " ";
|
||||
Unit = " ";
|
||||
Value = " ";
|
||||
Variable = " ";
|
||||
};
|
||||
}
|
616
pkgs/nvim/config/keymaps.nix
Normal file
616
pkgs/nvim/config/keymaps.nix
Normal file
@ -0,0 +1,616 @@
|
||||
{
|
||||
globals.mapleader = " ";
|
||||
|
||||
keymaps = [
|
||||
# better up/down
|
||||
{
|
||||
mode = ["n" "x"];
|
||||
key = "j";
|
||||
action = "v:count == 0 ? 'gj' : 'j'";
|
||||
options = {
|
||||
desc = "Down";
|
||||
expr = true;
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n" "x"];
|
||||
key = "<Down>";
|
||||
action = "v:count == 0 ? 'gj' : 'j'";
|
||||
options = {
|
||||
desc = "Down";
|
||||
expr = true;
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n" "x"];
|
||||
key = "k";
|
||||
action = "v:count == 0 ? 'gk' : 'k'";
|
||||
options = {
|
||||
desc = "Up";
|
||||
expr = true;
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n" "x"];
|
||||
key = "<Up>";
|
||||
action = "v:count == 0 ? 'gk' : 'k'";
|
||||
options = {
|
||||
desc = "Up";
|
||||
expr = true;
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
# Clear search with <esc>
|
||||
{
|
||||
mode = ["i" "n"];
|
||||
key = "<esc>";
|
||||
action = "<cmd>noh<cr><esc>";
|
||||
options = {
|
||||
desc = "Escape and Clear hlsearch";
|
||||
};
|
||||
}
|
||||
|
||||
# Add undo break-points
|
||||
{
|
||||
mode = "i";
|
||||
key = ",";
|
||||
action = ",<c-g>u";
|
||||
}
|
||||
{
|
||||
mode = "i";
|
||||
key = ".";
|
||||
action = ".<c-g>u";
|
||||
}
|
||||
{
|
||||
mode = "i";
|
||||
key = ";";
|
||||
action = ";<c-g>u";
|
||||
}
|
||||
|
||||
# Move to window using the <ctrl> hjkl keys
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-h>";
|
||||
action = "<C-w>h";
|
||||
options = {
|
||||
desc = "Go to Left Window";
|
||||
remap = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-j>";
|
||||
action = "<C-w>j";
|
||||
options = {
|
||||
desc = "Go to Lower Window";
|
||||
remap = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-k>";
|
||||
action = "<C-w>k";
|
||||
options = {
|
||||
desc = "Go to Upper Window";
|
||||
remap = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-l>";
|
||||
action = "<C-w>l";
|
||||
options = {
|
||||
desc = "Go to Right Window";
|
||||
remap = true;
|
||||
};
|
||||
}
|
||||
|
||||
# Resize window using <ctrl> arrow keys
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-Up>";
|
||||
action = "<cmd>resize +2<cr>";
|
||||
options = {desc = "Increase Window Height";};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-Down>";
|
||||
action = "<cmd>resize -2<cr>";
|
||||
options = {desc = "Decrease Window Height";};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-Left>";
|
||||
action = "<cmd>vertical resize -2<cr>";
|
||||
options = {desc = "Decrease Window Width";};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-Right>";
|
||||
action = "<cmd>vertical resize +2<cr>";
|
||||
options = {desc = "Increase Window Width";};
|
||||
}
|
||||
|
||||
# General maps
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>f";
|
||||
action = "+find/file";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>s";
|
||||
action = "+search";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>q";
|
||||
action = "+quit/session";
|
||||
}
|
||||
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>g";
|
||||
action = "+git";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>u";
|
||||
action = "+ui";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>w";
|
||||
action = "+windows";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader><Tab>";
|
||||
action = "+tab";
|
||||
}
|
||||
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>d";
|
||||
action = "+debug";
|
||||
}
|
||||
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>c";
|
||||
action = "+code";
|
||||
}
|
||||
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>t";
|
||||
action = "+test";
|
||||
}
|
||||
|
||||
# Tabs
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader><tab>l";
|
||||
action = "<cmd>tablast<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Last tab";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader><tab>f";
|
||||
action = "<cmd>tabfirst<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "First Tab";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader><tab><tab>";
|
||||
action = "<cmd>tabnew<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "New Tab";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader><tab>]";
|
||||
action = "<cmd>tabnext<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Next Tab";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader><tab>d";
|
||||
action = "<cmd>tabclose<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Close tab";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader><tab>[";
|
||||
action = "<cmd>tabprevious<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Previous Tab";
|
||||
};
|
||||
}
|
||||
|
||||
# Windows
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ww";
|
||||
action = "<C-W>p";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Other window";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>wd";
|
||||
action = "<C-W>c";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Delete window";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>w-";
|
||||
action = "<C-W>s";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Split window below";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>w|";
|
||||
action = "<C-W>v";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Split window right";
|
||||
};
|
||||
}
|
||||
|
||||
# {
|
||||
# mode = "n";
|
||||
# key = "<leader>-";
|
||||
# action = "<C-W>s";
|
||||
# options = {
|
||||
# silent = true;
|
||||
# desc = "Split window below";
|
||||
# };
|
||||
# }
|
||||
|
||||
# {
|
||||
# mode = "n";
|
||||
# key = "<leader>|";
|
||||
# action = "<C-W>v";
|
||||
# options = {
|
||||
# silent = true;
|
||||
# desc = "Split window right";
|
||||
# };
|
||||
# }
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-s>";
|
||||
action = "<cmd>w<cr><esc>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Save file";
|
||||
};
|
||||
}
|
||||
|
||||
# Quit/Session
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>qq";
|
||||
action = "<cmd>quitall<cr><esc>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Quit all";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>qs";
|
||||
action = ":lua require('persistence').load()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Restore session";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ql";
|
||||
action = "<cmd>lua require('persistence').load({ last = true })<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Restore last session";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>qd";
|
||||
action = "<cmd>lua require('persistence').stop()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Don't save current session";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ul";
|
||||
action = ":lua ToggleLineNumber()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Toggle Line Numbers";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>uL";
|
||||
action = ":lua ToggleRelativeLineNumber()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Toggle Relative Line Numbers";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>uw";
|
||||
action = ":lua ToggleWrap()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Toggle Line Wrap";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "v";
|
||||
key = "J";
|
||||
action = ":m '>+1<CR>gv=gv";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Move up when line is highlighted";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "v";
|
||||
key = "K";
|
||||
action = ":m '<-2<CR>gv=gv";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Move down when line is highlighted";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "J";
|
||||
action = "mzJ`z";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Allow cursor to stay in the same place after appeding to current line";
|
||||
};
|
||||
}
|
||||
|
||||
# better indenting
|
||||
{
|
||||
mode = "v";
|
||||
key = "<";
|
||||
action = "<gv";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Indent while remaining in visual mode.";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "v";
|
||||
key = ">";
|
||||
action = ">gv";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Indent while remaining in visual mode.";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-d>";
|
||||
action = "<C-d>zz";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Allow <C-d> and <C-u> to keep the cursor in the middle";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-u>";
|
||||
action = "<C-u>zz";
|
||||
options = {
|
||||
desc = "Allow C-d and C-u to keep the cursor in the middle";
|
||||
};
|
||||
}
|
||||
|
||||
# Remap for dealing with word wrap and adding jumps to the jumplist.
|
||||
{
|
||||
mode = "n";
|
||||
key = "j";
|
||||
action.__raw = "
|
||||
[[(v:count > 1 ? 'm`' . v:count : 'g') . 'j']]
|
||||
";
|
||||
options = {
|
||||
expr = true;
|
||||
desc = "Remap for dealing with word wrap and adding jumps to the jumplist.";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "k";
|
||||
action.__raw = "
|
||||
[[(v:count > 1 ? 'm`' . v:count : 'g') . 'k']]
|
||||
";
|
||||
options = {
|
||||
expr = true;
|
||||
desc = "Remap for dealing with word wrap and adding jumps to the jumplist.";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "n";
|
||||
action = "nzzzv";
|
||||
options = {
|
||||
desc = "Allow search terms to stay in the middle";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "N";
|
||||
action = "Nzzzv";
|
||||
options = {
|
||||
desc = "Allow search terms to stay in the middle";
|
||||
};
|
||||
}
|
||||
|
||||
# Paste stuff without saving the deleted word into the buffer
|
||||
{
|
||||
mode = "x";
|
||||
key = "<leader>p";
|
||||
action = "\"_dP";
|
||||
options = {
|
||||
desc = "Deletes to void register and paste over";
|
||||
};
|
||||
}
|
||||
|
||||
# Copy stuff to system clipboard with <leader> + y or just y to have it just in vim
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>y";
|
||||
action = "\"+y";
|
||||
options = {
|
||||
desc = "Copy to system clipboard";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>Y";
|
||||
action = "\"+Y";
|
||||
options = {
|
||||
desc = "Copy to system clipboard";
|
||||
};
|
||||
}
|
||||
|
||||
# Delete to void register
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>D";
|
||||
action = "\"_d";
|
||||
options = {
|
||||
desc = "Delete to void register";
|
||||
};
|
||||
}
|
||||
|
||||
# <C-c> instead of pressing esc just because
|
||||
{
|
||||
mode = "i";
|
||||
key = "<C-c>";
|
||||
action = "<Esc>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-f>";
|
||||
action = "!tmux new tmux-sessionizer<CR>";
|
||||
options = {
|
||||
desc = "Switch between projects";
|
||||
};
|
||||
}
|
||||
];
|
||||
extraConfigLua = ''
|
||||
local notify = require("notify")
|
||||
|
||||
local function show_notification(message, level)
|
||||
notify(message, level, { title = "conform.nvim" })
|
||||
end
|
||||
|
||||
function ToggleLineNumber()
|
||||
if vim.wo.number then
|
||||
vim.wo.number = false
|
||||
show_notification("Line numbers disabled", "info")
|
||||
else
|
||||
vim.wo.number = true
|
||||
vim.wo.relativenumber = false
|
||||
show_notification("Line numbers enabled", "info")
|
||||
end
|
||||
end
|
||||
|
||||
function ToggleRelativeLineNumber()
|
||||
if vim.wo.relativenumber then
|
||||
vim.wo.relativenumber = false
|
||||
show_notification("Relative line numbers disabled", "info")
|
||||
else
|
||||
vim.wo.relativenumber = true
|
||||
vim.wo.number = false
|
||||
show_notification("Relative line numbers enabled", "info")
|
||||
end
|
||||
end
|
||||
|
||||
function ToggleWrap()
|
||||
if vim.wo.wrap then
|
||||
vim.wo.wrap = false
|
||||
show_notification("Wrap disabled", "info")
|
||||
else
|
||||
vim.wo.wrap = true
|
||||
vim.wo.number = false
|
||||
show_notification("Wrap enabled", "info")
|
||||
end
|
||||
end
|
||||
|
||||
if vim.lsp.inlay_hint then
|
||||
vim.keymap.set('n', '<leader>uh', function()
|
||||
vim.lsp.inlay_hint(0, nil)
|
||||
end, { desc = 'Toggle Inlay Hints' })
|
||||
end
|
||||
'';
|
||||
}
|
8
pkgs/nvim/config/languages/latex/default.nix
Normal file
8
pkgs/nvim/config/languages/latex/default.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
plugins.lsp.servers.texlab = {
|
||||
enable = true;
|
||||
settings.texlab = {
|
||||
build.onSave = true;
|
||||
};
|
||||
};
|
||||
}
|
81
pkgs/nvim/config/languages/nvim-jdtls.nix
Normal file
81
pkgs/nvim/config/languages/nvim-jdtls.nix
Normal file
@ -0,0 +1,81 @@
|
||||
let
|
||||
javaTestPath = "/nix/store/j3nvmhvj2pmnykw5pbm51dn0bz4cv6j3-vscode-extension-vscjava-vscode-java-test-0.38.2023032402/share/vscode/extensions/vscjava.vscode-java-test/server/com.microsoft.java.test.plugin-0.38.2.jar
|
||||
";
|
||||
in {
|
||||
plugins.nvim-jdtls = {
|
||||
enable = true;
|
||||
cmd = [
|
||||
"/nix/store/20h2hjjm94gbskqhbwikbgxbblv1xpf2-jdt-language-server-1.31.0/bin/jdtls"
|
||||
];
|
||||
# configuration = "/path/to/configuration";
|
||||
data = "~/.cache/jdtls/workspace";
|
||||
settings = {
|
||||
java = {
|
||||
signatureHelp = true;
|
||||
completion = true;
|
||||
};
|
||||
};
|
||||
initOptions = {
|
||||
bundles = [
|
||||
"/nix/store/b9ib40q36wxjl4xs5lng263lflz1fsi7-vscode-extension-vscjava-vscode-java-debug-0.49.2023032407/share/vscode/extensions/vscjava.vscode-java-debug/server/com.microsoft.java.debug.plugin-0.44.0.jar"
|
||||
"${javaTestPath}"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
#
|
||||
# extraConfigLua = ''
|
||||
# local jdtls = require("jdtls")
|
||||
# local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||
#
|
||||
# local root_dir = require("jdtls.setup").find_root({ "packageInfo" }, "Config")
|
||||
# local home = os.getenv("HOME")
|
||||
# local eclipse_workspace = home .. "/.local/share/eclipse/" .. vim.fn.fnamemodify(root_dir, ":p:h:t")
|
||||
#
|
||||
# local ws_folders_jdtls = {}
|
||||
# if root_dir then
|
||||
# local file = io.open(root_dir .. "/.bemol/ws_root_folders")
|
||||
# if file then
|
||||
# for line in file:lines() do
|
||||
# table.insert(ws_folders_jdtls, "file://" .. line)
|
||||
# end
|
||||
# file:close()
|
||||
# end
|
||||
# end
|
||||
#
|
||||
# -- for completions
|
||||
# local client_capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
# local capabilities = cmp_nvim_lsp.default_capabilities(client_capabilities)
|
||||
#
|
||||
# local config = {
|
||||
# capabilities = capabilities,
|
||||
# cmd = {
|
||||
# "${pkgs.jdt-language-server}/bin/jdt-language-server",
|
||||
# "--jvm-arg=-javaagent:" .. home .. "/Developer/lombok.jar",
|
||||
# "-data",
|
||||
# eclipse_workspace,
|
||||
# "--add-modules=ALL-SYSTEM",
|
||||
# },
|
||||
# root_dir = root_dir,
|
||||
# init_options = {
|
||||
# workspaceFolders = ws_folders_jdtls,
|
||||
# },
|
||||
# settings = {
|
||||
# java = {
|
||||
# signatureHelp = { enabled = true},
|
||||
# completion = { enabled = true },
|
||||
# },
|
||||
# },
|
||||
# on_attach = function(client, bufnr)
|
||||
# local opts = { silent = true, buffer = bufnr }
|
||||
# vim.keymap.set('n', "<leader>lo", jdtls.organize_imports, { desc = 'Organize imports', buffer = bufnr })
|
||||
# vim.keymap.set('n', "<leader>df", jdtls.test_class, opts)
|
||||
# vim.keymap.set('n', "<leader>dn", jdtls.test_nearest_method, opts)
|
||||
# vim.keymap.set('n', '<leader>rv', jdtls.extract_variable_all, { desc = 'Extract variable', buffer = bufnr })
|
||||
# vim.keymap.set('n', '<leader>rc', jdtls.extract_constant, { desc = 'Extract constant', buffer = bufnr })
|
||||
# end
|
||||
# }
|
||||
#
|
||||
# jdtls.start_or_attach(config)
|
||||
# '';
|
||||
|
25
pkgs/nvim/config/languages/nvim-lint.nix
Normal file
25
pkgs/nvim/config/languages/nvim-lint.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgsMaster,
|
||||
...
|
||||
}: {
|
||||
plugins.lint = {
|
||||
enable = true;
|
||||
lintersByFt = {
|
||||
nix = ["statix"];
|
||||
lua = ["selene"];
|
||||
python = ["flake8"];
|
||||
javascript = ["eslint_d"];
|
||||
javascriptreact = ["eslint_d"];
|
||||
typescript = ["eslint_d"];
|
||||
typescriptreact = ["eslint_d"];
|
||||
json = ["jsonlint"];
|
||||
java = ["checkstyle"];
|
||||
};
|
||||
};
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
statix
|
||||
pkgsMaster.eslint_d
|
||||
];
|
||||
}
|
9
pkgs/nvim/config/languages/python/default.nix
Normal file
9
pkgs/nvim/config/languages/python/default.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
plugins = {
|
||||
lsp.servers.pyright = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
conform-nvim.formattersByFt = ["black"];
|
||||
};
|
||||
}
|
19
pkgs/nvim/config/languages/treesitter/mdx.nix
Normal file
19
pkgs/nvim/config/languages/treesitter/mdx.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
filetype.extension.mdx = "mdx";
|
||||
|
||||
plugins.treesitter.languageRegister.markdown = ["mdx"];
|
||||
|
||||
# Tree Sitter Grammar
|
||||
extraFiles."queries/markdown/injections.scm" = {
|
||||
enable = true;
|
||||
text = ''
|
||||
; extends
|
||||
((inline) @injection.content
|
||||
(#lua-match? @injection.content "^%s*import")
|
||||
(#set! injection.language "typescript"))
|
||||
((inline) @injection.content
|
||||
(#lua-match? @injection.content "^%s*export")
|
||||
(#set! injection.language "typescript"))
|
||||
'';
|
||||
};
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
plugins.treesitter-context = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
{
|
||||
plugins.treesitter-textobjects = {
|
||||
enable = false;
|
||||
select = {
|
||||
enable = true;
|
||||
lookahead = true;
|
||||
keymaps = {
|
||||
"aa" = "@parameter.outer";
|
||||
"ia" = "@parameter.inner";
|
||||
"af" = "@function.outer";
|
||||
"if" = "@function.inner";
|
||||
"ac" = "@class.outer";
|
||||
"ic" = "@class.inner";
|
||||
"ii" = "@conditional.inner";
|
||||
"ai" = "@conditional.outer";
|
||||
"il" = "@loop.inner";
|
||||
"al" = "@loop.outer";
|
||||
"at" = "@comment.outer";
|
||||
};
|
||||
};
|
||||
move = {
|
||||
enable = true;
|
||||
gotoNextStart = {
|
||||
"]m" = "@function.outer";
|
||||
"]]" = "@class.outer";
|
||||
};
|
||||
gotoNextEnd = {
|
||||
"]M" = "@function.outer";
|
||||
"][" = "@class.outer";
|
||||
};
|
||||
gotoPreviousStart = {
|
||||
"[m" = "@function.outer";
|
||||
"[[" = "@class.outer";
|
||||
};
|
||||
gotoPreviousEnd = {
|
||||
"[M" = "@function.outer";
|
||||
"[]" = "@class.outer";
|
||||
};
|
||||
};
|
||||
swap = {
|
||||
enable = true;
|
||||
swapNext = {
|
||||
"<leader>a" = "@parameters.inner";
|
||||
};
|
||||
swapPrevious = {
|
||||
"<leader>A" = "@parameter.outer";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
11
pkgs/nvim/config/languages/treesitter/treesitter.nix
Normal file
11
pkgs/nvim/config/languages/treesitter/treesitter.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
plugins.treesitter = {
|
||||
enable = true;
|
||||
folding = true;
|
||||
nixvimInjections = true;
|
||||
settings = {
|
||||
highlight.enable = true;
|
||||
indent.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
5
pkgs/nvim/config/languages/treesitter/ts-autotag.nix
Normal file
5
pkgs/nvim/config/languages/treesitter/ts-autotag.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
plugins.ts-autotag = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
plugins.ts-context-commentstring = {
|
||||
enable = true;
|
||||
disableAutoInitialization = false;
|
||||
};
|
||||
}
|
50
pkgs/nvim/config/languages/typescript-tools-nvim.nix
Normal file
50
pkgs/nvim/config/languages/typescript-tools-nvim.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
plugins.typescript-tools = {
|
||||
enable = false;
|
||||
settings = {
|
||||
tsserverFilePreferences = {
|
||||
# Inlay Hints
|
||||
includeInlayParameterNameHints = "all";
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
|
||||
includeInlayFunctionParameterTypeHints = true;
|
||||
includeInlayVariableTypeHints = true;
|
||||
includeInlayVariableTypeHintsWhenTypeMatchesName = true;
|
||||
includeInlayPropertyDeclarationTypeHints = true;
|
||||
includeInlayFunctionLikeReturnTypeHints = true;
|
||||
includeInlayEnumMemberValueHints = true;
|
||||
};
|
||||
tsserverPlugins = [
|
||||
"@vue/typescript-plugin"
|
||||
];
|
||||
on_attach = ''
|
||||
function(client, bufnr)
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
client.server_capabilities.documentRangeFormattingProvider = false
|
||||
|
||||
if vim.lsp.inlay_hint then
|
||||
vim.lsp.inlay_hint(bufnr, true)
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>co";
|
||||
action = "<cmd>TSToolsOrganizeImports<cr>";
|
||||
options = {
|
||||
desc = "Organize Imports";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>cR";
|
||||
action = "<cmd>TSToolsRemoveUnusedImports<cr>";
|
||||
options = {
|
||||
desc = "Remove Unused Imports";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
103
pkgs/nvim/config/lsp/conform.nix
Normal file
103
pkgs/nvim/config/lsp/conform.nix
Normal file
@ -0,0 +1,103 @@
|
||||
{pkgs, ...}: {
|
||||
plugins.conform-nvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
notify_on_error = true;
|
||||
formatters_by_ft = {
|
||||
html = [["prettierd" "prettier"]];
|
||||
css = [["prettierd" "prettier"]];
|
||||
javascript = [["prettierd" "prettier"]];
|
||||
javascriptreact = [["prettierd" "prettier"]];
|
||||
typescript = [["prettierd" "prettier"]];
|
||||
typescriptreact = [["prettierd" "prettier"]];
|
||||
astro = [["prettierd" "prettier"]];
|
||||
vue = [["prettierd" "prettier"]];
|
||||
json = [["prettierd" "prettier"]];
|
||||
yaml = [["prettierd" "prettier"]];
|
||||
java = ["google-java-format"];
|
||||
python = ["black"];
|
||||
lua = ["stylua"];
|
||||
nix = ["alejandra"];
|
||||
markdown = [["prettierd" "prettier"]];
|
||||
rust = ["rustfmt"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
prettierd
|
||||
alejandra
|
||||
];
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>uf";
|
||||
action = ":FormatToggle<CR>";
|
||||
options = {
|
||||
desc = "Toggle Format";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>cf";
|
||||
action = "<cmd>lua require('conform').format()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Format Buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "v";
|
||||
key = "<leader>cF";
|
||||
action = "<cmd>lua require('conform').format()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Format Lines";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
extraConfigLua = ''
|
||||
local conform = require("conform")
|
||||
local notify = require("notify")
|
||||
|
||||
conform.setup({
|
||||
format_on_save = function(bufnr)
|
||||
-- Disable with a global or buffer-local variable
|
||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||
return
|
||||
end
|
||||
return { timeout_ms = 500, lsp_fallback = true }
|
||||
end,
|
||||
})
|
||||
|
||||
local function show_notification(message, level)
|
||||
notify(message, level, { title = "conform.nvim" })
|
||||
end
|
||||
|
||||
vim.api.nvim_create_user_command("FormatToggle", function(args)
|
||||
local is_global = not args.bang
|
||||
if is_global then
|
||||
vim.g.disable_autoformat = not vim.g.disable_autoformat
|
||||
if vim.g.disable_autoformat then
|
||||
show_notification("Autoformat-on-save disabled globally", "info")
|
||||
else
|
||||
show_notification("Autoformat-on-save enabled globally", "info")
|
||||
end
|
||||
else
|
||||
vim.b.disable_autoformat = not vim.b.disable_autoformat
|
||||
if vim.b.disable_autoformat then
|
||||
show_notification("Autoformat-on-save disabled for this buffer", "info")
|
||||
else
|
||||
show_notification("Autoformat-on-save enabled for this buffer", "info")
|
||||
end
|
||||
end
|
||||
end, {
|
||||
desc = "Toggle autoformat-on-save",
|
||||
bang = true,
|
||||
})
|
||||
'';
|
||||
}
|
99
pkgs/nvim/config/lsp/fidget.nix
Normal file
99
pkgs/nvim/config/lsp/fidget.nix
Normal file
@ -0,0 +1,99 @@
|
||||
{
|
||||
plugins.fidget = {
|
||||
enable = true;
|
||||
logger = {
|
||||
level = "warn"; # “off”, “error”, “warn”, “info”, “debug”, “trace”
|
||||
floatPrecision = 0.01; # Limit the number of decimals displayed for floats
|
||||
};
|
||||
progress = {
|
||||
pollRate = 0; # How and when to poll for progress messages
|
||||
suppressOnInsert = true; # Suppress new messages while in insert mode
|
||||
ignoreDoneAlready = false; # Ignore new tasks that are already complete
|
||||
ignoreEmptyMessage = false; # Ignore new tasks that don't contain a message
|
||||
clearOnDetach =
|
||||
# Clear notification group when LSP server detaches
|
||||
''
|
||||
function(client_id)
|
||||
local client = vim.lsp.get_client_by_id(client_id)
|
||||
return client and client.name or nil
|
||||
end
|
||||
'';
|
||||
notificationGroup =
|
||||
# How to get a progress message's notification group key
|
||||
''
|
||||
function(msg) return msg.lsp_client.name end
|
||||
'';
|
||||
ignore = []; # List of LSP servers to ignore
|
||||
lsp = {
|
||||
progressRingbufSize = 0; # Configure the nvim's LSP progress ring buffer size
|
||||
};
|
||||
display = {
|
||||
renderLimit = 16; # How many LSP messages to show at once
|
||||
doneTtl = 3; # How long a message should persist after completion
|
||||
doneIcon = "✔"; # Icon shown when all LSP progress tasks are complete
|
||||
doneStyle = "Constant"; # Highlight group for completed LSP tasks
|
||||
progressTtl = "math.huge"; # How long a message should persist when in progress
|
||||
progressIcon = {
|
||||
pattern = "dots";
|
||||
period = 1;
|
||||
}; # Icon shown when LSP progress tasks are in progress
|
||||
progressStyle = "WarningMsg"; # Highlight group for in-progress LSP tasks
|
||||
groupStyle = "Title"; # Highlight group for group name (LSP server name)
|
||||
iconStyle = "Question"; # Highlight group for group icons
|
||||
priority = 30; # Ordering priority for LSP notification group
|
||||
skipHistory = true; # Whether progress notifications should be omitted from history
|
||||
formatMessage = ''
|
||||
require ("fidget.progress.display").default_format_message
|
||||
''; # How to format a progress message
|
||||
formatAnnote = ''
|
||||
function (msg) return msg.title end
|
||||
''; # How to format a progress annotation
|
||||
formatGroupName = ''
|
||||
function (group) return tostring (group) end
|
||||
''; # How to format a progress notification group's name
|
||||
overrides = {
|
||||
rust_analyzer = {
|
||||
name = "rust-analyzer";
|
||||
};
|
||||
}; # Override options from the default notification config
|
||||
};
|
||||
};
|
||||
notification = {
|
||||
pollRate = 10; # How frequently to update and render notifications
|
||||
filter = "info"; # “off”, “error”, “warn”, “info”, “debug”, “trace”
|
||||
historySize = 128; # Number of removed messages to retain in history
|
||||
overrideVimNotify = true;
|
||||
redirect = ''
|
||||
function(msg, level, opts)
|
||||
if opts and opts.on_open then
|
||||
return require("fidget.integration.nvim-notify").delegate(msg, level, opts)
|
||||
end
|
||||
end
|
||||
'';
|
||||
configs = {
|
||||
default = "require('fidget.notification').default_config";
|
||||
};
|
||||
|
||||
window = {
|
||||
normalHl = "Comment";
|
||||
winblend = 0;
|
||||
border = "none"; # none, single, double, rounded, solid, shadow
|
||||
zindex = 45;
|
||||
maxWidth = 0;
|
||||
maxHeight = 0;
|
||||
xPadding = 1;
|
||||
yPadding = 0;
|
||||
align = "bottom";
|
||||
relative = "editor";
|
||||
};
|
||||
view = {
|
||||
stackUpwards = true; # Display notification items from bottom to top
|
||||
iconSeparator = " "; # Separator between group name and icon
|
||||
groupSeparator = "---"; # Separator between notification groups
|
||||
groupSeparatorHl =
|
||||
# Highlight group used for group separator
|
||||
"Comment";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
188
pkgs/nvim/config/lsp/lsp.nix
Normal file
188
pkgs/nvim/config/lsp/lsp.nix
Normal file
@ -0,0 +1,188 @@
|
||||
{
|
||||
pkgs,
|
||||
icons,
|
||||
...
|
||||
}: {
|
||||
plugins = {
|
||||
lsp-format = {
|
||||
enable = false; # Enable it if you want lsp-format integration for none-ls
|
||||
};
|
||||
lsp = {
|
||||
enable = true;
|
||||
capabilities = "offsetEncoding = 'utf-16'";
|
||||
servers = {
|
||||
clangd = {enable = true;};
|
||||
lua_ls = {
|
||||
enable = true;
|
||||
extraOptions = {
|
||||
settings = {
|
||||
Lua = {
|
||||
completion = {
|
||||
callSnippet = "Replace";
|
||||
};
|
||||
telemetry = {
|
||||
enabled = false;
|
||||
};
|
||||
hint = {enable = true;};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
nil_ls = {enable = true;};
|
||||
ts_ls = {
|
||||
enable = true;
|
||||
extraOptions = {
|
||||
settings = {
|
||||
javascript = {
|
||||
inlayHints = {
|
||||
includeInlayEnumMemberValueHints = true;
|
||||
includeInlayFunctionLikeReturnTypeHints = true;
|
||||
includeInlayFunctionParameterTypeHints = true;
|
||||
includeInlayParameterNameHints = "all";
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
|
||||
includeInlayPropertyDeclarationTypeHints = true;
|
||||
includeInlayVariableTypeHints = true;
|
||||
};
|
||||
};
|
||||
typescript = {
|
||||
inlayHints = {
|
||||
includeInlayEnumMemberValueHints = true;
|
||||
includeInlayFunctionLikeReturnTypeHints = true;
|
||||
includeInlayFunctionParameterTypeHints = true;
|
||||
includeInlayParameterNameHints = "all";
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
|
||||
includeInlayPropertyDeclarationTypeHints = true;
|
||||
includeInlayVariableTypeHints = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
astro = {enable = true;};
|
||||
volar = {
|
||||
enable = true;
|
||||
package = pkgs.vue-language-server;
|
||||
tslsIntegration = true;
|
||||
rootDir = ''require("lspconfig.util").root_pattern("src/App.vue")'';
|
||||
};
|
||||
svelte = {enable = true;};
|
||||
eslint = {enable = true;};
|
||||
pyright = {enable = true;};
|
||||
ruff_lsp = {enable = true;};
|
||||
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
installCargo = false;
|
||||
installRustc = false;
|
||||
settings = {
|
||||
checkOnSave = true;
|
||||
check = {
|
||||
command = "clippy";
|
||||
};
|
||||
# inlayHints = {
|
||||
# enable = true;
|
||||
# showParameterNames = true;
|
||||
# parameterHintsPrefix = "<- ";
|
||||
# otherHintsPrefix = "=> ";
|
||||
# };
|
||||
procMacro = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dartls.enable = true;
|
||||
};
|
||||
# keymaps = {
|
||||
# silent = true;
|
||||
# lspBuf = {
|
||||
# gd = {
|
||||
# action = "definition";
|
||||
# desc = "Goto Definition";
|
||||
# };
|
||||
# gr = {
|
||||
# action = "references";
|
||||
# desc = "Goto References";
|
||||
# };
|
||||
# gD = {
|
||||
# action = "declaration";
|
||||
# desc = "Goto Declaration";
|
||||
# };
|
||||
# gI = {
|
||||
# action = "implementation";
|
||||
# desc = "Goto Implementation";
|
||||
# };
|
||||
# gT = {
|
||||
# action = "type_definition";
|
||||
# desc = "Type Definition";
|
||||
# };
|
||||
# K = {
|
||||
# action = "hover";
|
||||
# desc = "Hover";
|
||||
# };
|
||||
# "<leader>cw" = {
|
||||
# action = "workspace_symbol";
|
||||
# desc = "Workspace Symbol";
|
||||
# };
|
||||
# "<leader>cr" = {
|
||||
# action = "rename";
|
||||
# desc = "Rename";
|
||||
# };
|
||||
# "<leader>ca" = {
|
||||
# action = "code_action";
|
||||
# desc = "Code Action";
|
||||
# };
|
||||
# "<C-k>" = {
|
||||
# action = "signature_help";
|
||||
# desc = "Signature Help";
|
||||
# };
|
||||
# };
|
||||
# diagnostic = {
|
||||
# "<leader>cd" = {
|
||||
# action = "open_float";
|
||||
# desc = "Line Diagnostics";
|
||||
# };
|
||||
# "[d" = {
|
||||
# action = "goto_next";
|
||||
# desc = "Next Diagnostic";
|
||||
# };
|
||||
# "]d" = {
|
||||
# action = "goto_prev";
|
||||
# desc = "Previous Diagnostic";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
};
|
||||
extraConfigLua = ''
|
||||
local _border = "rounded"
|
||||
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(
|
||||
vim.lsp.handlers.hover, {
|
||||
border = _border
|
||||
}
|
||||
)
|
||||
|
||||
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
|
||||
vim.lsp.handlers.signature_help, {
|
||||
border = _border
|
||||
}
|
||||
)
|
||||
|
||||
vim.diagnostic.config({
|
||||
float={border=_border},
|
||||
signs = {
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = "${icons.diagnostics.Error}",
|
||||
[vim.diagnostic.severity.WARN] = "${icons.diagnostics.Warn}",
|
||||
[vim.diagnostic.severity.HINT] = "${icons.diagnostics.Hint}",
|
||||
[vim.diagnostic.severity.INFO] = "${icons.diagnostics.Info}",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require('lspconfig.ui.windows').default_options = {
|
||||
border = _border
|
||||
}
|
||||
'';
|
||||
}
|
186
pkgs/nvim/config/lsp/lspsaga.nix
Normal file
186
pkgs/nvim/config/lsp/lspsaga.nix
Normal file
@ -0,0 +1,186 @@
|
||||
{
|
||||
plugins.lspsaga = {
|
||||
enable = true;
|
||||
beacon = {
|
||||
enable = true;
|
||||
};
|
||||
ui = {
|
||||
border = "rounded"; # One of none, single, double, rounded, solid, shadow
|
||||
codeAction = "💡"; # Can be any symbol you want 💡
|
||||
};
|
||||
hover = {
|
||||
openCmd = "!floorp"; # Choose your browser
|
||||
openLink = "gx";
|
||||
};
|
||||
diagnostic = {
|
||||
borderFollow = true;
|
||||
diagnosticOnlyCurrent = false;
|
||||
showCodeAction = true;
|
||||
};
|
||||
symbolInWinbar = {
|
||||
enable = false; # Breadcrumbs
|
||||
};
|
||||
codeAction = {
|
||||
extendGitSigns = false;
|
||||
showServerName = true;
|
||||
onlyInCursor = true;
|
||||
numShortcut = true;
|
||||
keys = {
|
||||
exec = "<CR>";
|
||||
quit = ["<Esc>" "q"];
|
||||
};
|
||||
};
|
||||
lightbulb = {
|
||||
enable = false;
|
||||
sign = false;
|
||||
virtualText = true;
|
||||
};
|
||||
implement = {
|
||||
enable = false;
|
||||
};
|
||||
rename = {
|
||||
autoSave = false;
|
||||
keys = {
|
||||
exec = "<CR>";
|
||||
quit = ["<C-k>" "<Esc>"];
|
||||
select = "x";
|
||||
};
|
||||
};
|
||||
outline = {
|
||||
autoClose = true;
|
||||
autoPreview = true;
|
||||
closeAfterJump = true;
|
||||
layout = "normal"; # normal or float
|
||||
winPosition = "right"; # left or right
|
||||
keys = {
|
||||
jump = "e";
|
||||
quit = "q";
|
||||
toggleOrJump = "o";
|
||||
};
|
||||
};
|
||||
scrollPreview = {
|
||||
scrollDown = "<C-f>";
|
||||
scrollUp = "<C-b>";
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "gd";
|
||||
action = "<cmd>Lspsaga finder def<CR>";
|
||||
options = {
|
||||
desc = "Goto Definition";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "gr";
|
||||
action = "<cmd>Lspsaga finder ref<CR>";
|
||||
options = {
|
||||
desc = "Goto References";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
# {
|
||||
# mode = "n";
|
||||
# key = "gD";
|
||||
# action = "<cmd>Lspsaga show_line_diagnostics<CR>";
|
||||
# options = {
|
||||
# desc = "Goto Declaration";
|
||||
# silent = true;
|
||||
# };
|
||||
# }
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "gI";
|
||||
action = "<cmd>Lspsaga finder imp<CR>";
|
||||
options = {
|
||||
desc = "Goto Implementation";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "gT";
|
||||
action = "<cmd>Lspsaga peek_type_definition<CR>";
|
||||
options = {
|
||||
desc = "Type Definition";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "K";
|
||||
action = "<cmd>Lspsaga hover_doc<CR>";
|
||||
options = {
|
||||
desc = "Hover";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>cw";
|
||||
action = "<cmd>Lspsaga outline<CR>";
|
||||
options = {
|
||||
desc = "Outline";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>cr";
|
||||
action = "<cmd>Lspsaga rename<CR>";
|
||||
options = {
|
||||
desc = "Rename";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ca";
|
||||
action = "<cmd>Lspsaga code_action<CR>";
|
||||
options = {
|
||||
desc = "Code Action";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>cd";
|
||||
action = "<cmd>Lspsaga show_line_diagnostics<CR>";
|
||||
options = {
|
||||
desc = "Line Diagnostics";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "[d";
|
||||
action = "<cmd>Lspsaga diagnostic_jump_next<CR>";
|
||||
options = {
|
||||
desc = "Next Diagnostic";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "]d";
|
||||
action = "<cmd>Lspsaga diagnostic_jump_prev<CR>";
|
||||
options = {
|
||||
desc = "Previous Diagnostic";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
52
pkgs/nvim/config/lsp/trouble.nix
Normal file
52
pkgs/nvim/config/lsp/trouble.nix
Normal file
@ -0,0 +1,52 @@
|
||||
{
|
||||
plugins.trouble = {
|
||||
enable = true;
|
||||
settings = {
|
||||
auto_close = true;
|
||||
};
|
||||
};
|
||||
# TODO: Add keybinds to close trouble (q would be nice), rn I need to use :x to close it...
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>x";
|
||||
action = "+diagnostics/quickfix";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>xx";
|
||||
action = "<cmd>TroubleToggle<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Document Diagnostics (Trouble)";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>xX";
|
||||
action = "<cmd>TroubleToggle workspace_diagnostics<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Workspace Diagnostics (Trouble)";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>xt";
|
||||
action = "<cmd>TroubleToggle todo<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Todo (Trouble)";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>xQ";
|
||||
action = "<cmd>TodoQuickFix<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Quickfix List (Trouble)";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
71
pkgs/nvim/config/none-ls/none-ls.nix
Normal file
71
pkgs/nvim/config/none-ls/none-ls.nix
Normal file
@ -0,0 +1,71 @@
|
||||
{
|
||||
plugins.none-ls = {
|
||||
enable = false;
|
||||
enableLspFormat = false;
|
||||
settings = {
|
||||
update_in_insert = false;
|
||||
on_attach = ''
|
||||
function(client, bufnr)
|
||||
if client.supports_method "textDocument/formatting" then
|
||||
vim.api.nvim_clear_autocmds { group = augroup, buffer = bufnr }
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = augroup,
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
vim.lsp.buf.format { bufnr = bufnr }
|
||||
end,
|
||||
})
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
sources = {
|
||||
code_actions = {
|
||||
gitsigns.enable = true;
|
||||
statix.enable = true;
|
||||
};
|
||||
diagnostics = {
|
||||
checkstyle = {
|
||||
enable = true;
|
||||
};
|
||||
statix = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
formatting = {
|
||||
alejandra = {
|
||||
enable = true;
|
||||
};
|
||||
prettier = {
|
||||
enable = true;
|
||||
disableTsServerFormatter = true;
|
||||
};
|
||||
google_java_format = {
|
||||
enable = true;
|
||||
};
|
||||
stylua = {
|
||||
enable = true;
|
||||
};
|
||||
black = {
|
||||
enable = true;
|
||||
settings = ''
|
||||
{
|
||||
extra_args = { "--fast" },
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
# keymaps = [
|
||||
# {
|
||||
# mode = [ "n" "v" ];
|
||||
# key = "<leader>cf";
|
||||
# action = "<cmd>lua vim.lsp.buf.format()<cr>";
|
||||
# options = {
|
||||
# silent = true;
|
||||
# desc = "Format";
|
||||
# };
|
||||
# }
|
||||
# ];
|
||||
}
|
167
pkgs/nvim/config/sets.nix
Normal file
167
pkgs/nvim/config/sets.nix
Normal file
@ -0,0 +1,167 @@
|
||||
{
|
||||
config = {
|
||||
# Set colorscheme
|
||||
colorscheme = "gruvbox";
|
||||
|
||||
# Enable experimental lua loader
|
||||
luaLoader.enable = true;
|
||||
|
||||
opts = {
|
||||
# Autosave when changing buffers
|
||||
autowrite = true;
|
||||
|
||||
# Enable relative line numbers
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
|
||||
# Set tabs to 2 spaces
|
||||
tabstop = 2;
|
||||
softtabstop = 2;
|
||||
showtabline = 2;
|
||||
expandtab = true;
|
||||
|
||||
# Enable auto indenting and set it to spaces
|
||||
smartindent = true;
|
||||
shiftwidth = 2;
|
||||
|
||||
# Enable smart indenting (see https://stackoverflow.com/questions/1204149/smart-wrap-in-vim)
|
||||
breakindent = true;
|
||||
|
||||
# Enable incremental searching
|
||||
hlsearch = true;
|
||||
incsearch = true;
|
||||
|
||||
# Enable text wrap
|
||||
wrap = true;
|
||||
|
||||
# Better splitting
|
||||
splitbelow = true;
|
||||
splitright = true;
|
||||
|
||||
# Enable mouse mode
|
||||
mouse = "a"; # Mouse
|
||||
|
||||
# Enable ignorecase + smartcase for better searching
|
||||
ignorecase = true;
|
||||
smartcase = true; # Don't ignore case with capitals
|
||||
grepprg = "rg --vimgrep";
|
||||
grepformat = "%f:%l:%c:%m";
|
||||
|
||||
# Decrease updatetime
|
||||
updatetime = 50; # faster completion (4000ms default)
|
||||
|
||||
# Set completeopt to have a better completion experience
|
||||
completeopt = ["menuone" "noselect" "noinsert"]; # mostly just for cmp
|
||||
|
||||
# Enable persistent undo history
|
||||
swapfile = false;
|
||||
backup = false;
|
||||
undofile = true;
|
||||
|
||||
# Enable 24-bit colors
|
||||
termguicolors = true;
|
||||
|
||||
# Enable the sign column to prevent the screen from jumping
|
||||
signcolumn = "yes";
|
||||
|
||||
# Enable cursor line highlight
|
||||
cursorline = true; # Highlight the line where the cursor is located
|
||||
|
||||
# Set fold settings
|
||||
# These options were reccommended by nvim-ufo
|
||||
# See: https://github.com/kevinhwang91/nvim-ufo#minimal-configuration
|
||||
foldcolumn = "0";
|
||||
foldlevel = 99;
|
||||
foldlevelstart = 99;
|
||||
foldenable = true;
|
||||
|
||||
# Always keep 8 lines above/below cursor unless at start/end of file
|
||||
scrolloff = 8;
|
||||
|
||||
# Place a column line
|
||||
colorcolumn = "80";
|
||||
|
||||
# Customize sidebar characters
|
||||
fillchars = {
|
||||
foldopen = "";
|
||||
foldclose = "";
|
||||
fold = " ";
|
||||
foldsep = " ";
|
||||
diff = "╱";
|
||||
eob = " ";
|
||||
};
|
||||
|
||||
# Reduce which-key timeout to 10ms
|
||||
timeoutlen = 10;
|
||||
|
||||
# Set encoding type
|
||||
encoding = "utf-8";
|
||||
fileencoding = "utf-8";
|
||||
|
||||
# Change cursor options
|
||||
guicursor = [
|
||||
"n-v-c:block" # Normal, visual, command-line: block cursor
|
||||
"i-ci-ve:ver25" # Insert, command-line insert, visual-exclude: vertical bar cursor with block cursor, use "ver25" for 25% width
|
||||
"r-cr:hor20" # Replace, command-line replace: horizontal bar cursor with 20% height
|
||||
"o:hor50" # Operator-pending: horizontal bar cursor with 50% height
|
||||
"a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor" # All modes: blinking settings
|
||||
"sm:block-blinkwait175-blinkoff150-blinkon175" # Showmatch: block cursor with specific blinking settings
|
||||
];
|
||||
|
||||
# Enable chars list
|
||||
list = false; # Show invisible characters (tabs, eol, ...)
|
||||
listchars = "eol:↲,tab:|->,lead:·,space: ,trail:•,extends:→,precedes:←,nbsp:␣";
|
||||
|
||||
# More space in the neovim command line for displaying messages
|
||||
cmdheight = 2;
|
||||
|
||||
# We don't need to see things like INSERT anymore
|
||||
showmode = false;
|
||||
|
||||
# Maximum number of items to show in the popup menu (0 means "use available screen space")
|
||||
pumheight = 0;
|
||||
|
||||
# Use conform-nvim for gq formatting. ('formatexpr' is set to vim.lsp.formatexpr(), so you can format lines via gq if the language server supports it)
|
||||
formatexpr = "v:lua.require'conform'.formatexpr()";
|
||||
|
||||
laststatus = 3; # (https://neovim.io/doc/user/options.html#'laststatus')
|
||||
};
|
||||
|
||||
extraFiles = {
|
||||
"lua/helpers.lua".source = ./helpers.lua;
|
||||
};
|
||||
|
||||
extraConfigLuaPre = ''
|
||||
require "helpers"
|
||||
'';
|
||||
|
||||
extraConfigLua = ''
|
||||
local opt = vim.opt
|
||||
local g = vim.g
|
||||
local o = vim.o
|
||||
-- Neovide
|
||||
if g.neovide then
|
||||
-- Neovide options
|
||||
g.neovide_fullscreen = false
|
||||
g.neovide_hide_mouse_when_typing = false
|
||||
g.neovide_refresh_rate = 165
|
||||
g.neovide_cursor_vfx_mode = "ripple"
|
||||
g.neovide_cursor_animate_command_line = true
|
||||
g.neovide_cursor_animate_in_insert_mode = true
|
||||
g.neovide_cursor_vfx_particle_lifetime = 5.0
|
||||
g.neovide_cursor_vfx_particle_density = 14.0
|
||||
g.neovide_cursor_vfx_particle_speed = 12.0
|
||||
g.neovide_transparency = 0.8
|
||||
|
||||
-- Neovide Fonts
|
||||
o.guifont = "MonoLisa Trial:Medium:h15"
|
||||
-- o.guifont = "CommitMono:Medium:h15"
|
||||
-- o.guifont = "JetBrainsMono Nerd Font:h14:Medium:i"
|
||||
-- o.guifont = "FiraMono Nerd Font:Medium:h14"
|
||||
-- o.guifont = "CaskaydiaCove Nerd Font:h14:b:i"
|
||||
-- o.guifont = "BlexMono Nerd Font Mono:h14:Medium:i"
|
||||
-- o.guifont = "Liga SFMono Nerd Font:b:h15"
|
||||
end
|
||||
'';
|
||||
};
|
||||
}
|
15
pkgs/nvim/config/snippets/luasnip.nix
Normal file
15
pkgs/nvim/config/snippets/luasnip.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{pkgs, ...}: {
|
||||
plugins.luasnip = {
|
||||
enable = true;
|
||||
settings = {
|
||||
enable_autosnippets = true;
|
||||
store_selection_keys = "<Tab>";
|
||||
};
|
||||
fromVscode = [
|
||||
{
|
||||
lazyLoad = true;
|
||||
paths = "${pkgs.vimPlugins.friendly-snippets}";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
93
pkgs/nvim/config/statusline/lualine.nix
Normal file
93
pkgs/nvim/config/statusline/lualine.nix
Normal file
@ -0,0 +1,93 @@
|
||||
{icons, ...}: {
|
||||
plugins.lualine = {
|
||||
enable = true;
|
||||
settings = {
|
||||
options = {
|
||||
always_divide_middle = true;
|
||||
globalstatus = true;
|
||||
ignore_focus = ["neo-tree"];
|
||||
theme = "auto";
|
||||
component_separators = {
|
||||
left = "·";
|
||||
right = "·";
|
||||
};
|
||||
section_separators = {
|
||||
left = ""; #
|
||||
right = ""; #
|
||||
};
|
||||
};
|
||||
extensions = ["fzf"];
|
||||
sections = let
|
||||
mkColor = color: {
|
||||
__raw = ''function() return MVim.fg("${color}") end'';
|
||||
};
|
||||
in {
|
||||
lualine_a = ["mode"];
|
||||
lualine_b = ["branch"];
|
||||
lualine_c = [
|
||||
{
|
||||
__unkeyed-1 = "diagnostics";
|
||||
symbols = {
|
||||
error = icons.diagnostics.Error;
|
||||
warn = icons.diagnostics.Warn;
|
||||
info = icons.diagnostics.Info;
|
||||
hint = icons.diagnostics.Hint;
|
||||
};
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "filetype";
|
||||
icon_only = true;
|
||||
separator = {
|
||||
left = "";
|
||||
right = "";
|
||||
};
|
||||
padding = {
|
||||
left = 1;
|
||||
right = 0;
|
||||
};
|
||||
}
|
||||
"filename"
|
||||
];
|
||||
|
||||
lualine_x = [
|
||||
# Command
|
||||
{
|
||||
__unkeyed-1.__raw = ''function() return require("noice").api.status.command.get() end'';
|
||||
color = mkColor "Statement";
|
||||
cond.__raw = ''function() return package.loaded["noice"] and require("noice").api.status.command.has() end'';
|
||||
}
|
||||
# Mode
|
||||
{
|
||||
__unkeyed-1.__raw = ''function() return require("noice").api.status.mode.get() end'';
|
||||
color = mkColor "Constant";
|
||||
cond.__raw = ''function() return package.loaded["noice"] and require("noice").api.status.mode.has() end'';
|
||||
}
|
||||
];
|
||||
lualine_y = [
|
||||
{
|
||||
__unkeyed-1 = "progress";
|
||||
separator = {
|
||||
left = " ";
|
||||
right = " ";
|
||||
};
|
||||
padding = {
|
||||
left = 1;
|
||||
right = 1;
|
||||
};
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "location";
|
||||
padding = {
|
||||
left = 0;
|
||||
right = 1;
|
||||
};
|
||||
}
|
||||
];
|
||||
lualine_z = [''" " .. os.date("%I:%M %p"):gsub("0*", "", 1)''];
|
||||
};
|
||||
disabled_filetypes = {
|
||||
statusline = ["dashboard" "alpha" "starter"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
65
pkgs/nvim/config/statusline/staline.nix
Normal file
65
pkgs/nvim/config/statusline/staline.nix
Normal file
@ -0,0 +1,65 @@
|
||||
{pkgs, ...}: {
|
||||
extraPlugins = with pkgs.vimUtils; [
|
||||
(buildVimPlugin {
|
||||
pname = "staline.nvim";
|
||||
version = "2024-02-05";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "tamton-aquib";
|
||||
repo = "staline.nvim";
|
||||
rev = "a53f869278b8b186a5afd6f21680cd103c381599";
|
||||
hash = "sha256-GDMKzxFDtQk5LL+rMsxTGTyLv69w5NUd+u19noeO5ws=";
|
||||
};
|
||||
})
|
||||
];
|
||||
extraConfigLua = ''
|
||||
require("staline").setup({
|
||||
sections = {
|
||||
left = { "-mode", " ", "branch" },
|
||||
mid = { "lsp_name" },
|
||||
right = { "file_name", "line_column" },
|
||||
},
|
||||
inactive_sections = {
|
||||
left = { "-mode", " ", "branch" },
|
||||
mid = { "lsp_name" },
|
||||
right = { "file_name", "line_column" },
|
||||
},
|
||||
defaults = {
|
||||
left_separator = " ",
|
||||
right_separator = " ",
|
||||
branch_symbol = " ",
|
||||
mod_symbol = "",
|
||||
line_column = "[%l/%L]",
|
||||
inactive_color = "#80a6f2", --#303030 is the default
|
||||
inactive_bgcolor = "none",
|
||||
},
|
||||
special_table = {
|
||||
lazy = { "Plugins", "💤 " },
|
||||
TelescopePrompt = { "Telescope", " " },
|
||||
oil = { "Oil", " " },
|
||||
lazygit = { "LazyGit", " " },
|
||||
},
|
||||
mode_icons = {
|
||||
["n"] = "NORMAL",
|
||||
["no"] = "NORMAL",
|
||||
["nov"] = "NORMAL",
|
||||
["noV"] = "NORMAL",
|
||||
["niI"] = "NORMAL",
|
||||
["niR"] = "NORMAL",
|
||||
["niV"] = "NORMAL",
|
||||
["i"] = "INSERT",
|
||||
["ic"] = "INSERT",
|
||||
["ix"] = "INSERT",
|
||||
["s"] = "INSERT",
|
||||
["S"] = "INSERT",
|
||||
["v"] = "VISUAL",
|
||||
["V"] = "VISUAL",
|
||||
[""] = "VISUAL",
|
||||
["r"] = "REPLACE",
|
||||
["r?"] = "REPLACE",
|
||||
["R"] = "REPLACE",
|
||||
["c"] = "COMMAND",
|
||||
["t"] = "TERMINAL",
|
||||
},
|
||||
})
|
||||
'';
|
||||
}
|
178
pkgs/nvim/config/telescope/telescope.nix
Normal file
178
pkgs/nvim/config/telescope/telescope.nix
Normal file
@ -0,0 +1,178 @@
|
||||
{
|
||||
plugins.telescope = {
|
||||
enable = true;
|
||||
|
||||
extensions = {
|
||||
fzf-native = {
|
||||
enable = true;
|
||||
};
|
||||
ui-select = {
|
||||
settings = {
|
||||
specific_opts = {
|
||||
codeactions = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
undo = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
# If you'd prefer Telescope not to enter a normal-like mode when hitting escape (and instead exiting), you can map <Esc> to do so via:
|
||||
settings = {
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
"<esc>" = {
|
||||
__raw = ''
|
||||
function(...)
|
||||
return require("telescope.actions").close(...)
|
||||
end'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
keymaps = {
|
||||
"<leader><space>" = {
|
||||
action = "find_files";
|
||||
options.desc = "Find project files";
|
||||
};
|
||||
"<leader>/" = {
|
||||
action = "live_grep";
|
||||
options.desc = "Grep (root dir)";
|
||||
};
|
||||
"<leader>:" = {
|
||||
action = "command_history";
|
||||
options.desc = "Command History";
|
||||
};
|
||||
"<leader>b" = {
|
||||
action = "buffers";
|
||||
options.desc = "+buffer";
|
||||
};
|
||||
"<leader>ff" = {
|
||||
action = "find_files";
|
||||
options.desc = "Find project files";
|
||||
};
|
||||
"<leader>fr" = {
|
||||
action = "oldfiles";
|
||||
options.desc = "Recent";
|
||||
};
|
||||
"<leader>fb" = {
|
||||
action = "buffers";
|
||||
options.desc = "Buffers";
|
||||
};
|
||||
"<C-p>" = {
|
||||
action = "git_files";
|
||||
options.desc = "Search git files";
|
||||
};
|
||||
"<leader>gc" = {
|
||||
action = "git_commits";
|
||||
options.desc = "Commits";
|
||||
};
|
||||
"<leader>gs" = {
|
||||
action = "git_status";
|
||||
options.desc = "Status";
|
||||
};
|
||||
"<leader>sa" = {
|
||||
action = "autocommands";
|
||||
options.desc = "Auto Commands";
|
||||
};
|
||||
"<leader>sb" = {
|
||||
action = "current_buffer_fuzzy_find";
|
||||
options.desc = "Buffer";
|
||||
};
|
||||
"<leader>sc" = {
|
||||
action = "command_history";
|
||||
options.desc = "Command History";
|
||||
};
|
||||
"<leader>sC" = {
|
||||
action = "commands";
|
||||
options.desc = "Commands";
|
||||
};
|
||||
"<leader>sD" = {
|
||||
action = "diagnostics";
|
||||
options.desc = "Workspace diagnostics";
|
||||
};
|
||||
"<leader>sh" = {
|
||||
action = "help_tags";
|
||||
options.desc = "Help pages";
|
||||
};
|
||||
"<leader>sH" = {
|
||||
action = "highlights";
|
||||
options.desc = "Search Highlight Groups";
|
||||
};
|
||||
"<leader>sk" = {
|
||||
action = "keymaps";
|
||||
options.desc = "Keymaps";
|
||||
};
|
||||
"<leader>sM" = {
|
||||
action = "man_pages";
|
||||
options.desc = "Man pages";
|
||||
};
|
||||
"<leader>sm" = {
|
||||
action = "marks";
|
||||
options.desc = "Jump to Mark";
|
||||
};
|
||||
"<leader>so" = {
|
||||
action = "vim_options";
|
||||
options.desc = "Options";
|
||||
};
|
||||
"<leader>sR" = {
|
||||
action = "resume";
|
||||
options.desc = "Resume";
|
||||
};
|
||||
"<leader>uC" = {
|
||||
action = "colorscheme";
|
||||
options.desc = "Colorscheme preview";
|
||||
};
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fp";
|
||||
action = "<cmd>Telescope projects<CR>";
|
||||
options = {
|
||||
desc = "Projects";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>sd";
|
||||
action = "<cmd>Telescope diagnostics bufnr=0<cr>";
|
||||
options = {
|
||||
desc = "Document diagnostics";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>st";
|
||||
action = "<cmd>TodoTelescope<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Todo (Telescope)";
|
||||
};
|
||||
}
|
||||
|
||||
# {
|
||||
# mode = "n";
|
||||
# key = "<leader>,";
|
||||
# action = "<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>";
|
||||
# options = {
|
||||
# desc = "Switch Buffer";
|
||||
# };
|
||||
# }
|
||||
];
|
||||
extraConfigLua = ''
|
||||
local telescope = require('telescope')
|
||||
telescope.setup{
|
||||
pickers = {
|
||||
colorscheme = {
|
||||
enable_preview = true
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user