Compare commits
485 commits
Author | SHA1 | Date | |
---|---|---|---|
197af4cb55 | |||
7a50d8e8d1 | |||
8d1023a4a2 | |||
65299f9f1f | |||
11618adc76 | |||
4290a4d45a | |||
2e20dabf06 | |||
baac8eed23 | |||
b2bb18f583 | |||
3b9e5cf5c6 | |||
4f293981f8 | |||
60dce8e681 | |||
70b61a74ae | |||
84e19cb236 | |||
599690ede5 | |||
ddd85e4830 | |||
350c745cf1 | |||
af7de46bf5 | |||
2390d2fe82 | |||
7792eead8d | |||
8609d63413 | |||
c745986ef4 | |||
29734b6bd7 | |||
b82994c914 | |||
ae8bad7a03 | |||
40fd5e3035 | |||
663b2c4eb4 | |||
dabe148755 | |||
9b47d50dc6 | |||
cbd5408e45 | |||
1216292c4c | |||
8cf062885e | |||
10946e39ae | |||
11efc745e3 | |||
f889c8fdda | |||
79fd28061b | |||
403029e478 | |||
44c45c48a1 | |||
a32c23d474 | |||
652fbe4026 | |||
f7b386e25a | |||
3a88101b04 | |||
7d8736ecad | |||
f5ab3abe76 | |||
5823811700 | |||
a53626d5c3 | |||
5a107254d2 | |||
73814bfa47 | |||
ca6f5e6919 | |||
205311a514 | |||
25425b6b7c | |||
035540b33e | |||
e3849773fd | |||
d9fad9be8d | |||
1f41b9642a | |||
27fcf24a80 | |||
72782ebb87 | |||
b58c3c4d31 | |||
dc30a6a437 | |||
8f73eca404 | |||
f546beea17 | |||
d0e16f75f7 | |||
df2ab41246 | |||
4ba43fb647 | |||
fc79fba781 | |||
4f02f4bd7f | |||
a74f230db3 | |||
dedea5399a | |||
72ea5f7086 | |||
e2ac562d31 | |||
5d4b19d217 | |||
abf32ff426 | |||
c1e155988d | |||
e69a26f77f | |||
af4e08b5af | |||
c65c53cf73 | |||
a5fb079c06 | |||
0016d20633 | |||
982b0ccc48 | |||
a731e61c09 | |||
3b4c75121a | |||
e556401bac | |||
84ba8bf7cc | |||
05078468af | |||
7163022eda | |||
a6ec1cf879 | |||
79ab4ca237 | |||
e03c4d07ec | |||
30cc84fbda | |||
43f0f9b028 | |||
8ffe055df8 | |||
6067499083 | |||
2809c01b20 | |||
bce8fbbb78 | |||
c327895c6b | |||
37ae2afef6 | |||
9d4b2b4b7f | |||
83e191134a | |||
cba0555c38 | |||
9677a6ca77 | |||
a8b1fed384 | |||
fb87eabdce | |||
7717317840 | |||
5fb4292e1c | |||
9d8b575f3a | |||
54e15511e8 | |||
db2143289c | |||
82ac0622aa | |||
f819c3bad6 | |||
1ba8ff0100 | |||
dd900e9377 | |||
c7dce3ab4c | |||
25ce495599 | |||
d5a1912ced | |||
3c12cbec24 | |||
ff47e7ba4b | |||
75ab653451 | |||
9d6d17f2cf | |||
f9e5be5864 | |||
a3c722e9f8 | |||
9601ff024b | |||
74ff7d0cff | |||
aa63b0d3e0 | |||
e86705a8b7 | |||
0bef8299c2 | |||
fb21aab2e3 | |||
52d0f2ad8d | |||
6d8bbd3b94 | |||
3171475f90 | |||
866af533ef | |||
52109a6671 | |||
e583ab81e4 | |||
820fda70aa | |||
fccbf30dd3 | |||
e1ebdc68e9 | |||
e35ba5af34 | |||
6a7a16807d | |||
f358b8e5e9 | |||
88ada5d28d | |||
d8f1e5318a | |||
895c257573 | |||
0999370e2d | |||
9fa9338f7a | |||
66308177ed | |||
e2bfa81b10 | |||
3130e4ee19 | |||
e92a899c87 | |||
0d1a446ab4 | |||
dba7a5ac50 | |||
f742129d4d | |||
6128c1a1e3 | |||
ee15e3823e | |||
f6fd747fb3 | |||
62bd8fb899 | |||
bcdcabc5c4 | |||
988000655b | |||
5a7309b5d3 | |||
95ee537f03 | |||
4df523437a | |||
3788823072 | |||
bfa2f177d3 | |||
e21a61c360 | |||
a98b467d26 | |||
6849194702 | |||
e0d5144389 | |||
37de97df46 | |||
66fd1c3066 | |||
12f1800aed | |||
0c4a52f6ec | |||
1411269c58 | |||
8c18115208 | |||
ba9775666b | |||
12698af186 | |||
8fb56c0005 | |||
a38be99ea0 | |||
db2dc67e47 | |||
8b8ce6baa3 | |||
a313be12ea | |||
ea612479a0 | |||
c8717806ab | |||
7bff0e57e2 | |||
0caf77129f | |||
cd543e02ce | |||
267185f176 | |||
55fa0214cb | |||
5b9fd51586 | |||
b7c77998f3 | |||
b67be71d21 | |||
042e3e787c | |||
55a3807844 | |||
61fecf3bdb | |||
9590b879ed | |||
a3d1233ad1 | |||
37e55bb342 | |||
64425bd447 | |||
3df87b1a12 | |||
1b24f5f065 | |||
cae8bb47ce | |||
7ffbe8ac24 | |||
3c92306ca3 | |||
d0efa40c63 | |||
9116e95a03 | |||
57be38c32f | |||
6b795f7557 | |||
16bcd5e813 | |||
49c94bcd62 | |||
23e3c53693 | |||
d2237c0a12 | |||
a45c032180 | |||
62ed33c82c | |||
0057fb3378 | |||
0a403bb9e2 | |||
891c8a1f8d | |||
47f54d5d6f | |||
cb89698fec | |||
e9d20e9453 | |||
6d01ccf480 | |||
47b0ffed69 | |||
6f9886d43f | |||
0f94246609 | |||
d5582a3371 | |||
cc66970484 | |||
42cdcd29c1 | |||
31b758d884 | |||
2b2326a65c | |||
e8e1f8e7ce | |||
cec92da687 | |||
4c6ecb05bd | |||
9191b17bff | |||
26187a521b | |||
984ba9267d | |||
017b19cd17 | |||
796ecadf90 | |||
8ee594e06b | |||
72461214d8 | |||
8efbd6f577 | |||
9dfb48ba0c | |||
73449da88f | |||
9dbc963840 | |||
4d8da4b646 | |||
b25018e39e | |||
54d97e55d9 | |||
45a78e44b4 | |||
4da58e8adc | |||
96bca1f669 | |||
d7000927a3 | |||
f4feb18c9a | |||
49f2ada271 | |||
a121569f84 | |||
da236805f5 | |||
6efc109f1c | |||
ff2c16e55e | |||
5938a873b3 | |||
b676b70273 | |||
1bbd87d36e | |||
d6d6498ee9 | |||
389eb3d497 | |||
7a2dbc4a41 | |||
4c3b506937 | |||
f4364c6398 | |||
0fc04a3b18 | |||
0610fc96e9 | |||
312d1801f0 | |||
24201d0db6 | |||
fa3a5e4ac4 | |||
442c3cec92 | |||
fb18de26a0 | |||
2fcd6ed271 | |||
2a10090d56 | |||
457f369587 | |||
159e7a7c72 | |||
827f1d16d9 | |||
ef177f1293 | |||
a031de90f4 | |||
c71d2715a3 | |||
e66b6653db | |||
bcbbe82906 | |||
0f3d872faf | |||
392e10d5c4 | |||
8f46975d54 | |||
0eff21231b | |||
fb1244edcf | |||
00f6fd9f6e | |||
f13e48aaaf | |||
9f1eeca6b4 | |||
13a40b624d | |||
9e4694d115 | |||
0175810b04 | |||
3451b47e6a | |||
75bbfc22a1 | |||
8b7d68b296 | |||
43c06ae4c4 | |||
a0f97d1a10 | |||
e671f7a375 | |||
6554122847 | |||
83aad01227 | |||
2114a9037f | |||
59e1329644 | |||
795b5a05ce | |||
2a213c6b28 | |||
8af20e204a | |||
e58e5439d8 | |||
b740fa3e93 | |||
4061273bab | |||
dd626c2fc0 | |||
939f79f04d | |||
9dea0100c9 | |||
f30f235f19 | |||
115aa92ddd | |||
bd8e6a0715 | |||
e23c78fdb5 | |||
d5cf98310f | |||
5fe4764f01 | |||
aa3ccc9a9d | |||
c4a7c09930 | |||
04d19cb17d | |||
b97907ebcd | |||
f92a7d0bc9 | |||
45aa2c98fd | |||
22d7205413 | |||
9034479a24 | |||
b584274633 | |||
eae3b152d8 | |||
f81c7ce648 | |||
e226364c3f | |||
4c6a9fc358 | |||
0026a64c7c | |||
911cc18e65 | |||
87b886bfb0 | |||
74880599ea | |||
7e210d325f | |||
6ead1cbc6e | |||
a0f9a2b55d | |||
ce07329417 | |||
00580c2c1f | |||
5edc79b504 | |||
13ac723ec0 | |||
688ec82caf | |||
494542e1d2 | |||
4ffc922419 | |||
a8cc32d0e0 | |||
2874437ab9 | |||
9dabfa7771 | |||
3add3c5d49 | |||
d7189f1d82 | |||
56caaa4112 | |||
f774f4b674 | |||
a0307ebb97 | |||
d710638278 | |||
72f21229f3 | |||
d122f9061a | |||
f5091547bb | |||
c35c00bf75 | |||
eb09394470 | |||
180e5743cc | |||
34b7c07297 | |||
cad15d88fd | |||
7fcc87b549 | |||
bc88e102b6 | |||
72a1d720a7 | |||
5658f13955 | |||
916cc95918 | |||
1d4f9fecdc | |||
9c9cc992b8 | |||
af395cafcb | |||
60b8c06011 | |||
9df249c52d | |||
243f5b5607 | |||
ad844d9266 | |||
7d3c774e4e | |||
516f3a3d3e | |||
db480ac857 | |||
6cab6c0bf1 | |||
ec10309491 | |||
df27f03c62 | |||
f0698e809b | |||
404f022701 | |||
c17fb32a28 | |||
5ec6b664bf | |||
d97229fa11 | |||
27fdc7a92e | |||
08b1521824 | |||
7159aa535c | |||
28afd2dc86 | |||
59cc5c791e | |||
2686ad6086 | |||
4caa879c4e | |||
7d5c1d1860 | |||
b1a17f605d | |||
60d5495bed | |||
48ba1729e6 | |||
42c594e32e | |||
43a76ca3d7 | |||
e703451af2 | |||
3ff06fa2bc | |||
a394b9cefd | |||
5f644d0ccd | |||
4980df6f75 | |||
6c0376da29 | |||
0889e6a448 | |||
2d3e4844b7 | |||
691b35c860 | |||
0ab8805aa5 | |||
a03283d0d2 | |||
fc1e93f731 | |||
ffd576cf99 | |||
797f8d032d | |||
dbb15d07ed | |||
a39a314e4c | |||
2871c291bf | |||
71a3654e9a | |||
865274a2df | |||
ff789db499 | |||
a9697956e4 | |||
7f52ad42cd | |||
ebc446116c | |||
b111910e64 | |||
cc2bae9274 | |||
c9951e3774 | |||
dc3d14fc76 | |||
1d0d36659a | |||
36482dbb45 | |||
bd015badf8 | |||
2ecab054f9 | |||
399e02b074 | |||
0b5508b94d | |||
69d4d7a147 | |||
6978e1ad5b | |||
9620ca8ca3 | |||
f7302479b3 | |||
116474d8a8 | |||
11c2e5d852 | |||
ea7579024f | |||
88307f11d7 | |||
76247f161d | |||
73834fcdb2 | |||
b544207c17 | |||
b822cce916 | |||
93540ebbea | |||
6b492a2c08 | |||
97162fa355 | |||
409e64b82d | |||
98d64349ab | |||
1cee88929a | |||
c9d18957f1 | |||
c68bfb81d3 | |||
e0b8b9ce02 | |||
d8a874ffa7 | |||
e9821d4cf0 | |||
7822eb7064 | |||
6b3d0f8971 | |||
75cfaa84ca | |||
0462eb091c | |||
5eaac88cd0 | |||
7abf093ddd | |||
5f27b9df55 | |||
1ef63feb7c | |||
4d57037bd1 | |||
c33dc594ec | |||
3db49bbddf | |||
f5c18d6902 | |||
be02ace030 | |||
fc65aa5403 | |||
77f117cc5d | |||
25ec5ef86d | |||
3e1fe36c42 | |||
731e2118a5 | |||
53eea2bced | |||
867c475918 | |||
934120a952 | |||
a1c1373fc5 | |||
173f1d32ad | |||
145a7214b2 | |||
57f04d95db | |||
ae0468bf73 | |||
d9349d5317 | |||
458c00e499 | |||
c9ef45c958 | |||
ae7d2a3974 | |||
9fb2c6e365 | |||
fe54c2d5ba | |||
fc8c1560e3 | |||
3e1ee94dc9 | |||
3c9a69063f | |||
a16c6bd6cc |
265 changed files with 10802 additions and 5008 deletions
|
@ -7,5 +7,9 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
name: Checkout repository
|
name: Checkout repository
|
||||||
|
- name: Attic login
|
||||||
|
run: attic login nixfleet http://sisko.wg.aciceri.dev:8081 ${{secrets.ATTIC_NIXFLEET_TOKEN}}
|
||||||
- name: Build with nix
|
- name: Build with nix
|
||||||
run: nix-fast-build --no-nom --systems "x86_64-linux aarch64-linux"
|
run: nix-fast-build --no-nom --systems "x86_64-linux aarch64-linux" --attic-cache "nixfleet" --skip-cached --result-file result.json || true
|
||||||
|
- name: Report checks
|
||||||
|
run: report-checks
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
name: update-flake-lock
|
name: update-flake-lock
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 15 * * *' # daily at 15:00
|
- cron: "0 15 * * *" # daily at 15:00
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lockfile:
|
lockfile:
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@ result
|
||||||
.direnv
|
.direnv
|
||||||
.pre-commit-config.yaml
|
.pre-commit-config.yaml
|
||||||
*.qcow2
|
*.qcow2
|
||||||
|
result*
|
|
@ -3,33 +3,55 @@
|
||||||
self,
|
self,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.treefmt-nix.flakeModule
|
inputs.treefmt-nix.flakeModule
|
||||||
inputs.pre-commit-hooks.flakeModule
|
inputs.git-hooks-nix.flakeModule
|
||||||
];
|
];
|
||||||
|
|
||||||
perSystem = _: {
|
perSystem =
|
||||||
treefmt.config = {
|
{ config, ... }:
|
||||||
projectRootFile = ".git/config";
|
{
|
||||||
programs.alejandra.enable = true;
|
treefmt.config = {
|
||||||
|
projectRootFile = ".git/config";
|
||||||
|
flakeFormatter = true;
|
||||||
|
flakeCheck = true;
|
||||||
|
programs = {
|
||||||
|
nixfmt.enable = true;
|
||||||
|
prettier.enable = true;
|
||||||
|
black.enable = true;
|
||||||
|
shfmt.enable = true;
|
||||||
|
};
|
||||||
|
settings.global.excludes = [
|
||||||
|
"*.age"
|
||||||
|
"*.svg"
|
||||||
|
"*.png"
|
||||||
|
"*.jpg"
|
||||||
|
"*.bin"
|
||||||
|
"*.el"
|
||||||
|
"*.org"
|
||||||
|
".envrc"
|
||||||
|
"*.conf"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
pre-commit.settings = {
|
||||||
|
hooks.treefmt = {
|
||||||
|
enable = true;
|
||||||
|
package = config.treefmt.build.wrapper;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pre-commit.settings.hooks = {
|
flake.checks =
|
||||||
alejandra.enable = true;
|
let
|
||||||
# deadnix.enable = true;
|
build = _: nc: nc.config.system.build.toplevel;
|
||||||
# statix.enable = true;
|
in
|
||||||
|
{
|
||||||
|
x86_64-linux = lib.mapAttrs build { inherit (self.nixosConfigurations) picard; };
|
||||||
|
aarch64-linux = lib.mapAttrs build {
|
||||||
|
inherit (self.nixosConfigurations) sisko; # pbp;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
flake.checks = let
|
|
||||||
build = _: nc: nc.config.system.build.toplevel;
|
|
||||||
in {
|
|
||||||
x86_64-linux = lib.mapAttrs build {
|
|
||||||
inherit (self.nixosConfigurations) picard;
|
|
||||||
};
|
|
||||||
aarch64-linux = lib.mapAttrs build {
|
|
||||||
inherit (self.nixosConfigurations) sisko; #pbp;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
{inputs, ...}: {
|
|
||||||
imports = [
|
|
||||||
inputs.hercules-ci-effects.flakeModule
|
|
||||||
];
|
|
||||||
herculesCI.ciSystems = [
|
|
||||||
"x86_64-linux"
|
|
||||||
"aarch64-linux"
|
|
||||||
];
|
|
||||||
hercules-ci.flake-update = {
|
|
||||||
enable = true;
|
|
||||||
updateBranch = "updated-flake-lock";
|
|
||||||
createPullRequest = true;
|
|
||||||
autoMergeMethod = "rebase";
|
|
||||||
baseMerge = {
|
|
||||||
enable = true;
|
|
||||||
method = "rebase";
|
|
||||||
};
|
|
||||||
when = {
|
|
||||||
minute = 45;
|
|
||||||
hour = 13;
|
|
||||||
dayOfWeek = ["Mon" "Tue" "Wed" "Thu" "Fri" "Sat" "Sun"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
1305
flake.lock
generated
1305
flake.lock
generated
File diff suppressed because it is too large
Load diff
71
flake.nix
71
flake.nix
|
@ -3,62 +3,59 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
flakeParts.url = "github:hercules-ci/flake-parts";
|
flakeParts.url = "github:hercules-ci/flake-parts";
|
||||||
nixpkgsUnstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgsSisko.url = "github:NixOS/nixpkgs/b6eaf97c6960d97350c584de1b6dcff03c9daf42";
|
||||||
nixpkgsUnstableForSisko.url = "github:NixOS/nixpkgs/0e74ca98a74bc7270d28838369593635a5db3260";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
nixpkgsStable.url = "github:NixOS/nixpkgs/nixos-23.11";
|
|
||||||
nixosHardware.url = "github:NixOS/nixos-hardware";
|
nixosHardware.url = "github:NixOS/nixos-hardware";
|
||||||
homeManager = {
|
homeManager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
# TODO: remove after https://github.com/nix-community/home-manager/pull/3811
|
# TODO: remove after https://github.com/nix-community/home-manager/pull/3811
|
||||||
homeManagerGitWorkspace = {
|
homeManagerGitWorkspace = {
|
||||||
url = "github:aciceri/home-manager/git-workspace";
|
url = "github:aciceri/home-manager/git-workspace";
|
||||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
|
||||||
# TODO: remove after https://github.com/nix-community/home-manager/pull/4249
|
|
||||||
homeManagerSwayNC = {
|
|
||||||
url = "github:rhoriguchi/home-manager/swaync";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
|
||||||
};
|
};
|
||||||
disko = {
|
disko = {
|
||||||
url = "github:nix-community/disko";
|
url = "github:nix-community/disko";
|
||||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
pre-commit-hooks = {
|
git-hooks-nix = {
|
||||||
url = "github:cachix/pre-commit-hooks.nix";
|
url = "github:cachix/git-hooks.nix";
|
||||||
inputs = {
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
nixpkgs.follows = "nixpkgsUnstable";
|
|
||||||
nixpkgs-stable.follows = "nixpkgsStable";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
nur.url = "github:nix-community/NUR";
|
|
||||||
agenix.url = "github:ryantm/agenix";
|
agenix.url = "github:ryantm/agenix";
|
||||||
rock5b.url = "github:aciceri/rock5b-nixos";
|
|
||||||
ccrEmacs.url = "git+https://git.aciceri.dev/aciceri/emacs.git";
|
|
||||||
treefmt-nix = {
|
treefmt-nix = {
|
||||||
url = "github:numtide/treefmt-nix";
|
url = "github:numtide/treefmt-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
hercules-ci-effects.url = "github:hercules-ci/hercules-ci-effects";
|
|
||||||
dream2nix.url = "github:nix-community/dream2nix";
|
dream2nix.url = "github:nix-community/dream2nix";
|
||||||
hercules-ci-agent.url = "github:hercules-ci/hercules-ci-agent";
|
nix-on-droid.url = "github:nix-community/nix-on-droid";
|
||||||
nix-fast-build = {
|
lix = {
|
||||||
url = "github:Mic92/nix-fast-build";
|
url = "git+https://git@git.lix.systems/lix-project/lix"; # FIXME update
|
||||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
flake = false;
|
||||||
};
|
};
|
||||||
nixThePlanet = {
|
lix-module = {
|
||||||
url = "github:aciceri/NixThePlanet/nix-in-darwin";
|
url = "git+https://git.lix.systems/lix-project/nixos-module";
|
||||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
inputs.lix.follows = "lix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nixDarwin = {
|
mobile-nixos = {
|
||||||
url = "github:LnL7/nix-darwin";
|
url = "github:NixOS/mobile-nixos";
|
||||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
flake = false;
|
||||||
};
|
};
|
||||||
|
impermanence.url = "github:nix-community/impermanence";
|
||||||
|
vscode-server.url = "github:nix-community/nixos-vscode-server";
|
||||||
|
lanzaboote = {
|
||||||
|
url = "github:nix-community/lanzaboote";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
catppuccin.url = "github:catppuccin/nix";
|
||||||
|
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ {flakeParts, ...}:
|
outputs =
|
||||||
flakeParts.lib.mkFlake {inherit inputs;} {
|
inputs@{ flakeParts, ... }:
|
||||||
|
flakeParts.lib.mkFlake { inherit inputs; } {
|
||||||
imports = [
|
imports = [
|
||||||
# TODO export modules as flake outputs
|
# TODO export modules as flake outputs
|
||||||
# ./modules
|
# ./modules
|
||||||
|
@ -67,8 +64,10 @@
|
||||||
./packages
|
./packages
|
||||||
./shell
|
./shell
|
||||||
./checks
|
./checks
|
||||||
./ci
|
|
||||||
];
|
];
|
||||||
systems = ["x86_64-linux" "aarch64-linux"];
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
imports = [../email];
|
imports = [ ../email ];
|
||||||
config = {
|
config = {
|
||||||
accounts.email.accounts = {
|
accounts.email.accounts = {
|
||||||
autistici.aerc = {
|
autistici.aerc = {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
home.packages = [pkgs.binance];
|
{
|
||||||
|
home.packages = [ pkgs.binance ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
{
|
{
|
||||||
programs.btop = {
|
programs.btop = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.update_ms = 100;
|
settings = {
|
||||||
|
update_ms = 100;
|
||||||
|
theme_background = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
4
hmModules/calibre/default.nix
Normal file
4
hmModules/calibre/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.calibre ];
|
||||||
|
}
|
13
hmModules/catppuccin/default.nix
Normal file
13
hmModules/catppuccin/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
catppuccin = {
|
||||||
|
enable = true;
|
||||||
|
flavor = "mocha";
|
||||||
|
accent = "sapphire";
|
||||||
|
};
|
||||||
|
|
||||||
|
qt = {
|
||||||
|
platformTheme.name = lib.mkForce "kvantum";
|
||||||
|
style.name = lib.mkForce "kvantum";
|
||||||
|
};
|
||||||
|
}
|
4
hmModules/chirp/default.nix
Normal file
4
hmModules/chirp/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.chirp ];
|
||||||
|
}
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
programs.chromium = {
|
programs.chromium = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.google-chrome;
|
package = pkgs.google-chrome;
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
home.packages = [pkgs.cura];
|
{
|
||||||
|
home.packages = [
|
||||||
|
pkgs.cura-appimage
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
home.packages = [pkgs.digikam];
|
{
|
||||||
|
home.packages = [ pkgs.digikam ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
home.packages = [pkgs.discord];
|
{
|
||||||
|
home.packages = [
|
||||||
|
(pkgs.discord.override {
|
||||||
|
withOpenASAR = true;
|
||||||
|
withVencord = true;
|
||||||
|
})
|
||||||
|
];
|
||||||
home.file.".config/discord/settings.json".text = builtins.toJSON {
|
home.file.".config/discord/settings.json".text = builtins.toJSON {
|
||||||
SKIP_HOST_UPDATE = true;
|
SKIP_HOST_UPDATE = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
home.packages = [pkgs.dolphin-emu];
|
{
|
||||||
|
home.packages = [ pkgs.dolphin-emu ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, lib, ... }:
|
||||||
# home.packages = [pkgs.schildichat-desktop];
|
{
|
||||||
home.packages = [pkgs.element-desktop];
|
home.packages = [ pkgs.element-desktop ];
|
||||||
|
|
||||||
systemd.user.services.element-desktop = {
|
systemd.user.services.element-desktop = {
|
||||||
Install.WantedBy = ["graphical-session.target"];
|
Install.WantedBy = [ "graphical-session.target" ];
|
||||||
|
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Element";
|
Description = "Element";
|
||||||
PartOf = ["graphical-session.target"];
|
PartOf = [ "graphical-session.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
# ExecStart = "${pkgs.schildichat-desktop}/bin/schildichat-desktop"; # TODO I preferred SchildiChat but it was removed from nixpkgs becuase unsafe
|
ExecStart = lib.getExe pkgs.element-desktop;
|
||||||
ExecStart = "${pkgs.element-desktop}/bin/element-desktop";
|
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 3;
|
RestartSec = 3;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,11 +1,65 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
age,
|
fleetFlake,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
age,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
ccrEmacs.enable = true;
|
let
|
||||||
home.sessionVariables.EDITOR = lib.mkForce "emacsclient";
|
emacs = fleetFlake.packages.${pkgs.system}.emacs;
|
||||||
systemd.user.services.emacs.Service.EnvironmentFile = age.secrets.chatgpt-token.path;
|
inherit (emacs.passthru) treesitGrammars;
|
||||||
home.packages = lib.lists.optional pkgs.stdenv.isx86_64 pkgs.llm-workflow-engine;
|
in
|
||||||
|
{
|
||||||
|
systemd.user.sessionVariables = {
|
||||||
|
EDITOR = lib.mkForce "emacsclient -c";
|
||||||
|
OPENAI_API_KEY_PATH = age.secrets.chatgpt-token.path;
|
||||||
|
};
|
||||||
|
programs.emacs = {
|
||||||
|
enable = true;
|
||||||
|
package = emacs;
|
||||||
|
};
|
||||||
|
services.emacs = {
|
||||||
|
enable = true;
|
||||||
|
client.enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
socketActivation.enable = false;
|
||||||
|
startWithUserSession = true;
|
||||||
|
package = emacs;
|
||||||
|
};
|
||||||
|
home.packages =
|
||||||
|
with pkgs;
|
||||||
|
[
|
||||||
|
binutils
|
||||||
|
delta
|
||||||
|
(ripgrep.override { withPCRE2 = true; })
|
||||||
|
gnutls
|
||||||
|
fd
|
||||||
|
hunspell
|
||||||
|
python3
|
||||||
|
imagemagick
|
||||||
|
ghostscript_headless
|
||||||
|
mupdf-headless
|
||||||
|
poppler_utils
|
||||||
|
ffmpegthumbnailer
|
||||||
|
mediainfo
|
||||||
|
unzipNLS
|
||||||
|
nodejs_20
|
||||||
|
qadwaitadecorations
|
||||||
|
kdePackages.qtwayland
|
||||||
|
copilot-language-server.fhs
|
||||||
|
math-preview
|
||||||
|
emacs-lsp-booster
|
||||||
|
]
|
||||||
|
++ (with hunspellDicts; [
|
||||||
|
en_US-large
|
||||||
|
it_IT
|
||||||
|
]);
|
||||||
|
home.activation.linkEmacsConfig = lib.hm.dag.entryAnywhere ''
|
||||||
|
if [ ! -d "$HOME/.config/emacs" ]; then
|
||||||
|
$DRY_RUN_CMD mkdir "$HOME/.config/emacs"
|
||||||
|
$DRY_RUN_CMD ln -s "$HOME/projects/aciceri/nixfleet/hmModules/emacs/init.el" "$HOME/.config/emacs/init.el"
|
||||||
|
$DRY_RUN_CMD ln -s "$HOME/.config/emacs" "$HOME/emacs"
|
||||||
|
fi
|
||||||
|
$DRY_RUN_CMD ln -sfn ${treesitGrammars} "$HOME/.config/emacs/tree-sitter"
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
1216
hmModules/emacs/init.el
Normal file
1216
hmModules/emacs/init.el
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,17 +1,271 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
secrets,
|
secrets,
|
||||||
|
fleetFlake,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
programs.mbsync.enable = true;
|
programs.mbsync.enable = true;
|
||||||
programs.msmtp.enable = true;
|
programs.msmtp.enable = true;
|
||||||
|
services.mbsync = {
|
||||||
|
enable = true;
|
||||||
|
postExec = lib.getExe (
|
||||||
|
pkgs.writeShellScriptBin "mbsync-post-exec" ''
|
||||||
|
${lib.getExe pkgs.notmuch} new
|
||||||
|
for _ in _ _
|
||||||
|
do
|
||||||
|
afew -C ~/.config/notmuch/default/config --tag --new -vv
|
||||||
|
afew -C ~/.config/notmuch/default/config --move --new -vv
|
||||||
|
done
|
||||||
|
''
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
# home.file.".config/aerc/stylesets" =
|
||||||
|
# let
|
||||||
|
# catppuccin-aerc = pkgs.fetchFromGitHub {
|
||||||
|
# owner = "catppuccin";
|
||||||
|
# repo = "aerc";
|
||||||
|
# rev = "ca404a9f2d125ef12db40db663d43c9d94116a05";
|
||||||
|
# hash = "sha256-OWIkHsKFts/zkrDUtbBPXHVSrHL/F0v3LB1rnlFAKmE=";
|
||||||
|
# };
|
||||||
|
# in
|
||||||
|
# {
|
||||||
|
# source = "${catppuccin-aerc}/dist";
|
||||||
|
# recursive = true;
|
||||||
|
# };
|
||||||
|
|
||||||
|
# programs.aerc = {
|
||||||
|
# enable = true;
|
||||||
|
# extraBinds = {
|
||||||
|
# global = {
|
||||||
|
# "<C-p>" = ":prev-tab<Enter>";
|
||||||
|
# "<C-n>" = ":next-tab<Enter>";
|
||||||
|
# "?" = ":help keys<Enter>";
|
||||||
|
# };
|
||||||
|
|
||||||
|
# messages = {
|
||||||
|
# "h" = ":prev-tab<Enter>";
|
||||||
|
# "l" = ":next-tab<Enter>";
|
||||||
|
|
||||||
|
# "j" = ":next<Enter>";
|
||||||
|
# "<Down>" = ":next<Enter>";
|
||||||
|
# "<C-d>" = ":next 50%<Enter>";
|
||||||
|
# "<C-f>" = ":next 100%<Enter>";
|
||||||
|
# "<PgDn>" = ":next 100%<Enter>";
|
||||||
|
|
||||||
|
# "k" = ":prev<Enter>";
|
||||||
|
# "<Up>" = ":prev<Enter>";
|
||||||
|
# "<C-u>" = ":prev 50%<Enter>";
|
||||||
|
# "<C-b>" = ":prev 100%<Enter>";
|
||||||
|
# "<PgUp>" = ":prev 100%<Enter>";
|
||||||
|
# "g" = ":select 0<Enter>";
|
||||||
|
# "G" = ":select -1<Enter>";
|
||||||
|
|
||||||
|
# "J" = ":next-folder<Enter>";
|
||||||
|
# "K" = ":prev-folder<Enter>";
|
||||||
|
# "H" = ":collapse-folder<Enter>";
|
||||||
|
# "L" = ":expand-folder<Enter>";
|
||||||
|
|
||||||
|
# "v" = ":mark -t<Enter>";
|
||||||
|
# "x" = ":mark -t<Enter>:next<Enter>";
|
||||||
|
# "V" = ":mark -v<Enter>";
|
||||||
|
|
||||||
|
# "T" = ":toggle-threads<Enter>";
|
||||||
|
|
||||||
|
# "<Enter>" = ":view<Enter>";
|
||||||
|
# "d" = ":prompt 'Really delete this message?' 'delete-message'<Enter>";
|
||||||
|
# "D" = ":delete<Enter>";
|
||||||
|
# "A" = ":archive flat<Enter>";
|
||||||
|
|
||||||
|
# "C" = ":compose<Enter>";
|
||||||
|
|
||||||
|
# "rr" = ":reply -a<Enter>";
|
||||||
|
# "rq" = ":reply -aq<Enter>";
|
||||||
|
# "Rr" = ":reply<Enter>";
|
||||||
|
# "Rq" = ":reply -q<Enter>";
|
||||||
|
|
||||||
|
# "c" = ":cf<space>";
|
||||||
|
# "$" = ":term<space>";
|
||||||
|
# "!" = ":term<space>";
|
||||||
|
# "|" = ":pipe<space>";
|
||||||
|
|
||||||
|
# "/" = ":search<space>";
|
||||||
|
# "\\" = ":filter<space>";
|
||||||
|
# "n" = ":next-result<Enter>";
|
||||||
|
# "N" = ":prev-result<Enter>";
|
||||||
|
# "<Esc>" = ":clear<Enter>";
|
||||||
|
# };
|
||||||
|
|
||||||
|
# "messages:folder=Drafts" = {
|
||||||
|
# "<Enter>" = ":recall<Enter>";
|
||||||
|
# };
|
||||||
|
|
||||||
|
# view = {
|
||||||
|
# "/" = ":toggle-key-passthrough<Enter>/";
|
||||||
|
# "q" = ":close<Enter>";
|
||||||
|
# "O" = ":open<Enter>";
|
||||||
|
# "S" = ":save<space>";
|
||||||
|
# "|" = ":pipe<space>";
|
||||||
|
# "D" = ":delete<Enter>";
|
||||||
|
# "A" = ":archive flat<Enter>";
|
||||||
|
|
||||||
|
# "<C-l>" = ":open-link <space>";
|
||||||
|
|
||||||
|
# "f" = ":forward<Enter>";
|
||||||
|
# "rr" = ":reply -a<Enter>";
|
||||||
|
# "rq" = ":reply -aq<Enter>";
|
||||||
|
# "Rr" = ":reply<Enter>";
|
||||||
|
# "Rq" = ":reply -q<Enter>";
|
||||||
|
|
||||||
|
# "H" = ":toggle-headers<Enter>";
|
||||||
|
# "<C-k>" = ":prev-part<Enter>";
|
||||||
|
# "<C-j>" = ":next-part<Enter>";
|
||||||
|
# "J" = ":next<Enter>";
|
||||||
|
# "K" = ":prev<Enter>";
|
||||||
|
# };
|
||||||
|
|
||||||
|
# "view::passthrough" = {
|
||||||
|
# "$noinherit" = true;
|
||||||
|
# "$ex" = "<C-x>";
|
||||||
|
# "<Esc>" = ":toggle-key-passthrough<Enter>";
|
||||||
|
# };
|
||||||
|
|
||||||
|
# compose = {
|
||||||
|
# "$noinherit" = "true";
|
||||||
|
# "$ex" = "<C-x>";
|
||||||
|
# "<C-k>" = ":prev-field<Enter>";
|
||||||
|
# "<C-j>" = ":next-field<Enter>";
|
||||||
|
# "<A-p>" = ":switch-account -p<Enter>";
|
||||||
|
# "<A-n>" = ":switch-account -n<Enter>";
|
||||||
|
# "<tab>" = ":next-field<Enter>";
|
||||||
|
# "<C-p>" = ":prev-tab<Enter>";
|
||||||
|
# "<C-n>" = ":next-tab<Enter>";
|
||||||
|
# };
|
||||||
|
|
||||||
|
# "compose::editor" = {
|
||||||
|
# "$noinherit" = "true";
|
||||||
|
# "$ex" = "<C-x>";
|
||||||
|
# "<C-k>" = ":prev-field<Enter>";
|
||||||
|
# "<C-j>" = ":next-field<Enter>";
|
||||||
|
# "<C-p>" = ":prev-tab<Enter>";
|
||||||
|
# "<C-n>" = ":next-tab<Enter>";
|
||||||
|
# };
|
||||||
|
|
||||||
|
# "compose::review" = {
|
||||||
|
# "y" = ":send<Enter>";
|
||||||
|
# "n" = ":abort<Enter>";
|
||||||
|
# "p" = ":postpone<Enter>";
|
||||||
|
# "q" = ":choose -o d discard abort -o p postpone postpone<Enter>";
|
||||||
|
# "e" = ":edit<Enter>";
|
||||||
|
# "a" = ":attach<space>";
|
||||||
|
# "d" = ":detach<space>";
|
||||||
|
# };
|
||||||
|
|
||||||
|
# terminal = {
|
||||||
|
# "$noinherit" = "true";
|
||||||
|
# "$ex" = "<C-x>";
|
||||||
|
|
||||||
|
# "<C-p>" = ":prev-tab<Enter>";
|
||||||
|
# "<C-n>" = ":next-tab<Enter>";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# extraConfig = {
|
||||||
|
# general.unsafe-accounts-conf = true;
|
||||||
|
# ui = {
|
||||||
|
# styleset-name = "catppuccin-mocha";
|
||||||
|
# this-day-time-format = ''" 15:04"'';
|
||||||
|
# this-year-time-format = "Mon Jan 02 15:04";
|
||||||
|
# timestamp-format = "2006-01-02 15:04";
|
||||||
|
|
||||||
|
# spinner = "[ ⡿ ],[ ⣟ ],[ ⣯ ],[ ⣷ ],[ ⣾ ],[ ⣽ ],[ ⣻ ],[ ⢿ ]";
|
||||||
|
# border-char-vertical = "┃";
|
||||||
|
# border-char-horizontal = "━";
|
||||||
|
# };
|
||||||
|
# viewer = {
|
||||||
|
# always-show-mime = true;
|
||||||
|
# };
|
||||||
|
# compose = {
|
||||||
|
# no-attachment-warning = "^[^>]*attach(ed|ment)";
|
||||||
|
# };
|
||||||
|
# filters = {
|
||||||
|
# "text/plain" = "colorize";
|
||||||
|
# "text/html" = "html";
|
||||||
|
# "text/calendar" = "calendar";
|
||||||
|
# "message/delivery-status" = "colorize";
|
||||||
|
# "message/rfc822" = "colorize";
|
||||||
|
# "image/*" = "${pkgs.catimg}/bin/catimg -";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
programs.notmuch = {
|
programs.notmuch = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hooks.preNew = "mbsync --all";
|
new.tags = [ "new" ];
|
||||||
|
search.excludeTags = [
|
||||||
|
"trash"
|
||||||
|
"deleted"
|
||||||
|
"spam"
|
||||||
|
];
|
||||||
|
maildir.synchronizeFlags = true;
|
||||||
};
|
};
|
||||||
services.mbsync.enable = true;
|
|
||||||
|
programs.afew = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
[Filter.1]
|
||||||
|
message = "Tag GitHub notifications"
|
||||||
|
tags = +github
|
||||||
|
query = from:noreply@github.com OR from:notifications@github.com
|
||||||
|
|
||||||
|
[Filter.2]
|
||||||
|
query = "folder:autistici/Inbox"
|
||||||
|
tags = +autistici
|
||||||
|
message = "Tag personal autistici emails"
|
||||||
|
|
||||||
|
[Filter.3]
|
||||||
|
query = "not folder:autistici/Inbox"
|
||||||
|
tag = -new
|
||||||
|
message = "Sanity check: remove the new tag for emails moved out from Inbox"
|
||||||
|
|
||||||
|
[Filter.4]
|
||||||
|
query = "not folder:autistici/Inbox"
|
||||||
|
tag = -new
|
||||||
|
message = "Sanity check: remove the new tag for emails moved out from Inbox"
|
||||||
|
|
||||||
|
[Filter.5]
|
||||||
|
query = "not folder:autistici/Sent"
|
||||||
|
tag = +sent
|
||||||
|
message = "Sanity check: add the sent tag for emails in Sent"
|
||||||
|
|
||||||
|
[Filter.6]
|
||||||
|
query = "not folder:autistici/Drafts"
|
||||||
|
tag = +draft
|
||||||
|
message = "Sanity check: add the draft tag for emails in Draft"
|
||||||
|
|
||||||
|
[MailMover]
|
||||||
|
folders = autistici/Inbox
|
||||||
|
rename = true
|
||||||
|
|
||||||
|
autistici/Inbox = 'tag:archive':autistici/Archive 'tag:github':autistici/GitHub 'NOT tag:new':autistici/Trash
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services.emails-watcher = {
|
||||||
|
Unit.Description = "Send notifications when new emails arrive";
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${lib.getExe fleetFlake.packages.${pkgs.system}.emails-watcher}";
|
||||||
|
Environment = [ "INBOX_NEW=~/Maildir/autistici/Inbox/new" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
accounts.email = {
|
accounts.email = {
|
||||||
accounts.autistici = {
|
accounts.autistici = {
|
||||||
|
aerc.enable = true;
|
||||||
address = "andrea.ciceri@autistici.org";
|
address = "andrea.ciceri@autistici.org";
|
||||||
gpg = {
|
gpg = {
|
||||||
key = "7A66EEA1E6C598D07D361287A1FC89532D1C565";
|
key = "7A66EEA1E6C598D07D361287A1FC89532D1C565";
|
||||||
|
@ -24,6 +278,8 @@
|
||||||
mbsync = {
|
mbsync = {
|
||||||
enable = true;
|
enable = true;
|
||||||
create = "maildir";
|
create = "maildir";
|
||||||
|
expunge = "both";
|
||||||
|
remove = "both";
|
||||||
};
|
};
|
||||||
msmtp.enable = true;
|
msmtp.enable = true;
|
||||||
notmuch.enable = true;
|
notmuch.enable = true;
|
||||||
|
|
193
hmModules/firefox/catppuccin.css
Normal file
193
hmModules/firefox/catppuccin.css
Normal file
|
@ -0,0 +1,193 @@
|
||||||
|
:root {
|
||||||
|
/* Catppuccin Colors */
|
||||||
|
--bg: #1e1e2e;
|
||||||
|
--currentline: #302d41;
|
||||||
|
--fg: #d9e0ee;
|
||||||
|
--comment: #575268;
|
||||||
|
--flamingo: #f2cdcd;
|
||||||
|
--mauve: #ddb6f2;
|
||||||
|
--pink: #f5c2e7;
|
||||||
|
--maroon: #e8a2af;
|
||||||
|
--red: #f28fad;
|
||||||
|
--peach: #f8bd96;
|
||||||
|
--yellow: #fae3b0;
|
||||||
|
--green: #abe9b3;
|
||||||
|
--teal: #b5e8e0;
|
||||||
|
--blue: #96cdfb;
|
||||||
|
--sky: #89dceb;
|
||||||
|
--lavender: #c9cbff;
|
||||||
|
--rosewater: #f5e0dc;
|
||||||
|
--font: monospace; /*"FiraCode Nerd Font Mono";*/
|
||||||
|
|
||||||
|
/* vimium theme uses colors: flamingo, peach, rosewater, green, blue, lavender */
|
||||||
|
--tridactyl-fg: var(--fg);
|
||||||
|
--tridactyl-bg: var(--bg);
|
||||||
|
--tridactyl-url-fg: var(--rosewater);
|
||||||
|
--tridactyl-url-bg: var(--bg);
|
||||||
|
--tridactyl-highlight-box-bg: var(--currentline);
|
||||||
|
--tridactyl-highlight-box-fg: var(--fg);
|
||||||
|
--tridactyl-of-fg: var(--fg);
|
||||||
|
--tridactyl-of-bg: var(--currentline);
|
||||||
|
--tridactyl-cmdl-fg: var(--bg);
|
||||||
|
--tridactyl-cmdl-font-family: var(--font);
|
||||||
|
--tridactyl-cmplt-font-family: var(--font);
|
||||||
|
--tridactyl-hintspan-font-family: var(--font);
|
||||||
|
|
||||||
|
/* Hint character tags */
|
||||||
|
--tridactyl-hintspan-fg: var(--bg) !important;
|
||||||
|
--tridactyl-hintspan-bg: var(--green) !important;
|
||||||
|
|
||||||
|
/* Element Highlights */
|
||||||
|
--tridactyl-hint-active-fg: none;
|
||||||
|
--tridactyl-hint-active-bg: none;
|
||||||
|
--tridactyl-hint-active-outline: none;
|
||||||
|
--tridactyl-hint-bg: none;
|
||||||
|
--tridactyl-hint-outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#command-line-holder {
|
||||||
|
order: 1;
|
||||||
|
border: 2px solid var(--lavender);
|
||||||
|
background: var(--tridactyl-bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
#tridactyl-input {
|
||||||
|
padding: 1rem;
|
||||||
|
color: var(--tridactyl-fg);
|
||||||
|
width: 90%;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
background: var(--tridactyl-bg);
|
||||||
|
padding-left: unset;
|
||||||
|
padding: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#completions table {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
font-weight: 200;
|
||||||
|
border-spacing: 0;
|
||||||
|
table-layout: fixed;
|
||||||
|
padding: 1rem 0;
|
||||||
|
/* padding-top: 1rem; */
|
||||||
|
/* padding-bottom: 1rem; */
|
||||||
|
}
|
||||||
|
|
||||||
|
#completions > div {
|
||||||
|
max-height: calc(20 * var(--option-height));
|
||||||
|
min-height: calc(10 * var(--option-height));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* COMPLETIONS */
|
||||||
|
|
||||||
|
#completions {
|
||||||
|
--option-height: 1.4em;
|
||||||
|
color: var(--tridactyl-fg);
|
||||||
|
background: var(--tridactyl-bg);
|
||||||
|
display: inline-block;
|
||||||
|
font-size: unset;
|
||||||
|
font-weight: 200;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100%;
|
||||||
|
border-top: unset;
|
||||||
|
order: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Olie doesn't know how CSS inheritance works */
|
||||||
|
#completions .HistoryCompletionSource {
|
||||||
|
max-height: unset;
|
||||||
|
min-height: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
#completions .HistoryCompletionSource table {
|
||||||
|
width: 100%;
|
||||||
|
font-size: 9pt;
|
||||||
|
border-spacing: 0;
|
||||||
|
table-layout: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* redundancy 2: redundancy 2: more redundancy */
|
||||||
|
#completions .BmarkCompletionSource {
|
||||||
|
max-height: unset;
|
||||||
|
min-height: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
#completions table tr td.prefix,
|
||||||
|
#completions table tr td.privatewindow,
|
||||||
|
#completions table tr td.container,
|
||||||
|
#completions table tr td.icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#completions .BufferCompletionSource table {
|
||||||
|
width: unset;
|
||||||
|
font-size: unset;
|
||||||
|
border-spacing: unset;
|
||||||
|
table-layout: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
#completions table tr .title,
|
||||||
|
#completions table tr td.excmd {
|
||||||
|
width: 50%;
|
||||||
|
padding-left: 1rem;
|
||||||
|
color: var(--blue);
|
||||||
|
}
|
||||||
|
|
||||||
|
#completions table tr .content,
|
||||||
|
#completions table tr td.documentation {
|
||||||
|
padding-right: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#completions table tr {
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
#completions table tr td {
|
||||||
|
padding: 0.5rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#completions .sectionHeader {
|
||||||
|
background: unset;
|
||||||
|
font-weight: bold;
|
||||||
|
border-bottom: unset;
|
||||||
|
padding: 1rem 1rem 0 !important;
|
||||||
|
padding-left: unset;
|
||||||
|
padding-bottom: 0.2rem;
|
||||||
|
color: var(--peach);
|
||||||
|
}
|
||||||
|
|
||||||
|
#cmdline_iframe {
|
||||||
|
position: fixed !important;
|
||||||
|
bottom: unset;
|
||||||
|
top: 25% !important;
|
||||||
|
left: 10% !important;
|
||||||
|
z-index: 2147483647 !important;
|
||||||
|
width: 80% !important;
|
||||||
|
box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 20px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.TridactylStatusIndicator {
|
||||||
|
position: fixed !important;
|
||||||
|
bottom: 0 !important;
|
||||||
|
background: var(--tridactyl-bg) !important;
|
||||||
|
border: unset !important;
|
||||||
|
border: 1px var(--purple) solid !important;
|
||||||
|
font-size: 12pt !important;
|
||||||
|
/*font-weight: 200 !important;*/
|
||||||
|
padding: 0.8ex !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#completions .focused {
|
||||||
|
background: var(--currentline);
|
||||||
|
/* color: var(--blue); */
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
#completions .focused td.title {
|
||||||
|
color: var(--pink);
|
||||||
|
}
|
||||||
|
|
||||||
|
#completions .focused .url {
|
||||||
|
background: var(--currentline);
|
||||||
|
color: var(--green);
|
||||||
|
}
|
|
@ -1,34 +1,72 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
username,
|
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
let
|
||||||
|
mkExtension = shortId: uuid: {
|
||||||
|
name = uuid;
|
||||||
|
value = {
|
||||||
|
install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
|
||||||
|
installation_mode = "normal_installed";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
nativeMessagingHosts = [
|
||||||
extraPolicies = {
|
pkgs.tridactyl-native
|
||||||
ExtensionSettings = {};
|
pkgs.vdhcoapp
|
||||||
|
];
|
||||||
|
policies = {
|
||||||
|
DisableTelemetry = true;
|
||||||
|
DisableFirefoxStudies = true;
|
||||||
|
EnableTrackingProtection = {
|
||||||
|
Value = true;
|
||||||
|
Locked = true;
|
||||||
|
Cryptomining = true;
|
||||||
|
Fingerprinting = true;
|
||||||
|
EmailTracking = true;
|
||||||
};
|
};
|
||||||
nativeMessagingHosts = [pkgs.tridactyl-native pkgs.fx-cast-bridge];
|
HardwareAcceleration = true;
|
||||||
};
|
FirefoxHome = {
|
||||||
profiles.${username} = {
|
TopSites = false;
|
||||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
SponsoredTopSites = false;
|
||||||
privacy-badger
|
Highlights = false;
|
||||||
ublock-origin
|
Pocket = false;
|
||||||
tridactyl
|
SponsoredPocket = false;
|
||||||
|
Snippets = false;
|
||||||
|
Locked = false;
|
||||||
|
};
|
||||||
|
FirefoxSuggest = {
|
||||||
|
WebSuggestions = true;
|
||||||
|
SponsoredSuggestions = false;
|
||||||
|
ImproveSuggest = false;
|
||||||
|
Locked = true;
|
||||||
|
};
|
||||||
|
OverrideFirstRunPage = "";
|
||||||
|
OverridePostUpdatePage = "";
|
||||||
|
DontCheckDefaultBrowser = true;
|
||||||
|
DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on"
|
||||||
|
SearchBar = "unified"; # alternative: "separate"
|
||||||
|
HttpsOnlyMode = "force_enabled";
|
||||||
|
NoDefaultBookmarks = true;
|
||||||
|
OfferToSaveLogins = false;
|
||||||
|
OfferToSaveLoginsDefault = false;
|
||||||
|
PasswordManagerEnabled = true;
|
||||||
|
DefaultDownloadDirectory = "\${home}/Downloads";
|
||||||
|
PromptForDownloadLocation = false;
|
||||||
|
RequestedLocales = "en-US";
|
||||||
|
|
||||||
|
ExtensionSettings = builtins.listToAttrs [
|
||||||
|
(mkExtension "ublock-origin" "uBlock0@raymondhill.net")
|
||||||
|
(mkExtension "tridactyl-vim" "tridactyl.vim@cmcaine.co.uk")
|
||||||
|
(mkExtension "styl-us" "7a7a4a92-a2a0-41d1-9fd7-1e92480d612d")
|
||||||
];
|
];
|
||||||
settings = {
|
};
|
||||||
"browser.startup.homepage" = "https://google.it";
|
profiles.default = {
|
||||||
"browser.search.region" = "IT";
|
|
||||||
"browser.search.isUS" = false;
|
|
||||||
"distribution.searchplugins.defaultLocale" = "it-IT";
|
|
||||||
"general.useragent.locale" = "it-IT";
|
|
||||||
"browser.bookmarks.showMobileBookmarks" = true;
|
|
||||||
"browser.download.folderList" = 2;
|
|
||||||
"browser.download.lastDir" = "/home/${username}/Downloads/";
|
|
||||||
"browser.shell.checkDefaultBrowser" = false;
|
|
||||||
};
|
|
||||||
search.force = true;
|
search.force = true;
|
||||||
|
search.default = "google";
|
||||||
search.engines = {
|
search.engines = {
|
||||||
"Searx" = {
|
"Searx" = {
|
||||||
urls = [
|
urls = [
|
||||||
|
@ -44,11 +82,18 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
extensions = [ ];
|
||||||
|
userChrome = builtins.readFile ./userchrome.css;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home.sessionVariables = {
|
|
||||||
MOZ_ENABLE_WAYLAND = 1;
|
xdg.configFile."tridactyl/tridactylrc".text = ''
|
||||||
XDG_CURRENT_DESKTOP = "sway";
|
set editorcmd emacsclient -c %f
|
||||||
NIXOS_OZONE_WL = 1;
|
|
||||||
|
colors catppuccin
|
||||||
|
'';
|
||||||
|
|
||||||
|
xdg.configFile."tridactyl/themes/catppuccin.css" = {
|
||||||
|
source = ./catppuccin.css;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
73
hmModules/firefox/userchrome.css
Normal file
73
hmModules/firefox/userchrome.css
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
/* * Do not remove the @namespace line -- it's required for correct functioning */
|
||||||
|
/* set default namespace to XUL */
|
||||||
|
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||||
|
|
||||||
|
/* Remove Back button when there's nothing to go Back to */
|
||||||
|
#back-button[disabled="true"] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove Forward button when there's nothing to go Forward to */
|
||||||
|
#forward-button[disabled="true"] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove Home button (never use it) */
|
||||||
|
#home-button {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.titlebar-spacer {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove import bookmarks button */
|
||||||
|
#import-button {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove bookmark toolbar */
|
||||||
|
toolbarbutton.bookmark-item:not(.subviewbutton) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove whitespace in toolbar */
|
||||||
|
#nav-bar toolbarpaletteitem[id^="wrapper-customizableui-special-spring"],
|
||||||
|
#nav-bar toolbarspring {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Hide dumb Firefox View button */
|
||||||
|
#firefox-view-button {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Hide Firefox tab icon */
|
||||||
|
.tab-icon-image {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Linux stuff to keep GNOME system theme */
|
||||||
|
.titlebar-min {
|
||||||
|
appearance: auto !important;
|
||||||
|
-moz-default-appearance: -moz-window-button-minimize !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.titlebar-max {
|
||||||
|
appearance: auto !important;
|
||||||
|
-moz-default-appearance: -moz-window-button-maximize !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.titlebar-restore {
|
||||||
|
appearance: auto !important;
|
||||||
|
-moz-default-appearance: -moz-window-button-restore !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.titlebar-close {
|
||||||
|
appearance: auto !important;
|
||||||
|
-moz-default-appearance: -moz-window-button-close !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.titlebar-button {
|
||||||
|
list-style-image: none !important;
|
||||||
|
}
|
|
@ -1,31 +1,66 @@
|
||||||
{lib, ...}: {
|
{
|
||||||
programs.foot = {
|
lib,
|
||||||
enable = true;
|
config,
|
||||||
server.enable = true;
|
...
|
||||||
settings = {
|
}:
|
||||||
main = {
|
lib.mkMerge [
|
||||||
term = "xterm-256color";
|
{
|
||||||
login-shell = "yes";
|
programs.foot = {
|
||||||
# Using dpi-aware = "yes" font size is too small on my external monitor
|
enable = true;
|
||||||
# Scaling that output in sway is inefficient and make XWayland apps blurred
|
server.enable = true;
|
||||||
dpi-aware = "no";
|
settings = {
|
||||||
font = let
|
main = {
|
||||||
size = "12";
|
term = "xterm-direct";
|
||||||
in
|
login-shell = "yes";
|
||||||
lib.concatStringsSep ", " [
|
dpi-aware = "no";
|
||||||
"Fira Code:size=${size}"
|
horizontal-letter-offset = "1";
|
||||||
"Symbols Nerd Font:size=${size}"
|
pad = "1x1";
|
||||||
"JoyPixels:size=${size}"
|
font =
|
||||||
];
|
let
|
||||||
};
|
size = "13";
|
||||||
|
in
|
||||||
|
lib.mkForce (
|
||||||
|
lib.concatStringsSep ", " [
|
||||||
|
"Iosevka Comfy:size=${size}"
|
||||||
|
"Symbols Nerd Font:size=${size}"
|
||||||
|
"JoyPixels:size=${size}"
|
||||||
|
]
|
||||||
|
);
|
||||||
|
};
|
||||||
|
cursor = {
|
||||||
|
blink = true;
|
||||||
|
};
|
||||||
|
tweak = {
|
||||||
|
overflowing-glyphs = true;
|
||||||
|
};
|
||||||
|
|
||||||
mouse = {
|
key-bindings = {
|
||||||
hide-when-typing = "yes";
|
scrollback-up-page = "Control+Shift+k";
|
||||||
};
|
scrollback-down-page = "Control+Shift+j";
|
||||||
|
search-start = "Control+Shift+s";
|
||||||
|
pipe-command-output = ''[sh -c 'f=$(mktemp); cat - > $f; footclient hx $f; rm $f'] Control+Shift+g'';
|
||||||
|
};
|
||||||
|
|
||||||
colors = {
|
mouse = {
|
||||||
background = "282C34";
|
hide-when-typing = "yes";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
}
|
(lib.mkIf config.programs.fish.enable {
|
||||||
|
programs.fish.functions = {
|
||||||
|
mark_prompt_start = {
|
||||||
|
body = ''echo -en "\e]133;A\e\\"'';
|
||||||
|
onEvent = "fish_prompt";
|
||||||
|
};
|
||||||
|
foot_cmd_start = {
|
||||||
|
body = ''echo -en "\e]133;C\e\\"'';
|
||||||
|
onEvent = "fish_preexec";
|
||||||
|
};
|
||||||
|
foot_cmd_end = {
|
||||||
|
body = ''echo -en "\e]133;D\e\\"'';
|
||||||
|
onEvent = "fish_postexec";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]
|
||||||
|
|
4
hmModules/freecad/default.nix
Normal file
4
hmModules/freecad/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.freecad-wayland ];
|
||||||
|
}
|
4
hmModules/gimp/default.nix
Normal file
4
hmModules/gimp/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.gimp ];
|
||||||
|
}
|
|
@ -2,7 +2,8 @@
|
||||||
age,
|
age,
|
||||||
username,
|
username,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
services.git-workspace = {
|
services.git-workspace = {
|
||||||
enable = true;
|
enable = true;
|
||||||
frequency = "04:00:00";
|
frequency = "04:00:00";
|
||||||
|
|
|
@ -2,13 +2,21 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
username,
|
username,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
config = {
|
config = {
|
||||||
name = "Andrea Ciceri";
|
name = "Andrea Ciceri";
|
||||||
email = "andrea.ciceri@autistici.org";
|
email = "andrea.ciceri@autistici.org";
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
imports = [../gitui ../lazygit];
|
{
|
||||||
|
imports = [
|
||||||
|
../gitui
|
||||||
|
../lazygit
|
||||||
|
];
|
||||||
|
|
||||||
|
home.packages = [ pkgs.git-credential-manager ];
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.gitAndTools.gitFull;
|
package = pkgs.gitAndTools.gitFull;
|
||||||
|
@ -19,11 +27,18 @@ in {
|
||||||
rebase.autostash = true;
|
rebase.autostash = true;
|
||||||
github.user = "aciceri";
|
github.user = "aciceri";
|
||||||
|
|
||||||
user.signingKey = "/home/${username}/.ssh/id_rsa";
|
user.signingKey = "/home/${username}/.ssh/id_ed25519";
|
||||||
gpg.format = "ssh";
|
gpg.format = "ssh";
|
||||||
commit.gpgsign = true;
|
commit.gpgsign = true;
|
||||||
|
|
||||||
core.editor = "emacsclient";
|
credential.helper = "libsecret";
|
||||||
|
credential.credentialStore = "cache";
|
||||||
|
|
||||||
|
core = {
|
||||||
|
fsmonitor = true;
|
||||||
|
untrackedcache = true;
|
||||||
|
};
|
||||||
|
fetch.writeCommitGraph = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
userName = config.name;
|
userName = config.name;
|
||||||
|
@ -32,7 +47,8 @@ in {
|
||||||
extraConfig.url = {
|
extraConfig.url = {
|
||||||
"ssh://git@github.com/".insteadOf = "https://github.com/";
|
"ssh://git@github.com/".insteadOf = "https://github.com/";
|
||||||
# Workaround for https://github.com/rust-lang/cargo/issues/3381#issuecomment-1193730972
|
# Workaround for https://github.com/rust-lang/cargo/issues/3381#issuecomment-1193730972
|
||||||
"https://github.com/rust-lang/crates.io-index".insteadOf = "https://github.com/rust-lang/crates.io-index";
|
"https://github.com/rust-lang/crates.io-index".insteadOf =
|
||||||
|
"https://github.com/rust-lang/crates.io-index";
|
||||||
"https://github.com/RustSec/advisory-db".insteadOf = "https://github.com/RustSec/advisory-db";
|
"https://github.com/RustSec/advisory-db".insteadOf = "https://github.com/RustSec/advisory-db";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
config,
|
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
services.gnome-keyring = {
|
services.gnome-keyring = {
|
||||||
enable = false; # Is this broken? https://github.com/nix-community/home-manager/issues/1454
|
enable = false; # Is this broken? https://github.com/nix-community/home-manager/issues/1454
|
||||||
components = lib.mkForce [
|
components = lib.mkForce [
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = [pkgs.gcr]; # Needed in PATH
|
home.packages = [ pkgs.gcr ]; # Needed in PATH
|
||||||
|
|
||||||
# Workaround
|
# Workaround
|
||||||
wayland.windowManager.hyprland.extraConfig = ''
|
wayland.windowManager.hyprland.extraConfig = ''
|
||||||
|
|
|
@ -1,25 +1,18 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
services.gpg-agent = {
|
services.gpg-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableSshSupport = true;
|
pinentryPackage = pkgs.pinentry-rofi.override {
|
||||||
sshKeys = ["CE2FD0D9BECBD8876811714925066CC257413416"];
|
rofi = pkgs.rofi-wayland;
|
||||||
extraConfig = let
|
};
|
||||||
pinentryRofi = pkgs.writeShellApplication {
|
extraConfig = ''
|
||||||
name = "pinentry-rofi-with-env";
|
|
||||||
runtimeInputs = with pkgs; [coreutils rofi];
|
|
||||||
text = ''
|
|
||||||
"${pkgs.pinentry-rofi}/bin/pinentry-rofi" "$@"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in ''
|
|
||||||
allow-emacs-pinentry
|
allow-emacs-pinentry
|
||||||
allow-loopback-pinentry
|
allow-loopback-pinentry
|
||||||
pinentry-program ${pinentryRofi}/bin/pinentry-rofi-with-env
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.gpg = {
|
programs.gpg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {};
|
settings = { };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
19
hmModules/headless-hyprland/default.nix
Normal file
19
hmModules/headless-hyprland/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
originalConfig = config.wayland.windowManager.hyprland.extraConfig;
|
||||||
|
config = builtins.replaceStrings [ "SUPER" ] [ "" ] originalConfig;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
systemd.user.services.headless-hyprland = {
|
||||||
|
Unit.Description = "Headless Hyprland";
|
||||||
|
Service = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = ''
|
||||||
|
${lib.getExe config.wayland.windowManager.hyprland.package} --config ${config}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,8 +1,16 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
zk
|
||||||
|
nixd
|
||||||
|
terraform-ls
|
||||||
|
python3Packages.python-lsp-server
|
||||||
|
nodePackages.typescript-language-server
|
||||||
|
];
|
||||||
|
|
||||||
programs.helix = {
|
programs.helix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
theme = "dracula";
|
|
||||||
editor = {
|
editor = {
|
||||||
indent-guides.render = true;
|
indent-guides.render = true;
|
||||||
cursor-shape = {
|
cursor-shape = {
|
||||||
|
@ -10,7 +18,36 @@
|
||||||
normal = "block";
|
normal = "block";
|
||||||
select = "underline";
|
select = "underline";
|
||||||
};
|
};
|
||||||
|
color-modes = true;
|
||||||
true-color = true; # to make colors coherent when in ssh
|
true-color = true; # to make colors coherent when in ssh
|
||||||
|
# inline-diagnostic = {
|
||||||
|
# cursor-line = "hint";
|
||||||
|
# other-lines = "error";
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
languages = {
|
||||||
|
language = [
|
||||||
|
{
|
||||||
|
name = "nix";
|
||||||
|
language-servers = [ "nixd" ];
|
||||||
|
formatter.command = "nixfmt";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "markdown";
|
||||||
|
language-servers = [ "zk" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "typescript";
|
||||||
|
language-servers = [ "vtsls" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
language-server = {
|
||||||
|
nixd.command = "nixd";
|
||||||
|
zk = {
|
||||||
|
command = "zk";
|
||||||
|
args = [ "lsp" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,15 +3,16 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
screenshotScript = pkgs.writeShellScript "screenshot.sh" ''
|
let
|
||||||
|
screenshotScript = pkgs.writeShellScriptBin "screenshot.sh" ''
|
||||||
filename="$HOME/shots/$(date --iso-8601=seconds).png"
|
filename="$HOME/shots/$(date --iso-8601=seconds).png"
|
||||||
coords="$(${pkgs.slurp}/bin/slurp)"
|
coords="$(${pkgs.slurp}/bin/slurp)"
|
||||||
${pkgs.grim}/bin/grim -t png -g "$coords" "$filename"
|
${pkgs.grim}/bin/grim -t png -g "$coords" "$filename"
|
||||||
wl-copy -t image/png < $filename
|
wl-copy -t image/png < $filename
|
||||||
'';
|
'';
|
||||||
hyprland = config.wayland.windowManager.hyprland.package;
|
hyprland = config.wayland.windowManager.hyprland.package;
|
||||||
switchMonitorScript = pkgs.writeShellScript "switch-monitor.sh" ''
|
switchMonitorScript = pkgs.writeShellScriptBin "switch-monitor.sh" ''
|
||||||
if [[ "$(${hyprland}/bin/hyprctl monitors) | grep '\sDP-[0-9]+'" ]]; then
|
if [[ "$(${hyprland}/bin/hyprctl monitors) | grep '\sDP-[0-9]+'" ]]; then
|
||||||
if [[ $1 == "open" ]]; then
|
if [[ $1 == "open" ]]; then
|
||||||
${hyprland}/bin/hyprctl keyword monitor "eDP-1,1920x1080,3760x230,1"
|
${hyprland}/bin/hyprctl keyword monitor "eDP-1,1920x1080,3760x230,1"
|
||||||
|
@ -20,19 +21,26 @@
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hyprpaper.nix
|
./hyprpaper.nix
|
||||||
../waybar
|
../waybar
|
||||||
../swayidle
|
../swayidle
|
||||||
# ../mako
|
|
||||||
../swaync
|
|
||||||
../gammastep
|
../gammastep
|
||||||
# ../kitty
|
../swaync
|
||||||
../wezterm
|
../foot
|
||||||
];
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [wl-clipboard waypipe];
|
home.packages = with pkgs; [
|
||||||
|
wl-clipboard
|
||||||
|
waypipe
|
||||||
|
switchMonitorScript
|
||||||
|
screenshotScript
|
||||||
|
hyprpaper
|
||||||
|
fuzzel
|
||||||
|
brightnessctl
|
||||||
|
];
|
||||||
|
|
||||||
systemd.user.sessionVariables = {
|
systemd.user.sessionVariables = {
|
||||||
NIXOS_OZONE_WL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
|
@ -47,162 +55,41 @@ in {
|
||||||
|
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
font.name = "Sans,Symbols Nerd Font";
|
theme = {
|
||||||
|
name = "Catppuccin-GTK-Purple-Dark-Compact";
|
||||||
|
package = pkgs.magnetic-catppuccin-gtk.override {
|
||||||
|
accent = [ "purple" ];
|
||||||
|
shade = "dark";
|
||||||
|
size = "compact";
|
||||||
|
};
|
||||||
|
};
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
name = "Adwaita";
|
name = "Adwaita";
|
||||||
package = pkgs.gnome.adwaita-icon-theme;
|
package = pkgs.adwaita-icon-theme;
|
||||||
|
};
|
||||||
|
cursorTheme = {
|
||||||
|
name = "catppuccin-mocha-sapphire";
|
||||||
|
package = pkgs.catppuccin-cursors;
|
||||||
|
size = 38;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.kanshi = {
|
home.file.".icons/catppuccin-mocha-sapphire" = {
|
||||||
|
source = "${pkgs.catppuccin-cursors.mochaSapphire}/share/icons/catppuccin-mocha-sapphire-cursors";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
qt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemdTarget = "hyprland-session.target";
|
|
||||||
profiles = {
|
|
||||||
undocked = {
|
|
||||||
outputs = [
|
|
||||||
{
|
|
||||||
status = "enable";
|
|
||||||
criteria = "eDP-1";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
docked = {
|
|
||||||
outputs = [
|
|
||||||
{
|
|
||||||
status = "disable";
|
|
||||||
criteria = "eDP-1";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
status = "enable";
|
|
||||||
criteria = "DP-1";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = false;
|
||||||
extraConfig = ''
|
plugins = with pkgs.hyprlandPlugins; [
|
||||||
input {
|
hy3
|
||||||
touchpad {
|
hyprspace
|
||||||
disable_while_typing = true # set to true while playing
|
];
|
||||||
}
|
# TODO migrate to structured options
|
||||||
}
|
extraConfig = builtins.readFile ./hyprland.conf;
|
||||||
|
|
||||||
monitor = HDMI-A-1, 2560x1440, 0x0, 1 # picard
|
|
||||||
monitor = eDP-1, 1920x1080, 0x0, 1 # kirk
|
|
||||||
|
|
||||||
bindl=,switch:off:Lid Switch,exec,${switchMonitorScript} open
|
|
||||||
bindl=,switch:on:Lid Switch,exec,${switchMonitorScript} close
|
|
||||||
|
|
||||||
exec-once = ${pkgs.hyprpaper}/bin/hyprpaper
|
|
||||||
|
|
||||||
windowrulev2 = tile, class:^(Spotify)$
|
|
||||||
windowrulev2 = workspace 9, class:^(Spotify)$
|
|
||||||
windowrulev2 = tile, class:^(fluffychat)$
|
|
||||||
windowrulev2 = workspace 8, class:^(fluffychat)$
|
|
||||||
windowrulev2 = tile, class:^(WhatsApp for Linux)$
|
|
||||||
windowrulev2 = workspace 7, class:^(WhatsApp for Linux)$
|
|
||||||
windowrulev2 = float, title:^(floating)$
|
|
||||||
|
|
||||||
bind = SUPER, b, exec, firefox
|
|
||||||
bind = SUPER SHIFT, b , exec, ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh mothership.fleet firefox
|
|
||||||
bind = SUPER SHIFT, RETURN, exec, ${config.programs.wezterm.package}/bin/wezterm ssh mothership.fleet
|
|
||||||
bind = SUPER, m, exec, ${config.programs.wezterm.package}/bin/wezterm start -- mosh mothership.fleet
|
|
||||||
bind = SUPER, t, exec, ${config.programs.wezterm.package}/bin/wezterm
|
|
||||||
bind = SUPER, RETURN, exec, emacsclient -c --eval "(ccr/start-eshell)"
|
|
||||||
bind = SUPER, x, exec, emacsclient -c
|
|
||||||
bind = SUPER SHIFT, n, exec, emacsclient --eval '(ccr/org-capture "n")' -c -F '((name . "floating"))'
|
|
||||||
bind = SUPER SHIFT, w, exec, emacsclient --eval '(ccr/org-capture "j")' -c -F '((name . "floating"))'
|
|
||||||
bind = SUPER, y, exec, ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh picard.fleet emacsclient -c
|
|
||||||
bind = SUPER, d, exec, ${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0
|
|
||||||
bind = SUPER, s, exec, ${screenshotScript}
|
|
||||||
bind = , XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl s +5%
|
|
||||||
bind = , XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl s 5%-
|
|
||||||
bind = SUPER, code:60, exec, ${pkgs.brightnessctl}/bin/brightnessctl s +5%
|
|
||||||
bind = SUPER, code:59, exec, ${pkgs.brightnessctl}/bin/brightnessctl s 5%-
|
|
||||||
bind = SUPER SHIFT, t, exec, ${config.services.swaync.package}/bin/swaync-client -t
|
|
||||||
|
|
||||||
|
|
||||||
bind = SUPER SHIFT, q, killactive
|
|
||||||
bind = SUPER SHIFT, f, fullscreen, 0
|
|
||||||
bind = SUPER SHIFT, e, exit
|
|
||||||
|
|
||||||
bind = SUPER, h, movefocus, l
|
|
||||||
bind = SUPER, l, movefocus, r
|
|
||||||
bind = SUPER, k, movefocus, u
|
|
||||||
bind = SUPER, j, movefocus, d
|
|
||||||
|
|
||||||
bind = SUPER SHIFT, h, movewindow, l
|
|
||||||
bind = SUPER SHIFT, l, movewindow, r
|
|
||||||
bind = SUPER SHIFT, k, movewindow, u
|
|
||||||
bind = SUPER SHIFT, j ,movewindow, d
|
|
||||||
|
|
||||||
bind = SUPER, p, movecurrentworkspacetomonitor, r
|
|
||||||
bind = SUPER, o, movecurrentworkspacetomonitor, l
|
|
||||||
|
|
||||||
bindm=ALT,mouse:272,movewindow
|
|
||||||
|
|
||||||
bind = SUPER, 1, workspace, 1
|
|
||||||
bind = SUPER, 2, workspace, 2
|
|
||||||
bind = SUPER, 3, workspace, 3
|
|
||||||
bind = SUPER, 4, workspace, 4
|
|
||||||
bind = SUPER, 5, workspace, 5
|
|
||||||
bind = SUPER, 6, workspace, 6
|
|
||||||
bind = SUPER, 7, workspace, 7
|
|
||||||
bind = SUPER, 8, workspace, 8
|
|
||||||
bind = SUPER, 9, workspace, 9
|
|
||||||
bind = SUPER, 0, workspace, 10
|
|
||||||
|
|
||||||
bind = SUPER SHIFT, 1, movetoworkspace, 1
|
|
||||||
bind = SUPER SHIFT, 2, movetoworkspace, 2
|
|
||||||
bind = SUPER SHIFT, 3, movetoworkspace, 3
|
|
||||||
bind = SUPER SHIFT, 4, movetoworkspace, 4
|
|
||||||
bind = SUPER SHIFT, 5, movetoworkspace, 5
|
|
||||||
bind = SUPER SHIFT, 6, movetoworkspace, 6
|
|
||||||
bind = SUPER SHIFT, 7, movetoworkspace, 7
|
|
||||||
bind = SUPER SHIFT, 8, movetoworkspace, 8
|
|
||||||
bind = SUPER SHIFT, 9, movetoworkspace, 9
|
|
||||||
bind = SUPER SHIFT, 0, movetoworkspace, 10
|
|
||||||
|
|
||||||
general {
|
|
||||||
gaps_in = 0
|
|
||||||
gaps_out = 0
|
|
||||||
border_size = 1
|
|
||||||
col.active_border = rgba(AF8D61FF) rgba(CEB153FF) rgba(7B8387FF) 45deg
|
|
||||||
col.inactive_border = rgba(AF8D6166)
|
|
||||||
}
|
|
||||||
|
|
||||||
decoration {
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
|
||||||
|
|
||||||
rounding = 2
|
|
||||||
# blur = true
|
|
||||||
# blur_size = 8
|
|
||||||
# blur_passes = 1
|
|
||||||
# blur_new_optimizations = true
|
|
||||||
|
|
||||||
drop_shadow = true
|
|
||||||
shadow_range = 4
|
|
||||||
shadow_render_power = 3
|
|
||||||
col.shadow = rgba(a8cfee11)
|
|
||||||
}
|
|
||||||
|
|
||||||
animations {
|
|
||||||
enabled = true
|
|
||||||
|
|
||||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
|
||||||
|
|
||||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
|
||||||
|
|
||||||
animation = windows, 1, 3, myBezier
|
|
||||||
animation = windowsOut, 1, 3, default, popin 80%
|
|
||||||
animation = border, 1, 5, default
|
|
||||||
animation = borderangle, 1, 4, default
|
|
||||||
animation = fade, 1, 3, default
|
|
||||||
animation = workspaces, 1, 3, default
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
190
hmModules/hyprland/hyprland.conf
Normal file
190
hmModules/hyprland/hyprland.conf
Normal file
|
@ -0,0 +1,190 @@
|
||||||
|
cursor {
|
||||||
|
hide_on_key_press = true
|
||||||
|
enable_hyprcursor = true
|
||||||
|
zoom_rigid = true
|
||||||
|
}
|
||||||
|
|
||||||
|
env = HYPRCURSOR_THEME,catppuccin-mocha-sapphire
|
||||||
|
env = HYPRCURSOR_SIZE,40
|
||||||
|
env = XCURSOR_THEME,catppuccin-mocha-sapphire
|
||||||
|
env = XCURSOR_SIZE,40
|
||||||
|
|
||||||
|
$mod = SUPER
|
||||||
|
|
||||||
|
input {
|
||||||
|
touchpad {
|
||||||
|
disable_while_typing = true # set to true while playing
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
monitor = HDMI-A-1, 2560x1440, 0x0, 1 # picard
|
||||||
|
monitor = eDP-1, 1920x1080, 0x0, 1, mirror, DP-1 # kirk
|
||||||
|
|
||||||
|
bindl=,switch:off:Lid Switch,exec,switch-monitor.sh open
|
||||||
|
bindl=,switch:on:Lid Switch,exec,switch-monitor.sh close
|
||||||
|
|
||||||
|
exec-once = hyprpaper
|
||||||
|
|
||||||
|
windowrulev2 = tile, class:^(Spotify)$
|
||||||
|
windowrulev2 = workspace 9, class:^(Spotify)$
|
||||||
|
windowrulev2 = float, title:^(floating)$
|
||||||
|
|
||||||
|
bind = $mod, b, exec, firefox
|
||||||
|
# bind = $mod, t, exec, footclient $SHELL -C "zellij"
|
||||||
|
bind = $mod, t, exec, footclient $SHELL
|
||||||
|
bind = $mod, RETURN, exec, emacsclient -c --eval "(ccr/start-eshell)"
|
||||||
|
bind = $mod, m, exec, emacsclient -c --eval '(notmuch-search "tag:new")'
|
||||||
|
bind = $mod, g, exec, emacsclient -c --eval '(switch-to-buffer (gptel "*ChatGPT*"))'
|
||||||
|
bind = $mod, c, exec, emacsclient -c --eval '(org-roam-dailies-capture-today)'
|
||||||
|
bind = $mod, d, exec, fuzzel --background-color=253559cc --border-radius=5 --border-width=0
|
||||||
|
bind = $mod, s, exec, screenshot.sh
|
||||||
|
bind = $mod, n, exec, logseq
|
||||||
|
bind = $mod, x, exec, emacsclient -c
|
||||||
|
bind = , XF86MonBrightnessUp, exec, brightnessctl s +5%
|
||||||
|
bind = , XF86MonBrightnessDown, exec, brightnessctl s 5%-
|
||||||
|
bind = $mod, code:60, exec, brightnessctl s +5%
|
||||||
|
bind = $mod, code:59, exec, brightnessctl s 5%-
|
||||||
|
|
||||||
|
bind = $mod SHIFT, t, hy3:makegroup, tab, ephemeral
|
||||||
|
bind = $mod SHIFT, q, killactive
|
||||||
|
bind = $mod SHIFT, f, fullscreen, 0
|
||||||
|
bind = $mod SHIFT, e, exit
|
||||||
|
|
||||||
|
bind = $mod, h, hy3:movefocus, l
|
||||||
|
bind = $mod, l, hy3:movefocus, r
|
||||||
|
bind = $mod, k, hy3:movefocus, u
|
||||||
|
bind = $mod, j, hy3:movefocus, d
|
||||||
|
|
||||||
|
bind = $mod SHIFT, h, hy3:movewindow, l
|
||||||
|
bind = $mod SHIFT, l, hy3:movewindow, r
|
||||||
|
bind = $mod SHIFT, k, hy3:movewindow, u
|
||||||
|
bind = $mod SHIFT, j ,hy3:movewindow, d
|
||||||
|
|
||||||
|
bind = $mod, v, hy3:makegroup, v
|
||||||
|
bind = $mod SHIFT, v, hy3:makegroup, h
|
||||||
|
|
||||||
|
bind = $mod, p, movecurrentworkspacetomonitor, r
|
||||||
|
bind = $mod, o, movecurrentworkspacetomonitor, l
|
||||||
|
|
||||||
|
bindm=ALT,mouse:272,hy3:movewindow
|
||||||
|
|
||||||
|
bind = $mod, 1, workspace, 1
|
||||||
|
bind = $mod, 2, workspace, 2
|
||||||
|
bind = $mod, 3, workspace, 3
|
||||||
|
bind = $mod, 4, workspace, 4
|
||||||
|
bind = $mod, 5, workspace, 5
|
||||||
|
bind = $mod, 6, workspace, 6
|
||||||
|
bind = $mod, 7, workspace, 7
|
||||||
|
bind = $mod, 8, workspace, 8
|
||||||
|
bind = $mod, 9, workspace, 9
|
||||||
|
bind = $mod, 0, workspace, 10
|
||||||
|
|
||||||
|
bind = $mod SHIFT, 1, movetoworkspace, 1
|
||||||
|
bind = $mod SHIFT, 2, movetoworkspace, 2
|
||||||
|
bind = $mod SHIFT, 3, movetoworkspace, 3
|
||||||
|
bind = $mod SHIFT, 4, movetoworkspace, 4
|
||||||
|
bind = $mod SHIFT, 5, movetoworkspace, 5
|
||||||
|
bind = $mod SHIFT, 6, movetoworkspace, 6
|
||||||
|
bind = $mod SHIFT, 7, movetoworkspace, 7
|
||||||
|
bind = $mod SHIFT, 8, movetoworkspace, 8
|
||||||
|
bind = $mod SHIFT, 9, movetoworkspace, 9
|
||||||
|
bind = $mod SHIFT, 0, movetoworkspace, 10
|
||||||
|
|
||||||
|
general {
|
||||||
|
layout = hy3
|
||||||
|
gaps_in = 8
|
||||||
|
gaps_out = 5
|
||||||
|
}
|
||||||
|
|
||||||
|
decoration {
|
||||||
|
rounding = 8
|
||||||
|
|
||||||
|
# drop_shadow = true
|
||||||
|
# shadow_range = 4
|
||||||
|
# shadow_render_power = 3
|
||||||
|
# col.shadow = rgba(a8cfee11)
|
||||||
|
}
|
||||||
|
|
||||||
|
animations {
|
||||||
|
enabled = true
|
||||||
|
|
||||||
|
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||||
|
|
||||||
|
animation = windows, 1, 3, myBezier
|
||||||
|
animation = windowsOut, 1, 3, default, popin 80%
|
||||||
|
animation = border, 1, 5, default
|
||||||
|
animation = borderangle, 1, 4, default
|
||||||
|
animation = fade, 1, 3, default
|
||||||
|
animation = workspaces, 1, 3, default
|
||||||
|
}
|
||||||
|
|
||||||
|
plugin {
|
||||||
|
hy3 {
|
||||||
|
# disable gaps when only one window is onscreen
|
||||||
|
# 0 - always show gaps
|
||||||
|
# 1 - hide gaps with a single window onscreen
|
||||||
|
# 2 - 1 but also show the window border
|
||||||
|
no_gaps_when_only = 0 # default: 0
|
||||||
|
|
||||||
|
# policy controlling what happens when a node is removed from a group,
|
||||||
|
# leaving only a group
|
||||||
|
# 0 = remove the nested group
|
||||||
|
# 1 = keep the nested group
|
||||||
|
# 2 = keep the nested group only if its parent is a tab group
|
||||||
|
node_collapse_policy = 2 # default: 2
|
||||||
|
|
||||||
|
# offset from group split direction when only one window is in a group
|
||||||
|
group_inset = 0 # default: 10
|
||||||
|
|
||||||
|
# if a tab group will automatically be created for the first window spawned in a workspace
|
||||||
|
tab_first_window = false
|
||||||
|
|
||||||
|
# tab group settings
|
||||||
|
tabs {
|
||||||
|
# height of the tab bar
|
||||||
|
height = 20
|
||||||
|
|
||||||
|
# padding between the tab bar and its focused node
|
||||||
|
padding = 10
|
||||||
|
|
||||||
|
# the tab bar should animate in/out from the top instead of below the window
|
||||||
|
from_top = false
|
||||||
|
|
||||||
|
# rounding of tab bar corners
|
||||||
|
rounding = 4
|
||||||
|
|
||||||
|
# render the window title on the bar
|
||||||
|
render_text = true
|
||||||
|
|
||||||
|
# center the window title
|
||||||
|
text_center = true
|
||||||
|
|
||||||
|
# font to render the window title with
|
||||||
|
text_font = Fira Code
|
||||||
|
|
||||||
|
# height of the window title
|
||||||
|
text_height = 14
|
||||||
|
|
||||||
|
# left padding of the window title
|
||||||
|
text_padding = 4
|
||||||
|
|
||||||
|
# active tab bar segment color
|
||||||
|
# col.active = <color> # default: 0xff32b4ff
|
||||||
|
|
||||||
|
# urgent tab bar segment color
|
||||||
|
# col.urgent = <color> # default: 0xffff4f4f
|
||||||
|
|
||||||
|
# inactive tab bar segment color
|
||||||
|
# col.inactive = <color> # default: 0x80808080
|
||||||
|
|
||||||
|
# active tab bar text color
|
||||||
|
# col.text.active = <color> # default: 0xff000000
|
||||||
|
|
||||||
|
# urgent tab bar text color
|
||||||
|
# col.text.urgent = <color> # default: 0xff000000
|
||||||
|
|
||||||
|
# inactive tab bar text color
|
||||||
|
# col.text.inactive = <color> # default: 0xff000000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,7 +1,9 @@
|
||||||
let
|
let
|
||||||
wallpaper = ./wallpaper.png;
|
wallpaper = ./wallpaper.png;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
xdg.configFile."hypr/hyprpaper.conf".text = ''
|
xdg.configFile."hypr/hyprpaper.conf".text = ''
|
||||||
|
splash = false
|
||||||
preload = ${wallpaper}
|
preload = ${wallpaper}
|
||||||
wallpaper = eDP-1,${wallpaper}
|
wallpaper = eDP-1,${wallpaper}
|
||||||
wallpaper = DP-1,${wallpaper}
|
wallpaper = DP-1,${wallpaper}
|
||||||
|
|
4
hmModules/ib-tws/default.nix
Normal file
4
hmModules/ib-tws/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{ fleetFlake, pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [ fleetFlake.packages.${pkgs.system}.ib-tws ];
|
||||||
|
}
|
3
hmModules/imv/default.nix
Normal file
3
hmModules/imv/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
programs.imv.enable = true;
|
||||||
|
}
|
|
@ -1,3 +1,4 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
home.packages = [pkgs.kicad-small];
|
{
|
||||||
|
home.packages = [ pkgs.kicad-small ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
font = {
|
font = {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
programs.lazygit = {
|
programs.lazygit = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
4
hmModules/libreoffice/default.nix
Normal file
4
hmModules/libreoffice/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.libreoffice ];
|
||||||
|
}
|
15
hmModules/logseq/default.nix
Normal file
15
hmModules/logseq/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
logseq = pkgs.appimageTools.wrapType2 {
|
||||||
|
name = "logseq";
|
||||||
|
version = "nightly-20240909";
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
url = "https://github.com/logseq/logseq/releases/download/nightly/Logseq-linux-x64-0.10.10-alpha+nightly.20240909.AppImage";
|
||||||
|
hash = "sha256-Hy/zk8ZCkWajsMRUMsewLvkKpMpsBZYnFootPU9y6Z0=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
logseq-wayland = pkgs.writeScriptBin "logseq" "${lib.getExe' logseq "logseq"} --enable-features=UseOzonePlatform --ozone-platform=wayland";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.packages = [ logseq-wayland ];
|
||||||
|
}
|
|
@ -1,3 +1,4 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
home.packages = [pkgs.lutris];
|
{
|
||||||
|
home.packages = [ pkgs.lutris ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
home.packages = [pkgs.monero-gui];
|
{
|
||||||
|
home.packages = [ pkgs.monero-gui ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
home.packages = [pkgs.moonlight-qt];
|
{
|
||||||
|
home.packages = [ pkgs.moonlight-qt ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# TODO: use upstream ytmusic when updated: https://github.com/OzymandiasTheGreat/mopidy-ytmusic/issues/68
|
# TODO: use upstream ytmusic when updated: https://github.com/OzymandiasTheGreat/mopidy-ytmusic/issues/68
|
||||||
{pkgs, ...}: let
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
ytmusicapi = pkgs.python310Packages.buildPythonPackage rec {
|
ytmusicapi = pkgs.python310Packages.buildPythonPackage rec {
|
||||||
pname = "ytmusicapi";
|
pname = "ytmusicapi";
|
||||||
version = "0.24.0";
|
version = "0.24.0";
|
||||||
|
@ -38,14 +39,20 @@
|
||||||
python310Packages.pytube
|
python310Packages.pytube
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonImportsCheck = ["mopidy_ytmusic"];
|
pythonImportsCheck = [ "mopidy_ytmusic" ];
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
services.mopidy = {
|
services.mopidy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extensionPackages = [mopidy-ytmusic] ++ (with pkgs; [mopidy-mpd mopidy-mpris]);
|
extensionPackages =
|
||||||
|
[ mopidy-ytmusic ]
|
||||||
|
++ (with pkgs; [
|
||||||
|
mopidy-mpd
|
||||||
|
mopidy-mpris
|
||||||
|
]);
|
||||||
settings = {
|
settings = {
|
||||||
mpd = {
|
mpd = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
home.packages = [pkgs.nheko];
|
{
|
||||||
|
home.packages = [ pkgs.nheko ];
|
||||||
|
|
||||||
# systemd.user.services.nheko = {
|
# systemd.user.services.nheko = {
|
||||||
# Install.WantedBy = ["graphical-session.target"];
|
# Install.WantedBy = ["graphical-session.target"];
|
||||||
|
|
580
hmModules/niri/config.kdl
Normal file
580
hmModules/niri/config.kdl
Normal file
|
@ -0,0 +1,580 @@
|
||||||
|
// This config is in the KDL format: https://kdl.dev
|
||||||
|
// "/-" comments out the following node.
|
||||||
|
// Check the wiki for a full description of the configuration:
|
||||||
|
// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview
|
||||||
|
|
||||||
|
// Input device configuration.
|
||||||
|
// Find the full list of options on the wiki:
|
||||||
|
// https://github.com/YaLTeR/niri/wiki/Configuration:-Input
|
||||||
|
input {
|
||||||
|
keyboard {
|
||||||
|
xkb {
|
||||||
|
layout "us"
|
||||||
|
// options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Next sections include libinput settings.
|
||||||
|
// Omitting settings disables them, or leaves them at their default values.
|
||||||
|
touchpad {
|
||||||
|
// off
|
||||||
|
tap
|
||||||
|
// dwt
|
||||||
|
// dwtp
|
||||||
|
natural-scroll
|
||||||
|
// accel-speed 0.2
|
||||||
|
// accel-profile "flat"
|
||||||
|
// scroll-method "two-finger"
|
||||||
|
// disabled-on-external-mouse
|
||||||
|
}
|
||||||
|
|
||||||
|
mouse {
|
||||||
|
// off
|
||||||
|
// natural-scroll
|
||||||
|
// accel-speed 0.2
|
||||||
|
// accel-profile "flat"
|
||||||
|
// scroll-method "no-scroll"
|
||||||
|
}
|
||||||
|
|
||||||
|
trackpoint {
|
||||||
|
// off
|
||||||
|
// natural-scroll
|
||||||
|
// accel-speed 0.2
|
||||||
|
// accel-profile "flat"
|
||||||
|
// scroll-method "on-button-down"
|
||||||
|
// scroll-button 273
|
||||||
|
// middle-emulation
|
||||||
|
}
|
||||||
|
|
||||||
|
// Uncomment this to make the mouse warp to the center of newly focused windows.
|
||||||
|
warp-mouse-to-focus
|
||||||
|
|
||||||
|
// Focus windows and outputs automatically when moving the mouse into them.
|
||||||
|
// Setting max-scroll-amount="0%" makes it work only on windows already fully on screen.
|
||||||
|
focus-follows-mouse max-scroll-amount="0%"
|
||||||
|
}
|
||||||
|
|
||||||
|
cursor {
|
||||||
|
xcursor-theme "catppuccin-mocha-sapphire"
|
||||||
|
xcursor-size 38
|
||||||
|
hide-when-typing
|
||||||
|
hide-after-inactive-ms 10000
|
||||||
|
}
|
||||||
|
|
||||||
|
spawn-at-startup "xwayland-satellite"
|
||||||
|
|
||||||
|
environment {
|
||||||
|
QT_QPA_PLATFORM "wayland"
|
||||||
|
DISPLAY ":0"
|
||||||
|
}
|
||||||
|
|
||||||
|
hotkey-overlay {
|
||||||
|
skip-at-startup
|
||||||
|
}
|
||||||
|
|
||||||
|
// You can configure outputs by their name, which you can find
|
||||||
|
// by running `niri msg outputs` while inside a niri instance.
|
||||||
|
// The built-in laptop monitor is usually called "eDP-1".
|
||||||
|
// Find more information on the wiki:
|
||||||
|
// https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
|
||||||
|
// Remember to uncomment the node by removing "/-"!
|
||||||
|
output "eDP-1" {
|
||||||
|
// Uncomment this line to disable this output.
|
||||||
|
// off
|
||||||
|
|
||||||
|
// Resolution and, optionally, refresh rate of the output.
|
||||||
|
// The format is "<width>x<height>" or "<width>x<height>@<refresh rate>".
|
||||||
|
// If the refresh rate is omitted, niri will pick the highest refresh rate
|
||||||
|
// for the resolution.
|
||||||
|
// If the mode is omitted altogether or is invalid, niri will pick one automatically.
|
||||||
|
// Run `niri msg outputs` while inside a niri instance to list all outputs and their modes.
|
||||||
|
mode "1920x1080@59.999"
|
||||||
|
|
||||||
|
// You can use integer or fractional scale, for example use 1.5 for 150% scale.
|
||||||
|
scale 1.1
|
||||||
|
|
||||||
|
// Transform allows to rotate the output counter-clockwise, valid values are:monitor
|
||||||
|
// normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270.
|
||||||
|
transform "normal"
|
||||||
|
|
||||||
|
// Position of the output in the global coordinate space.
|
||||||
|
// This affects directional monitor actions like "focus-monitor-left", and cursor movement.
|
||||||
|
// The cursor can only move between directly adjacent outputs.
|
||||||
|
// Output scale and rotation has to be taken into account for positioning:
|
||||||
|
// outputs are sized in logical, or scaled, pixels.
|
||||||
|
// For example, a 3840×2160 output with scale 2.0 will have a logical size of 1920×1080,
|
||||||
|
// so to put another output directly adjacent to it on the right, set its x to 1920.
|
||||||
|
// If the position is unset or results in an overlap, the output is instead placed
|
||||||
|
// automatically.
|
||||||
|
// position x=1280 y=0
|
||||||
|
}
|
||||||
|
|
||||||
|
output "Dell Inc. DELL U2515H 9X2VY5170PJL" {
|
||||||
|
mode "2560x1440@59.951"
|
||||||
|
scale 1
|
||||||
|
transform "normal"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Settings that influence how windows are positioned and sized.
|
||||||
|
// Find more information on the wiki:
|
||||||
|
// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
|
||||||
|
layout {
|
||||||
|
// Set gaps around windows in logical pixels.
|
||||||
|
gaps 16
|
||||||
|
|
||||||
|
// When to center a column when changing focus, options are:
|
||||||
|
// - "never", default behavior, focusing an off-screen column will keep at the left
|
||||||
|
// or right edge of the screen.
|
||||||
|
// - "always", the focused column will always be centered.
|
||||||
|
// - "on-overflow", focusing a column will center it if it doesn't fit
|
||||||
|
// together with the previously focused column.
|
||||||
|
center-focused-column "never"
|
||||||
|
|
||||||
|
// You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
|
||||||
|
preset-column-widths {
|
||||||
|
// Proportion sets the width as a fraction of the output width, taking gaps into account.
|
||||||
|
// For example, you can perfectly fit four windows sized "proportion 0.25" on an output.
|
||||||
|
// The default preset widths are 1/3, 1/2 and 2/3 of the output.
|
||||||
|
proportion 0.33333
|
||||||
|
proportion 0.5
|
||||||
|
proportion 0.66667
|
||||||
|
|
||||||
|
// Fixed sets the width in logical pixels exactly.
|
||||||
|
// fixed 1920
|
||||||
|
}
|
||||||
|
|
||||||
|
// You can also customize the heights that "switch-preset-window-height" (Mod+Shift+R) toggles between.
|
||||||
|
// preset-window-heights { }
|
||||||
|
|
||||||
|
// You can change the default width of the new windows.
|
||||||
|
default-column-width { proportion 0.5; }
|
||||||
|
// If you leave the brackets empty, the windows themselves will decide their initial width.
|
||||||
|
// default-column-width {}
|
||||||
|
|
||||||
|
// By default focus ring and border are rendered as a solid background rectangle
|
||||||
|
// behind windows. That is, they will show up through semitransparent windows.
|
||||||
|
// This is because windows using client-side decorations can have an arbitrary shape.
|
||||||
|
//
|
||||||
|
// If you don't like that, you should uncomment `prefer-no-csd` below.
|
||||||
|
// Niri will draw focus ring and border *around* windows that agree to omit their
|
||||||
|
// client-side decorations.
|
||||||
|
//
|
||||||
|
// Alternatively, you can override it with a window rule called
|
||||||
|
// `draw-border-with-background`.
|
||||||
|
|
||||||
|
// You can change how the focus ring looks.
|
||||||
|
focus-ring {
|
||||||
|
// Uncomment this line to disable the focus ring.
|
||||||
|
// off
|
||||||
|
|
||||||
|
// How many logical pixels the ring extends out from the windows.
|
||||||
|
width 2
|
||||||
|
|
||||||
|
// Colors can be set in a variety of ways:
|
||||||
|
// - CSS named colors: "red"
|
||||||
|
// - RGB hex: "#rgb", "#rgba", "#rrggbb", "#rrggbbaa"
|
||||||
|
// - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others.
|
||||||
|
|
||||||
|
// Color of the ring on the active monitor.
|
||||||
|
active-color "#7fc8ff"
|
||||||
|
|
||||||
|
// Color of the ring on inactive monitors.
|
||||||
|
inactive-color "#505050"
|
||||||
|
|
||||||
|
// You can also use gradients. They take precedence over solid colors.
|
||||||
|
// Gradients are rendered the same as CSS linear-gradient(angle, from, to).
|
||||||
|
// The angle is the same as in linear-gradient, and is optional,
|
||||||
|
// defaulting to 180 (top-to-bottom gradient).
|
||||||
|
// You can use any CSS linear-gradient tool on the web to set these up.
|
||||||
|
// Changing the color space is also supported, check the wiki for more info.
|
||||||
|
//
|
||||||
|
// active-gradient from="#80c8ff" to="#bbddff" angle=45
|
||||||
|
|
||||||
|
// You can also color the gradient relative to the entire view
|
||||||
|
// of the workspace, rather than relative to just the window itself.
|
||||||
|
// To do that, set relative-to="workspace-view".
|
||||||
|
//
|
||||||
|
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
|
||||||
|
}
|
||||||
|
|
||||||
|
// You can also add a border. It's similar to the focus ring, but always visible.
|
||||||
|
border {
|
||||||
|
// The settings are the same as for the focus ring.
|
||||||
|
// If you enable the border, you probably want to disable the focus ring.
|
||||||
|
off
|
||||||
|
|
||||||
|
width 4
|
||||||
|
active-color "#ffc87f"
|
||||||
|
inactive-color "#505050"
|
||||||
|
|
||||||
|
// active-gradient from="#ffbb66" to="#ffc880" angle=45 relative-to="workspace-view"
|
||||||
|
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Struts shrink the area occupied by windows, similarly to layer-shell panels.
|
||||||
|
// You can think of them as a kind of outer gaps. They are set in logical pixels.
|
||||||
|
// Left and right struts will cause the next window to the side to always be visible.
|
||||||
|
// Top and bottom struts will simply add outer gaps in addition to the area occupied by
|
||||||
|
// layer-shell panels and regular gaps.
|
||||||
|
struts {
|
||||||
|
// left 64
|
||||||
|
// right 64
|
||||||
|
// top 64
|
||||||
|
// bottom 64
|
||||||
|
}
|
||||||
|
|
||||||
|
shadow {
|
||||||
|
on
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
layer-rule {
|
||||||
|
match namespace="^rofi$"
|
||||||
|
shadow {
|
||||||
|
on
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add lines like this to spawn processes at startup.
|
||||||
|
// Note that running niri as a session supports xdg-desktop-autostart,
|
||||||
|
// which may be more convenient to use.
|
||||||
|
// See the binds section below for more spawn examples.
|
||||||
|
spawn-at-startup "waypaper" "--wallpaper" "~/.config/niri/wallpaper.png"
|
||||||
|
|
||||||
|
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
|
||||||
|
// If the client will specifically ask for CSD, the request will be honored.
|
||||||
|
// Additionally, clients will be informed that they are tiled, removing some client-side rounded corners.
|
||||||
|
// This option will also fix border/focus ring drawing behind some semitransparent windows.
|
||||||
|
// After enabling or disabling this, you need to restart the apps for this to take effect.
|
||||||
|
prefer-no-csd
|
||||||
|
|
||||||
|
// You can change the path where screenshots are saved.
|
||||||
|
// A ~ at the front will be expanded to the home directory.
|
||||||
|
// The path is formatted with strftime(3) to give you the screenshot date and time.
|
||||||
|
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
|
||||||
|
|
||||||
|
// You can also set this to null to disable saving screenshots to disk.
|
||||||
|
// screenshot-path null
|
||||||
|
|
||||||
|
// Animation settings.
|
||||||
|
// The wiki explains how to configure individual animations:
|
||||||
|
// https://github.com/YaLTeR/niri/wiki/Configuration:-Animations
|
||||||
|
animations {
|
||||||
|
// Uncomment to turn off all animations.
|
||||||
|
// off
|
||||||
|
|
||||||
|
// Slow down all animations by this factor. Values below 1 speed them up instead.
|
||||||
|
// slowdown 3.0
|
||||||
|
}
|
||||||
|
|
||||||
|
// Window rules let you adjust behavior for individual windows.
|
||||||
|
// Find more information on the wiki:
|
||||||
|
// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
|
||||||
|
|
||||||
|
// Work around WezTerm's initial configure bug
|
||||||
|
// by setting an empty default-column-width.
|
||||||
|
window-rule {
|
||||||
|
// This regular expression is intentionally made as specific as possible,
|
||||||
|
// since this is the default config, and we want no false positives.
|
||||||
|
// You can get away with just app-id="wezterm" if you want.
|
||||||
|
match app-id=r#"^org\.wezfurlong\.wezterm$"#
|
||||||
|
default-column-width {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Example: block out two password managers from screen capture.
|
||||||
|
// (This example rule is commented out with a "/-" in front.)
|
||||||
|
/-window-rule {
|
||||||
|
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
|
||||||
|
match app-id=r#"^org\.gnome\.World\.Secrets$"#
|
||||||
|
|
||||||
|
block-out-from "screen-capture"
|
||||||
|
|
||||||
|
// Use this instead if you want them visible on third-party screenshot tools.
|
||||||
|
// block-out-from "screencast"
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
geometry-corner-radius 4
|
||||||
|
clip-to-geometry true
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"^spotify$"#
|
||||||
|
open-maximized true
|
||||||
|
open-on-workspace "spotify"
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"^Slack$"#
|
||||||
|
open-maximized true
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"^Element"#
|
||||||
|
open-maximized true
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match title=r#"^Emacs Selector$"#
|
||||||
|
opacity 0.95
|
||||||
|
open-floating true
|
||||||
|
open-focused true
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match title=r#"^bTop$"#
|
||||||
|
opacity 0.95
|
||||||
|
open-floating true
|
||||||
|
open-focused true
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match title=r#"^GPTel - Emacs$"#
|
||||||
|
opacity 0.95
|
||||||
|
open-floating true
|
||||||
|
open-focused true
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match title=r#"^Authentication Required"#
|
||||||
|
open-floating true
|
||||||
|
open-focused true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
binds {
|
||||||
|
// Keys consist of modifiers separated by + signs, followed by an XKB key name
|
||||||
|
// in the end. To find an XKB name for a particular key, you may use a program
|
||||||
|
// like wev.
|
||||||
|
//
|
||||||
|
// "Mod" is a special modifier equal to Super when running on a TTY, and to Alt
|
||||||
|
// when running as a winit window.
|
||||||
|
//
|
||||||
|
// Most actions that you can bind here can also be invoked programmatically with
|
||||||
|
// `niri msg action do-something`.
|
||||||
|
|
||||||
|
// Mod-Shift-/, which is usually the same as Mod-?,
|
||||||
|
// shows a list of important hotkeys.
|
||||||
|
Mod+Shift+Slash { show-hotkey-overlay; }
|
||||||
|
|
||||||
|
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
||||||
|
Mod+T { spawn "footclient"; }
|
||||||
|
Mod+D { spawn "rofi" "-show" "drun"; }
|
||||||
|
Mod+W { spawn "rofi" "-show" "window"; }
|
||||||
|
Mod+P { spawn "rofi-pass" "--clip"; }
|
||||||
|
Mod+X { spawn "emacsclient" "-c"; }
|
||||||
|
Mod+B { spawn "firefox"; }
|
||||||
|
Mod+RETURN { spawn "emacsclient" "-c" "--eval" "(ccr/start-eshell)"; }
|
||||||
|
Mod+M { spawn "emacsclient" "-c" "--eval" "(notmuch-search \"tag:new\")"; }
|
||||||
|
// Mod+G { spawn "emacsclient" "-c" "--eval" "(switch-to-buffer (gptel \"*ChatGPT*\"))" "-F" "((name . \"GPTel - Emacs\") (width . $NIRI_GPTEL_COLS) (height . $NIRI_GPTEL_ROWS))'"; }
|
||||||
|
Mod+G { spawn "run-floating-gptel"; }
|
||||||
|
Mod+Shift+C { spawn "emacsclient" "-c" "--eval" "(org-roam-dailies-capture-today)"; }
|
||||||
|
Mod+Alt+L { spawn "swaylock"; }
|
||||||
|
Mod+Space { spawn "rofi" "-show" "menu" "-modi" "menu:rofi-power-menu"; }
|
||||||
|
// Mod+Ctrl+b { spawn "foot" "--title='bTop'" "-W" "$NIRI_BTOP_COLSx$NIRI_BTOP_ROWS" "btop";}
|
||||||
|
Mod+Ctrl+b { spawn "run-floating-btop"; }
|
||||||
|
|
||||||
|
// Example volume keys mappings for PipeWire & WirePlumber.
|
||||||
|
// The allow-when-locked=true property makes them work even when the session is locked.
|
||||||
|
XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; }
|
||||||
|
XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; }
|
||||||
|
XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
|
||||||
|
XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
|
||||||
|
|
||||||
|
Mod+Shift+period { spawn "brightnessctl" "s" "5%+"; }
|
||||||
|
Mod+Shift+comma { spawn "brightnessctl" "s" "5%-"; }
|
||||||
|
Mod+XF86MonBrightnessUp { spawn "brightnessctl" "s" "5%+"; }
|
||||||
|
Mod+XF86MonBrightnessDown { spawn "brightnessctl" "s" "5%-"; }
|
||||||
|
|
||||||
|
Mod+Q { close-window; }
|
||||||
|
|
||||||
|
Mod+Left { focus-column-left; }
|
||||||
|
Mod+Down { focus-window-down; }
|
||||||
|
Mod+Up { focus-window-up; }
|
||||||
|
Mod+Right { focus-column-right; }
|
||||||
|
Mod+H { focus-column-left; }
|
||||||
|
Mod+J { focus-window-down; }
|
||||||
|
Mod+K { focus-window-up; }
|
||||||
|
Mod+L { focus-column-right; }
|
||||||
|
|
||||||
|
Mod+Ctrl+Left { move-column-left; }
|
||||||
|
Mod+Ctrl+Down { move-window-down; }
|
||||||
|
Mod+Ctrl+Up { move-window-up; }
|
||||||
|
Mod+Ctrl+Right { move-column-right; }
|
||||||
|
Mod+Ctrl+H { move-column-left; }
|
||||||
|
Mod+Ctrl+J { move-window-down; }
|
||||||
|
Mod+Ctrl+K { move-window-up; }
|
||||||
|
Mod+Ctrl+L { move-column-right; }
|
||||||
|
|
||||||
|
// Alternative commands that move across workspaces when reaching
|
||||||
|
// the first or last window in a column.
|
||||||
|
// Mod+J { focus-window-or-workspace-down; }
|
||||||
|
// Mod+K { focus-window-or-workspace-up; }
|
||||||
|
// Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
|
||||||
|
// Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
|
||||||
|
|
||||||
|
Mod+Home { focus-column-first; }
|
||||||
|
Mod+End { focus-column-last; }
|
||||||
|
Mod+Ctrl+Home { move-column-to-first; }
|
||||||
|
Mod+Ctrl+End { move-column-to-last; }
|
||||||
|
|
||||||
|
Mod+Shift+Left { focus-monitor-left; }
|
||||||
|
Mod+Shift+Down { focus-monitor-down; }
|
||||||
|
Mod+Shift+Up { focus-monitor-up; }
|
||||||
|
Mod+Shift+Right { focus-monitor-right; }
|
||||||
|
Mod+Shift+H { focus-monitor-left; }
|
||||||
|
Mod+Shift+J { focus-monitor-down; }
|
||||||
|
Mod+Shift+K { focus-monitor-up; }
|
||||||
|
Mod+Shift+L { focus-monitor-right; }
|
||||||
|
|
||||||
|
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
|
||||||
|
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
|
||||||
|
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
|
||||||
|
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
|
||||||
|
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
|
||||||
|
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
|
||||||
|
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
|
||||||
|
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
|
||||||
|
|
||||||
|
// Alternatively, there are commands to move just a single window:
|
||||||
|
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
|
||||||
|
// ...
|
||||||
|
|
||||||
|
// And you can also move a whole workspace to another monitor:
|
||||||
|
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
|
||||||
|
// ...
|
||||||
|
|
||||||
|
Mod+Page_Down { focus-workspace-down; }
|
||||||
|
Mod+Page_Up { focus-workspace-up; }
|
||||||
|
Mod+U { focus-workspace-down; }
|
||||||
|
Mod+I { focus-workspace-up; }
|
||||||
|
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
|
||||||
|
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
|
||||||
|
Mod+Ctrl+U { move-column-to-workspace-down; }
|
||||||
|
Mod+Ctrl+I { move-column-to-workspace-up; }
|
||||||
|
|
||||||
|
// Alternatively, there are commands to move just a single window:
|
||||||
|
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
|
||||||
|
// ...
|
||||||
|
|
||||||
|
Mod+Shift+Page_Down { move-workspace-down; }
|
||||||
|
Mod+Shift+Page_Up { move-workspace-up; }
|
||||||
|
Mod+Shift+U { move-workspace-down; }
|
||||||
|
Mod+Shift+I { move-workspace-up; }
|
||||||
|
|
||||||
|
// You can bind mouse wheel scroll ticks using the following syntax.
|
||||||
|
// These binds will change direction based on the natural-scroll setting.
|
||||||
|
//
|
||||||
|
// To avoid scrolling through workspaces really fast, you can use
|
||||||
|
// the cooldown-ms property. The bind will be rate-limited to this value.
|
||||||
|
// You can set a cooldown on any bind, but it's most useful for the wheel.
|
||||||
|
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
|
||||||
|
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
|
||||||
|
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
|
||||||
|
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
|
||||||
|
|
||||||
|
Mod+WheelScrollRight { focus-column-right; }
|
||||||
|
Mod+WheelScrollLeft { focus-column-left; }
|
||||||
|
Mod+Ctrl+WheelScrollRight { move-column-right; }
|
||||||
|
Mod+Ctrl+WheelScrollLeft { move-column-left; }
|
||||||
|
|
||||||
|
// Usually scrolling up and down with Shift in applications results in
|
||||||
|
// horizontal scrolling; these binds replicate that.
|
||||||
|
Mod+Shift+WheelScrollDown { focus-column-right; }
|
||||||
|
Mod+Shift+WheelScrollUp { focus-column-left; }
|
||||||
|
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
|
||||||
|
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
|
||||||
|
|
||||||
|
// Similarly, you can bind touchpad scroll "ticks".
|
||||||
|
// Touchpad scrolling is continuous, so for these binds it is split into
|
||||||
|
// discrete intervals.
|
||||||
|
// These binds are also affected by touchpad's natural-scroll, so these
|
||||||
|
// example binds are "inverted", since we have natural-scroll enabled for
|
||||||
|
// touchpads by default.
|
||||||
|
// Mod+TouchpadScrollDown { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; }
|
||||||
|
// Mod+TouchpadScrollUp { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; }
|
||||||
|
|
||||||
|
// You can refer to workspaces by index. However, keep in mind that
|
||||||
|
// niri is a dynamic workspace system, so these commands are kind of
|
||||||
|
// "best effort". Trying to refer to a workspace index bigger than
|
||||||
|
// the current workspace count will instead refer to the bottommost
|
||||||
|
// (empty) workspace.
|
||||||
|
//
|
||||||
|
// For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
|
||||||
|
// will all refer to the 3rd workspace.
|
||||||
|
Mod+1 { focus-workspace 1; }
|
||||||
|
Mod+2 { focus-workspace 2; }
|
||||||
|
Mod+3 { focus-workspace 3; }
|
||||||
|
Mod+4 { focus-workspace 4; }
|
||||||
|
Mod+5 { focus-workspace 5; }
|
||||||
|
Mod+6 { focus-workspace 6; }
|
||||||
|
Mod+7 { focus-workspace 7; }
|
||||||
|
Mod+8 { focus-workspace 8; }
|
||||||
|
Mod+9 { focus-workspace 9; }
|
||||||
|
Mod+Ctrl+1 { move-column-to-workspace 1; }
|
||||||
|
Mod+Ctrl+2 { move-column-to-workspace 2; }
|
||||||
|
Mod+Ctrl+3 { move-column-to-workspace 3; }
|
||||||
|
Mod+Ctrl+4 { move-column-to-workspace 4; }
|
||||||
|
Mod+Ctrl+5 { move-column-to-workspace 5; }
|
||||||
|
Mod+Ctrl+6 { move-column-to-workspace 6; }
|
||||||
|
Mod+Ctrl+7 { move-column-to-workspace 7; }
|
||||||
|
Mod+Ctrl+8 { move-column-to-workspace 8; }
|
||||||
|
Mod+Ctrl+9 { move-column-to-workspace 9; }
|
||||||
|
|
||||||
|
// Alternatively, there are commands to move just a single window:
|
||||||
|
// Mod+Ctrl+1 { move-window-to-workspace 1; }
|
||||||
|
|
||||||
|
// Switches focus between the current and the previous workspace.
|
||||||
|
// Mod+Tab { focus-workspace-previous; }
|
||||||
|
|
||||||
|
// Consume one window from the right into the focused column.
|
||||||
|
Mod+Comma { consume-window-into-column; }
|
||||||
|
// Expel one window from the focused column to the right.
|
||||||
|
Mod+Period { expel-window-from-column; }
|
||||||
|
|
||||||
|
// There are also commands that consume or expel a single window to the side.
|
||||||
|
Mod+BracketLeft { consume-or-expel-window-left; }
|
||||||
|
Mod+BracketRight { consume-or-expel-window-right; }
|
||||||
|
|
||||||
|
Mod+R { switch-preset-column-width; }
|
||||||
|
Mod+Shift+R { switch-preset-window-height; }
|
||||||
|
Mod+Ctrl+R { reset-window-height; }
|
||||||
|
Mod+F { maximize-column; }
|
||||||
|
Mod+Shift+F { fullscreen-window; }
|
||||||
|
Mod+C { center-column; }
|
||||||
|
|
||||||
|
// Finer width adjustments.
|
||||||
|
// This command can also:
|
||||||
|
// * set width in pixels: "1000"
|
||||||
|
// * adjust width in pixels: "-5" or "+5"
|
||||||
|
// * set width as a percentage of screen width: "25%"
|
||||||
|
// * adjust width as a percentage of screen width: "-10%" or "+10%"
|
||||||
|
// Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0,
|
||||||
|
// set-column-width "100" will make the column occupy 200 physical screen pixels.
|
||||||
|
Mod+Minus { set-column-width "-10%"; }
|
||||||
|
Mod+Equal { set-column-width "+10%"; }
|
||||||
|
|
||||||
|
// Finer height adjustments when in column with other windows.
|
||||||
|
Mod+Shift+Minus { set-window-height "-10%"; }
|
||||||
|
Mod+Shift+Equal { set-window-height "+10%"; }
|
||||||
|
|
||||||
|
// Actions to switch layouts.
|
||||||
|
// Note: if you uncomment these, make sure you do NOT have
|
||||||
|
// a matching layout switch hotkey configured in xkb options above.
|
||||||
|
// Having both at once on the same hotkey will break the switching,
|
||||||
|
// since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
|
||||||
|
// Mod+Space { switch-layout "next"; }
|
||||||
|
// Mod+Shift+Space { switch-layout "prev"; }
|
||||||
|
|
||||||
|
Mod+S { screenshot; }
|
||||||
|
Mod+Ctrl+S { screenshot-window; }
|
||||||
|
|
||||||
|
// The quit action will show a confirmation dialog to avoid accidental exits.
|
||||||
|
Mod+Shift+E { quit; }
|
||||||
|
Ctrl+Alt+Delete { quit; }
|
||||||
|
|
||||||
|
// Powers off the monitors. To turn them back on, do any input like
|
||||||
|
// moving the mouse or pressing any other key.
|
||||||
|
Mod+Shift+P { power-off-monitors; }
|
||||||
|
}
|
284
hmModules/niri/default.nix
Normal file
284
hmModules/niri/default.nix
Normal file
|
@ -0,0 +1,284 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
hostname,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
niriVars =
|
||||||
|
{
|
||||||
|
picard = {
|
||||||
|
floating-gptel = {
|
||||||
|
rows = "60";
|
||||||
|
cols = "150";
|
||||||
|
};
|
||||||
|
floating-btop = {
|
||||||
|
rows = "60";
|
||||||
|
cols = "210";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
kirk = {
|
||||||
|
floating-gptel = {
|
||||||
|
rows = "40";
|
||||||
|
cols = "140";
|
||||||
|
};
|
||||||
|
floating-btop = {
|
||||||
|
rows = "40";
|
||||||
|
cols = "140";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
."${hostname}" or {
|
||||||
|
floating-gptel = {
|
||||||
|
rows = "40";
|
||||||
|
cols = "140";
|
||||||
|
};
|
||||||
|
floating-btop = {
|
||||||
|
rows = "40";
|
||||||
|
cols = "140";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
run-floating-gptel =
|
||||||
|
with niriVars.floating-gptel;
|
||||||
|
pkgs.writeScriptBin "run-floating-gptel" ''
|
||||||
|
emacsclient -c --eval '(switch-to-buffer (gptel "*GptEl*"))' -F '((name . "GPTel - Emacs") (width . ${cols}) (height . ${rows}))'
|
||||||
|
'';
|
||||||
|
run-floating-btop =
|
||||||
|
with niriVars.floating-btop;
|
||||||
|
pkgs.writeScriptBin "run-floating-btop" ''
|
||||||
|
foot --title='bTop' -W ${cols}x${rows} btop
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
niri
|
||||||
|
waypaper
|
||||||
|
xwayland-satellite
|
||||||
|
run-floating-gptel
|
||||||
|
run-floating-btop
|
||||||
|
];
|
||||||
|
systemd.user.targets.niri-session = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Niri session";
|
||||||
|
BindsTo = [ "graphical-session.target" ];
|
||||||
|
Wants = [
|
||||||
|
"graphical-session-pre.target"
|
||||||
|
"xdg-desktop-autostart.target"
|
||||||
|
];
|
||||||
|
After = [ "graphical-session-pre.target" ];
|
||||||
|
Before = [ "xdg-desktop-autostart.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file."${config.xdg.configHome}/niri/wallpaper.png" = {
|
||||||
|
source = ../hyprland/wallpaper.png;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.activation.linkNiriConfig = lib.hm.dag.entryAnywhere ''
|
||||||
|
if [ ! -e "$HOME/.config/niri/config.kdl" ]; then
|
||||||
|
$DRY_RUN_CMD ln -s "$HOME/projects/aciceri/nixfleet/hmModules/niri/config.kdl" "$HOME/.config/niri/config.kdl"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
DISPLAY = ":0";
|
||||||
|
QT_QPA_PLATFORM = "wayland";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.rofi = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.rofi-wayland;
|
||||||
|
theme =
|
||||||
|
let
|
||||||
|
inherit (config.lib.formats.rasi) mkLiteral;
|
||||||
|
cfg = config.catppuccin.fzf;
|
||||||
|
palette = (lib.importJSON "${config.catppuccin.sources.palette}/palette.json").${cfg.flavor}.colors;
|
||||||
|
selectColor = color: palette.${color}.hex;
|
||||||
|
|
||||||
|
in
|
||||||
|
lib.mkForce {
|
||||||
|
"*" = {
|
||||||
|
# blue = mkLiteral "#0000FF";
|
||||||
|
# white = mkLiteral "#FFFFFF";
|
||||||
|
# black = mkLiteral "#000000";
|
||||||
|
# grey = mkLiteral "#eeeeee";
|
||||||
|
|
||||||
|
blue = mkLiteral (selectColor "blue");
|
||||||
|
white = mkLiteral "#FFFFFF";
|
||||||
|
black = mkLiteral "#000000";
|
||||||
|
grey = mkLiteral "#eeeeee";
|
||||||
|
|
||||||
|
spacing = 2;
|
||||||
|
background-color = mkLiteral "#00000000";
|
||||||
|
border-color = mkLiteral "#444444FF";
|
||||||
|
anchor = mkLiteral "north";
|
||||||
|
location = mkLiteral "center";
|
||||||
|
};
|
||||||
|
|
||||||
|
"window" = {
|
||||||
|
transparency = "real";
|
||||||
|
background-color = mkLiteral "#00000000";
|
||||||
|
border = 0;
|
||||||
|
padding = mkLiteral "0% 0% 1em 0%";
|
||||||
|
x-offset = 0;
|
||||||
|
y-offset = mkLiteral "-10%";
|
||||||
|
};
|
||||||
|
|
||||||
|
"mainbox" = {
|
||||||
|
padding = mkLiteral "0px";
|
||||||
|
border = 0;
|
||||||
|
spacing = mkLiteral "1%";
|
||||||
|
};
|
||||||
|
|
||||||
|
"message" = {
|
||||||
|
border = 0;
|
||||||
|
border-radius = mkLiteral "4px";
|
||||||
|
padding = mkLiteral "1em";
|
||||||
|
background-color = mkLiteral "@white";
|
||||||
|
text-color = mkLiteral "@black";
|
||||||
|
};
|
||||||
|
|
||||||
|
"textbox normal" = {
|
||||||
|
text-color = mkLiteral "#002B36FF";
|
||||||
|
padding = 0;
|
||||||
|
border = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
"listview" = {
|
||||||
|
fixed-height = 1;
|
||||||
|
border = 0;
|
||||||
|
padding = mkLiteral "1em";
|
||||||
|
reverse = false;
|
||||||
|
border-radius = mkLiteral "4px";
|
||||||
|
|
||||||
|
columns = 1;
|
||||||
|
background-color = mkLiteral "@white";
|
||||||
|
};
|
||||||
|
|
||||||
|
"element" = {
|
||||||
|
border = 0;
|
||||||
|
padding = mkLiteral "2px";
|
||||||
|
highlight = mkLiteral "bold";
|
||||||
|
};
|
||||||
|
|
||||||
|
"element-text" = {
|
||||||
|
background-color = mkLiteral "inherit";
|
||||||
|
text-color = mkLiteral "inherit";
|
||||||
|
};
|
||||||
|
|
||||||
|
"element normal.normal" = {
|
||||||
|
text-color = mkLiteral "#002B36FF";
|
||||||
|
background-color = mkLiteral "#F5F5F500";
|
||||||
|
};
|
||||||
|
|
||||||
|
"element normal.urgent" = {
|
||||||
|
text-color = mkLiteral "#D75F00FF";
|
||||||
|
background-color = mkLiteral "#F5F5F5FF";
|
||||||
|
};
|
||||||
|
|
||||||
|
"element normal.active" = {
|
||||||
|
text-color = mkLiteral "#005F87FF";
|
||||||
|
background-color = mkLiteral "#F5F5F5FF";
|
||||||
|
};
|
||||||
|
|
||||||
|
"element selected.normal" = {
|
||||||
|
text-color = mkLiteral "#F5F5F5FF";
|
||||||
|
background-color = mkLiteral "#4271AEFF";
|
||||||
|
};
|
||||||
|
|
||||||
|
"element selected.urgent" = {
|
||||||
|
text-color = mkLiteral "#F5F5F5FF";
|
||||||
|
background-color = mkLiteral "#D75F00FF";
|
||||||
|
};
|
||||||
|
|
||||||
|
"element selected.active" = {
|
||||||
|
text-color = mkLiteral "#F5F5F5FF";
|
||||||
|
background-color = mkLiteral "#005F87FF";
|
||||||
|
};
|
||||||
|
|
||||||
|
"element alternate.normal" = {
|
||||||
|
text-color = mkLiteral "#002B36FF";
|
||||||
|
background-color = mkLiteral "#D0D0D0FF";
|
||||||
|
};
|
||||||
|
|
||||||
|
"element alternate.urgent" = {
|
||||||
|
text-color = mkLiteral "#D75F00FF";
|
||||||
|
background-color = mkLiteral "#D0D0D0FF";
|
||||||
|
};
|
||||||
|
|
||||||
|
"element alternate.active" = {
|
||||||
|
text-color = mkLiteral "#005F87FF";
|
||||||
|
background-color = mkLiteral "#D0D0D0FF";
|
||||||
|
};
|
||||||
|
|
||||||
|
"scrollbar" = {
|
||||||
|
border = 0;
|
||||||
|
padding = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
"inputbar" = {
|
||||||
|
spacing = 0;
|
||||||
|
border = 0;
|
||||||
|
padding = mkLiteral "0.5em 1em";
|
||||||
|
background-color = mkLiteral "@grey";
|
||||||
|
index = 0;
|
||||||
|
|
||||||
|
border-radius = mkLiteral "4px";
|
||||||
|
|
||||||
|
children = map mkLiteral [
|
||||||
|
"prompt"
|
||||||
|
"textbox-prompt-colon"
|
||||||
|
"entry"
|
||||||
|
"case-indicator"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"inputbar normal" = {
|
||||||
|
foreground-color = mkLiteral "#002B36FF";
|
||||||
|
background-color = mkLiteral "#F5F5F500";
|
||||||
|
};
|
||||||
|
|
||||||
|
"mode-switcher" = {
|
||||||
|
border = 0;
|
||||||
|
padding = mkLiteral "0.5em 1em";
|
||||||
|
background-color = mkLiteral "@grey";
|
||||||
|
index = 10;
|
||||||
|
};
|
||||||
|
|
||||||
|
"button selected" = {
|
||||||
|
text-color = mkLiteral "#4271AEFF";
|
||||||
|
};
|
||||||
|
|
||||||
|
"textbox-prompt-colon" = {
|
||||||
|
expand = false;
|
||||||
|
str = ":";
|
||||||
|
margin = mkLiteral "0px 0.3em 0em 0em";
|
||||||
|
text-color = mkLiteral "@black";
|
||||||
|
};
|
||||||
|
|
||||||
|
"error-message" = {
|
||||||
|
border = 0;
|
||||||
|
border-radius = mkLiteral "4px";
|
||||||
|
padding = mkLiteral "1em";
|
||||||
|
background-color = mkLiteral "#FF8888";
|
||||||
|
text-color = mkLiteral "@black";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extraConfig = {
|
||||||
|
modi = "drun,window,ssh";
|
||||||
|
combi-modes = [
|
||||||
|
"drun"
|
||||||
|
"window"
|
||||||
|
"ssh"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
font = "Iosevka Comfy 12";
|
||||||
|
terminal = "footclient";
|
||||||
|
pass = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.rofi-pass-wayland;
|
||||||
|
};
|
||||||
|
plugins = [ pkgs.rofi-calc ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,24 +1,27 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
fleetFlake,
|
fleetFlake,
|
||||||
lib,
|
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
programs.nix-index.enable = true;
|
programs.nix-index.enable = true;
|
||||||
|
|
||||||
systemd.user.services.nix-index-update = {
|
systemd.user.services.nix-index-update = {
|
||||||
Unit = {Description = "Update nix-index";};
|
Unit = {
|
||||||
|
Description = "Update nix-index";
|
||||||
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
CPUSchedulingPolicy = "idle";
|
CPUSchedulingPolicy = "idle";
|
||||||
IOSchedulingClass = "idle";
|
IOSchedulingClass = "idle";
|
||||||
ExecStart = "${pkgs.nix-index}/bin/nix-index --nixpkgs ${fleetFlake.inputs.nixpkgsUnstable}";
|
ExecStart = "${pkgs.nix-index}/bin/nix-index --nixpkgs ${fleetFlake.inputs.nixpkgs}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.timers.nix-index-update = {
|
systemd.user.timers.nix-index-update = {
|
||||||
Unit = {Description = "Update nix-index";};
|
Unit = {
|
||||||
|
Description = "Update nix-index";
|
||||||
|
};
|
||||||
|
|
||||||
Timer = {
|
Timer = {
|
||||||
Unit = "nix-index-update.service";
|
Unit = "nix-index-update.service";
|
||||||
|
@ -26,6 +29,8 @@
|
||||||
Persistent = true;
|
Persistent = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
Install = {WantedBy = ["timers.target"];};
|
Install = {
|
||||||
|
WantedBy = [ "timers.target" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
programs.obs-studio = {
|
programs.obs-studio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = with pkgs.obs-studio-plugins; [wlrobs input-overlay];
|
plugins = with pkgs.obs-studio-plugins; [
|
||||||
|
wlrobs
|
||||||
|
input-overlay
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
home.packages = [pkgs.openscad];
|
{
|
||||||
|
home.packages = [ pkgs.openscad ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,27 @@
|
||||||
|
{ pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
services.pantalaimon = {
|
services.pantalaimon = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs.pantalaimon.overrideAttrs {
|
||||||
|
pytestCheckPhase = "echo skip pytest";
|
||||||
|
};
|
||||||
settings = {
|
settings = {
|
||||||
|
Default = {
|
||||||
|
LogLevel = "Debug";
|
||||||
|
SSL = true;
|
||||||
|
};
|
||||||
local-matrix = {
|
local-matrix = {
|
||||||
Homeserver = "https://nixos.dev";
|
Homeserver = "https://matrix.aciceri.dev";
|
||||||
ListenAddress = "127.0.0.1";
|
# Homeserver = "https://matrix.nixos.dev/_matrix/client";
|
||||||
|
# Homeserver = "https://matrix.nixos.dev";
|
||||||
|
ListenAddress = "localhost";
|
||||||
ListenPort = 8008;
|
ListenPort = 8008;
|
||||||
|
# SSL = false;
|
||||||
|
UseKeyring = false;
|
||||||
|
# IgnoreVerification = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.user.services.pantalaimon.Unit.Requires = ["dbus.socket"];
|
|
||||||
|
systemd.user.services.pantalaimon.Unit.Requires = [ "dbus.socket" ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,12 +2,22 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
username,
|
username,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
let
|
||||||
|
fzfpass = pkgs.writeShellApplication {
|
||||||
|
name = "fzfpass";
|
||||||
|
text = ''
|
||||||
|
find "$PASSWORD_STORE_DIR" -name "*.gpg" | sed "s|$PASSWORD_STORE_DIR/||; s|\.gpg||" | fzf --border --info=inline | xargs pass "$@"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
programs.password-store = {
|
programs.password-store = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
PASSWORD_STORE_DIR = "/home/${username}/.password-store";
|
PASSWORD_STORE_DIR = "/home/${username}/.password-store";
|
||||||
};
|
};
|
||||||
package = pkgs.pass.withExtensions (e: [e.pass-otp]);
|
package = pkgs.pass.withExtensions (e: [ e.pass-otp ]);
|
||||||
};
|
};
|
||||||
|
home.packages = [ fzfpass ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (config.programs.qutebrowser) settings;
|
inherit (config.programs.qutebrowser) settings;
|
||||||
websites = {
|
websites = {
|
||||||
searx = "https://searx.be";
|
searx = "https://searx.be";
|
||||||
|
@ -16,7 +17,8 @@
|
||||||
less-dark-white = "#cccccc";
|
less-dark-white = "#cccccc";
|
||||||
blue = "#0000ff";
|
blue = "#0000ff";
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
programs.qutebrowser = {
|
programs.qutebrowser = {
|
||||||
enable = true;
|
enable = true;
|
||||||
searchEngines = with websites; {
|
searchEngines = with websites; {
|
||||||
|
@ -34,14 +36,15 @@ in {
|
||||||
",l" = ''config-cycle spellcheck.languages [" it-IT "] [" en-US "]'';
|
",l" = ''config-cycle spellcheck.languages [" it-IT "] [" en-US "]'';
|
||||||
};
|
};
|
||||||
insert = {
|
insert = {
|
||||||
"<Ctrl-p>" = ''spawn --userscript qute-pass --dmenu-invocation '${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0 -d' --password-only --unfiltered'';
|
"<Ctrl-p>" =
|
||||||
|
''spawn --userscript qute-pass --dmenu-invocation '${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0 -d' --password-only --unfiltered'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
auto_save.session = true;
|
auto_save.session = true;
|
||||||
url = with websites; {
|
url = with websites; {
|
||||||
default_page = searx;
|
default_page = searx;
|
||||||
start_pages = [searx];
|
start_pages = [ searx ];
|
||||||
};
|
};
|
||||||
editor.command = [
|
editor.command = [
|
||||||
"emacsclient"
|
"emacsclient"
|
||||||
|
@ -108,15 +111,13 @@ in {
|
||||||
};
|
};
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
fuzzel
|
fuzzel
|
||||||
(
|
(makeDesktopItem {
|
||||||
makeDesktopItem {
|
name = "qutebrowser";
|
||||||
name = "qutebrowser";
|
exec = "qutebrowser %u";
|
||||||
exec = "qutebrowser %u";
|
comment = "Qutebrowser";
|
||||||
comment = "Qutebrowser";
|
desktopName = "qutebrowser";
|
||||||
desktopName = "qutebrowser";
|
type = "Application";
|
||||||
type = "Application";
|
mimeTypes = [ "x-scheme-handler/https" ];
|
||||||
mimeTypes = ["x-scheme-handler/https"];
|
})
|
||||||
}
|
|
||||||
)
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
28
hmModules/reinstall-magisk-on-lineage/default.nix
Normal file
28
hmModules/reinstall-magisk-on-lineage/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
reinstall-magisk-on-lineage = pkgs.stdenv.mkDerivation {
|
||||||
|
name = "reinstall-magisk-on-lineage";
|
||||||
|
version = "git";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "NicolasWebDev";
|
||||||
|
repo = "reinstall-magisk-on-lineageos";
|
||||||
|
rev = "1ca911ed555d4badd705c6c71750b78be8962b0b";
|
||||||
|
hash = "sha256-95LzcWL4efR77i8UlzIT+7wQXp+91K2sUwcjmHvTf+Q=";
|
||||||
|
};
|
||||||
|
propagatedBuildInputs = with pkgs; [
|
||||||
|
android-tools
|
||||||
|
jq
|
||||||
|
];
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp reinstall-magisk-on-lineageos $out/bin/reinstall-magisk-on-lineageos
|
||||||
|
'';
|
||||||
|
patchPhase = ''
|
||||||
|
substituteInPlace reinstall-magisk-on-lineageos \
|
||||||
|
--replace-fail "paste_yours_here" "\"\$1\""
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.packages = [ reinstall-magisk-on-lineage ];
|
||||||
|
}
|
|
@ -1,3 +1,4 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
home.packages = [pkgs.remmina];
|
{
|
||||||
|
home.packages = [ pkgs.remmina ];
|
||||||
}
|
}
|
||||||
|
|
8
hmModules/sdrangel/default.nix
Normal file
8
hmModules/sdrangel/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [
|
||||||
|
(builtins.getFlake "github:NixOS/nixpkgs/063dece00c5a77e4a0ea24e5e5a5bd75232806f8")
|
||||||
|
.legacyPackages.${pkgs.system}.sdrangel
|
||||||
|
pkgs.kdePackages.qtlocation
|
||||||
|
];
|
||||||
|
}
|
|
@ -1,12 +1,29 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
age,
|
age,
|
||||||
|
hostname,
|
||||||
|
config,
|
||||||
|
username,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
programs.bat.enable = true;
|
programs.bat.enable = true;
|
||||||
|
|
||||||
|
programs.ranger = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
"preview_images" = true;
|
||||||
|
"preview_images_method" = "sixel";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.fzf.enable = true;
|
||||||
|
|
||||||
|
programs.ripgrep.enable = true;
|
||||||
|
|
||||||
|
programs.fd.enable = true;
|
||||||
|
|
||||||
programs.direnv = {
|
programs.direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
||||||
|
@ -15,103 +32,47 @@
|
||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# programs.exa = {
|
programs.lsd = {
|
||||||
# enable = false;
|
enable = true;
|
||||||
# enableAliases = true;
|
};
|
||||||
# };
|
|
||||||
|
|
||||||
# programs.fzf.enable = false;
|
|
||||||
|
|
||||||
programs.vim.enable = true;
|
programs.vim.enable = true;
|
||||||
|
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
controlMaster = "auto";
|
controlMaster = "auto";
|
||||||
controlPersist = "10m";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# programs.starship = {
|
systemd.user.services.atuind = {
|
||||||
# enable = false;
|
Unit.Description = "Atuin daemon";
|
||||||
# settings = {
|
Install = {
|
||||||
# character = {
|
WantedBy = [ "default.target" ];
|
||||||
# success_symbol = "[👌](bold green)";
|
};
|
||||||
# error_symbol = "[🤌](bold red)";
|
Service = {
|
||||||
# };
|
ExecStartPre = "${lib.getExe' pkgs.toybox "rm"} -f ${config.programs.atuin.settings.daemon.socket_path}";
|
||||||
# nix_shell = {
|
ExecStart = "${lib.getExe pkgs.atuin} daemon";
|
||||||
# symbol = "❄ ";
|
};
|
||||||
# };
|
};
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Playing with it sometimes
|
programs.atuin = {
|
||||||
# programs.nushell = {
|
enable = false; # FIXME broken on bash: https://github.com/nix-community/home-manager/issues/5958
|
||||||
# enable = false;
|
settings = {
|
||||||
# configFile.text = ''
|
daemon = {
|
||||||
# let carapace_completer = {|spans|
|
enabled = true;
|
||||||
# carapace $spans.0 nushell $spans | from json
|
socket_path = "/home/${username}/.local/share/atuin/atuin.sock"; # FIXME using ~ or $HOME doesn't work: https://github.com/atuinsh/atuin/issues/2289
|
||||||
# }
|
|
||||||
# let-env config = {
|
|
||||||
# show_banner: false
|
|
||||||
# ls: {
|
|
||||||
# use_ls_colors: true # use the LS_COLORS environment variable to colorize output
|
|
||||||
# clickable_links: true # enable or disable clickable links. Your terminal has to support links.
|
|
||||||
# }
|
|
||||||
# rm: {
|
|
||||||
# always_trash: true # always act as if -t was given. Can be overridden with -p
|
|
||||||
# }
|
|
||||||
# cd: {
|
|
||||||
# abbreviations: true # allows `cd s/o/f` to expand to `cd some/other/folder`
|
|
||||||
# }
|
|
||||||
# table: {
|
|
||||||
# mode: compact # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other
|
|
||||||
# index_mode: always # "always" show indexes, "never" show indexes, "auto" = show indexes when a table has "index" column
|
|
||||||
# trim: {
|
|
||||||
# methodology: wrapping # wrapping or truncating
|
|
||||||
# wrapping_try_keep_words: true # A strategy used by the 'wrapping' methodology
|
|
||||||
# truncating_suffix: "..." # A suffix used by the 'truncating' methodology
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# history: {
|
|
||||||
# max_size: 10000 # Session has to be reloaded for this to take effect
|
|
||||||
# sync_on_enter: true # Enable to share history between multiple sessions, else you have to close the session to write history to file
|
|
||||||
# file_format: "plaintext" # "sqlite" or "plaintext"
|
|
||||||
# }
|
|
||||||
# completions: {
|
|
||||||
# case_sensitive: false # set to true to enable case-sensitive completions
|
|
||||||
# quick: true # set this to false to prevent auto-selecting completions when only one remains
|
|
||||||
# partial: true # set this to false to prevent partial filling of the prompt
|
|
||||||
# algorithm: "fuzzy" # prefix or fuzzy
|
|
||||||
# external: {
|
|
||||||
# enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up my be very slow
|
|
||||||
# max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options
|
|
||||||
# completer: $carapace_completer # check 'carapace_completer' above as an example
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# filesize: {
|
|
||||||
# metric: true # true => KB, MB, GB (ISO standard), false => KiB, MiB, GiB (Windows standard)
|
|
||||||
# format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, zb, zib, auto
|
|
||||||
# }
|
|
||||||
# buffer_editor: "${config.programs.helix.package}/bin/helix"
|
|
||||||
# }
|
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
|
|
||||||
xdg.configFile."dracula-theme" = {
|
|
||||||
target = "fish/themes/dracula.theme";
|
|
||||||
source = let
|
|
||||||
theme = pkgs.fetchFromGitHub {
|
|
||||||
owner = "dracula";
|
|
||||||
repo = "fish";
|
|
||||||
rev = "269cd7d76d5104fdc2721db7b8848f6224bdf554";
|
|
||||||
hash = "sha256-Hyq4EfSmWmxwCYhp3O8agr7VWFAflcUe8BUKh50fNfY=";
|
|
||||||
};
|
};
|
||||||
in "${theme}/themes/Dracula\ Official.theme";
|
auto_sync = true;
|
||||||
|
sync_frequency = "5m";
|
||||||
|
sync_address = "http://sisko.wg.aciceri.dev:8889";
|
||||||
|
search_mode = "fuzzy";
|
||||||
|
style = "compact";
|
||||||
|
enter_accept = "true";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.fish = {
|
programs.bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
shellInit = ''
|
initExtra = lib.optionalString (builtins.hasAttr "cachix-personal-token" age.secrets) ''
|
||||||
fish_config theme choose "dracula"
|
|
||||||
export CACHIX_AUTH_TOKEN=$(cat ${age.secrets.cachix-personal-token.path})
|
export CACHIX_AUTH_TOKEN=$(cat ${age.secrets.cachix-personal-token.path})
|
||||||
'';
|
'';
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
|
@ -119,95 +80,65 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# programs.zsh = {
|
programs.zoxide.enable = true;
|
||||||
# enable = false; # Playing xswith fish at the moment
|
programs.thefuck.enable = true;
|
||||||
# enableAutosuggestions = true;
|
programs.oh-my-posh = {
|
||||||
# enableCompletion = true;
|
enable = true;
|
||||||
# enableSyntaxHighlighting = true;
|
useTheme = "catppuccin_mocha";
|
||||||
# enableVteIntegration = true;
|
};
|
||||||
# autocd = true;
|
|
||||||
# oh-my-zsh = {
|
programs.zellij.enableBashIntegration = false;
|
||||||
# enable = true;
|
|
||||||
# plugins = [
|
# programs.fish = {
|
||||||
# "ag"
|
# enable = true;
|
||||||
# "cabal"
|
|
||||||
# "colored-man-pages"
|
|
||||||
# "colorize"
|
|
||||||
# "command-not-found"
|
|
||||||
# "fzf"
|
|
||||||
# "git"
|
|
||||||
# "nomad"
|
|
||||||
# "pass"
|
|
||||||
# "python"
|
|
||||||
# "sudo"
|
|
||||||
# "terraform"
|
|
||||||
# "thefuck"
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
# plugins = [
|
# plugins = [
|
||||||
|
# # {
|
||||||
|
# # name = "fifc";
|
||||||
|
# # src = pkgs.fishPlugins.fifc.src;
|
||||||
|
# # }
|
||||||
# {
|
# {
|
||||||
# name = "fzf-tab";
|
# name = "z";
|
||||||
# src = pkgs.fetchFromGitHub {
|
# src = pkgs.fishPlugins.z.src;
|
||||||
# owner = "Aloxaf";
|
|
||||||
# repo = "fzf-tab";
|
|
||||||
# rev = "c2b4aa5ad2532cca91f23908ac7f00efb7ff09c9";
|
|
||||||
# sha256 = "sha256-gvZp8P3quOtcy1Xtt1LAW1cfZ/zCtnAmnWqcwrKel6w=";
|
|
||||||
# };
|
|
||||||
# }
|
|
||||||
# {
|
|
||||||
# name = "fzf-tab";
|
|
||||||
# src = pkgs.fetchFromGitHub {
|
|
||||||
# owner = "Aloxaf";
|
|
||||||
# repo = "fzf-tab";
|
|
||||||
# rev = "c2b4aa5ad2532cca91f23908ac7f00efb7ff09c9";
|
|
||||||
# sha256 = "sha256-gvZp8P3quOtcy1Xtt1LAW1cfZ/zCtnAmnWqcwrKel6w=";
|
|
||||||
# };
|
|
||||||
# }
|
|
||||||
# {
|
|
||||||
# name = "fast-syntax-highlighting";
|
|
||||||
# src = pkgs.fetchFromGitHub {
|
|
||||||
# owner = "zdharma-continuum";
|
|
||||||
# repo = "fast-syntax-highlighting";
|
|
||||||
# rev = "13d7b4e63468307b6dcb2dadf6150818f242cbff";
|
|
||||||
# sha256 = "sha256-AmsexwVombgVmRvl4O9Kd/WbnVJHPTXETxBv18PDHz4=";
|
|
||||||
# };
|
|
||||||
# }
|
# }
|
||||||
# ];
|
# ];
|
||||||
|
# shellInit =
|
||||||
|
# ''
|
||||||
|
# # fish_vi_key_bindings
|
||||||
|
# fish_default_key_bindings
|
||||||
|
# ''
|
||||||
|
# + lib.optionalString (builtins.hasAttr "cachix-personal-token" age.secrets) ''
|
||||||
|
# export CACHIX_AUTH_TOKEN=$(cat ${age.secrets.cachix-personal-token.path})
|
||||||
|
# '';
|
||||||
# shellAliases = {
|
# shellAliases = {
|
||||||
# "cat" = "bat";
|
# "cat" = "bat";
|
||||||
# "em" = "TERM=wezterm emacsclient -nw";
|
|
||||||
# };
|
# };
|
||||||
# loginExtra = "[[ -z $DISPLAY && $TTY = /dev/tty1 ]] && exec dbus-run-session Hyprland";
|
|
||||||
# envExtra = ''
|
|
||||||
# # [ $TERM = "dumb" ] && unsetopt zle && PS1='$ ' # for Emacs TRAMP mode
|
|
||||||
# '';
|
|
||||||
# initExtra = ''
|
|
||||||
# export CACHIX_AUTH_TOKEN=$(cat ${age.secrets.cachix-personal-token.path})
|
|
||||||
|
|
||||||
# # Don't enable VIM emulation when in Emacs
|
|
||||||
# [[ -z $INSIDE_EMACS ]] && source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
|
|
||||||
|
|
||||||
# # When enabling starship, home-manager add an `initExtra` rule to disable it when in Emacs but not with VTerm,
|
|
||||||
# # since I use also `eat` besides `vterm` the following line is needed
|
|
||||||
# [[ "$INSIDE_EMACS" =~ "eat" ]] && eval "$(${config.home.profileDirectory}/bin/starship init zsh)"
|
|
||||||
# '';
|
|
||||||
# };
|
# };
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages =
|
||||||
thefuck
|
with pkgs;
|
||||||
htop-vim
|
[
|
||||||
bottom
|
dig.dnsutils
|
||||||
dig.dnsutils
|
lsof
|
||||||
lsof
|
comma
|
||||||
zsh-completions
|
ffmpeg-headless
|
||||||
nix-zsh-completions
|
jless
|
||||||
comma
|
nix-melt
|
||||||
# carapace # used by nushell
|
nurl
|
||||||
nil # TODO probably not best place
|
jq
|
||||||
terraform-lsp # TODO probably not best place
|
yq-go
|
||||||
python3Packages.jedi-language-server # TODO probably not best place
|
procs
|
||||||
nodePackages.typescript-language-server # TODO probably not best place
|
chafa
|
||||||
cntr # TODO probably not best place
|
hexyl
|
||||||
# nom # FIXME disable on aarch64-linux, breaks everything :(
|
broot
|
||||||
];
|
file
|
||||||
|
]
|
||||||
|
++ (lib.optionals
|
||||||
|
(builtins.elem hostname [
|
||||||
|
"kirk"
|
||||||
|
"picard"
|
||||||
|
])
|
||||||
|
[
|
||||||
|
cntr # TODO probably not best place
|
||||||
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
home.packages = [pkgs.slack];
|
{
|
||||||
|
home.packages = [ pkgs.slack ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,24 @@
|
||||||
{pkgs, ...}: let
|
{
|
||||||
spotify-adblock = pkgs.nur.repos.nltch.spotify-adblock;
|
lib,
|
||||||
in {
|
pkgs,
|
||||||
home.packages = [spotify-adblock];
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
spotify-adblocked = pkgs.callPackage ../../packages/spotify-adblocked { };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.packages = [ spotify-adblocked ];
|
||||||
|
|
||||||
systemd.user.services.spotify-adblocked = {
|
systemd.user.services.spotify-adblocked = {
|
||||||
Install.WantedBy = ["graphical-session.target"];
|
Install.WantedBy = [ "graphical-session.target" ];
|
||||||
|
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Spotify";
|
Description = "Spotify";
|
||||||
PartOf = ["graphical-session.target"];
|
PartOf = [ "graphical-session.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
ExecStart = "${spotify-adblock}/bin/spotify";
|
ExecStart = lib.getExe spotify-adblocked;
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 3;
|
RestartSec = 3;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
home.packages = [pkgs.steam-run];
|
{
|
||||||
|
home.packages = [ pkgs.steam-run ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../waybar
|
../waybar
|
||||||
../swayidle
|
../swayidle
|
||||||
|
@ -12,7 +13,7 @@
|
||||||
../kitty
|
../kitty
|
||||||
];
|
];
|
||||||
config = {
|
config = {
|
||||||
home.packages = with pkgs; [wl-clipboard];
|
home.packages = with pkgs; [ wl-clipboard ];
|
||||||
|
|
||||||
systemd.user.sessionVariables = {
|
systemd.user.sessionVariables = {
|
||||||
NIXOS_OZONE_WL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
|
@ -27,106 +28,109 @@
|
||||||
|
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
font.name = "Sans,Symbols Nerd Font";
|
font.name = lib.mkForce "Sans,Symbols Nerd Font";
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
name = "Adwaita";
|
name = "Adwaita";
|
||||||
package = pkgs.gnome.adwaita-icon-theme;
|
package = pkgs.adwaita-icon-theme;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
wayland = {
|
wayland = {
|
||||||
windowManager.sway = let
|
windowManager.sway =
|
||||||
modifier = "Mod4";
|
let
|
||||||
in {
|
modifier = "Mod4";
|
||||||
enable = true;
|
in
|
||||||
wrapperFeatures.gtk = true;
|
{
|
||||||
config = {
|
enable = true;
|
||||||
inherit modifier;
|
wrapperFeatures.gtk = true;
|
||||||
menu = "${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0";
|
config = {
|
||||||
output = let
|
inherit modifier;
|
||||||
bg = "${./wallpaper.svg} fill";
|
menu = "${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0";
|
||||||
in {
|
output =
|
||||||
DP-2 = {
|
let
|
||||||
res = "1900x1200";
|
bg = "${./wallpaper.svg} fill";
|
||||||
pos = "0 0";
|
in
|
||||||
inherit bg;
|
{
|
||||||
transform = "90";
|
DP-2 = {
|
||||||
|
res = "1900x1200";
|
||||||
|
pos = "0 0";
|
||||||
|
inherit bg;
|
||||||
|
transform = "90";
|
||||||
|
};
|
||||||
|
DP-1 = {
|
||||||
|
res = "2560x1440";
|
||||||
|
pos = "1200 230";
|
||||||
|
inherit bg;
|
||||||
|
};
|
||||||
|
eDP-1 = {
|
||||||
|
res = "1920x1080";
|
||||||
|
pos = "3760 230";
|
||||||
|
inherit bg;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
terminal = "${config.programs.kitty.package}/bin/kitty ${config.programs.kitty.package}/bin/kitty +kitten ssh mothership.fleet";
|
||||||
|
bars = [
|
||||||
|
{
|
||||||
|
mode = "hide";
|
||||||
|
position = "top";
|
||||||
|
command = "${pkgs.waybar}/bin/waybar";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
gaps = {
|
||||||
|
smartBorders = "on";
|
||||||
};
|
};
|
||||||
DP-1 = {
|
assigns = {
|
||||||
res = "2560x1440";
|
"1" = [
|
||||||
pos = "1200 230";
|
{ title = ".*Mozilla Firefox$"; }
|
||||||
inherit bg;
|
{ title = ".*qutebrowser$"; }
|
||||||
|
];
|
||||||
|
"2" = [ { title = "^((?!qutebrowser-editor).)*Emacs$"; } ];
|
||||||
|
"3" = [ { title = "Slack.*"; } ];
|
||||||
|
"9" = [ { title = "^Element.*"; } ];
|
||||||
};
|
};
|
||||||
eDP-1 = {
|
floating.criteria = [
|
||||||
res = "1920x1080";
|
{ title = "MetaMask Notification.*"; }
|
||||||
pos = "3760 230";
|
{ title = "Volume Control"; } # pavucontrol
|
||||||
inherit bg;
|
{ title = "^.*editor - qutebrowser$"; } # Emacs opened by qutebrowser
|
||||||
|
];
|
||||||
|
input = {
|
||||||
|
"*" = {
|
||||||
|
xkb_layout = "us";
|
||||||
|
xkb_variant = "altgr-intl";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
keybindings =
|
||||||
|
let
|
||||||
|
screenshotScript = pkgs.writeShellScript "screenshot.sh" ''
|
||||||
|
filename="$HOME/shots/$(date --iso-8601=seconds).png"
|
||||||
|
coords="$(${pkgs.slurp}/bin/slurp)"
|
||||||
|
${pkgs.grim}/bin/grim -t png -g "$coords" "$filename"
|
||||||
|
wl-copy -t image/png < $filename
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
lib.mkOptionDefault {
|
||||||
|
"${modifier}+x" = "exec emacsclient -c";
|
||||||
|
"${modifier}+y" =
|
||||||
|
"exec ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh mothership.fleet emacsclient -c";
|
||||||
|
"${modifier}+b" = "exec qutebrowser";
|
||||||
|
"${modifier}+s" = "exec ${screenshotScript}";
|
||||||
|
# "${modifier}+g" = "exec ${screenrecordingScript}"; # FIXME
|
||||||
|
"${modifier}+t" = ''
|
||||||
|
exec emacsclient -c -F "\'(name . \\"VTerm\\"))" -q --eval '(vterm (getenv "SHELL"))'
|
||||||
|
'';
|
||||||
|
"${modifier}+u" = ''
|
||||||
|
exec ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh mothership.fleet emacsclient -c -F "\'(name . \\"VTerm\\"))" -q --eval '(eat (getenv "SHELL"))'
|
||||||
|
'';
|
||||||
|
"XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s +5%";
|
||||||
|
"XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s 5%-";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
terminal = "${config.programs.kitty.package}/bin/kitty ${config.programs.kitty.package}/bin/kitty +kitten ssh mothership.fleet";
|
extraConfig = ''
|
||||||
bars = [
|
bindsym ${modifier}+p move workspace to output right
|
||||||
{
|
'';
|
||||||
mode = "hide";
|
xwayland = true;
|
||||||
position = "top";
|
systemdIntegration = true;
|
||||||
command = "${pkgs.waybar}/bin/waybar";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
gaps = {
|
|
||||||
smartBorders = "on";
|
|
||||||
};
|
|
||||||
assigns = {
|
|
||||||
"1" = [{title = ".*Mozilla Firefox$";} {title = ".*qutebrowser$";}];
|
|
||||||
"2" = [{title = "^((?!qutebrowser-editor).)*Emacs$";}];
|
|
||||||
"3" = [{title = "Slack.*";}];
|
|
||||||
"9" = [{title = "^Element.*";}];
|
|
||||||
};
|
|
||||||
floating.criteria = [
|
|
||||||
{title = "MetaMask Notification.*";}
|
|
||||||
{title = "Volume Control";} # pavucontrol
|
|
||||||
{title = "^.*editor - qutebrowser$";} # Emacs opened by qutebrowser
|
|
||||||
];
|
|
||||||
input = {
|
|
||||||
"*" = {
|
|
||||||
xkb_layout = "us";
|
|
||||||
xkb_variant = "altgr-intl";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
keybindings = let
|
|
||||||
screenshotScript = pkgs.writeShellScript "screenshot.sh" ''
|
|
||||||
filename="$HOME/shots/$(date --iso-8601=seconds).png"
|
|
||||||
coords="$(${pkgs.slurp}/bin/slurp)"
|
|
||||||
${pkgs.grim}/bin/grim -t png -g "$coords" "$filename"
|
|
||||||
wl-copy -t image/png < $filename
|
|
||||||
'';
|
|
||||||
screenrecordingScript = pkgs.writeShellScript "screenrecorder.sh" ''
|
|
||||||
filename="$HOME/shots/recording-$(date --iso-8601=seconds).mp4"
|
|
||||||
coords="$(${pkgs.slurp}/bin/slurp)"
|
|
||||||
${pkgs.wf-recorder}/bin/wf-recorder -g "$coords" -f "$filename"
|
|
||||||
wl-copy -t video/mp4 < $filename
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
lib.mkOptionDefault {
|
|
||||||
"${modifier}+x" = "exec emacsclient -c";
|
|
||||||
"${modifier}+y" = "exec ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh mothership.fleet emacsclient -c";
|
|
||||||
"${modifier}+b" = "exec qutebrowser";
|
|
||||||
"${modifier}+s" = "exec ${screenshotScript}";
|
|
||||||
# "${modifier}+g" = "exec ${screenrecordingScript}"; # FIXME
|
|
||||||
"${modifier}+t" = ''
|
|
||||||
exec emacsclient -c -F "\'(name . \\"VTerm\\"))" -q --eval '(vterm (getenv "SHELL"))'
|
|
||||||
'';
|
|
||||||
"${modifier}+u" = ''
|
|
||||||
exec ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh mothership.fleet emacsclient -c -F "\'(name . \\"VTerm\\"))" -q --eval '(eat (getenv "SHELL"))'
|
|
||||||
'';
|
|
||||||
"XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s +5%";
|
|
||||||
"XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s 5%-";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
|
||||||
bindsym ${modifier}+p move workspace to output right
|
|
||||||
'';
|
|
||||||
xwayland = true;
|
|
||||||
systemdIntegration = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,65 +2,50 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
services.swayidle = let
|
{
|
||||||
# Downgraded due to
|
services.swayidle =
|
||||||
# https://github.com/mortie/swaylock-effects/issues/95
|
let
|
||||||
# swaylock-effects = pkgs.swaylock-effects.overrideAttrs (_: {
|
swaylockWithArgs = pkgs.writeScriptBin "swaylockWithArgs" ''
|
||||||
# version = "jirutka-master";
|
${pkgs.swaylock-effects}/bin/swaylock \
|
||||||
# src = pkgs.fetchFromGitHub {
|
--daemonize \
|
||||||
# owner = "jirutka";
|
--screenshots \
|
||||||
# repo = "swaylock-effects";
|
--clock \
|
||||||
# rev = "7c5681ce96587ce3090c6698501faeccdfdc157d";
|
--indicator \
|
||||||
# sha256 = "sha256-09Kq90wIIF9lPjiY2anf9MSgi/EqeXKXW1mFmhxA/aM";
|
--indicator-radius 100 \
|
||||||
# };
|
--indicator-thickness 7 \
|
||||||
# });
|
--effect-blur 7x5 \
|
||||||
swaylockWithArgs = pkgs.writeScriptBin "swaylockWithArgs" ''
|
--effect-vignette 0.5:0.5 \
|
||||||
${pkgs.swaylock-effects}/bin/swaylock \
|
--ring-color bb00cc \
|
||||||
--daemonize \
|
--key-hl-color 880033 \
|
||||||
--screenshots \
|
--line-color 00000000 \
|
||||||
--clock \
|
--inside-color 00000088 \
|
||||||
--indicator \
|
--separator-color 00000000 \
|
||||||
--indicator-radius 100 \
|
--fade-in 0.2
|
||||||
--indicator-thickness 7 \
|
'';
|
||||||
--effect-blur 7x5 \
|
swaylockCommand = "${swaylockWithArgs}/bin/swaylockWithArgs";
|
||||||
--effect-vignette 0.5:0.5 \
|
in
|
||||||
--ring-color bb00cc \
|
{
|
||||||
--key-hl-color 880033 \
|
enable = true;
|
||||||
--line-color 00000000 \
|
events = [
|
||||||
--inside-color 00000088 \
|
{
|
||||||
--separator-color 00000000 \
|
event = "before-sleep";
|
||||||
--grace 2 \
|
command = swaylockCommand;
|
||||||
--fade-in 0.2
|
}
|
||||||
'';
|
{
|
||||||
swaylockCommand = "${swaylockWithArgs}/bin/swaylockWithArgs";
|
event = "lock";
|
||||||
in {
|
command = swaylockCommand;
|
||||||
enable = true;
|
}
|
||||||
events = [
|
];
|
||||||
{
|
timeouts = [
|
||||||
event = "before-sleep";
|
{
|
||||||
command = swaylockCommand;
|
timeout = 600;
|
||||||
}
|
command = swaylockCommand;
|
||||||
{
|
}
|
||||||
event = "lock";
|
{
|
||||||
command = swaylockCommand;
|
timeout = 720;
|
||||||
}
|
command = "${pkgs.systemd}/bin/systemctl suspend";
|
||||||
];
|
}
|
||||||
timeouts = [
|
];
|
||||||
{
|
};
|
||||||
timeout = 600;
|
|
||||||
command = swaylockCommand;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
timeout = 720;
|
|
||||||
command = "${pkgs.systemd}/bin/systemctl suspend";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Otherwise it will start only after Sway and will not work with Hyprland
|
|
||||||
systemd.user.services.swayidle = {
|
|
||||||
Unit.PartOf = lib.mkForce [];
|
|
||||||
Install.WantedBy = lib.mkForce ["hyprland-session.target"];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
4
hmModules/teams/default.nix
Normal file
4
hmModules/teams/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.teams-for-linux ];
|
||||||
|
}
|
|
@ -1,14 +1,14 @@
|
||||||
{
|
{
|
||||||
imports = [../email];
|
imports = [ ../email ];
|
||||||
config = {
|
config = {
|
||||||
accounts.email.accounts = {
|
accounts.email.accounts = {
|
||||||
autistici.thunderbird = {
|
autistici.thunderbird = {
|
||||||
enable = true;
|
enable = true;
|
||||||
profiles = ["default"];
|
profiles = [ "default" ];
|
||||||
};
|
};
|
||||||
mlabs.thunderbird = {
|
mlabs.thunderbird = {
|
||||||
enable = true;
|
enable = true;
|
||||||
profiles = ["default"];
|
profiles = [ "default" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
programs.thunderbird = {
|
programs.thunderbird = {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
home.packages = [pkgs.tor-browser];
|
{
|
||||||
|
home.packages = [ pkgs.tor-browser ];
|
||||||
}
|
}
|
||||||
|
|
27
hmModules/tremotesf/default.nix
Normal file
27
hmModules/tremotesf/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.tremotesf ];
|
||||||
|
|
||||||
|
systemd.user.services.tremotesf = {
|
||||||
|
Install.WantedBy = [
|
||||||
|
"waybar.service"
|
||||||
|
];
|
||||||
|
|
||||||
|
Unit = {
|
||||||
|
Description = "tremotesf";
|
||||||
|
};
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
ExecStart = pkgs.writeShellScript "start-tremotesf.sh" ''
|
||||||
|
sleep 5
|
||||||
|
${lib.getExe pkgs.tremotesf} --minimized
|
||||||
|
'';
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 3;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
4
hmModules/vial/default.nix
Normal file
4
hmModules/vial/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.vial ];
|
||||||
|
}
|
6
hmModules/vscode-server/default.nix
Normal file
6
hmModules/vscode-server/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
services.vscode-server = {
|
||||||
|
enable = true;
|
||||||
|
enableFHS = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
programs.vscode = {
|
programs.vscode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# For a few reasons sometimes I'm forced to use VSCode and I don't have time to nixifiy even its configuration.
|
# For a few reasons sometimes I'm forced to use VSCode and I don't have time to nixifiy even its configuration.
|
||||||
|
|
78
hmModules/waybar/config.json
Normal file
78
hmModules/waybar/config.json
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
{
|
||||||
|
"layer": "top",
|
||||||
|
"position": "left",
|
||||||
|
"width": 36,
|
||||||
|
"margin": "12 0 12 0",
|
||||||
|
"spacing": 2,
|
||||||
|
"modules-left": ["clock", "custom/sep", "niri/window"],
|
||||||
|
"modules-center": ["niri/workspaces"],
|
||||||
|
"modules-right": [
|
||||||
|
"tray",
|
||||||
|
"custom/sep",
|
||||||
|
"temperature",
|
||||||
|
"custom/sep",
|
||||||
|
"pulseaudio",
|
||||||
|
"custom/powermenu"
|
||||||
|
],
|
||||||
|
"custom/sep": {
|
||||||
|
"format": "──"
|
||||||
|
// "format": ""
|
||||||
|
},
|
||||||
|
"custom/powermenu": {
|
||||||
|
"on-click": "rofi -show menu -modi menu:rofi-power-menu",
|
||||||
|
"format": "",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
"niri/workspaces": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"on-click": "activate",
|
||||||
|
"format-icons": {
|
||||||
|
"active": "",
|
||||||
|
"urgent": "",
|
||||||
|
"default": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"niri/window": {
|
||||||
|
"rotate": 90,
|
||||||
|
"rewrite": {
|
||||||
|
"(.*) — Mozilla Firefox": " $1",
|
||||||
|
"(.*) - Emacs": " $1",
|
||||||
|
"(.*) - Slack": " $1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
"tooltip": true,
|
||||||
|
"format": "{:%H\n%M}",
|
||||||
|
"tooltip-format": "{:%Y-%m-%d}"
|
||||||
|
},
|
||||||
|
"tray": {
|
||||||
|
"icon-size": 20,
|
||||||
|
"spacing": 5,
|
||||||
|
"show-passive-items": "false"
|
||||||
|
},
|
||||||
|
"temperature": {
|
||||||
|
"rotate": 90,
|
||||||
|
"hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
|
||||||
|
"critical-threshold": 80,
|
||||||
|
"format": "{icon} {temperatureC}°C",
|
||||||
|
"format-icons": ["", "", ""]
|
||||||
|
},
|
||||||
|
"pulseaudio": {
|
||||||
|
"rotate": 90,
|
||||||
|
"format": "{icon} {volume}%",
|
||||||
|
"format-bluetooth": "{icon} {volume}%",
|
||||||
|
"format-muted": "MUTE ",
|
||||||
|
"format-icons": {
|
||||||
|
"headphones": "",
|
||||||
|
"handsfree": "",
|
||||||
|
"headset": "",
|
||||||
|
"phone": "",
|
||||||
|
"portable": "",
|
||||||
|
"car": "",
|
||||||
|
"default": ["", ""]
|
||||||
|
},
|
||||||
|
"scroll-step": 3,
|
||||||
|
"on-click": "pavucontrol",
|
||||||
|
"on-click-right": "pactl set-source-mute @DEFAULT_SOURCE@ toggle"
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,121 +1,25 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
fleetFlake,
|
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
style = builtins.readFile ./style.css;
|
|
||||||
settings = {
|
|
||||||
mainBar = {
|
|
||||||
ipc = true;
|
|
||||||
layer = "top";
|
|
||||||
position = "top";
|
|
||||||
height = 30;
|
|
||||||
|
|
||||||
modules-left = [
|
|
||||||
"wlr/mode"
|
|
||||||
"hyprland/workspaces"
|
|
||||||
];
|
|
||||||
modules-center = ["wlr/window"];
|
|
||||||
modules-right = [
|
|
||||||
"network"
|
|
||||||
"tray"
|
|
||||||
"pulseaudio"
|
|
||||||
"cpu"
|
|
||||||
"memory"
|
|
||||||
"temperature"
|
|
||||||
"backlight"
|
|
||||||
"battery"
|
|
||||||
"clock"
|
|
||||||
];
|
|
||||||
|
|
||||||
"hyprland/workspaces" = {
|
|
||||||
all-outputs = true;
|
|
||||||
disable-scroll-wraparound = true;
|
|
||||||
# format = "{icon}";
|
|
||||||
on-click = "activate";
|
|
||||||
# format-icons = {
|
|
||||||
# "1" = "";
|
|
||||||
# "2" = "";
|
|
||||||
# "3" = "";
|
|
||||||
# "9" = "ﬧ";
|
|
||||||
# urgent = "";
|
|
||||||
# };
|
|
||||||
# sort-by-number = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"wlr/mode" = {tooltip = false;};
|
|
||||||
|
|
||||||
"wlr/window" = {max_length = 50;};
|
|
||||||
tray = {
|
|
||||||
spacing = 10;
|
|
||||||
};
|
|
||||||
battery = {
|
|
||||||
format = "{capacity}% {icon}";
|
|
||||||
format-alt = "{time} {icon}";
|
|
||||||
format-charging = "{capacity}% ";
|
|
||||||
format-icons = [" " " " " " " " " "];
|
|
||||||
format-plugged = "{capacity}% ";
|
|
||||||
states = {
|
|
||||||
critical = 15;
|
|
||||||
warning = 30;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
clock = {
|
|
||||||
format-alt = "{:%Y-%m-%d}";
|
|
||||||
tooltip-format = "{:%Y-%m-%d | %H:%M}";
|
|
||||||
};
|
|
||||||
cpu = {
|
|
||||||
format = "{usage}% ";
|
|
||||||
tooltip = false;
|
|
||||||
};
|
|
||||||
memory = {format = "{}% ";};
|
|
||||||
network = {
|
|
||||||
interval = 1;
|
|
||||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
|
||||||
format-disconnected = "Disconnected ⚠";
|
|
||||||
format-ethernet = "{ifname}: {ipaddr}/{cidr} up: {bandwidthUpBits:>4} down: {bandwidthDownBits:>4}";
|
|
||||||
format-linked = "{ifname} (No IP) ";
|
|
||||||
format-wifi = "{essid} ({signalStrength}%) {ipaddr}/{cidr} up: {bandwidthUpBits:>4} down: {bandwidthDownBits:>4}";
|
|
||||||
};
|
|
||||||
pulseaudio = {
|
|
||||||
format = "{volume}% {icon} {format_source}";
|
|
||||||
format-bluetooth = "{volume}% {icon} {format_source}";
|
|
||||||
format-bluetooth-muted = " {icon} {format_source}";
|
|
||||||
format-icons = {
|
|
||||||
car = "";
|
|
||||||
default = [" " " " " "];
|
|
||||||
handsfree = "";
|
|
||||||
headphones = " ";
|
|
||||||
headset = "";
|
|
||||||
phone = "";
|
|
||||||
portable = "";
|
|
||||||
};
|
|
||||||
format-muted = " {format_source}";
|
|
||||||
format-source = "{volume}% ";
|
|
||||||
format-source-muted = "";
|
|
||||||
on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
|
|
||||||
};
|
|
||||||
"wlr/mode" = {format = ''<span style="italic">{}</span>'';};
|
|
||||||
temperature = {
|
|
||||||
critical-threshold = 80;
|
|
||||||
format = "{temperatureC}°C {icon}";
|
|
||||||
format-icons = ["" "" ""];
|
|
||||||
hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input"; # picard FIXME
|
|
||||||
# hwmon-path = "/sys/class/thermal/thermal_zone4/temp"; # thinkpad
|
|
||||||
};
|
|
||||||
backlight = {
|
|
||||||
device = "ddcci2";
|
|
||||||
format = "{percent}% {icon}";
|
|
||||||
format-icons = [" " " "];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# waybar needs the hyprctl binary in PATH when started in hyprland
|
catppuccin.waybar.enable = lib.mkForce false;
|
||||||
systemd.user.services.waybar.Service.Environment = "PATH=${lib.makeBinPath [pkgs.hyprland]}";
|
|
||||||
|
home.activation.linkWaybarConfig = lib.hm.dag.entryAnywhere ''
|
||||||
|
if [ ! -d "$HOME/.config/waybar" ]; then
|
||||||
|
$DRY_RUN_CMD mkdir -p "$HOME/.config/waybar"
|
||||||
|
$DRY_RUN_CMD ln -s "$HOME/projects/aciceri/nixfleet/hmModules/waybar/config.json" "$HOME/.config/waybar/config"
|
||||||
|
$DRY_RUN_CMD ln -s "$HOME/projects/aciceri/nixfleet/hmModules/waybar/style.css" "$HOME/.config/waybar/style.css"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
rofi-power-menu
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,45 +1,71 @@
|
||||||
* {
|
* {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0;
|
font-family: "Iosevka Comfy", "FontAwesome", "Nerd Font";
|
||||||
min-height: 0;
|
font-size: 1.35rem;
|
||||||
font-family: Fira Code;
|
font-weight: 600;
|
||||||
|
background: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
background: rgba(255, 255, 255, 0.05);
|
color: #a5adcb;
|
||||||
color: white;
|
background-color: #181926;
|
||||||
font-size: 1.2rem;
|
|
||||||
|
border-top-right-radius: 5px;
|
||||||
|
border-bottom-right-radius: 5px;
|
||||||
|
}
|
||||||
|
.modules-left,
|
||||||
|
.modules-right,
|
||||||
|
.modules-center {
|
||||||
|
padding: 12px 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tooltip {
|
||||||
|
color: #a5adcb;
|
||||||
|
background-color: #181926;
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
tooltip * {
|
||||||
|
color: #a5adcb;
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-sep {
|
||||||
|
color: #494d64;
|
||||||
|
}
|
||||||
|
#workspaces button:hover {
|
||||||
|
box-shadow: inherit;
|
||||||
|
text-shadow: inherit;
|
||||||
|
}
|
||||||
#workspaces button {
|
#workspaces button {
|
||||||
padding: 0 10px;
|
color: #5b6078;
|
||||||
background: transparent;
|
background: none;
|
||||||
color: white;
|
padding: 0;
|
||||||
font-size: 2rem;
|
}
|
||||||
|
#workspaces button:hover {
|
||||||
|
color: #a6da95;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.active {
|
#workspaces button.active {
|
||||||
box-shadow: inset 0 -5px red;
|
color: #f5bde6;
|
||||||
|
}
|
||||||
|
#temperature {
|
||||||
|
color: #eed49f;
|
||||||
|
}
|
||||||
|
#clock {
|
||||||
|
font-weight: 600;
|
||||||
|
color: #8bd5ca;
|
||||||
|
}
|
||||||
|
#custom-bluetooth_devices {
|
||||||
|
color: #8aadf4;
|
||||||
|
}
|
||||||
|
#pulseaudio {
|
||||||
|
color: #a6da95;
|
||||||
|
}
|
||||||
|
#pulseaudio.muted {
|
||||||
|
color: #ed8796;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.focused, #workspaces button:hover {
|
#custom-powermenu {
|
||||||
box-shadow: inset 0 -5px white;
|
margin: 12px 0 0 0;
|
||||||
}
|
color: #6e738d;
|
||||||
|
|
||||||
#workspaces button.urgent {
|
|
||||||
/* background: @theme_fg_color; */
|
|
||||||
/* color: @theme_selected_bg_color; */
|
|
||||||
}
|
|
||||||
|
|
||||||
#mode {
|
|
||||||
margin: 0 4px;
|
|
||||||
padding: 0 4px;
|
|
||||||
/* background: @theme_fg_color; */
|
|
||||||
/* color: @unfocused_borders; */
|
|
||||||
}
|
|
||||||
|
|
||||||
#pulseaudio, #network, #cpu, #memory, #disk, #temperature, #battery, #language, #clock, #tray {
|
|
||||||
margin: 0 4px;
|
|
||||||
padding: 0 2px;
|
|
||||||
}
|
}
|
||||||
|
|
23
hmModules/wayvnc/default.nix
Normal file
23
hmModules/wayvnc/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
vpn,
|
||||||
|
hostname,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
systemd.user.services.wayvnc = {
|
||||||
|
Install.WantedBy = [ "graphical-session.target" ];
|
||||||
|
|
||||||
|
Unit = {
|
||||||
|
Description = "WayVNC";
|
||||||
|
PartOf = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${lib.getExe' pkgs.wayvnc "wayvnc"} ${vpn.${hostname}.ip} 5900";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 3;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,8 +1,9 @@
|
||||||
{...}: {
|
{
|
||||||
programs.wezterm = {
|
programs.wezterm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
return {
|
return {
|
||||||
|
-- enable_wayland = false; -- https://github.com/wez/wezterm/issues/4483
|
||||||
font = wezterm.font_with_fallback {
|
font = wezterm.font_with_fallback {
|
||||||
{
|
{
|
||||||
family = 'Iosevka Comfy',
|
family = 'Iosevka Comfy',
|
||||||
|
@ -13,7 +14,7 @@
|
||||||
};
|
};
|
||||||
font_size = 13;
|
font_size = 13;
|
||||||
allow_square_glyphs_to_overflow_width = "Always";
|
allow_square_glyphs_to_overflow_width = "Always";
|
||||||
color_scheme = "Dracula (Official)";
|
color_scheme = "Catppuccin Mocha";
|
||||||
window_background_opacity = 1;
|
window_background_opacity = 1;
|
||||||
enable_tab_bar = false;
|
enable_tab_bar = false;
|
||||||
hide_mouse_cursor_when_typing = false;
|
hide_mouse_cursor_when_typing = false;
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
home.packages = [pkgs.whatsapp-for-linux];
|
{
|
||||||
|
home.packages = [ pkgs.whatsapp-for-linux ];
|
||||||
|
|
||||||
systemd.user.services.whatsapp = {
|
systemd.user.services.whatsapp = {
|
||||||
Install.WantedBy = ["graphical-session.target"];
|
Install.WantedBy = [ "graphical-session.target" ];
|
||||||
|
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Whatsapp";
|
Description = "Whatsapp";
|
||||||
PartOf = ["graphical-session.target"];
|
PartOf = [ "graphical-session.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
winetricks
|
winetricks
|
||||||
wineWowPackages.waylandFull
|
wineWowPackages.waylandFull
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
xdg = {
|
xdg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
mimeApps.enable = true;
|
mimeApps.enable = true;
|
||||||
mimeApps.defaultApplications = {
|
mimeApps.defaultApplications = {
|
||||||
"text/html" = ["firefox.desktop"];
|
"text/html" = [ "firefox.desktop" ];
|
||||||
"x-scheme-handler/http" = ["firefox.desktop"];
|
"x-scheme-handler/http" = [ "firefox.desktop" ];
|
||||||
"x-scheme-handler/https" = ["firefox.desktop"];
|
"x-scheme-handler/https" = [ "firefox.desktop" ];
|
||||||
};
|
};
|
||||||
desktopEntries = {
|
desktopEntries = {
|
||||||
org-protocol = {
|
org-protocol = {
|
||||||
|
@ -13,16 +14,43 @@
|
||||||
genericName = "Org protocol";
|
genericName = "Org protocol";
|
||||||
exec = "emacsclient -- %u";
|
exec = "emacsclient -- %u";
|
||||||
terminal = false;
|
terminal = false;
|
||||||
mimeType = ["x-scheme-handler/org-protocol"];
|
mimeType = [ "x-scheme-handler/org-protocol" ];
|
||||||
};
|
};
|
||||||
firefox = {
|
firefox = {
|
||||||
name = "firefox";
|
name = "firefox";
|
||||||
genericName = "Firefox protocol";
|
genericName = "Firefox protocol";
|
||||||
exec = "firefox -- %U";
|
exec = "firefox -- %U";
|
||||||
terminal = false;
|
terminal = false;
|
||||||
mimeType = ["text/html" "text/xml" "text/uri"];
|
mimeType = [
|
||||||
|
"text/html"
|
||||||
|
"text/xml"
|
||||||
|
"text/uri"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
portal = {
|
||||||
|
enable = true;
|
||||||
|
configPackages = with pkgs; [
|
||||||
|
# xdg-desktop-portal-wlr
|
||||||
|
# xdg-desktop-portal-gtk
|
||||||
|
# xdg-desktop-portal-hyprland
|
||||||
|
xdg-desktop-portal-gnome
|
||||||
|
# xdg-desktop-portal
|
||||||
|
# kdePackages.xdg-desktop-portal-kde
|
||||||
|
# libsForQt5.xdg-desktop-portal-kde
|
||||||
|
gnome-keyring
|
||||||
|
];
|
||||||
|
extraPortals = with pkgs; [
|
||||||
|
# xdg-desktop-portal-wlr
|
||||||
|
# xdg-desktop-portal-gtk
|
||||||
|
# xdg-desktop-portal-hyprland
|
||||||
|
xdg-desktop-portal-gnome
|
||||||
|
# xdg-desktop-portal
|
||||||
|
# kdePackages.xdg-desktop-portal-kde
|
||||||
|
gnome-keyring
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
home.packages = [pkgs.xdg-utils];
|
home.packages = [ pkgs.xdg-utils ];
|
||||||
}
|
}
|
||||||
|
|
107
hmModules/zellij/default.nix
Normal file
107
hmModules/zellij/default.nix
Normal file
|
@ -0,0 +1,107 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
zjstatus = pkgs.fetchurl {
|
||||||
|
url = "https://github.com/dj95/zjstatus/releases/download/v0.17.0/zjstatus.wasm";
|
||||||
|
hash = "sha256-IgTfSl24Eap+0zhfiwTvmdVy/dryPxfEF7LhVNVXe+U=";
|
||||||
|
};
|
||||||
|
cfg = config.catppuccin.fzf;
|
||||||
|
palette = (lib.importJSON "${config.catppuccin.sources.palette}/palette.json").${cfg.flavor}.colors;
|
||||||
|
selectColor = color: palette.${color}.hex;
|
||||||
|
color_fg = selectColor "text";
|
||||||
|
color_bg = selectColor "mantle";
|
||||||
|
color_black = selectColor "surface1";
|
||||||
|
color_red = selectColor "red";
|
||||||
|
color_green = selectColor "green";
|
||||||
|
color_yellow = selectColor "yellow";
|
||||||
|
color_blue = selectColor "blue";
|
||||||
|
color_magenta = selectColor "pink";
|
||||||
|
color_cyan = selectColor "teal";
|
||||||
|
color_white = selectColor "subtext1";
|
||||||
|
layout = pkgs.writeText "layout.kdl" ''
|
||||||
|
layout {
|
||||||
|
default_tab_template {
|
||||||
|
pane size=1 borderless=true {
|
||||||
|
plugin location="file:${zjstatus}" {
|
||||||
|
color_fg "${color_fg}"
|
||||||
|
color_bg "${color_bg}"
|
||||||
|
color_black "${color_black}"
|
||||||
|
color_red "${color_red}"
|
||||||
|
color_green "${color_green}"
|
||||||
|
color_yellow "${color_yellow}"
|
||||||
|
color_blue "${color_blue}"
|
||||||
|
color_magenta "${color_magenta}"
|
||||||
|
color_cyan "${color_cyan}"
|
||||||
|
color_white "${color_white}"
|
||||||
|
|
||||||
|
format_left "{mode}#[bg=$bg] {tabs}"
|
||||||
|
// format_center "#[bg=$bg,fg=$fg] Zellij: #[bg=$bg,fg=$fg]{session}"
|
||||||
|
// format_right "{datetime}"
|
||||||
|
format_right "#[bg=$bg,fg=$fg] Zellij: #[bg=$bg,fg=$fg]{session} "
|
||||||
|
format_space "#[bg=$bg]"
|
||||||
|
format_hide_on_overlength "true"
|
||||||
|
format_precedence "crl"
|
||||||
|
|
||||||
|
border_enabled "false"
|
||||||
|
border_char "─"
|
||||||
|
border_format "#[fg=#6C7086]{char}"
|
||||||
|
border_position "top"
|
||||||
|
|
||||||
|
hide_frame_for_single_pane "true"
|
||||||
|
|
||||||
|
mode_normal "#[bg=$green,fg=$bg,bold] NORMAL #[bg=$bg,fg=$green]"
|
||||||
|
mode_locked "#[bg=$red,fg=$bg,bold] LOCKED #[bg=$bg,fg=$red]"
|
||||||
|
mode_resize "#[bg=$blue,fg=$bg,bold] RESIZE #[bg=$bg,fg=$blue]"
|
||||||
|
mode_pane "#[bg=$blue,fg=$bg,bold] PANE #[bg=$bg,fg=$blue]"
|
||||||
|
mode_tab "#[bg=$yellow,fg=$bg,bold] TAB #[bg=$bg,fg=$yellow]"
|
||||||
|
mode_scroll "#[bg=$blue,fg=$bg,bold] SCROLL #[bg=$bg,fg=$blue]"
|
||||||
|
mode_enter_search "#[bg=$yellow,fg=$bg,bold] ENT-SEARCH #[bg=$bg,fg=$yellow]"
|
||||||
|
mode_search "#[bg=$yellow,fg=$bg,bold] SEARCHARCH #[bg=$bg,fg=$yellow]"
|
||||||
|
mode_rename_tab "#[bg=$yellow,fg=$bg,bold] RENAME-TAB #[bg=$bg,fg=$yellow]"
|
||||||
|
mode_rename_pane "#[bg=$blue,fg=$bg,bold] RENAME-PANE #[bg=$bg,fg=$blue]"
|
||||||
|
mode_session "#[bg=$blue,fg=$bg,bold] SESSION #[bg=$bg,fg=$blue]"
|
||||||
|
mode_move "#[bg=$blue,fg=$bg,bold] MOVE #[bg=$bg,fg=$blue]"
|
||||||
|
mode_prompt "#[bg=$blue,fg=$bg,bold] PROMPT #[bg=$bg,fg=$blue]"
|
||||||
|
mode_tmux "#[bg=$magenta,fg=$bg,bold] TMUX #[bg=$bg,fg=$magenta]"
|
||||||
|
|
||||||
|
// formatting for inactive tabs
|
||||||
|
tab_normal "#[bg=$bg,fg=$cyan] #[bg=$cyan,fg=$bg,bold] {index} {floating_indicator}#[bg=$bg,fg=$bg,bold]"
|
||||||
|
tab_normal_fullscreen "#[bg=$bg,fg=$cyan] #[bg=$cyan,fg=$bg,bold] {index} {fullscreen_indicator}#[bg=$bg,fg=$bg,bold]"
|
||||||
|
tab_normal_sync "#[bg=$bg,fg=$cyan] #[bg=$cyan,fg=$bg,bold] {index} {sync_indicator}#[bg=$bg,fg=$bg,bold]"
|
||||||
|
|
||||||
|
// formatting for the current active tab
|
||||||
|
tab_active "#[bg=$bg,fg=$yellow] #[bg=$yellow,fg=$bg,bold] {index} {floating_indicator}#[bg=$bg,fg=$bg,bold]"
|
||||||
|
tab_active_fullscreen "#[bg=$bg,fg=$yellow] #[bg=$yellow,fg=$bg,bold] {index} {fullscreen_indicator}#[bg=$bg,fg=$bg,bold]"
|
||||||
|
tab_active_sync "#[bg=$bg,fg=$yellow] #[bg=$yellow,fg=$bg,bold] {index} {sync_indicator}#[bg=$bg,fg=$bg,bold]"
|
||||||
|
|
||||||
|
// separator between the tabs
|
||||||
|
tab_separator "#[bg=$bg] "
|
||||||
|
|
||||||
|
// indicators
|
||||||
|
tab_sync_indicator " "
|
||||||
|
tab_fullscreen_indicator " "
|
||||||
|
tab_floating_indicator " "
|
||||||
|
|
||||||
|
datetime "#[fg=$fg] {format} "
|
||||||
|
datetime_format "%Y-%m-%d %H:%M"
|
||||||
|
datetime_timezone "Europe/Rome"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
children
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.zellij = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
default_layout = "${layout}";
|
||||||
|
pane_frames = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
42
hmModules/zk/default.nix
Normal file
42
hmModules/zk/default.nix
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{
|
||||||
|
programs.bat.enable = true;
|
||||||
|
programs.fzf.enable = true;
|
||||||
|
programs.zk = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
notebook.dir = "~/notebook";
|
||||||
|
note = {
|
||||||
|
language = "en";
|
||||||
|
default-title = "Untitled";
|
||||||
|
filename = "{{id}}";
|
||||||
|
extension = "md";
|
||||||
|
template = "default.md";
|
||||||
|
};
|
||||||
|
group.journal = {
|
||||||
|
paths = [ "journal" ];
|
||||||
|
note = {
|
||||||
|
filename = "{{format-date now}}";
|
||||||
|
template = "journal.md";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
format.markdown = {
|
||||||
|
hashtags = false;
|
||||||
|
colon-tags = true;
|
||||||
|
multiword-tags = false;
|
||||||
|
};
|
||||||
|
tool = {
|
||||||
|
pager = "less -FIRX";
|
||||||
|
fzf-preview = "bat --color always {-1}";
|
||||||
|
};
|
||||||
|
lsp.diagnostics = {
|
||||||
|
wiki-title = "hint";
|
||||||
|
dead-link = "error";
|
||||||
|
};
|
||||||
|
lsp.completion = {
|
||||||
|
note-label = "{{title-or-path}}";
|
||||||
|
note-filter-text = "{{title}} {{path}}";
|
||||||
|
note-detail = "{{filename-stem}}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
26
hmModules/zmkbatx/default.nix
Normal file
26
hmModules/zmkbatx/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.zmkBATx ];
|
||||||
|
|
||||||
|
systemd.user.services.zmkBATx = {
|
||||||
|
Install.WantedBy = [
|
||||||
|
"waybar.service"
|
||||||
|
];
|
||||||
|
|
||||||
|
Unit = {
|
||||||
|
Description = "zmkBATx";
|
||||||
|
};
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
ExecStart = ''
|
||||||
|
${pkgs.runtimeShell} -l -c "${lib.getExe' pkgs.busybox "sleep"} 5 && ${lib.getExe pkgs.zmkBATx}"
|
||||||
|
'';
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 3;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
4
hmModules/zoom/default.nix
Normal file
4
hmModules/zoom/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.zoom-us ];
|
||||||
|
}
|
4
hmModules/zulip/default.nix
Normal file
4
hmModules/zulip/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.zulip ];
|
||||||
|
}
|
|
@ -1,26 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
# $ nix-env -qaP | grep wget
|
|
||||||
environment.systemPackages =
|
|
||||||
[ pkgs.vim
|
|
||||||
];
|
|
||||||
|
|
||||||
# # Auto upgrade nix package and the daemon service.
|
|
||||||
# services.nix-daemon.enable = true;
|
|
||||||
# # nix.package = pkgs.nix;
|
|
||||||
|
|
||||||
# # Necessary for using flakes on this system.
|
|
||||||
# nix.settings.experimental-features = "nix-command flakes";
|
|
||||||
|
|
||||||
# # Create /etc/zshrc that loads the nix-darwin environment.
|
|
||||||
# programs.zsh.enable = true; # default shell on catalina
|
|
||||||
# # programs.fish.enable = true;
|
|
||||||
|
|
||||||
# # # Set Git commit hash for darwin-version.
|
|
||||||
# # system.configurationRevision = self.rev or self.dirtyRev or null;
|
|
||||||
|
|
||||||
# # Used for backwards compatibility, please read the changelog before changing.
|
|
||||||
# # $ darwin-rebuild changelog
|
|
||||||
# system.stateVersion = 4;
|
|
||||||
|
|
||||||
# # The platform the configuration will be used on.
|
|
||||||
}
|
|
|
@ -1,6 +1,9 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
environment.systemPackages = [
|
{
|
||||||
pkgs.vim
|
environment.systemPackages = with pkgs; [
|
||||||
|
helix
|
||||||
|
vim
|
||||||
|
git
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.settings.experimental-features = "nix-command flakes";
|
nix.settings.experimental-features = "nix-command flakes";
|
||||||
|
@ -9,5 +12,5 @@
|
||||||
|
|
||||||
services.nix-daemon.enable = true;
|
services.nix-daemon.enable = true;
|
||||||
|
|
||||||
# nixpkgs.localSystem = "x86_64-darwin";
|
system.stateVersion = 5;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
{
|
{
|
||||||
fleetModules,
|
fleetModules,
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
|
@ -7,15 +7,22 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "usb_storage" "usbhid" "sd_mod"];
|
boot.initrd.availableKernelModules = [
|
||||||
boot.initrd.kernelModules = [];
|
"ahci"
|
||||||
boot.kernelModules = ["kvm-intel"];
|
"xhci_pci"
|
||||||
boot.extraModulePackages = [];
|
"usb_storage"
|
||||||
|
"usbhid"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
@ -31,7 +38,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{device = "/dev/disk/by-label/swap";}
|
{ device = "/dev/disk/by-label/swap"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
|
|
@ -1,76 +1,42 @@
|
||||||
{
|
{
|
||||||
self,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
imports = [./module.nix];
|
{
|
||||||
|
imports = [ ./module.nix ];
|
||||||
|
|
||||||
fleet = {
|
fleet = {
|
||||||
darwinHosts.archer = {
|
darwinHosts.archer = { };
|
||||||
};
|
|
||||||
|
nixOnDroidHosts.janeway = { };
|
||||||
|
|
||||||
hosts = {
|
hosts = {
|
||||||
# thinkpad = {
|
deltaflyer = {
|
||||||
# extraModules = with inputs; [
|
nixpkgs =
|
||||||
# nixosHardware.nixosModules.lenovo-thinkpad-x1-7th-gen
|
let
|
||||||
# buildbot-nix.nixosModules.buildbot-master
|
# keep in sync with https://github.com/mobile-nixos/mobile-nixos/blob/development/npins/sources.json
|
||||||
# buildbot-nix.nixosModules.buildbot-worker
|
rev = "d3c42f187194c26d9f0309a8ecc469d6c878ce33";
|
||||||
# ];
|
in
|
||||||
# extraHmModules = with inputs; [
|
builtins.getFlake "github:NixOS/nixpkgs/${rev}";
|
||||||
# ccrEmacs.hmModules.default
|
extraHmModules = [
|
||||||
# {
|
inputs.catppuccin.homeModules.catppuccin
|
||||||
# # TODO: remove after https://github.com/nix-community/home-manager/pull/3811
|
];
|
||||||
# imports = let
|
vpn = {
|
||||||
# hmModules = "${inputs.homeManagerGitWorkspace}/modules";
|
ip = "10.100.0.5";
|
||||||
# in [
|
publicKey = "6bzmBx2b5yzMdW0aK0KapoBesNcxTv5+qdo+pGmG+jc=";
|
||||||
# "${hmModules}/services/git-workspace.nix"
|
};
|
||||||
# ];
|
# homeManager = builtins.getFlake "github:nix-community/home-manager/670d9ecc3e46a6e3265c203c2d136031a3d3548e";
|
||||||
# }
|
extraModules = [
|
||||||
# ];
|
(import "${inputs.mobile-nixos}/lib/configuration.nix" { device = "oneplus-fajita"; })
|
||||||
# overlays = [inputs.nil.overlays.default];
|
inputs.catppuccin.nixosModules.catppuccin
|
||||||
# secrets = {
|
inputs.lix-module.nixosModules.default
|
||||||
# "thinkpad-wireguard-private-key" = {};
|
];
|
||||||
# "cachix-personal-token".owner = "ccr";
|
secrets = {
|
||||||
# "autistici-password".owner = "ccr";
|
"deltaflyer-wireguard-private-key" = { };
|
||||||
# "git-workspace-tokens".owner = "ccr";
|
"chatgpt-token".owner = "ccr";
|
||||||
# "chatgpt-token".owner = "ccr";
|
};
|
||||||
# };
|
};
|
||||||
# };
|
|
||||||
# rock5b = {
|
|
||||||
# system = "aarch64-linux";
|
|
||||||
# extraModules = with inputs; [
|
|
||||||
# disko.nixosModules.disko
|
|
||||||
# rock5b.nixosModules.default
|
|
||||||
# ];
|
|
||||||
# secrets = {
|
|
||||||
# "rock5b-wireguard-private-key" = {};
|
|
||||||
# "hercules-ci-join-token".owner = "hercules-ci-agent";
|
|
||||||
# "hercules-ci-binary-caches".owner = "hercules-ci-agent";
|
|
||||||
# "cachix-personal-token".owner = "ccr";
|
|
||||||
# "home-planimetry".owner = "hass";
|
|
||||||
# "cloudflare-dyndns-api-token" = {};
|
|
||||||
# # "nextcloud-admin-pass".owner = "nextcloud";
|
|
||||||
# # "aws-credentials" = {};
|
|
||||||
# };
|
|
||||||
# colmena.deployment.buildOnTarget = true;
|
|
||||||
# };
|
|
||||||
# pbp = {
|
|
||||||
# system = "aarch64-linux";
|
|
||||||
# extraModules = with inputs; [
|
|
||||||
# nixosHardware.nixosModules.pine64-pinebook-pro
|
|
||||||
# disko.nixosModules.disko
|
|
||||||
# ];
|
|
||||||
# extraHmModules = [
|
|
||||||
# inputs.ccrEmacs.hmModules.default
|
|
||||||
# ];
|
|
||||||
# secrets = {
|
|
||||||
# "pbp-wireguard-private-key" = {};
|
|
||||||
# "cachix-personal-token".owner = "ccr";
|
|
||||||
# "chatgpt-token".owner = "ccr";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
kirk = {
|
kirk = {
|
||||||
vpn = {
|
vpn = {
|
||||||
ip = "10.100.0.3";
|
ip = "10.100.0.3";
|
||||||
|
@ -79,19 +45,20 @@
|
||||||
extraModules = [
|
extraModules = [
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
inputs.nixosHardware.nixosModules.lenovo-thinkpad-x1-7th-gen
|
inputs.nixosHardware.nixosModules.lenovo-thinkpad-x1-7th-gen
|
||||||
|
inputs.lix-module.nixosModules.default
|
||||||
|
inputs.catppuccin.nixosModules.catppuccin
|
||||||
];
|
];
|
||||||
extraHmModules = [
|
extraHmModules = [
|
||||||
inputs.ccrEmacs.hmModules.default
|
|
||||||
"${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix"
|
"${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix"
|
||||||
"${inputs.homeManagerSwayNC}/modules/services/swaync.nix"
|
inputs.catppuccin.homeModules.catppuccin
|
||||||
];
|
];
|
||||||
secrets = {
|
secrets = {
|
||||||
"kirk-wireguard-private-key" = {};
|
"kirk-wireguard-private-key" = { };
|
||||||
"chatgpt-token".owner = "ccr";
|
"chatgpt-token".owner = "ccr";
|
||||||
"cachix-personal-token".owner = "ccr";
|
"cachix-personal-token".owner = "ccr";
|
||||||
"git-workspace-tokens".owner = "ccr";
|
"git-workspace-tokens".owner = "ccr";
|
||||||
"autistici-password".owner = "ccr";
|
"autistici-password".owner = "ccr";
|
||||||
"restic-hetzner-password" = {};
|
"restic-hetzner-password" = { };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -102,25 +69,22 @@
|
||||||
};
|
};
|
||||||
extraModules = [
|
extraModules = [
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
inputs.nixThePlanet.nixosModules.macos-ventura
|
inputs.lix-module.nixosModules.default
|
||||||
# inputs.hercules-ci-agent.nixosModules.agent-service
|
inputs.lanzaboote.nixosModules.lanzaboote
|
||||||
|
inputs.catppuccin.nixosModules.catppuccin
|
||||||
];
|
];
|
||||||
extraHmModules = [
|
extraHmModules = [
|
||||||
inputs.ccrEmacs.hmModules.default
|
|
||||||
"${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix"
|
"${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix"
|
||||||
"${inputs.homeManagerSwayNC}/modules/services/swaync.nix"
|
inputs.vscode-server.nixosModules.home
|
||||||
|
inputs.catppuccin.homeModules.catppuccin
|
||||||
];
|
];
|
||||||
secrets = {
|
secrets = {
|
||||||
"picard-wireguard-private-key" = {};
|
"picard-wireguard-private-key" = { };
|
||||||
"chatgpt-token".owner = "ccr";
|
"chatgpt-token".owner = "ccr";
|
||||||
"cachix-personal-token".owner = "ccr";
|
"cachix-personal-token".owner = "ccr";
|
||||||
"hercules-ci-join-token".owner = "hercules-ci-agent";
|
|
||||||
"hercules-ci-binary-caches".owner = "hercules-ci-agent";
|
|
||||||
"hercules-ci-secrets-json".owner = "hercules-ci-agent";
|
|
||||||
"git-workspace-tokens".owner = "ccr";
|
"git-workspace-tokens".owner = "ccr";
|
||||||
"autistici-password".owner = "ccr";
|
"autistici-password".owner = "ccr";
|
||||||
"restic-hetzner-password" = {};
|
"restic-hetzner-password" = { };
|
||||||
"aws-credentials".owner = "hercules-ci-agent";
|
|
||||||
"forgejo-runners-token".owner = "nixuser";
|
"forgejo-runners-token".owner = "nixuser";
|
||||||
"forgejo-nix-access-tokens".owner = "nixuser";
|
"forgejo-nix-access-tokens".owner = "nixuser";
|
||||||
};
|
};
|
||||||
|
@ -128,50 +92,85 @@
|
||||||
|
|
||||||
sisko = {
|
sisko = {
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
nixpkgs = inputs.nixpkgsUnstableForSisko; # using more recent `nixpkgsUnstable` it fails to restart
|
nixpkgs = inputs.nixpkgsSisko;
|
||||||
|
enableHomeManager = false;
|
||||||
vpn = {
|
vpn = {
|
||||||
ip = "10.100.0.1";
|
ip = "10.100.0.1";
|
||||||
publicKey = "bc5giljukT1+ChbbyTLdOfejfR3c8RZ4XoXmQM54nTY=";
|
publicKey = "bc5giljukT1+ChbbyTLdOfejfR3c8RZ4XoXmQM54nTY=";
|
||||||
};
|
};
|
||||||
extraModules = with inputs; [
|
extraModules = with inputs; [
|
||||||
disko.nixosModules.disko
|
disko.nixosModules.disko
|
||||||
# inputs.hercules-ci-agent.nixosModules.agent-service;
|
impermanence.nixosModules.impermanence
|
||||||
# rock5b.nixosModules.default
|
lix-module.nixosModules.default
|
||||||
];
|
];
|
||||||
secrets = {
|
secrets = {
|
||||||
"sisko-wireguard-private-key" = {};
|
"sisko-wireguard-private-key" = { };
|
||||||
"hercules-ci-join-token".owner = "hercules-ci-agent";
|
|
||||||
"hercules-ci-binary-caches".owner = "hercules-ci-agent";
|
|
||||||
"hercules-ci-secrets-json".owner = "hercules-ci-agent";
|
|
||||||
"cachix-personal-token".owner = "ccr";
|
|
||||||
"home-planimetry".owner = "hass";
|
"home-planimetry".owner = "hass";
|
||||||
"cloudflare-dyndns-api-token" = {};
|
"home-assistant-token".owner = "prometheus";
|
||||||
"restic-hetzner-password" = {};
|
"grafana-password".owner = "grafana";
|
||||||
"minio-credentials".owner = "minio";
|
"cloudflare-dyndns-api-token" = { };
|
||||||
"aws-credentials".owner = "hercules-ci-agent";
|
"restic-hetzner-password" = { };
|
||||||
"hass-ssh-key".owner = "hass";
|
"hass-ssh-key".owner = "hass";
|
||||||
|
"sisko-attic-environment-file".owner = "atticd";
|
||||||
|
"autistici-password" = {
|
||||||
|
# FIXME terrible, should create a third ad-hoc group
|
||||||
|
owner = "grafana";
|
||||||
|
group = "forgejo";
|
||||||
|
};
|
||||||
"matrix-registration-shared-secret".owner = "matrix-synapse";
|
"matrix-registration-shared-secret".owner = "matrix-synapse";
|
||||||
"matrix-sliding-sync-secret".owner = "matrix-synapse";
|
|
||||||
"autistici-password".owner = "forgejo";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pike = {
|
||||||
|
vpn = {
|
||||||
|
ip = "10.100.0.8";
|
||||||
|
publicKey = "16ctjunXCXDPLSUhocstJ9z9l45/YuJFxlLkpoxChjI=";
|
||||||
|
};
|
||||||
|
extraModules = [
|
||||||
|
inputs.lix-module.nixosModules.default
|
||||||
|
inputs.catppuccin.nixosModules.catppuccin
|
||||||
|
];
|
||||||
|
extraHmModules = [
|
||||||
|
"${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix"
|
||||||
|
inputs.vscode-server.nixosModules.home
|
||||||
|
inputs.catppuccin.homeModules.catppuccin
|
||||||
|
];
|
||||||
|
secrets = {
|
||||||
|
"pike-wireguard-private-key" = { };
|
||||||
|
"chatgpt-token".owner = "ccr";
|
||||||
|
"cachix-personal-token".owner = "ccr";
|
||||||
|
"git-workspace-tokens".owner = "ccr";
|
||||||
|
"autistici-password".owner = "ccr";
|
||||||
|
"restic-hetzner-password" = { };
|
||||||
|
"forgejo-runners-token".owner = "nixuser";
|
||||||
|
"forgejo-nix-access-tokens".owner = "nixuser";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
tpol = {
|
||||||
|
extraModules = with inputs; [
|
||||||
|
lix-module.nixosModules.default
|
||||||
|
];
|
||||||
|
secrets = {
|
||||||
|
"tpol-wireguard-private-key" = { };
|
||||||
|
};
|
||||||
|
vpn = {
|
||||||
|
ip = "10.100.0.7";
|
||||||
|
publicKey = "b/Pi7koTFo5CMAAzcL2ulvQ/0dUjKzbmXpvh4Lb/Bgo=";
|
||||||
|
};
|
||||||
|
extraHmModulesUser = "mara";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
vpnExtra = {
|
vpnExtra = {
|
||||||
oneplus6t = {
|
oneplus8t = {
|
||||||
ip = "10.100.0.4";
|
ip = "10.100.0.4";
|
||||||
publicKey = "O6/tKaA8Hs7OEqi15hV4RwviR6vyCTMYv6ZlhsI+tnI=";
|
publicKey = "9ccx4C4xvPC6lPgTZAHDSfK4FS2BP2i4D57u9IZjw18=";
|
||||||
|
};
|
||||||
|
macos-ventura = {
|
||||||
|
ip = "10.100.0.6";
|
||||||
|
publicKey = "/Eee1V0PsjZSzj7un1NxHKtFR+TpUIgJ7VAdIAzmvzQ=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.nixosConfigurations =
|
|
||||||
lib.mapAttrs
|
|
||||||
config.fleet._mkNixosConfiguration
|
|
||||||
config.fleet.hosts;
|
|
||||||
|
|
||||||
flake.darwinConfigurations =
|
|
||||||
lib.mapAttrs
|
|
||||||
config.fleet._mkDarwinConfiguration
|
|
||||||
config.fleet.darwinHosts;
|
|
||||||
}
|
}
|
||||||
|
|
166
hosts/deltaflyer/default.nix
Normal file
166
hosts/deltaflyer/default.nix
Normal file
|
@ -0,0 +1,166 @@
|
||||||
|
{
|
||||||
|
fleetModules,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
fleetModules [
|
||||||
|
"common"
|
||||||
|
"ssh"
|
||||||
|
"ccr"
|
||||||
|
"nix"
|
||||||
|
"bluetooth"
|
||||||
|
"dbus"
|
||||||
|
"networkmanager"
|
||||||
|
"pam"
|
||||||
|
"fonts"
|
||||||
|
"waydroid"
|
||||||
|
"wireguard-client"
|
||||||
|
]
|
||||||
|
++ [
|
||||||
|
# ./mobile-nixos-branding.nix
|
||||||
|
./plasma-mobile.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# options.home-manager.services.kanshi.attrTag = null;
|
||||||
|
|
||||||
|
config = lib.mkMerge [
|
||||||
|
# INSECURE STUFF FIRST
|
||||||
|
# Users and hardcoded passwords.
|
||||||
|
{
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(prev: final: {
|
||||||
|
gcc7 = final.gcc;
|
||||||
|
gcc8 = final.gcc;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
users.users.root.password = "nixos";
|
||||||
|
# users.users.ccr.password = "1234";
|
||||||
|
|
||||||
|
# Automatically login as defaultUserName.
|
||||||
|
# services.xserver.displayManager.autoLogin = {
|
||||||
|
# user = "ccr";
|
||||||
|
# };
|
||||||
|
}
|
||||||
|
|
||||||
|
# Networking, modem and misc.
|
||||||
|
{
|
||||||
|
# Ensures any rndis config from stage-1 is not clobbered by NetworkManager
|
||||||
|
networking.networkmanager.unmanaged = [
|
||||||
|
"rndis0"
|
||||||
|
"usb0"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Setup USB gadget networking in initrd...
|
||||||
|
mobile.boot.stage-1.networking.enable = lib.mkDefault true;
|
||||||
|
}
|
||||||
|
|
||||||
|
# SSH
|
||||||
|
{
|
||||||
|
# Start SSH by default...
|
||||||
|
# Not a good idea given the fact this config is insecure (well-known password).
|
||||||
|
services.openssh = {
|
||||||
|
settings.PermitRootLogin = lib.mkForce "yes";
|
||||||
|
};
|
||||||
|
mobile.adbd.enable = true;
|
||||||
|
ccr = {
|
||||||
|
enable = true;
|
||||||
|
autologin = true;
|
||||||
|
modules = [
|
||||||
|
"git"
|
||||||
|
"shell"
|
||||||
|
"helix"
|
||||||
|
# "hyprland"
|
||||||
|
"niri"
|
||||||
|
"emacs"
|
||||||
|
"firefox"
|
||||||
|
"mpv"
|
||||||
|
"xdg"
|
||||||
|
"catppuccin"
|
||||||
|
];
|
||||||
|
extraGroups = [
|
||||||
|
"dialout"
|
||||||
|
"feedbackd"
|
||||||
|
"networkmanager"
|
||||||
|
"video"
|
||||||
|
"wheel"
|
||||||
|
];
|
||||||
|
backupPaths = [ ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
system.stateVersion = "24.11";
|
||||||
|
nixpkgs.config.allowUnfreePredicate =
|
||||||
|
pkg:
|
||||||
|
builtins.elem (lib.getName pkg) [
|
||||||
|
"oneplus-sdm845-firmware-zstd"
|
||||||
|
"oneplus-sdm845-firmware-xz"
|
||||||
|
"oneplus-sdm845-firmware"
|
||||||
|
];
|
||||||
|
nixpkgs.crossSystem = lib.mkForce null;
|
||||||
|
nixpkgs.localSystem.system = "aarch64-linux"; # we use an aarch64 nix remote builder or binfmt
|
||||||
|
# mobile.boot.stage-1.kernel.useStrictKernelConfig = lib.mkDefault true;
|
||||||
|
|
||||||
|
ccr.extraModules = [
|
||||||
|
{
|
||||||
|
programs.fish.loginShellInit = ''
|
||||||
|
pgrep niri >/dev/null || exec niri-session
|
||||||
|
'';
|
||||||
|
# wayland.windowManager.hyprland.extraConfig = lib.mkAfter ''
|
||||||
|
# monitor = DSI-1, 1080x2340, 0x0, 2, transform, 1
|
||||||
|
# input {
|
||||||
|
# touchdevice {
|
||||||
|
# transform = 1
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
# bind = $mod, r, exec, rotate-screen hor
|
||||||
|
# bind = $mod SHIFT, r, exec, rotate-screen ver
|
||||||
|
# '';
|
||||||
|
home.packages =
|
||||||
|
let
|
||||||
|
rotateScript = pkgs.writeShellApplication {
|
||||||
|
name = "rotate-screen";
|
||||||
|
runtimeInputs = [ pkgs.hyprland ];
|
||||||
|
text = ''
|
||||||
|
if [[ "$1" == "hor" ]]; then
|
||||||
|
hyprctl keyword monitor DSI-1,1080x2340,0x0,2,transform,1
|
||||||
|
hyprctl keyword input:touchdevice:transform 1
|
||||||
|
elif [[ "$1" == "ver" ]]; then
|
||||||
|
hyprctl keyword monitor DSI-1,1080x2340,0x0,2,transform,0
|
||||||
|
hyprctl keyword input:touchdevice:transform 0
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
[ rotateScript ];
|
||||||
|
services.swayidle.enable = lib.mkForce false;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
# (pkgs.writeShellApplication {
|
||||||
|
# name = "start-win98";
|
||||||
|
# text = fleetFlake.inputs.nixThePlanet.apps.aarch64-linux.win98.program;
|
||||||
|
# })
|
||||||
|
pkgs.libreoffice
|
||||||
|
pkgs.superTuxKart
|
||||||
|
pkgs.chromium
|
||||||
|
pkgs.dolphin-emu
|
||||||
|
];
|
||||||
|
|
||||||
|
zramSwap.enable = lib.mkDefault true;
|
||||||
|
|
||||||
|
boot.binfmt.emulatedSystems = lib.mkForce [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
"i386-linux"
|
||||||
|
"i486-linux"
|
||||||
|
"i586-linux"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
55
hosts/deltaflyer/plasma-mobile.nix
Normal file
55
hosts/deltaflyer/plasma-mobile.nix
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
#
|
||||||
|
# Minimum config used to enable Plasma Mobile.
|
||||||
|
#
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
mobile.beautification = {
|
||||||
|
silentBoot = lib.mkDefault false;
|
||||||
|
splash = lib.mkDefault false;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# # desktopManager.plasma5.mobile.enable = true;
|
||||||
|
|
||||||
|
displayManager.autoLogin = {
|
||||||
|
enable = true;
|
||||||
|
user = "ccr";
|
||||||
|
};
|
||||||
|
|
||||||
|
displayManager.session = [
|
||||||
|
{
|
||||||
|
manage = "desktop";
|
||||||
|
name = "niri";
|
||||||
|
start = ''
|
||||||
|
${pkgs.niri}/bin/niri-session &
|
||||||
|
waitPID=$!
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
displayManager.defaultSession = "niri";
|
||||||
|
|
||||||
|
displayManager.lightdm = {
|
||||||
|
enable = true;
|
||||||
|
# Workaround for autologin only working at first launch.
|
||||||
|
# A logout or session crashing will show the login screen otherwise.
|
||||||
|
extraSeatDefaults = ''
|
||||||
|
session-cleanup-script=${pkgs.procps}/bin/pkill -P1 -fx ${pkgs.lightdm}/sbin/lightdm
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
libinput.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
hardware.pulseaudio.enable = lib.mkDefault false; # mkDefault to help out users wanting pipewire
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
networking.wireless.enable = false;
|
||||||
|
powerManagement.enable = true;
|
||||||
|
}
|
|
@ -4,7 +4,8 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
@ -42,17 +43,29 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
fonts = with pkgs; [powerline-fonts dejavu_fonts fira-code fira-code-symbols emacs-all-the-icons-fonts nerdfonts joypixels etBook];
|
fonts = with pkgs; [
|
||||||
|
powerline-fonts
|
||||||
|
dejavu_fonts
|
||||||
|
fira-code
|
||||||
|
fira-code-symbols
|
||||||
|
emacs-all-the-icons-fonts
|
||||||
|
nerdfonts
|
||||||
|
joypixels
|
||||||
|
etBook
|
||||||
|
];
|
||||||
fontconfig.defaultFonts = {
|
fontconfig.defaultFonts = {
|
||||||
monospace = ["DejaVu Sans Mono for Powerline"];
|
monospace = [ "DejaVu Sans Mono for Powerline" ];
|
||||||
sansSerif = ["DejaVu Sans"];
|
sansSerif = [ "DejaVu Sans" ];
|
||||||
serif = ["DejaVu Serif"];
|
serif = [ "DejaVu Serif" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config.joypixels.acceptLicense = true;
|
nixpkgs.config.joypixels.acceptLicense = true;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [waypipe firefox];
|
environment.systemPackages = with pkgs; [
|
||||||
|
waypipe
|
||||||
|
firefox
|
||||||
|
];
|
||||||
|
|
||||||
programs.mosh.enable = true;
|
programs.mosh.enable = true;
|
||||||
|
|
||||||
|
@ -61,7 +74,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.loader.grub = {
|
boot.loader.grub = {
|
||||||
devices = ["/dev/sda"];
|
devices = [ "/dev/sda" ];
|
||||||
efiSupport = true;
|
efiSupport = true;
|
||||||
efiInstallAsRemovable = true;
|
efiInstallAsRemovable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
# Example to create a bios compatible gpt partition
|
# Example to create a bios compatible gpt partition
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
disks ? ["/dev/sda"],
|
disks ? [ "/dev/sda" ],
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
disk = lib.genAttrs disks (dev: {
|
disk = lib.genAttrs disks (dev: {
|
||||||
device = dev;
|
device = dev;
|
||||||
type = "disk";
|
type = "disk";
|
||||||
|
@ -17,7 +18,7 @@
|
||||||
start = "0";
|
start = "0";
|
||||||
end = "1M";
|
end = "1M";
|
||||||
part-type = "primary";
|
part-type = "primary";
|
||||||
flags = ["bios_grub"];
|
flags = [ "bios_grub" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
type = "partition";
|
type = "partition";
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
@ -21,7 +22,7 @@
|
||||||
"shell"
|
"shell"
|
||||||
"git"
|
"git"
|
||||||
];
|
];
|
||||||
packages = [];
|
packages = [ ];
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel"
|
||||||
"fuse"
|
"fuse"
|
||||||
|
@ -31,7 +32,7 @@
|
||||||
|
|
||||||
systemd.services.standby-sdb = {
|
systemd.services.standby-sdb = {
|
||||||
description = "Set spindown time (sleep) for /dev/sdb ";
|
description = "Set spindown time (sleep) for /dev/sdb ";
|
||||||
wantedBy = ["multi-user.target"];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = "${pkgs.hdparm}/bin/hdparm -B 127 -S 241 /dev/sdb";
|
ExecStart = "${pkgs.hdparm}/bin/hdparm -B 127 -S 241 /dev/sdb";
|
||||||
|
@ -40,7 +41,7 @@
|
||||||
|
|
||||||
systemd.services.standby-sdc = {
|
systemd.services.standby-sdc = {
|
||||||
description = "Set spindown time (sleep) for /dev/sdc ";
|
description = "Set spindown time (sleep) for /dev/sdc ";
|
||||||
wantedBy = ["multi-user.target"];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = "${pkgs.hdparm}/bin/hdparm -B 127 -S 241 /dev/sdc";
|
ExecStart = "${pkgs.hdparm}/bin/hdparm -B 127 -S 241 /dev/sdc";
|
||||||
|
@ -54,7 +55,7 @@
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
group = "amule";
|
group = "amule";
|
||||||
};
|
};
|
||||||
users.groups."amule" = {};
|
users.groups."amule" = { };
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
samba-wsdd = {
|
samba-wsdd = {
|
||||||
|
@ -261,33 +262,35 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.ydns = let
|
systemd.services.ydns =
|
||||||
ydnsUpdater = pkgs.writeScriptBin "ydnsUpdater" ''
|
let
|
||||||
USER="andrea.ciceri@autistici.org"
|
ydnsUpdater = pkgs.writeScriptBin "ydnsUpdater" ''
|
||||||
PASSWORD=$(cat /home/ccr/.ydns-password)
|
USER="andrea.ciceri@autistici.org"
|
||||||
DOMAIN="ccr.ydns.eu"
|
PASSWORD=$(cat /home/ccr/.ydns-password)
|
||||||
for SUBDOMAIN in "books" "music" "sync" "torrent" "gate"
|
DOMAIN="ccr.ydns.eu"
|
||||||
do
|
for SUBDOMAIN in "books" "music" "sync" "torrent" "gate"
|
||||||
HOST="$SUBDOMAIN.$DOMAIN"
|
do
|
||||||
${pkgs.curl}/bin/curl --basic -u "$USER:$PASSWORD" --silent https://ydns.io/api/v1/update/?host=$HOST
|
HOST="$SUBDOMAIN.$DOMAIN"
|
||||||
done
|
${pkgs.curl}/bin/curl --basic -u "$USER:$PASSWORD" --silent https://ydns.io/api/v1/update/?host=$HOST
|
||||||
${pkgs.curl}/bin/curl --basic -u "$USER:$PASSWORD" --silent https://ydns.io/api/v1/update/?host=$DOMAIN
|
done
|
||||||
'';
|
${pkgs.curl}/bin/curl --basic -u "$USER:$PASSWORD" --silent https://ydns.io/api/v1/update/?host=$DOMAIN
|
||||||
in {
|
'';
|
||||||
description = "YDNS IP updater";
|
in
|
||||||
wantedBy = ["multi-user.target"];
|
{
|
||||||
after = ["network.target"];
|
description = "YDNS IP updater";
|
||||||
serviceConfig = {
|
wantedBy = [ "multi-user.target" ];
|
||||||
User = "root";
|
after = [ "network.target" ];
|
||||||
Type = "oneshot";
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.bash}/bin/bash ${ydnsUpdater}/bin/ydnsUpdater";
|
User = "root";
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${pkgs.bash}/bin/bash ${ydnsUpdater}/bin/ydnsUpdater";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services.wstunnel = {
|
systemd.services.wstunnel = {
|
||||||
description = "WSTunnel";
|
description = "WSTunnel";
|
||||||
wantedBy = ["multi-user.target"];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = ["network.target"];
|
after = [ "network.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "root";
|
User = "root";
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
@ -297,8 +300,8 @@
|
||||||
|
|
||||||
# TODO It seems to not work
|
# TODO It seems to not work
|
||||||
systemd.timers.ydnsUpdater = {
|
systemd.timers.ydnsUpdater = {
|
||||||
wantedBy = ["timers.target"];
|
wantedBy = [ "timers.target" ];
|
||||||
partOf = ["ydnsUpdater.service"];
|
partOf = [ "ydnsUpdater.service" ];
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
OnCalendar = "*-*-* *:00:00"; # hourly
|
OnCalendar = "*-*-* *:00:00"; # hourly
|
||||||
Unit = "ydnsUpdater.service";
|
Unit = "ydnsUpdater.service";
|
||||||
|
@ -330,13 +333,13 @@
|
||||||
|
|
||||||
networking.nat.enable = true;
|
networking.nat.enable = true;
|
||||||
networking.nat.externalInterface = "enp0s10";
|
networking.nat.externalInterface = "enp0s10";
|
||||||
networking.nat.internalInterfaces = ["wg0"];
|
networking.nat.internalInterfaces = [ "wg0" ];
|
||||||
|
|
||||||
networking.wireguard.interfaces = {
|
networking.wireguard.interfaces = {
|
||||||
# "wg0" is the network interface name. You can name the interface arbitrarily.
|
# "wg0" is the network interface name. You can name the interface arbitrarily.
|
||||||
wg0 = {
|
wg0 = {
|
||||||
# Determines the IP address and subnet of the server's end of the tunnel interface.
|
# Determines the IP address and subnet of the server's end of the tunnel interface.
|
||||||
ips = ["10.100.0.1/24"];
|
ips = [ "10.100.0.1/24" ];
|
||||||
|
|
||||||
# The port that WireGuard listens to. Must be accessible by the client.
|
# The port that WireGuard listens to. Must be accessible by the client.
|
||||||
listenPort = 51820;
|
listenPort = 51820;
|
||||||
|
@ -366,7 +369,7 @@
|
||||||
# Public key of the peer (not a file path).
|
# Public key of the peer (not a file path).
|
||||||
publicKey = "fCwjd75CefC9A7WqO7s3xfOk2nRcoTKfnAzDT6Lc5AA=";
|
publicKey = "fCwjd75CefC9A7WqO7s3xfOk2nRcoTKfnAzDT6Lc5AA=";
|
||||||
# List of IPs assigned to this peer within the tunnel subnet. Used to configure routing.
|
# List of IPs assigned to this peer within the tunnel subnet. Used to configure routing.
|
||||||
allowedIPs = ["10.100.0.2/32"];
|
allowedIPs = [ "10.100.0.2/32" ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,14 @@
|
||||||
{lib, ...}: {
|
{ lib, ... }:
|
||||||
|
{
|
||||||
boot = {
|
boot = {
|
||||||
initrd.availableKernelModules = ["ohci_pci" "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
|
initrd.availableKernelModules = [
|
||||||
|
"ohci_pci"
|
||||||
|
"ehci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usb_storage"
|
||||||
|
"usbhid"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
loader.grub = lib.mkForce {
|
loader.grub = lib.mkForce {
|
||||||
enable = true;
|
enable = true;
|
||||||
version = 2;
|
version = 2;
|
||||||
|
@ -23,5 +31,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [{device = "/dev/disk/by-label/swap";}];
|
swapDevices = [ { device = "/dev/disk/by-label/swap"; } ];
|
||||||
}
|
}
|
||||||
|
|
82
hosts/janeway/default.nix
Normal file
82
hosts/janeway/default.nix
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
fleetFlake,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
sshdTmpDirectory = "${config.user.home}/sshd-tmp";
|
||||||
|
sshdDirectory = "${config.user.home}/sshd";
|
||||||
|
port = 8022;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# Backup etc files instead of failing to activate generation if a file already exists in /etc
|
||||||
|
environment.etcBackupExtension = ".bak";
|
||||||
|
|
||||||
|
# Read the changelog before changing this value
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
|
||||||
|
# Set up nix for flakes
|
||||||
|
nix.extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Set your time zone
|
||||||
|
time.timeZone = "Europe/Rome";
|
||||||
|
|
||||||
|
home-manager.config =
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
home.stateVersion = "24.05";
|
||||||
|
_module.args = {
|
||||||
|
hostname = "janeway";
|
||||||
|
age.secrets = { };
|
||||||
|
};
|
||||||
|
imports = [ ../../hmModules/shell ];
|
||||||
|
};
|
||||||
|
|
||||||
|
build.activation.sshd =
|
||||||
|
let
|
||||||
|
keys = (builtins.import ../../lib).keys;
|
||||||
|
inherit (keys) hosts users;
|
||||||
|
in
|
||||||
|
''
|
||||||
|
$DRY_RUN_CMD mkdir $VERBOSE_ARG --parents "${config.user.home}/.ssh"
|
||||||
|
$DRY_RUN_CMD echo ${hosts.picard} > "${config.user.home}/.ssh/authorized_keys"
|
||||||
|
$DRY_RUN_CMD echo ${hosts.sisko} >> "${config.user.home}/.ssh/authorized_keys"
|
||||||
|
$DRY_RUN_CMD echo ${hosts.kirk} >> "${config.user.home}/.ssh/authorized_keys"
|
||||||
|
$DRY_RUN_CMD echo ${users.ccr-ssh} >> "${config.user.home}/.ssh/authorized_keys"
|
||||||
|
|
||||||
|
if [[ ! -d "${sshdDirectory}" ]]; then
|
||||||
|
$DRY_RUN_CMD rm $VERBOSE_ARG --recursive --force "${sshdTmpDirectory}"
|
||||||
|
$DRY_RUN_CMD mkdir $VERBOSE_ARG --parents "${sshdTmpDirectory}"
|
||||||
|
|
||||||
|
$VERBOSE_ECHO "Generating host keys..."
|
||||||
|
$DRY_RUN_CMD ${pkgs.openssh}/bin/ssh-keygen -t rsa -b 4096 -f "${sshdTmpDirectory}/ssh_host_rsa_key" -N ""
|
||||||
|
|
||||||
|
$VERBOSE_ECHO "Writing sshd_config..."
|
||||||
|
$DRY_RUN_CMD echo -e "HostKey ${sshdDirectory}/ssh_host_rsa_key\nPort ${toString port}\n" > "${sshdTmpDirectory}/sshd_config"
|
||||||
|
|
||||||
|
$DRY_RUN_CMD mv $VERBOSE_ARG "${sshdTmpDirectory}" "${sshdDirectory}"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
environment.packages =
|
||||||
|
let
|
||||||
|
inherit (fleetFlake.inputs.ccrEmacs.packages.aarch64-linux) ccrEmacs;
|
||||||
|
in
|
||||||
|
[
|
||||||
|
pkgs.bottom
|
||||||
|
pkgs.helix
|
||||||
|
pkgs.stress
|
||||||
|
pkgs.openssh
|
||||||
|
pkgs.git
|
||||||
|
pkgs.btop
|
||||||
|
ccrEmacs
|
||||||
|
(pkgs.writeScriptBin "sshd-start" ''
|
||||||
|
#!${pkgs.runtimeShell}
|
||||||
|
echo "Starting sshd in non-daemonized way on port ${toString port}"
|
||||||
|
${pkgs.openssh}/bin/sshd -f "${sshdDirectory}/sshd_config" -D
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
}
|
|
@ -3,7 +3,8 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports =
|
imports =
|
||||||
fleetModules [
|
fleetModules [
|
||||||
"common"
|
"common"
|
||||||
|
@ -26,34 +27,37 @@
|
||||||
"printing"
|
"printing"
|
||||||
"pam"
|
"pam"
|
||||||
"wireguard-client"
|
"wireguard-client"
|
||||||
"restic"
|
|
||||||
"greetd"
|
"greetd"
|
||||||
"syncthing"
|
"syncthing"
|
||||||
"mount-rock5b"
|
"mount-sisko"
|
||||||
|
"adb"
|
||||||
|
"binfmt"
|
||||||
|
"prometheus-exporters"
|
||||||
|
"alloy"
|
||||||
|
"syncthing"
|
||||||
|
"zerotier"
|
||||||
]
|
]
|
||||||
++ [
|
++ [ ./disko.nix ];
|
||||||
./disko.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
ccr = {
|
ccr = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autologin = true;
|
autologin = false;
|
||||||
modules = [
|
modules = [
|
||||||
"git"
|
"git"
|
||||||
"git-workspace"
|
"git-workspace"
|
||||||
"helix"
|
"helix"
|
||||||
"shell"
|
"shell"
|
||||||
|
"zellij"
|
||||||
"element"
|
"element"
|
||||||
"emacs"
|
|
||||||
"firefox"
|
"firefox"
|
||||||
"gpg"
|
"gpg"
|
||||||
"mpv"
|
"mpv"
|
||||||
"password-store"
|
"password-store"
|
||||||
"slack"
|
"slack"
|
||||||
"hyprland"
|
"hyprland"
|
||||||
|
"niri"
|
||||||
"udiskie"
|
"udiskie"
|
||||||
"xdg"
|
"xdg"
|
||||||
"spotify"
|
|
||||||
"lutris"
|
"lutris"
|
||||||
"wine"
|
"wine"
|
||||||
"cura"
|
"cura"
|
||||||
|
@ -61,23 +65,33 @@
|
||||||
"email"
|
"email"
|
||||||
"digikam"
|
"digikam"
|
||||||
"discord"
|
"discord"
|
||||||
|
"remmina"
|
||||||
|
"calibre"
|
||||||
|
"zathura"
|
||||||
|
"imv"
|
||||||
|
"catppuccin"
|
||||||
|
"libreoffice"
|
||||||
|
"emacs"
|
||||||
|
"chirp"
|
||||||
|
"sdrangel"
|
||||||
|
"zmkbatx"
|
||||||
|
"moonlight"
|
||||||
|
"gimp"
|
||||||
];
|
];
|
||||||
extraGroups = [];
|
extraGroups = [ "plugdev" ];
|
||||||
backupPaths = [];
|
backupPaths = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.kernelModules = ["i915"];
|
boot.initrd.kernelModules = [ "i915" ];
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules = [
|
||||||
"nvme"
|
"nvme"
|
||||||
"xhci_pci"
|
"xhci_pci"
|
||||||
"usb_storage"
|
"usb_storage"
|
||||||
"sd_mod"
|
"sd_mod"
|
||||||
];
|
];
|
||||||
boot.kernelModules = [
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
"kvm-intel"
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_7;
|
boot.kernelPackages = pkgs.linuxPackages;
|
||||||
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.loader.systemd-boot = {
|
boot.loader.systemd-boot = {
|
||||||
|
@ -90,10 +104,15 @@
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "schedutil";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "schedutil";
|
||||||
hardware.enableRedistributableFirmware = lib.mkDefault true;
|
hardware.enableRedistributableFirmware = lib.mkDefault true;
|
||||||
|
hardware.rtl-sdr.enable = true;
|
||||||
|
|
||||||
hardware.opengl = {
|
hardware.graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
driSupport = true;
|
enable32Bit = true;
|
||||||
driSupport32Bit = true;
|
};
|
||||||
|
|
||||||
|
zramSwap = {
|
||||||
|
enable = true;
|
||||||
|
algorithm = "zstd";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
482
hosts/module.nix
482
hosts/module.nix
|
@ -8,66 +8,208 @@
|
||||||
config,
|
config,
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
} @ flakePartsArgs: let
|
}:
|
||||||
|
let
|
||||||
cfg = config.fleet;
|
cfg = config.fleet;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.fleet = {
|
options.fleet = {
|
||||||
darwinHosts = lib.mkOption {
|
darwinHosts = lib.mkOption {
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({name, ...}: {
|
type = lib.types.attrsOf (
|
||||||
options = {
|
lib.types.submodule (
|
||||||
name = lib.mkOption {
|
{ name, ... }:
|
||||||
description = "Host name";
|
{
|
||||||
type = lib.types.strMatching "^$|^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$";
|
options = {
|
||||||
default = name;
|
name = lib.mkOption {
|
||||||
};
|
description = "Host name";
|
||||||
system = lib.mkOption {
|
type = lib.types.strMatching "^$|^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$";
|
||||||
description = "NixOS architecture (a.k.a. system)";
|
default = name;
|
||||||
type = lib.types.str;
|
};
|
||||||
default = "x86_64-darwin";
|
system = lib.mkOption {
|
||||||
};
|
description = "NixOS architecture (a.k.a. system)";
|
||||||
nixpkgs = lib.mkOption {
|
type = lib.types.str;
|
||||||
description = "Used nixpkgs";
|
default = "x86_64-darwin";
|
||||||
type = lib.types.anything;
|
};
|
||||||
default = inputs.nixpkgsUnstable;
|
nixpkgs = lib.mkOption {
|
||||||
};
|
description = "Used nixpkgs";
|
||||||
extraModules = lib.mkOption {
|
type = lib.types.anything;
|
||||||
description = "Extra NixOS modules";
|
default = inputs.nixpkgs;
|
||||||
type = lib.types.listOf lib.types.deferredModule;
|
};
|
||||||
default = [];
|
extraModules = lib.mkOption {
|
||||||
};
|
description = "Extra NixOS modules";
|
||||||
overlays = lib.mkOption {
|
type = lib.types.listOf lib.types.deferredModule;
|
||||||
description = "Enabled Nixpkgs overlays";
|
default = [ ];
|
||||||
type = lib.types.listOf (lib.mkOptionType {
|
};
|
||||||
name = "nixpkgs-overlay";
|
overlays = lib.mkOption {
|
||||||
description = "nixpkgs overlay";
|
description = "Enabled Nixpkgs overlays";
|
||||||
check = lib.isFunction;
|
type = lib.types.listOf (
|
||||||
merge = lib.mergeOneOption;
|
lib.mkOptionType {
|
||||||
});
|
name = "nixpkgs-overlay";
|
||||||
default = [];
|
description = "nixpkgs overlay";
|
||||||
};
|
check = lib.isFunction;
|
||||||
};
|
merge = lib.mergeOneOption;
|
||||||
}));
|
}
|
||||||
|
);
|
||||||
|
default = [ ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
nixOnDroidHosts = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf (
|
||||||
|
lib.types.submodule (
|
||||||
|
{ name, ... }:
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
name = lib.mkOption {
|
||||||
|
description = "Host name";
|
||||||
|
type = lib.types.strMatching "^$|^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$";
|
||||||
|
default = name;
|
||||||
|
};
|
||||||
|
system = lib.mkOption {
|
||||||
|
description = "NixOS architecture (a.k.a. system)";
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "aarch64-linux";
|
||||||
|
};
|
||||||
|
nixpkgs = lib.mkOption {
|
||||||
|
description = "Used nixpkgs";
|
||||||
|
type = lib.types.anything;
|
||||||
|
default = inputs.nixpkgs;
|
||||||
|
};
|
||||||
|
extraModules = lib.mkOption {
|
||||||
|
description = "Extra NixOS modules";
|
||||||
|
type = lib.types.listOf lib.types.deferredModule;
|
||||||
|
default = [ ];
|
||||||
|
};
|
||||||
|
overlays = lib.mkOption {
|
||||||
|
description = "Enabled Nixpkgs overlays";
|
||||||
|
type = lib.types.listOf (
|
||||||
|
lib.mkOptionType {
|
||||||
|
name = "nixpkgs-overlay";
|
||||||
|
description = "nixpkgs overlay";
|
||||||
|
check = lib.isFunction;
|
||||||
|
merge = lib.mergeOneOption;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
default = [ ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
hosts = lib.mkOption {
|
hosts = lib.mkOption {
|
||||||
description = "Host configuration";
|
description = "Host configuration";
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({name, ...}: {
|
type = lib.types.attrsOf (
|
||||||
options = {
|
lib.types.submodule (
|
||||||
name = lib.mkOption {
|
{ name, ... }:
|
||||||
description = "Host name";
|
{
|
||||||
type = lib.types.strMatching "^$|^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$";
|
options = {
|
||||||
default = name;
|
name = lib.mkOption {
|
||||||
};
|
description = "Host name";
|
||||||
system = lib.mkOption {
|
type = lib.types.strMatching "^$|^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$";
|
||||||
description = "NixOS architecture (a.k.a. system)";
|
default = name;
|
||||||
type = lib.types.str;
|
};
|
||||||
default = "x86_64-linux";
|
system = lib.mkOption {
|
||||||
};
|
description = "NixOS architecture (a.k.a. system)";
|
||||||
nixpkgs = lib.mkOption {
|
type = lib.types.str;
|
||||||
description = "Used nixpkgs";
|
default = "x86_64-linux";
|
||||||
type = lib.types.anything;
|
};
|
||||||
default = inputs.nixpkgsUnstable;
|
nixpkgs = lib.mkOption {
|
||||||
};
|
description = "Used nixpkgs";
|
||||||
vpn = {
|
type = lib.types.anything;
|
||||||
|
default = inputs.nixpkgs;
|
||||||
|
};
|
||||||
|
homeManager = lib.mkOption {
|
||||||
|
description = "Used home-manager";
|
||||||
|
type = lib.types.anything;
|
||||||
|
default = inputs.homeManager;
|
||||||
|
};
|
||||||
|
vpn = {
|
||||||
|
ip = lib.mkOption {
|
||||||
|
description = "Wireguard VPN ip";
|
||||||
|
type = lib.types.str;
|
||||||
|
};
|
||||||
|
publicKey = lib.mkOption {
|
||||||
|
description = "Wireguard public key";
|
||||||
|
type = lib.types.str;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
secrets = lib.mkOption {
|
||||||
|
description = "List of secrets names in the `secrets` folder";
|
||||||
|
type = lib.types.attrsOf (
|
||||||
|
lib.types.submodule (
|
||||||
|
{ name, ... }:
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
owner = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "root";
|
||||||
|
};
|
||||||
|
group = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "root";
|
||||||
|
};
|
||||||
|
file = lib.mkOption {
|
||||||
|
type = lib.types.path;
|
||||||
|
default = "${self.outPath}/secrets/${name}.age";
|
||||||
|
};
|
||||||
|
mode = lib.mkOption {
|
||||||
|
# TODO improve type
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "0440";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
default = { };
|
||||||
|
};
|
||||||
|
enableHomeManager = lib.mkOption {
|
||||||
|
description = "Enable home-manager module";
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
overlays = lib.mkOption {
|
||||||
|
description = "Enabled Nixpkgs overlays";
|
||||||
|
type = lib.types.listOf (
|
||||||
|
lib.mkOptionType {
|
||||||
|
name = "nixpkgs-overlay";
|
||||||
|
description = "nixpkgs overlay";
|
||||||
|
check = lib.isFunction;
|
||||||
|
merge = lib.mergeOneOption;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
default = [ ];
|
||||||
|
};
|
||||||
|
extraModules = lib.mkOption {
|
||||||
|
description = "Extra NixOS modules";
|
||||||
|
type = lib.types.listOf lib.types.deferredModule;
|
||||||
|
default = [ ];
|
||||||
|
};
|
||||||
|
extraHmModules = lib.mkOption {
|
||||||
|
description = "Extra home-manager modules";
|
||||||
|
type = lib.types.listOf lib.types.deferredModule;
|
||||||
|
default = [ ];
|
||||||
|
};
|
||||||
|
extraHmModulesUser = lib.mkOption {
|
||||||
|
description = "User for which to import extraHmModulesUser";
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "ccr";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config.overlays = with inputs; cfg.overlays;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
default = { };
|
||||||
|
};
|
||||||
|
vpnExtra = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf (
|
||||||
|
lib.types.submodule {
|
||||||
|
options = {
|
||||||
ip = lib.mkOption {
|
ip = lib.mkOption {
|
||||||
description = "Wireguard VPN ip";
|
description = "Wireguard VPN ip";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
@ -77,149 +219,85 @@ in {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
secrets = lib.mkOption {
|
}
|
||||||
description = "List of secrets names in the `secrets` folder";
|
);
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({name, ...}: {
|
default = { };
|
||||||
options = {
|
|
||||||
owner = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "root";
|
|
||||||
};
|
|
||||||
group = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "root";
|
|
||||||
};
|
|
||||||
file = lib.mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
default = "${self.outPath}/secrets/${name}.age";
|
|
||||||
};
|
|
||||||
mode = lib.mkOption {
|
|
||||||
# TODO improve type
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "0440";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
default = {};
|
|
||||||
};
|
|
||||||
enableHomeManager = lib.mkOption {
|
|
||||||
description = "Enable home-manager module";
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
};
|
|
||||||
overlays = lib.mkOption {
|
|
||||||
description = "Enabled Nixpkgs overlays";
|
|
||||||
type = lib.types.listOf (lib.mkOptionType {
|
|
||||||
name = "nixpkgs-overlay";
|
|
||||||
description = "nixpkgs overlay";
|
|
||||||
check = lib.isFunction;
|
|
||||||
merge = lib.mergeOneOption;
|
|
||||||
});
|
|
||||||
default = [];
|
|
||||||
};
|
|
||||||
extraModules = lib.mkOption {
|
|
||||||
description = "Extra NixOS modules";
|
|
||||||
type = lib.types.listOf lib.types.deferredModule;
|
|
||||||
default = [];
|
|
||||||
};
|
|
||||||
extraHmModules = lib.mkOption {
|
|
||||||
description = "Extra home-manager modules";
|
|
||||||
type = lib.types.listOf lib.types.deferredModule;
|
|
||||||
default = [];
|
|
||||||
};
|
|
||||||
extraHmModulesUser = lib.mkOption {
|
|
||||||
description = "User for which to import extraHmModulesUser";
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "ccr";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config.overlays = with inputs;
|
|
||||||
[
|
|
||||||
nur.overlay
|
|
||||||
]
|
|
||||||
++ cfg.overlays;
|
|
||||||
}));
|
|
||||||
default = {};
|
|
||||||
};
|
|
||||||
vpnExtra = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule {
|
|
||||||
options = {
|
|
||||||
ip = lib.mkOption {
|
|
||||||
description = "Wireguard VPN ip";
|
|
||||||
type = lib.types.str;
|
|
||||||
};
|
|
||||||
publicKey = lib.mkOption {
|
|
||||||
description = "Wireguard public key";
|
|
||||||
type = lib.types.str;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
});
|
|
||||||
default = {};
|
|
||||||
};
|
};
|
||||||
_mkNixosConfiguration = lib.mkOption {
|
_mkNixosConfiguration = lib.mkOption {
|
||||||
description = "Function returning a proper NixOS configuration";
|
description = "Function returning a proper NixOS configuration";
|
||||||
type = lib.types.functionTo (lib.types.functionTo lib.types.attrs); # TODO improve this type
|
type = lib.types.functionTo (lib.types.functionTo lib.types.attrs); # TODO improve this type
|
||||||
internal = true;
|
internal = true;
|
||||||
default = hostname: config:
|
default =
|
||||||
|
hostname: config:
|
||||||
config.nixpkgs.lib.nixosSystem {
|
config.nixpkgs.lib.nixosSystem {
|
||||||
inherit (config) system;
|
inherit (config) system;
|
||||||
modules =
|
modules =
|
||||||
[
|
[
|
||||||
({lib, ...}: {
|
(
|
||||||
networking.hostName = lib.mkForce hostname;
|
{ lib, ... }:
|
||||||
nixpkgs.overlays = config.overlays;
|
{
|
||||||
})
|
networking.hostName = lib.mkForce hostname;
|
||||||
|
nixpkgs.overlays = config.overlays;
|
||||||
|
}
|
||||||
|
)
|
||||||
"${self.outPath}/hosts/${hostname}"
|
"${self.outPath}/hosts/${hostname}"
|
||||||
]
|
]
|
||||||
++ (lib.optionals (config.secrets != []) [
|
++ (lib.optionals (config.secrets != [ ]) [
|
||||||
inputs.agenix.nixosModules.default
|
inputs.agenix.nixosModules.default
|
||||||
({lib, ...}: let
|
(
|
||||||
allSecrets = lib.mapAttrs' (name: value: {
|
{ lib, ... }:
|
||||||
name = lib.removeSuffix ".age" name;
|
let
|
||||||
inherit value;
|
allSecrets = lib.mapAttrs' (name: value: {
|
||||||
}) (import "${self.outPath}/secrets/secrets.nix");
|
name = lib.removeSuffix ".age" name;
|
||||||
filteredSecrets =
|
inherit value;
|
||||||
lib.filterAttrs
|
}) (import "${self.outPath}/secrets/secrets.nix");
|
||||||
(name: _: builtins.hasAttr name config.secrets)
|
filteredSecrets = lib.filterAttrs (name: _: builtins.hasAttr name config.secrets) allSecrets;
|
||||||
allSecrets;
|
in
|
||||||
in {
|
{
|
||||||
age.secrets =
|
age.secrets = lib.mapAttrs' (name: _: {
|
||||||
lib.mapAttrs' (name: _: {
|
|
||||||
name = builtins.baseNameOf name;
|
name = builtins.baseNameOf name;
|
||||||
value = {
|
value = {
|
||||||
inherit (config.secrets.${name}) owner group file mode;
|
inherit (config.secrets.${name})
|
||||||
|
owner
|
||||||
|
group
|
||||||
|
file
|
||||||
|
mode
|
||||||
|
;
|
||||||
};
|
};
|
||||||
})
|
}) filteredSecrets;
|
||||||
filteredSecrets;
|
}
|
||||||
})
|
)
|
||||||
])
|
])
|
||||||
++ (lib.optionals config.enableHomeManager (let
|
++ (lib.optionals config.enableHomeManager (
|
||||||
user = config.extraHmModulesUser;
|
let
|
||||||
extraHmModules = config.extraHmModules;
|
user = config.extraHmModulesUser;
|
||||||
in [
|
extraHmModules = config.extraHmModules;
|
||||||
inputs.homeManager.nixosModule
|
in
|
||||||
({
|
[
|
||||||
config,
|
config.homeManager.nixosModules.home-manager
|
||||||
pkgs,
|
(
|
||||||
...
|
{
|
||||||
}: {
|
config,
|
||||||
home-manager.users."${user}" = {
|
...
|
||||||
imports = extraHmModules;
|
}:
|
||||||
_module.args = {
|
{
|
||||||
age = config.age or {};
|
home-manager.users."${user}" = {
|
||||||
fleetFlake = self;
|
imports = extraHmModules;
|
||||||
pkgsStable = inputs.nixpkgsStable.legacyPackages.${pkgs.system};
|
_module.args = {
|
||||||
};
|
age = config.age or { };
|
||||||
};
|
fleetFlake = self;
|
||||||
})
|
};
|
||||||
]))
|
};
|
||||||
|
}
|
||||||
|
)
|
||||||
|
]
|
||||||
|
))
|
||||||
++ config.extraModules;
|
++ config.extraModules;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
fleetModules = builtins.map (moduleName: "${self.outPath}/modules/${moduleName}");
|
fleetModules = builtins.map (moduleName: "${self.outPath}/modules/${moduleName}");
|
||||||
fleetHmModules = builtins.map (moduleName: "${self.outPath}/hmModules/${moduleName}");
|
fleetHmModules = builtins.map (moduleName: "${self.outPath}/hmModules/${moduleName}");
|
||||||
fleetFlake = self;
|
fleetFlake = self;
|
||||||
vpn = cfg.vpnExtra // (lib.mapAttrs (_: host: host.vpn) cfg.hosts);
|
vpn = cfg.vpnExtra // (lib.mapAttrs (_: host: host.vpn) cfg.hosts);
|
||||||
inherit (flakePartsArgs.config.allSystems.${config.system}.allModuleArgs.config._module.args) inputs';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -227,21 +305,55 @@ in {
|
||||||
description = "Function returning a proper Darwin configuration";
|
description = "Function returning a proper Darwin configuration";
|
||||||
type = lib.types.functionTo (lib.types.functionTo lib.types.attrs); # TODO improve this type
|
type = lib.types.functionTo (lib.types.functionTo lib.types.attrs); # TODO improve this type
|
||||||
internal = true;
|
internal = true;
|
||||||
default = hostname: config:
|
default =
|
||||||
|
hostname: config:
|
||||||
inputs.nixDarwin.lib.darwinSystem {
|
inputs.nixDarwin.lib.darwinSystem {
|
||||||
modules = [
|
modules = [
|
||||||
({
|
(
|
||||||
lib,
|
{
|
||||||
pkgs,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
networking.hostName = lib.mkForce hostname;
|
{
|
||||||
nixpkgs.overlays = config.overlays;
|
networking.hostName = lib.mkForce hostname;
|
||||||
nixpkgs.hostPlatform = config.system;
|
nixpkgs.overlays = config.overlays;
|
||||||
})
|
nixpkgs.hostPlatform = config.system;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
"${self.outPath}/hosts/${hostname}"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
_mkNixOnDroidConfiguration = lib.mkOption {
|
||||||
|
description = "Function returning a proper nix-on-droid configuration";
|
||||||
|
type = lib.types.functionTo (lib.types.functionTo lib.types.attrs); # TODO improve this type
|
||||||
|
internal = true;
|
||||||
|
default =
|
||||||
|
hostname: config:
|
||||||
|
inputs.nix-on-droid.lib.nixOnDroidConfiguration {
|
||||||
|
pkgs = inputs.nixpkgs.legacyPackages.aarch64-linux;
|
||||||
|
modules = [
|
||||||
|
(
|
||||||
|
{
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
nixpkgs.overlays = config.overlays;
|
||||||
|
_module.args.fleetFlake = self;
|
||||||
|
}
|
||||||
|
)
|
||||||
"${self.outPath}/hosts/${hostname}"
|
"${self.outPath}/hosts/${hostname}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
flake.nixosConfigurations = lib.mapAttrs config.fleet._mkNixosConfiguration config.fleet.hosts;
|
||||||
|
|
||||||
|
flake.darwinConfigurations = lib.mapAttrs config.fleet._mkDarwinConfiguration config.fleet.darwinHosts;
|
||||||
|
|
||||||
|
flake.nixOnDroidConfigurations = lib.mapAttrs config.fleet._mkNixOnDroidConfiguration config.fleet.nixOnDroidHosts;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue