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:
|
||||
- uses: actions/checkout@v4
|
||||
name: Checkout repository
|
||||
- name: Attic login
|
||||
run: attic login nixfleet http://sisko.wg.aciceri.dev:8081 ${{secrets.ATTIC_NIXFLEET_TOKEN}}
|
||||
- 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
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 15 * * *' # daily at 15:00
|
||||
- cron: "0 15 * * *" # daily at 15:00
|
||||
|
||||
jobs:
|
||||
lockfile:
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@ result
|
|||
.direnv
|
||||
.pre-commit-config.yaml
|
||||
*.qcow2
|
||||
result*
|
|
@ -3,31 +3,53 @@
|
|||
self,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
inputs.treefmt-nix.flakeModule
|
||||
inputs.pre-commit-hooks.flakeModule
|
||||
inputs.git-hooks-nix.flakeModule
|
||||
];
|
||||
|
||||
perSystem = _: {
|
||||
perSystem =
|
||||
{ config, ... }:
|
||||
{
|
||||
treefmt.config = {
|
||||
projectRootFile = ".git/config";
|
||||
programs.alejandra.enable = true;
|
||||
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 = {
|
||||
alejandra.enable = true;
|
||||
# deadnix.enable = true;
|
||||
# statix.enable = true;
|
||||
pre-commit.settings = {
|
||||
hooks.treefmt = {
|
||||
enable = true;
|
||||
package = config.treefmt.build.wrapper;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
flake.checks = let
|
||||
flake.checks =
|
||||
let
|
||||
build = _: nc: nc.config.system.build.toplevel;
|
||||
in {
|
||||
x86_64-linux = lib.mapAttrs build {
|
||||
inherit (self.nixosConfigurations) picard;
|
||||
};
|
||||
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
69
flake.nix
69
flake.nix
|
@ -3,61 +3,58 @@
|
|||
|
||||
inputs = {
|
||||
flakeParts.url = "github:hercules-ci/flake-parts";
|
||||
nixpkgsUnstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgsUnstableForSisko.url = "github:NixOS/nixpkgs/0e74ca98a74bc7270d28838369593635a5db3260";
|
||||
nixpkgsStable.url = "github:NixOS/nixpkgs/nixos-23.11";
|
||||
nixpkgsSisko.url = "github:NixOS/nixpkgs/b6eaf97c6960d97350c584de1b6dcff03c9daf42";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixosHardware.url = "github:NixOS/nixos-hardware";
|
||||
homeManager = {
|
||||
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
|
||||
homeManagerGitWorkspace = {
|
||||
url = "github:aciceri/home-manager/git-workspace";
|
||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
||||
};
|
||||
# TODO: remove after https://github.com/nix-community/home-manager/pull/4249
|
||||
homeManagerSwayNC = {
|
||||
url = "github:rhoriguchi/home-manager/swaync";
|
||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
pre-commit-hooks = {
|
||||
url = "github:cachix/pre-commit-hooks.nix";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgsUnstable";
|
||||
nixpkgs-stable.follows = "nixpkgsStable";
|
||||
git-hooks-nix = {
|
||||
url = "github:cachix/git-hooks.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
nur.url = "github:nix-community/NUR";
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
rock5b.url = "github:aciceri/rock5b-nixos";
|
||||
ccrEmacs.url = "git+https://git.aciceri.dev/aciceri/emacs.git";
|
||||
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";
|
||||
hercules-ci-agent.url = "github:hercules-ci/hercules-ci-agent";
|
||||
nix-fast-build = {
|
||||
url = "github:Mic92/nix-fast-build";
|
||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
||||
nix-on-droid.url = "github:nix-community/nix-on-droid";
|
||||
lix = {
|
||||
url = "git+https://git@git.lix.systems/lix-project/lix"; # FIXME update
|
||||
flake = false;
|
||||
};
|
||||
nixThePlanet = {
|
||||
url = "github:aciceri/NixThePlanet/nix-in-darwin";
|
||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
||||
lix-module = {
|
||||
url = "git+https://git.lix.systems/lix-project/nixos-module";
|
||||
inputs.lix.follows = "lix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixDarwin = {
|
||||
url = "github:LnL7/nix-darwin";
|
||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
||||
mobile-nixos = {
|
||||
url = "github:NixOS/mobile-nixos";
|
||||
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 =
|
||||
inputs@{ flakeParts, ... }:
|
||||
flakeParts.lib.mkFlake { inherit inputs; } {
|
||||
imports = [
|
||||
# TODO export modules as flake outputs
|
||||
|
@ -67,8 +64,10 @@
|
|||
./packages
|
||||
./shell
|
||||
./checks
|
||||
./ci
|
||||
];
|
||||
systems = ["x86_64-linux" "aarch64-linux"];
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.binance ];
|
||||
}
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
{
|
||||
programs.btop = {
|
||||
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 = {
|
||||
enable = true;
|
||||
package = pkgs.google-chrome;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.cura];
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.cura-appimage
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.digikam ];
|
||||
}
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.discord];
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
(pkgs.discord.override {
|
||||
withOpenASAR = true;
|
||||
withVencord = true;
|
||||
})
|
||||
];
|
||||
home.file.".config/discord/settings.json".text = builtins.toJSON {
|
||||
SKIP_HOST_UPDATE = true;
|
||||
};
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.dolphin-emu ];
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
# home.packages = [pkgs.schildichat-desktop];
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.element-desktop ];
|
||||
|
||||
systemd.user.services.element-desktop = {
|
||||
|
@ -11,8 +11,7 @@
|
|||
};
|
||||
|
||||
Service = {
|
||||
# ExecStart = "${pkgs.schildichat-desktop}/bin/schildichat-desktop"; # TODO I preferred SchildiChat but it was removed from nixpkgs becuase unsafe
|
||||
ExecStart = "${pkgs.element-desktop}/bin/element-desktop";
|
||||
ExecStart = lib.getExe pkgs.element-desktop;
|
||||
Restart = "on-failure";
|
||||
RestartSec = 3;
|
||||
};
|
||||
|
|
|
@ -1,11 +1,65 @@
|
|||
{
|
||||
lib,
|
||||
age,
|
||||
fleetFlake,
|
||||
pkgs,
|
||||
age,
|
||||
...
|
||||
}: {
|
||||
ccrEmacs.enable = true;
|
||||
home.sessionVariables.EDITOR = lib.mkForce "emacsclient";
|
||||
systemd.user.services.emacs.Service.EnvironmentFile = age.secrets.chatgpt-token.path;
|
||||
home.packages = lib.lists.optional pkgs.stdenv.isx86_64 pkgs.llm-workflow-engine;
|
||||
}:
|
||||
let
|
||||
emacs = fleetFlake.packages.${pkgs.system}.emacs;
|
||||
inherit (emacs.passthru) treesitGrammars;
|
||||
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,
|
||||
secrets,
|
||||
fleetFlake,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
programs.mbsync.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 = {
|
||||
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.autistici = {
|
||||
aerc.enable = true;
|
||||
address = "andrea.ciceri@autistici.org";
|
||||
gpg = {
|
||||
key = "7A66EEA1E6C598D07D361287A1FC89532D1C565";
|
||||
|
@ -24,6 +278,8 @@
|
|||
mbsync = {
|
||||
enable = true;
|
||||
create = "maildir";
|
||||
expunge = "both";
|
||||
remove = "both";
|
||||
};
|
||||
msmtp.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,
|
||||
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 = {
|
||||
enable = true;
|
||||
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
||||
extraPolicies = {
|
||||
ExtensionSettings = {};
|
||||
};
|
||||
nativeMessagingHosts = [pkgs.tridactyl-native pkgs.fx-cast-bridge];
|
||||
};
|
||||
profiles.${username} = {
|
||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
privacy-badger
|
||||
ublock-origin
|
||||
tridactyl
|
||||
nativeMessagingHosts = [
|
||||
pkgs.tridactyl-native
|
||||
pkgs.vdhcoapp
|
||||
];
|
||||
settings = {
|
||||
"browser.startup.homepage" = "https://google.it";
|
||||
"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;
|
||||
policies = {
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxStudies = true;
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
||||
Locked = true;
|
||||
Cryptomining = true;
|
||||
Fingerprinting = true;
|
||||
EmailTracking = true;
|
||||
};
|
||||
HardwareAcceleration = true;
|
||||
FirefoxHome = {
|
||||
TopSites = false;
|
||||
SponsoredTopSites = false;
|
||||
Highlights = false;
|
||||
Pocket = false;
|
||||
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")
|
||||
];
|
||||
};
|
||||
profiles.default = {
|
||||
search.force = true;
|
||||
search.default = "google";
|
||||
search.engines = {
|
||||
"Searx" = {
|
||||
urls = [
|
||||
|
@ -44,11 +82,18 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
extensions = [ ];
|
||||
userChrome = builtins.readFile ./userchrome.css;
|
||||
};
|
||||
};
|
||||
home.sessionVariables = {
|
||||
MOZ_ENABLE_WAYLAND = 1;
|
||||
XDG_CURRENT_DESKTOP = "sway";
|
||||
NIXOS_OZONE_WL = 1;
|
||||
|
||||
xdg.configFile."tridactyl/tridactylrc".text = ''
|
||||
set editorcmd emacsclient -c %f
|
||||
|
||||
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, ...}: {
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
lib.mkMerge [
|
||||
{
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
server.enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
term = "xterm-256color";
|
||||
term = "xterm-direct";
|
||||
login-shell = "yes";
|
||||
# Using dpi-aware = "yes" font size is too small on my external monitor
|
||||
# Scaling that output in sway is inefficient and make XWayland apps blurred
|
||||
dpi-aware = "no";
|
||||
font = let
|
||||
size = "12";
|
||||
horizontal-letter-offset = "1";
|
||||
pad = "1x1";
|
||||
font =
|
||||
let
|
||||
size = "13";
|
||||
in
|
||||
lib.mkForce (
|
||||
lib.concatStringsSep ", " [
|
||||
"Fira Code:size=${size}"
|
||||
"Iosevka Comfy:size=${size}"
|
||||
"Symbols Nerd Font:size=${size}"
|
||||
"JoyPixels:size=${size}"
|
||||
];
|
||||
]
|
||||
);
|
||||
};
|
||||
cursor = {
|
||||
blink = true;
|
||||
};
|
||||
tweak = {
|
||||
overflowing-glyphs = true;
|
||||
};
|
||||
|
||||
key-bindings = {
|
||||
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'';
|
||||
};
|
||||
|
||||
mouse = {
|
||||
hide-when-typing = "yes";
|
||||
};
|
||||
|
||||
colors = {
|
||||
background = "282C34";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
(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,
|
||||
username,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
services.git-workspace = {
|
||||
enable = true;
|
||||
frequency = "04:00:00";
|
||||
|
|
|
@ -2,13 +2,21 @@
|
|||
pkgs,
|
||||
username,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
config = {
|
||||
name = "Andrea Ciceri";
|
||||
email = "andrea.ciceri@autistici.org";
|
||||
};
|
||||
in {
|
||||
imports = [../gitui ../lazygit];
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../gitui
|
||||
../lazygit
|
||||
];
|
||||
|
||||
home.packages = [ pkgs.git-credential-manager ];
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
|
@ -19,11 +27,18 @@ in {
|
|||
rebase.autostash = true;
|
||||
github.user = "aciceri";
|
||||
|
||||
user.signingKey = "/home/${username}/.ssh/id_rsa";
|
||||
user.signingKey = "/home/${username}/.ssh/id_ed25519";
|
||||
gpg.format = "ssh";
|
||||
commit.gpgsign = true;
|
||||
|
||||
core.editor = "emacsclient";
|
||||
credential.helper = "libsecret";
|
||||
credential.credentialStore = "cache";
|
||||
|
||||
core = {
|
||||
fsmonitor = true;
|
||||
untrackedcache = true;
|
||||
};
|
||||
fetch.writeCommitGraph = true;
|
||||
};
|
||||
|
||||
userName = config.name;
|
||||
|
@ -32,7 +47,8 @@ in {
|
|||
extraConfig.url = {
|
||||
"ssh://git@github.com/".insteadOf = "https://github.com/";
|
||||
# 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";
|
||||
};
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
services.gnome-keyring = {
|
||||
enable = false; # Is this broken? https://github.com/nix-community/home-manager/issues/1454
|
||||
components = lib.mkForce [
|
||||
|
|
|
@ -1,20 +1,13 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
sshKeys = ["CE2FD0D9BECBD8876811714925066CC257413416"];
|
||||
extraConfig = let
|
||||
pinentryRofi = pkgs.writeShellApplication {
|
||||
name = "pinentry-rofi-with-env";
|
||||
runtimeInputs = with pkgs; [coreutils rofi];
|
||||
text = ''
|
||||
"${pkgs.pinentry-rofi}/bin/pinentry-rofi" "$@"
|
||||
'';
|
||||
pinentryPackage = pkgs.pinentry-rofi.override {
|
||||
rofi = pkgs.rofi-wayland;
|
||||
};
|
||||
in ''
|
||||
extraConfig = ''
|
||||
allow-emacs-pinentry
|
||||
allow-loopback-pinentry
|
||||
pinentry-program ${pinentryRofi}/bin/pinentry-rofi-with-env
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
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 = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = "dracula";
|
||||
editor = {
|
||||
indent-guides.render = true;
|
||||
cursor-shape = {
|
||||
|
@ -10,7 +18,36 @@
|
|||
normal = "block";
|
||||
select = "underline";
|
||||
};
|
||||
color-modes = true;
|
||||
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,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
screenshotScript = pkgs.writeShellScript "screenshot.sh" ''
|
||||
}:
|
||||
let
|
||||
screenshotScript = pkgs.writeShellScriptBin "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
|
||||
'';
|
||||
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 [[ $1 == "open" ]]; then
|
||||
${hyprland}/bin/hyprctl keyword monitor "eDP-1,1920x1080,3760x230,1"
|
||||
|
@ -20,19 +21,26 @@
|
|||
fi
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./hyprpaper.nix
|
||||
../waybar
|
||||
../swayidle
|
||||
# ../mako
|
||||
../swaync
|
||||
../gammastep
|
||||
# ../kitty
|
||||
../wezterm
|
||||
../swaync
|
||||
../foot
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [wl-clipboard waypipe];
|
||||
home.packages = with pkgs; [
|
||||
wl-clipboard
|
||||
waypipe
|
||||
switchMonitorScript
|
||||
screenshotScript
|
||||
hyprpaper
|
||||
fuzzel
|
||||
brightnessctl
|
||||
];
|
||||
|
||||
systemd.user.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
|
@ -47,162 +55,41 @@ in {
|
|||
|
||||
gtk = {
|
||||
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 = {
|
||||
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;
|
||||
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 = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
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 # 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
|
||||
}
|
||||
'';
|
||||
enable = false;
|
||||
plugins = with pkgs.hyprlandPlugins; [
|
||||
hy3
|
||||
hyprspace
|
||||
];
|
||||
# TODO migrate to structured options
|
||||
extraConfig = builtins.readFile ./hyprland.conf;
|
||||
};
|
||||
}
|
||||
|
|
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
|
||||
wallpaper = ./wallpaper.png;
|
||||
in {
|
||||
in
|
||||
{
|
||||
xdg.configFile."hypr/hyprpaper.conf".text = ''
|
||||
splash = false
|
||||
preload = ${wallpaper}
|
||||
wallpaper = eDP-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 ];
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ ... }:
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font = {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.lazygit = {
|
||||
enable = true;
|
||||
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 ];
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.monero-gui ];
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.moonlight-qt ];
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# TODO: use upstream ytmusic when updated: https://github.com/OzymandiasTheGreat/mopidy-ytmusic/issues/68
|
||||
{pkgs, ...}: let
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
ytmusicapi = pkgs.python310Packages.buildPythonPackage rec {
|
||||
pname = "ytmusicapi";
|
||||
version = "0.24.0";
|
||||
|
@ -42,10 +43,16 @@
|
|||
|
||||
doCheck = false;
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
services.mopidy = {
|
||||
enable = true;
|
||||
extensionPackages = [mopidy-ytmusic] ++ (with pkgs; [mopidy-mpd mopidy-mpris]);
|
||||
extensionPackages =
|
||||
[ mopidy-ytmusic ]
|
||||
++ (with pkgs; [
|
||||
mopidy-mpd
|
||||
mopidy-mpris
|
||||
]);
|
||||
settings = {
|
||||
mpd = {
|
||||
enabled = true;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.nheko ];
|
||||
|
||||
# systemd.user.services.nheko = {
|
||||
|
|
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,
|
||||
fleetFlake,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
programs.nix-index.enable = true;
|
||||
|
||||
systemd.user.services.nix-index-update = {
|
||||
Unit = {Description = "Update nix-index";};
|
||||
Unit = {
|
||||
Description = "Update nix-index";
|
||||
};
|
||||
|
||||
Service = {
|
||||
CPUSchedulingPolicy = "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 = {
|
||||
Unit = {Description = "Update nix-index";};
|
||||
Unit = {
|
||||
Description = "Update nix-index";
|
||||
};
|
||||
|
||||
Timer = {
|
||||
Unit = "nix-index-update.service";
|
||||
|
@ -26,6 +29,8 @@
|
|||
Persistent = true;
|
||||
};
|
||||
|
||||
Install = {WantedBy = ["timers.target"];};
|
||||
Install = {
|
||||
WantedBy = [ "timers.target" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.obs-studio = {
|
||||
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 ];
|
||||
}
|
||||
|
|
|
@ -1,13 +1,27 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
services.pantalaimon = {
|
||||
enable = true;
|
||||
package = pkgs.pantalaimon.overrideAttrs {
|
||||
pytestCheckPhase = "echo skip pytest";
|
||||
};
|
||||
settings = {
|
||||
Default = {
|
||||
LogLevel = "Debug";
|
||||
SSL = true;
|
||||
};
|
||||
local-matrix = {
|
||||
Homeserver = "https://nixos.dev";
|
||||
ListenAddress = "127.0.0.1";
|
||||
Homeserver = "https://matrix.aciceri.dev";
|
||||
# Homeserver = "https://matrix.nixos.dev/_matrix/client";
|
||||
# Homeserver = "https://matrix.nixos.dev";
|
||||
ListenAddress = "localhost";
|
||||
ListenPort = 8008;
|
||||
# SSL = false;
|
||||
UseKeyring = false;
|
||||
# IgnoreVerification = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.pantalaimon.Unit.Requires = [ "dbus.socket" ];
|
||||
}
|
||||
|
|
|
@ -2,7 +2,16 @@
|
|||
pkgs,
|
||||
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 = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
@ -10,4 +19,5 @@
|
|||
};
|
||||
package = pkgs.pass.withExtensions (e: [ e.pass-otp ]);
|
||||
};
|
||||
home.packages = [ fzfpass ];
|
||||
}
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.programs.qutebrowser) settings;
|
||||
websites = {
|
||||
searx = "https://searx.be";
|
||||
|
@ -16,7 +17,8 @@
|
|||
less-dark-white = "#cccccc";
|
||||
blue = "#0000ff";
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
programs.qutebrowser = {
|
||||
enable = true;
|
||||
searchEngines = with websites; {
|
||||
|
@ -34,7 +36,8 @@ in {
|
|||
",l" = ''config-cycle spellcheck.languages [" it-IT "] [" en-US "]'';
|
||||
};
|
||||
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 = {
|
||||
|
@ -108,15 +111,13 @@ in {
|
|||
};
|
||||
home.packages = with pkgs; [
|
||||
fuzzel
|
||||
(
|
||||
makeDesktopItem {
|
||||
(makeDesktopItem {
|
||||
name = "qutebrowser";
|
||||
exec = "qutebrowser %u";
|
||||
comment = "Qutebrowser";
|
||||
desktopName = "qutebrowser";
|
||||
type = "Application";
|
||||
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 ];
|
||||
}
|
||||
|
|
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,
|
||||
pkgs,
|
||||
age,
|
||||
hostname,
|
||||
config,
|
||||
username,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
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 = {
|
||||
enable = true;
|
||||
config = {
|
||||
|
@ -15,103 +32,47 @@
|
|||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
# programs.exa = {
|
||||
# enable = false;
|
||||
# enableAliases = true;
|
||||
# };
|
||||
|
||||
# programs.fzf.enable = false;
|
||||
programs.lsd = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.vim.enable = true;
|
||||
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
controlMaster = "auto";
|
||||
controlPersist = "10m";
|
||||
};
|
||||
|
||||
# programs.starship = {
|
||||
# enable = false;
|
||||
# settings = {
|
||||
# character = {
|
||||
# success_symbol = "[👌](bold green)";
|
||||
# error_symbol = "[🤌](bold red)";
|
||||
# };
|
||||
# nix_shell = {
|
||||
# symbol = "❄ ";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
|
||||
# Playing with it sometimes
|
||||
# programs.nushell = {
|
||||
# enable = false;
|
||||
# configFile.text = ''
|
||||
# let carapace_completer = {|spans|
|
||||
# carapace $spans.0 nushell $spans | from json
|
||||
# }
|
||||
# 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=";
|
||||
systemd.user.services.atuind = {
|
||||
Unit.Description = "Atuin daemon";
|
||||
Install = {
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStartPre = "${lib.getExe' pkgs.toybox "rm"} -f ${config.programs.atuin.settings.daemon.socket_path}";
|
||||
ExecStart = "${lib.getExe pkgs.atuin} daemon";
|
||||
};
|
||||
in "${theme}/themes/Dracula\ Official.theme";
|
||||
};
|
||||
|
||||
programs.fish = {
|
||||
programs.atuin = {
|
||||
enable = false; # FIXME broken on bash: https://github.com/nix-community/home-manager/issues/5958
|
||||
settings = {
|
||||
daemon = {
|
||||
enabled = true;
|
||||
socket_path = "/home/${username}/.local/share/atuin/atuin.sock"; # FIXME using ~ or $HOME doesn't work: https://github.com/atuinsh/atuin/issues/2289
|
||||
};
|
||||
auto_sync = true;
|
||||
sync_frequency = "5m";
|
||||
sync_address = "http://sisko.wg.aciceri.dev:8889";
|
||||
search_mode = "fuzzy";
|
||||
style = "compact";
|
||||
enter_accept = "true";
|
||||
};
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
shellInit = ''
|
||||
fish_config theme choose "dracula"
|
||||
initExtra = lib.optionalString (builtins.hasAttr "cachix-personal-token" age.secrets) ''
|
||||
export CACHIX_AUTH_TOKEN=$(cat ${age.secrets.cachix-personal-token.path})
|
||||
'';
|
||||
shellAliases = {
|
||||
|
@ -119,95 +80,65 @@
|
|||
};
|
||||
};
|
||||
|
||||
# programs.zsh = {
|
||||
# enable = false; # Playing xswith fish at the moment
|
||||
# enableAutosuggestions = true;
|
||||
# enableCompletion = true;
|
||||
# enableSyntaxHighlighting = true;
|
||||
# enableVteIntegration = true;
|
||||
# autocd = true;
|
||||
# oh-my-zsh = {
|
||||
programs.zoxide.enable = true;
|
||||
programs.thefuck.enable = true;
|
||||
programs.oh-my-posh = {
|
||||
enable = true;
|
||||
useTheme = "catppuccin_mocha";
|
||||
};
|
||||
|
||||
programs.zellij.enableBashIntegration = false;
|
||||
|
||||
# programs.fish = {
|
||||
# enable = true;
|
||||
# plugins = [
|
||||
# "ag"
|
||||
# "cabal"
|
||||
# "colored-man-pages"
|
||||
# "colorize"
|
||||
# "command-not-found"
|
||||
# "fzf"
|
||||
# "git"
|
||||
# "nomad"
|
||||
# "pass"
|
||||
# "python"
|
||||
# "sudo"
|
||||
# "terraform"
|
||||
# "thefuck"
|
||||
# ];
|
||||
# };
|
||||
# plugins = [
|
||||
# # {
|
||||
# # name = "fifc";
|
||||
# # src = pkgs.fishPlugins.fifc.src;
|
||||
# # }
|
||||
# {
|
||||
# name = "fzf-tab";
|
||||
# src = pkgs.fetchFromGitHub {
|
||||
# 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=";
|
||||
# };
|
||||
# name = "z";
|
||||
# src = pkgs.fishPlugins.z.src;
|
||||
# }
|
||||
# ];
|
||||
# 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 = {
|
||||
# "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; [
|
||||
thefuck
|
||||
htop-vim
|
||||
bottom
|
||||
home.packages =
|
||||
with pkgs;
|
||||
[
|
||||
dig.dnsutils
|
||||
lsof
|
||||
zsh-completions
|
||||
nix-zsh-completions
|
||||
comma
|
||||
# carapace # used by nushell
|
||||
nil # TODO probably not best place
|
||||
terraform-lsp # TODO probably not best place
|
||||
python3Packages.jedi-language-server # TODO probably not best place
|
||||
nodePackages.typescript-language-server # TODO probably not best place
|
||||
ffmpeg-headless
|
||||
jless
|
||||
nix-melt
|
||||
nurl
|
||||
jq
|
||||
yq-go
|
||||
procs
|
||||
chafa
|
||||
hexyl
|
||||
broot
|
||||
file
|
||||
]
|
||||
++ (lib.optionals
|
||||
(builtins.elem hostname [
|
||||
"kirk"
|
||||
"picard"
|
||||
])
|
||||
[
|
||||
cntr # TODO probably not best place
|
||||
# nom # FIXME disable on aarch64-linux, breaks everything :(
|
||||
];
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.slack ];
|
||||
}
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
{pkgs, ...}: let
|
||||
spotify-adblock = pkgs.nur.repos.nltch.spotify-adblock;
|
||||
in {
|
||||
home.packages = [spotify-adblock];
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
spotify-adblocked = pkgs.callPackage ../../packages/spotify-adblocked { };
|
||||
in
|
||||
{
|
||||
home.packages = [ spotify-adblocked ];
|
||||
|
||||
systemd.user.services.spotify-adblocked = {
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
|
@ -12,7 +18,7 @@ in {
|
|||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = "${spotify-adblock}/bin/spotify";
|
||||
ExecStart = lib.getExe spotify-adblocked;
|
||||
Restart = "on-failure";
|
||||
RestartSec = 3;
|
||||
};
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.steam-run ];
|
||||
}
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
../waybar
|
||||
../swayidle
|
||||
|
@ -27,25 +28,29 @@
|
|||
|
||||
gtk = {
|
||||
enable = true;
|
||||
font.name = "Sans,Symbols Nerd Font";
|
||||
font.name = lib.mkForce "Sans,Symbols Nerd Font";
|
||||
iconTheme = {
|
||||
name = "Adwaita";
|
||||
package = pkgs.gnome.adwaita-icon-theme;
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
};
|
||||
};
|
||||
|
||||
wayland = {
|
||||
windowManager.sway = let
|
||||
windowManager.sway =
|
||||
let
|
||||
modifier = "Mod4";
|
||||
in {
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
config = {
|
||||
inherit modifier;
|
||||
menu = "${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0";
|
||||
output = let
|
||||
output =
|
||||
let
|
||||
bg = "${./wallpaper.svg} fill";
|
||||
in {
|
||||
in
|
||||
{
|
||||
DP-2 = {
|
||||
res = "1900x1200";
|
||||
pos = "0 0";
|
||||
|
@ -75,7 +80,10 @@
|
|||
smartBorders = "on";
|
||||
};
|
||||
assigns = {
|
||||
"1" = [{title = ".*Mozilla Firefox$";} {title = ".*qutebrowser$";}];
|
||||
"1" = [
|
||||
{ title = ".*Mozilla Firefox$"; }
|
||||
{ title = ".*qutebrowser$"; }
|
||||
];
|
||||
"2" = [ { title = "^((?!qutebrowser-editor).)*Emacs$"; } ];
|
||||
"3" = [ { title = "Slack.*"; } ];
|
||||
"9" = [ { title = "^Element.*"; } ];
|
||||
|
@ -91,23 +99,19 @@
|
|||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
};
|
||||
keybindings = let
|
||||
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}+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
|
||||
|
|
|
@ -2,19 +2,10 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
services.swayidle = let
|
||||
# Downgraded due to
|
||||
# https://github.com/mortie/swaylock-effects/issues/95
|
||||
# swaylock-effects = pkgs.swaylock-effects.overrideAttrs (_: {
|
||||
# version = "jirutka-master";
|
||||
# src = pkgs.fetchFromGitHub {
|
||||
# owner = "jirutka";
|
||||
# repo = "swaylock-effects";
|
||||
# rev = "7c5681ce96587ce3090c6698501faeccdfdc157d";
|
||||
# sha256 = "sha256-09Kq90wIIF9lPjiY2anf9MSgi/EqeXKXW1mFmhxA/aM";
|
||||
# };
|
||||
# });
|
||||
}:
|
||||
{
|
||||
services.swayidle =
|
||||
let
|
||||
swaylockWithArgs = pkgs.writeScriptBin "swaylockWithArgs" ''
|
||||
${pkgs.swaylock-effects}/bin/swaylock \
|
||||
--daemonize \
|
||||
|
@ -30,11 +21,11 @@
|
|||
--line-color 00000000 \
|
||||
--inside-color 00000088 \
|
||||
--separator-color 00000000 \
|
||||
--grace 2 \
|
||||
--fade-in 0.2
|
||||
'';
|
||||
swaylockCommand = "${swaylockWithArgs}/bin/swaylockWithArgs";
|
||||
in {
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
events = [
|
||||
{
|
||||
|
@ -57,10 +48,4 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
|
||||
# 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,3 +1,4 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
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 = {
|
||||
enable = true;
|
||||
# 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,
|
||||
lib,
|
||||
fleetFlake,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
programs.waybar = {
|
||||
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"
|
||||
catppuccin.waybar.enable = lib.mkForce false;
|
||||
|
||||
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
|
||||
];
|
||||
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
|
||||
systemd.user.services.waybar.Service.Environment = "PATH=${lib.makeBinPath [pkgs.hyprland]}";
|
||||
}
|
||||
|
|
|
@ -1,45 +1,71 @@
|
|||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
min-height: 0;
|
||||
font-family: Fira Code;
|
||||
|
||||
font-family: "Iosevka Comfy", "FontAwesome", "Nerd Font";
|
||||
font-size: 1.35rem;
|
||||
font-weight: 600;
|
||||
background: none;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
color: white;
|
||||
font-size: 1.2rem;
|
||||
color: #a5adcb;
|
||||
background-color: #181926;
|
||||
|
||||
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 {
|
||||
padding: 0 10px;
|
||||
background: transparent;
|
||||
color: white;
|
||||
font-size: 2rem;
|
||||
color: #5b6078;
|
||||
background: none;
|
||||
padding: 0;
|
||||
}
|
||||
#workspaces button:hover {
|
||||
color: #a6da95;
|
||||
}
|
||||
|
||||
#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 {
|
||||
box-shadow: inset 0 -5px white;
|
||||
}
|
||||
|
||||
#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;
|
||||
#custom-powermenu {
|
||||
margin: 12px 0 0 0;
|
||||
color: #6e738d;
|
||||
}
|
||||
|
|
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 = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
return {
|
||||
-- enable_wayland = false; -- https://github.com/wez/wezterm/issues/4483
|
||||
font = wezterm.font_with_fallback {
|
||||
{
|
||||
family = 'Iosevka Comfy',
|
||||
|
@ -13,7 +14,7 @@
|
|||
};
|
||||
font_size = 13;
|
||||
allow_square_glyphs_to_overflow_width = "Always";
|
||||
color_scheme = "Dracula (Official)";
|
||||
color_scheme = "Catppuccin Mocha";
|
||||
window_background_opacity = 1;
|
||||
enable_tab_bar = false;
|
||||
hide_mouse_cursor_when_typing = false;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.whatsapp-for-linux ];
|
||||
|
||||
systemd.user.services.whatsapp = {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
winetricks
|
||||
wineWowPackages.waylandFull
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
xdg = {
|
||||
enable = true;
|
||||
mimeApps.enable = true;
|
||||
|
@ -20,9 +21,36 @@
|
|||
genericName = "Firefox protocol";
|
||||
exec = "firefox -- %U";
|
||||
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 ];
|
||||
}
|
||||
|
|
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, ...}: {
|
||||
environment.systemPackages = [
|
||||
pkgs.vim
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
helix
|
||||
vim
|
||||
git
|
||||
];
|
||||
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
|
@ -9,5 +12,5 @@
|
|||
|
||||
services.nix-daemon.enable = true;
|
||||
|
||||
# nixpkgs.localSystem = "x86_64-darwin";
|
||||
system.stateVersion = 5;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
{
|
||||
fleetModules,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
|
|
|
@ -7,12 +7,19 @@
|
|||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "usb_storage" "usbhid" "sd_mod"];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ahci"
|
||||
"xhci_pci"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
|
|
@ -1,76 +1,42 @@
|
|||
{
|
||||
self,
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [ ./module.nix ];
|
||||
|
||||
fleet = {
|
||||
darwinHosts.archer = {
|
||||
};
|
||||
darwinHosts.archer = { };
|
||||
|
||||
nixOnDroidHosts.janeway = { };
|
||||
|
||||
hosts = {
|
||||
# thinkpad = {
|
||||
# extraModules = with inputs; [
|
||||
# nixosHardware.nixosModules.lenovo-thinkpad-x1-7th-gen
|
||||
# buildbot-nix.nixosModules.buildbot-master
|
||||
# buildbot-nix.nixosModules.buildbot-worker
|
||||
# ];
|
||||
# extraHmModules = with inputs; [
|
||||
# ccrEmacs.hmModules.default
|
||||
# {
|
||||
# # TODO: remove after https://github.com/nix-community/home-manager/pull/3811
|
||||
# imports = let
|
||||
# hmModules = "${inputs.homeManagerGitWorkspace}/modules";
|
||||
# in [
|
||||
# "${hmModules}/services/git-workspace.nix"
|
||||
# ];
|
||||
# }
|
||||
# ];
|
||||
# overlays = [inputs.nil.overlays.default];
|
||||
# secrets = {
|
||||
# "thinkpad-wireguard-private-key" = {};
|
||||
# "cachix-personal-token".owner = "ccr";
|
||||
# "autistici-password".owner = "ccr";
|
||||
# "git-workspace-tokens".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";
|
||||
# };
|
||||
# };
|
||||
deltaflyer = {
|
||||
nixpkgs =
|
||||
let
|
||||
# keep in sync with https://github.com/mobile-nixos/mobile-nixos/blob/development/npins/sources.json
|
||||
rev = "d3c42f187194c26d9f0309a8ecc469d6c878ce33";
|
||||
in
|
||||
builtins.getFlake "github:NixOS/nixpkgs/${rev}";
|
||||
extraHmModules = [
|
||||
inputs.catppuccin.homeModules.catppuccin
|
||||
];
|
||||
vpn = {
|
||||
ip = "10.100.0.5";
|
||||
publicKey = "6bzmBx2b5yzMdW0aK0KapoBesNcxTv5+qdo+pGmG+jc=";
|
||||
};
|
||||
# homeManager = builtins.getFlake "github:nix-community/home-manager/670d9ecc3e46a6e3265c203c2d136031a3d3548e";
|
||||
extraModules = [
|
||||
(import "${inputs.mobile-nixos}/lib/configuration.nix" { device = "oneplus-fajita"; })
|
||||
inputs.catppuccin.nixosModules.catppuccin
|
||||
inputs.lix-module.nixosModules.default
|
||||
];
|
||||
secrets = {
|
||||
"deltaflyer-wireguard-private-key" = { };
|
||||
"chatgpt-token".owner = "ccr";
|
||||
};
|
||||
};
|
||||
|
||||
kirk = {
|
||||
vpn = {
|
||||
ip = "10.100.0.3";
|
||||
|
@ -79,11 +45,12 @@
|
|||
extraModules = [
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.nixosHardware.nixosModules.lenovo-thinkpad-x1-7th-gen
|
||||
inputs.lix-module.nixosModules.default
|
||||
inputs.catppuccin.nixosModules.catppuccin
|
||||
];
|
||||
extraHmModules = [
|
||||
inputs.ccrEmacs.hmModules.default
|
||||
"${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix"
|
||||
"${inputs.homeManagerSwayNC}/modules/services/swaync.nix"
|
||||
inputs.catppuccin.homeModules.catppuccin
|
||||
];
|
||||
secrets = {
|
||||
"kirk-wireguard-private-key" = { };
|
||||
|
@ -102,25 +69,22 @@
|
|||
};
|
||||
extraModules = [
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.nixThePlanet.nixosModules.macos-ventura
|
||||
# inputs.hercules-ci-agent.nixosModules.agent-service
|
||||
inputs.lix-module.nixosModules.default
|
||||
inputs.lanzaboote.nixosModules.lanzaboote
|
||||
inputs.catppuccin.nixosModules.catppuccin
|
||||
];
|
||||
extraHmModules = [
|
||||
inputs.ccrEmacs.hmModules.default
|
||||
"${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix"
|
||||
"${inputs.homeManagerSwayNC}/modules/services/swaync.nix"
|
||||
inputs.vscode-server.nixosModules.home
|
||||
inputs.catppuccin.homeModules.catppuccin
|
||||
];
|
||||
secrets = {
|
||||
"picard-wireguard-private-key" = { };
|
||||
"chatgpt-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";
|
||||
"autistici-password".owner = "ccr";
|
||||
"restic-hetzner-password" = { };
|
||||
"aws-credentials".owner = "hercules-ci-agent";
|
||||
"forgejo-runners-token".owner = "nixuser";
|
||||
"forgejo-nix-access-tokens".owner = "nixuser";
|
||||
};
|
||||
|
@ -128,50 +92,85 @@
|
|||
|
||||
sisko = {
|
||||
system = "aarch64-linux";
|
||||
nixpkgs = inputs.nixpkgsUnstableForSisko; # using more recent `nixpkgsUnstable` it fails to restart
|
||||
nixpkgs = inputs.nixpkgsSisko;
|
||||
enableHomeManager = false;
|
||||
vpn = {
|
||||
ip = "10.100.0.1";
|
||||
publicKey = "bc5giljukT1+ChbbyTLdOfejfR3c8RZ4XoXmQM54nTY=";
|
||||
};
|
||||
extraModules = with inputs; [
|
||||
disko.nixosModules.disko
|
||||
# inputs.hercules-ci-agent.nixosModules.agent-service;
|
||||
# rock5b.nixosModules.default
|
||||
impermanence.nixosModules.impermanence
|
||||
lix-module.nixosModules.default
|
||||
];
|
||||
secrets = {
|
||||
"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-assistant-token".owner = "prometheus";
|
||||
"grafana-password".owner = "grafana";
|
||||
"cloudflare-dyndns-api-token" = { };
|
||||
"restic-hetzner-password" = { };
|
||||
"minio-credentials".owner = "minio";
|
||||
"aws-credentials".owner = "hercules-ci-agent";
|
||||
"hass-ssh-key".owner = "hass";
|
||||
"matrix-registration-shared-secret".owner = "matrix-synapse";
|
||||
"matrix-sliding-sync-secret".owner = "matrix-synapse";
|
||||
"autistici-password".owner = "forgejo";
|
||||
"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";
|
||||
};
|
||||
};
|
||||
|
||||
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 = {
|
||||
oneplus6t = {
|
||||
oneplus8t = {
|
||||
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,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
|
@ -42,7 +43,16 @@
|
|||
};
|
||||
|
||||
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 = {
|
||||
monospace = [ "DejaVu Sans Mono for Powerline" ];
|
||||
sansSerif = [ "DejaVu Sans" ];
|
||||
|
@ -52,7 +62,10 @@
|
|||
|
||||
nixpkgs.config.joypixels.acceptLicense = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [waypipe firefox];
|
||||
environment.systemPackages = with pkgs; [
|
||||
waypipe
|
||||
firefox
|
||||
];
|
||||
|
||||
programs.mosh.enable = true;
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
disks ? [ "/dev/sda" ],
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
disk = lib.genAttrs disks (dev: {
|
||||
device = dev;
|
||||
type = "disk";
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
|
@ -261,7 +262,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
systemd.services.ydns = let
|
||||
systemd.services.ydns =
|
||||
let
|
||||
ydnsUpdater = pkgs.writeScriptBin "ydnsUpdater" ''
|
||||
USER="andrea.ciceri@autistici.org"
|
||||
PASSWORD=$(cat /home/ccr/.ydns-password)
|
||||
|
@ -273,7 +275,8 @@
|
|||
done
|
||||
${pkgs.curl}/bin/curl --basic -u "$USER:$PASSWORD" --silent https://ydns.io/api/v1/update/?host=$DOMAIN
|
||||
'';
|
||||
in {
|
||||
in
|
||||
{
|
||||
description = "YDNS IP updater";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
|
|
|
@ -1,6 +1,14 @@
|
|||
{lib, ...}: {
|
||||
{ lib, ... }:
|
||||
{
|
||||
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 {
|
||||
enable = true;
|
||||
version = 2;
|
||||
|
|
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,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports =
|
||||
fleetModules [
|
||||
"common"
|
||||
|
@ -26,34 +27,37 @@
|
|||
"printing"
|
||||
"pam"
|
||||
"wireguard-client"
|
||||
"restic"
|
||||
"greetd"
|
||||
"syncthing"
|
||||
"mount-rock5b"
|
||||
"mount-sisko"
|
||||
"adb"
|
||||
"binfmt"
|
||||
"prometheus-exporters"
|
||||
"alloy"
|
||||
"syncthing"
|
||||
"zerotier"
|
||||
]
|
||||
++ [
|
||||
./disko.nix
|
||||
];
|
||||
++ [ ./disko.nix ];
|
||||
|
||||
ccr = {
|
||||
enable = true;
|
||||
autologin = true;
|
||||
autologin = false;
|
||||
modules = [
|
||||
"git"
|
||||
"git-workspace"
|
||||
"helix"
|
||||
"shell"
|
||||
"zellij"
|
||||
"element"
|
||||
"emacs"
|
||||
"firefox"
|
||||
"gpg"
|
||||
"mpv"
|
||||
"password-store"
|
||||
"slack"
|
||||
"hyprland"
|
||||
"niri"
|
||||
"udiskie"
|
||||
"xdg"
|
||||
"spotify"
|
||||
"lutris"
|
||||
"wine"
|
||||
"cura"
|
||||
|
@ -61,8 +65,20 @@
|
|||
"email"
|
||||
"digikam"
|
||||
"discord"
|
||||
"remmina"
|
||||
"calibre"
|
||||
"zathura"
|
||||
"imv"
|
||||
"catppuccin"
|
||||
"libreoffice"
|
||||
"emacs"
|
||||
"chirp"
|
||||
"sdrangel"
|
||||
"zmkbatx"
|
||||
"moonlight"
|
||||
"gimp"
|
||||
];
|
||||
extraGroups = [];
|
||||
extraGroups = [ "plugdev" ];
|
||||
backupPaths = [ ];
|
||||
};
|
||||
|
||||
|
@ -73,11 +89,9 @@
|
|||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.kernelModules = [
|
||||
"kvm-intel"
|
||||
];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
|
||||
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_7;
|
||||
boot.kernelPackages = pkgs.linuxPackages;
|
||||
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.systemd-boot = {
|
||||
|
@ -90,10 +104,15 @@
|
|||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "schedutil";
|
||||
hardware.enableRedistributableFirmware = lib.mkDefault true;
|
||||
hardware.rtl-sdr.enable = true;
|
||||
|
||||
hardware.opengl = {
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "zstd";
|
||||
};
|
||||
}
|
||||
|
|
214
hosts/module.nix
214
hosts/module.nix
|
@ -8,12 +8,17 @@
|
|||
config,
|
||||
inputs,
|
||||
...
|
||||
} @ flakePartsArgs: let
|
||||
}:
|
||||
let
|
||||
cfg = config.fleet;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.fleet = {
|
||||
darwinHosts = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.submodule ({name, ...}: {
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule (
|
||||
{ name, ... }:
|
||||
{
|
||||
options = {
|
||||
name = lib.mkOption {
|
||||
description = "Host name";
|
||||
|
@ -28,7 +33,7 @@ in {
|
|||
nixpkgs = lib.mkOption {
|
||||
description = "Used nixpkgs";
|
||||
type = lib.types.anything;
|
||||
default = inputs.nixpkgsUnstable;
|
||||
default = inputs.nixpkgs;
|
||||
};
|
||||
extraModules = lib.mkOption {
|
||||
description = "Extra NixOS modules";
|
||||
|
@ -37,20 +42,70 @@ in {
|
|||
};
|
||||
overlays = lib.mkOption {
|
||||
description = "Enabled Nixpkgs overlays";
|
||||
type = lib.types.listOf (lib.mkOptionType {
|
||||
type = lib.types.listOf (
|
||||
lib.mkOptionType {
|
||||
name = "nixpkgs-overlay";
|
||||
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 {
|
||||
description = "Host configuration";
|
||||
type = lib.types.attrsOf (lib.types.submodule ({name, ...}: {
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule (
|
||||
{ name, ... }:
|
||||
{
|
||||
options = {
|
||||
name = lib.mkOption {
|
||||
description = "Host name";
|
||||
|
@ -65,7 +120,12 @@ in {
|
|||
nixpkgs = lib.mkOption {
|
||||
description = "Used nixpkgs";
|
||||
type = lib.types.anything;
|
||||
default = inputs.nixpkgsUnstable;
|
||||
default = inputs.nixpkgs;
|
||||
};
|
||||
homeManager = lib.mkOption {
|
||||
description = "Used home-manager";
|
||||
type = lib.types.anything;
|
||||
default = inputs.homeManager;
|
||||
};
|
||||
vpn = {
|
||||
ip = lib.mkOption {
|
||||
|
@ -79,7 +139,10 @@ in {
|
|||
};
|
||||
secrets = lib.mkOption {
|
||||
description = "List of secrets names in the `secrets` folder";
|
||||
type = lib.types.attrsOf (lib.types.submodule ({name, ...}: {
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule (
|
||||
{ name, ... }:
|
||||
{
|
||||
options = {
|
||||
owner = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
|
@ -99,7 +162,9 @@ in {
|
|||
default = "0440";
|
||||
};
|
||||
};
|
||||
}));
|
||||
}
|
||||
)
|
||||
);
|
||||
default = { };
|
||||
};
|
||||
enableHomeManager = lib.mkOption {
|
||||
|
@ -109,12 +174,14 @@ in {
|
|||
};
|
||||
overlays = lib.mkOption {
|
||||
description = "Enabled Nixpkgs overlays";
|
||||
type = lib.types.listOf (lib.mkOptionType {
|
||||
type = lib.types.listOf (
|
||||
lib.mkOptionType {
|
||||
name = "nixpkgs-overlay";
|
||||
description = "nixpkgs overlay";
|
||||
check = lib.isFunction;
|
||||
merge = lib.mergeOneOption;
|
||||
});
|
||||
}
|
||||
);
|
||||
default = [ ];
|
||||
};
|
||||
extraModules = lib.mkOption {
|
||||
|
@ -133,16 +200,15 @@ in {
|
|||
default = "ccr";
|
||||
};
|
||||
};
|
||||
config.overlays = with inputs;
|
||||
[
|
||||
nur.overlay
|
||||
]
|
||||
++ cfg.overlays;
|
||||
}));
|
||||
config.overlays = with inputs; cfg.overlays;
|
||||
}
|
||||
)
|
||||
);
|
||||
default = { };
|
||||
};
|
||||
vpnExtra = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.submodule {
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule {
|
||||
options = {
|
||||
ip = lib.mkOption {
|
||||
description = "Wireguard VPN ip";
|
||||
|
@ -153,73 +219,85 @@ in {
|
|||
type = lib.types.str;
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
);
|
||||
default = { };
|
||||
};
|
||||
_mkNixosConfiguration = lib.mkOption {
|
||||
description = "Function returning a proper NixOS configuration";
|
||||
type = lib.types.functionTo (lib.types.functionTo lib.types.attrs); # TODO improve this type
|
||||
internal = true;
|
||||
default = hostname: config:
|
||||
default =
|
||||
hostname: config:
|
||||
config.nixpkgs.lib.nixosSystem {
|
||||
inherit (config) system;
|
||||
modules =
|
||||
[
|
||||
({lib, ...}: {
|
||||
(
|
||||
{ lib, ... }:
|
||||
{
|
||||
networking.hostName = lib.mkForce hostname;
|
||||
nixpkgs.overlays = config.overlays;
|
||||
})
|
||||
}
|
||||
)
|
||||
"${self.outPath}/hosts/${hostname}"
|
||||
]
|
||||
++ (lib.optionals (config.secrets != [ ]) [
|
||||
inputs.agenix.nixosModules.default
|
||||
({lib, ...}: let
|
||||
(
|
||||
{ lib, ... }:
|
||||
let
|
||||
allSecrets = lib.mapAttrs' (name: value: {
|
||||
name = lib.removeSuffix ".age" name;
|
||||
inherit value;
|
||||
}) (import "${self.outPath}/secrets/secrets.nix");
|
||||
filteredSecrets =
|
||||
lib.filterAttrs
|
||||
(name: _: builtins.hasAttr name config.secrets)
|
||||
allSecrets;
|
||||
in {
|
||||
age.secrets =
|
||||
lib.mapAttrs' (name: _: {
|
||||
filteredSecrets = lib.filterAttrs (name: _: builtins.hasAttr name config.secrets) allSecrets;
|
||||
in
|
||||
{
|
||||
age.secrets = lib.mapAttrs' (name: _: {
|
||||
name = builtins.baseNameOf name;
|
||||
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 (
|
||||
let
|
||||
user = config.extraHmModulesUser;
|
||||
extraHmModules = config.extraHmModules;
|
||||
in [
|
||||
inputs.homeManager.nixosModule
|
||||
({
|
||||
in
|
||||
[
|
||||
config.homeManager.nixosModules.home-manager
|
||||
(
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
home-manager.users."${user}" = {
|
||||
imports = extraHmModules;
|
||||
_module.args = {
|
||||
age = config.age or { };
|
||||
fleetFlake = self;
|
||||
pkgsStable = inputs.nixpkgsStable.legacyPackages.${pkgs.system};
|
||||
};
|
||||
};
|
||||
})
|
||||
]))
|
||||
}
|
||||
)
|
||||
]
|
||||
))
|
||||
++ config.extraModules;
|
||||
specialArgs = {
|
||||
fleetModules = builtins.map (moduleName: "${self.outPath}/modules/${moduleName}");
|
||||
fleetHmModules = builtins.map (moduleName: "${self.outPath}/hmModules/${moduleName}");
|
||||
fleetFlake = self;
|
||||
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";
|
||||
type = lib.types.functionTo (lib.types.functionTo lib.types.attrs); # TODO improve this type
|
||||
internal = true;
|
||||
default = hostname: config:
|
||||
default =
|
||||
hostname: config:
|
||||
inputs.nixDarwin.lib.darwinSystem {
|
||||
modules = [
|
||||
({
|
||||
(
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
networking.hostName = lib.mkForce hostname;
|
||||
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}"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = fleetModules [
|
||||
"common"
|
||||
"wireguard-server"
|
||||
|
@ -57,7 +58,16 @@
|
|||
};
|
||||
|
||||
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 = {
|
||||
monospace = [ "DejaVu Sans Mono for Powerline" ];
|
||||
sansSerif = [ "DejaVu Sans" ];
|
||||
|
@ -71,18 +81,16 @@
|
|||
|
||||
environment.systemPackages = with pkgs; [ waypipe ];
|
||||
|
||||
home-manager.users.ccr.gtk = {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
name = "Adwaita";
|
||||
package = pkgs.gnome.adwaita-icon-theme;
|
||||
};
|
||||
};
|
||||
programs.dconf.enable = true;
|
||||
|
||||
programs.mosh.enable = true;
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid"];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"nvme"
|
||||
"usbhid"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
{
|
||||
lib,
|
||||
disks ? ["/dev/nvme0n1" "/dev/nvme1n1"],
|
||||
disks ? [
|
||||
"/dev/nvme0n1"
|
||||
"/dev/nvme1n1"
|
||||
],
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
disk = {
|
||||
x = {
|
||||
type = "disk";
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue