Compare commits
367 Commits
5a2c019d22
...
main
Author | SHA1 | Date | |
---|---|---|---|
f61a4ee7e3 | |||
15280d58db | |||
13406ac5a5 | |||
e77d36d230 | |||
38691b024c | |||
6cb1847ce3 | |||
f9d691975d | |||
b5ace6ccb9 | |||
bec9559314 | |||
b654d36a6f | |||
42099e9142 | |||
e0ded22cc5 | |||
05b0b6f6dd | |||
b98f2c94fe | |||
120a482b1e | |||
240b124a28 | |||
448c8523e7 | |||
dbce42d130 | |||
4c54a00ec9 | |||
dbc625d989 | |||
5d729b4948 | |||
05a5fc1976 | |||
89ba85360c | |||
5ebfdb39f1 | |||
5ca4021c5b | |||
f5232c2bfb | |||
07313c8ab4 | |||
271d4097c8 | |||
17e2821237 | |||
055e983dec | |||
f9b349f04e | |||
56211a0c9e | |||
cc7c838f01 | |||
0970d50557 | |||
88d320fded | |||
6daa10eb1e | |||
c7a2912aa3 | |||
bfc3ee5264 | |||
13ffb87959 | |||
0fc344416c | |||
238db043b4 | |||
5caf79cc2d | |||
1a8b0c4449 | |||
ec1e077975 | |||
32f1129f62 | |||
065ee1a066 | |||
d1ca1b95b8 | |||
8164630ae7 | |||
80a865d1f6 | |||
0f52c25063 | |||
a9e9fbb543 | |||
7d2771d133 | |||
1c6576d54f | |||
0d4f40960b | |||
75c682b085 | |||
55585a31d4 | |||
195f941fad | |||
6c8042897b | |||
d090186360 | |||
491a43212b | |||
a5148e8758 | |||
a4b3c5459c | |||
8e7be94b1d | |||
ccf63fa289 | |||
611be25f39 | |||
99bcf9068c | |||
a484af41be | |||
da9391b68a | |||
4ca8b75fa4 | |||
2766a80c70 | |||
8a50a29ef7 | |||
44ac3ac799 | |||
7f2def19e8 | |||
15de1e42e9 | |||
9a921d531a | |||
628b278309 | |||
f2797d39ee | |||
7a8597cdef | |||
1a478ba01e | |||
f699955913 | |||
b780a2d51e | |||
1f6a2f8cca | |||
48c4a9a147 | |||
02d570f13d | |||
c16865a048 | |||
3a7334c3b9 | |||
04d77743ab | |||
e520257894 | |||
222368696b | |||
49e6f00172 | |||
cd8c80ed10 | |||
571196db9d | |||
d3ff73c7ed | |||
b803a816db | |||
322653d25f | |||
9c62e506f4 | |||
64c613d5ca | |||
565a25a122 | |||
f8e0a66986 | |||
ae017a01b7 | |||
116872c3a7 | |||
326271181d | |||
9e9475268b | |||
aff127af23 | |||
db6834220d | |||
2d77b7c880 | |||
423b66c2ce | |||
a32c87a33a | |||
dce7267c30 | |||
8eb9c02b66 | |||
534fe6e7a0 | |||
863648d28f | |||
1b4d899713 | |||
30e4b336e5 | |||
2e0ee755e3 | |||
a1279896f7 | |||
3f485a06e7 | |||
beae688002 | |||
7febbf79d2 | |||
a8ff627aba | |||
9d17b55a33 | |||
2aa29ddb79 | |||
4e8b633cb0 | |||
f82a8856b1 | |||
da10edad83 | |||
aa819813ee | |||
77ea83fae3 | |||
6aa5ce4904 | |||
f21c7e15ba | |||
2c4b960475 | |||
8ff01c21ee | |||
344903ec9b | |||
cdaf1fd04e | |||
3f14f52f51 | |||
a822ca69c5 | |||
42af96b6e6 | |||
75ed98ca0a | |||
feef15e944 | |||
851dfda368 | |||
2637cc2d9d | |||
0559164a2e | |||
390ab43b05 | |||
0a9c0084df | |||
a29d88574c | |||
9c2b28b1e8 | |||
7961adf9e3 | |||
98f207adf4 | |||
8c8aff3065 | |||
94c63a75ba | |||
5b5c757a0c | |||
496cd364da | |||
8c30180c6c | |||
4bffbf61ac | |||
1b82709951 | |||
675bc756b1 | |||
a3f35652a7 | |||
3456730de4 | |||
d0a3a165e0 | |||
03c95b7b6f | |||
6d1afe26eb | |||
e1853bdbb5 | |||
23631f0391 | |||
b1d0a85100 | |||
1110b28c36 | |||
7429f4e861 | |||
1a7ab84cbd | |||
0be300aa7b | |||
71fa64ccfa | |||
9baa192388 | |||
fec2bba6fc | |||
539f35cf2e | |||
b9e6e8e28b | |||
9cf8e67377 | |||
d8ba3bc590 | |||
2310f2fa90 | |||
6c76023edc | |||
45a7046b35 | |||
4cc4d51655 | |||
9973c8ccad | |||
9dc1ca3175 | |||
54b53e5026 | |||
2072020b9c | |||
d613665f5c | |||
1c8ffbf289 | |||
da0bf720dd | |||
3667246bf0 | |||
d712b4d00d | |||
01275a4785 | |||
0cd6a8708e | |||
308fab0078 | |||
67b147c22f | |||
00d63a90a7 | |||
f0719ab51c | |||
3c58cead1c | |||
e5a70822ad | |||
1e0e83b934 | |||
63563d6537 | |||
f3eacd23c3 | |||
f3d2da344f | |||
bcc917a2da | |||
2283f4b660 | |||
d35f27ea11 | |||
da6cbcc4c4 | |||
d0c948c2ce | |||
605622288e | |||
b8205f7dd1 | |||
b221af0ea7 | |||
4826de340e | |||
bd22fe4dd3 | |||
6655676928 | |||
9fa74a54ff | |||
dd96ede0c8 | |||
25bc410fdd | |||
ac70365221 | |||
1c46f39e6d | |||
e0dc5888d8 | |||
dbde974faa | |||
cb534abacd | |||
92d8a0e76e | |||
09e4a7cb46 | |||
48c3a93156 | |||
232cec6c0e | |||
745f103304 | |||
a0b5f5b5c4 | |||
8db057bc42 | |||
f27298fa9f | |||
e6a3d4b7db | |||
cd200e0d1b | |||
4c45aa0005 | |||
bf73460fe7 | |||
3b839f957f | |||
abc25ef6ae | |||
fd6a01a1df | |||
57f260920f | |||
fac2369ac9 | |||
3a75c8c938 | |||
a5511710a3 | |||
20dbcb197a | |||
753d303907 | |||
be6048a73f | |||
3810c58373 | |||
a62148ed8f | |||
a60ad7aef4 | |||
0bda5d2e06 | |||
f19dbf0a76 | |||
6120312ae6 | |||
12296300a4 | |||
8bff8462f5 | |||
ff3becb280 | |||
3b4f67c04f | |||
267616cc4e | |||
d9bf9363bb | |||
867fe1d499 | |||
971d01eb39 | |||
15f0020ccf | |||
44e5d0819f | |||
597391a802 | |||
ef30450892 | |||
a91af9bae7 | |||
0b80531ad0 | |||
37c3b67dea | |||
6d0d71630b | |||
9b224b96a5 | |||
111d3d9777 | |||
9e4597fdd3 | |||
2bbf3bade0 | |||
9def7cb0f6 | |||
f7d8f58aaa | |||
dcfb553990 | |||
b9b3aaa060 | |||
d3871dd3a5 | |||
3b22026126 | |||
86a6ad5767 | |||
cd15722fa9 | |||
871acbd8e6 | |||
ebdc037b07 | |||
86bc85392e | |||
44dcc01e7f | |||
684a48804d | |||
68c53b010d | |||
290d4466ad | |||
302922eee6 | |||
58da3a96ae | |||
b2c59b3419 | |||
62b2834fb2 | |||
75a8652776 | |||
be35a2cdce | |||
a33e4b8366 | |||
462ab61d81 | |||
3ac19ad849 | |||
6ea0b486b6 | |||
cca87f0771 | |||
c2e17a4481 | |||
70a6016243 | |||
0f8b328b90 | |||
c2781c50a7 | |||
3481bcd675 | |||
e4b574a7ca | |||
acccdbc938 | |||
63a586642a | |||
8dccfbd32a | |||
ceb04ea2e2 | |||
5f75b4ebad | |||
210cbdbfd7 | |||
dd5c2e41d2 | |||
1883e9c09f | |||
c9c6944844 | |||
1fcafb2be7 | |||
cd0c000204 | |||
a9bfae3d4c | |||
7a26f45b00 | |||
098d5bc99d | |||
ec11f6ec7f | |||
abd54dac68 | |||
f6a044036b | |||
46c3134e6b | |||
d0432eb17b | |||
3dd54609e4 | |||
4a65e88516 | |||
b1bb0467db | |||
1f8aaa83b5 | |||
04583f5da8 | |||
1cdf2dd7e5 | |||
1fc0740314 | |||
71f6c0d738 | |||
73b795635c | |||
aef0c34412 | |||
d8b4d086a9 | |||
509955e420 | |||
6742f2a4f8 | |||
085ec0b0d0 | |||
40e351737b | |||
173cb17a65 | |||
b0e41708a4 | |||
cde41060a4 | |||
bd52208559 | |||
9013976776 | |||
b4e7f2dd5c | |||
f8a45439ae | |||
223bd8d63a | |||
a865e458f7 | |||
78e613148a | |||
c416d2343b | |||
ea301be586 | |||
4130b57cda | |||
1ed5ce9ecf | |||
6bc2a77708 | |||
f7ede6e382 | |||
2aa0285b5d | |||
62e8021652 | |||
5b58cdbf20 | |||
a698c6d1cb | |||
60bd18a459 | |||
5a04e28041 | |||
19115a9b67 | |||
63422ffe6d | |||
b282c859d3 | |||
25c0c31e15 | |||
8bb06f218b | |||
ddaa5f506e | |||
445f0b41f0 | |||
9d8479c88d | |||
dbd6c31160 | |||
ecbcd74579 | |||
e510b26e23 | |||
37a67dfd35 | |||
213a0431cf |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
.null-ls*
|
||||
nixos-switch.log
|
||||
result
|
||||
|
BIN
assets/bg1080.png
Normal file
BIN
assets/bg1080.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 MiB |
BIN
assets/bg1080vert.png
Normal file
BIN
assets/bg1080vert.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 MiB |
BIN
assets/bg4k.png
Normal file
BIN
assets/bg4k.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.2 MiB |
76
flake.lock
generated
76
flake.lock
generated
@ -7,26 +7,63 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709756385,
|
||||
"narHash": "sha256-EwAsCWfjLnq6Rzh9c95ThPhTTOQkY/R9ZROPUfhtHmE=",
|
||||
"lastModified": 1749154018,
|
||||
"narHash": "sha256-gjN3j7joRvT3a8Zgcylnd4NFsnXeDBumqiu4HmY1RIg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "ad9254cd9af9165000ecd6ef9c23c2b8ceda01c7",
|
||||
"rev": "7aae0ee71a17b19708b93b3ed448a1a0952bf111",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-25.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"musnix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741303672,
|
||||
"narHash": "sha256-eRKbKccBu3PK/oJpmUuLo+0v45d0SEjosE8tVsHbpeA=",
|
||||
"owner": "musnix",
|
||||
"repo": "musnix",
|
||||
"rev": "d56a15f30329f304151e4e05fa82264d127da934",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "musnix",
|
||||
"repo": "musnix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1709479366,
|
||||
"narHash": "sha256-n6F0n8UV6lnTZbYPl1A9q1BS0p4hduAv1mGAP17CVd0=",
|
||||
"lastModified": 1750400657,
|
||||
"narHash": "sha256-3vkjFnxCOP6vm5Pm13wC/Zy6/VYgei/I/2DWgW4RFeA=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b8697e57f10292a6165a20f03d2f42920dfaf973",
|
||||
"rev": "b2485d56967598da068b5a6946dadda8bfcbcd37",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-25.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1750506804,
|
||||
"narHash": "sha256-VLFNc4egNjovYVxDGyBYTrvVCgDYgENp5bVi9fPTDYc=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4206c4cb56751df534751b058295ea61357bbbaa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -36,26 +73,12 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1709428628,
|
||||
"narHash": "sha256-//ZCCnpVai/ShtO2vPjh3AWgo8riXCaret6V9s7Hew4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "66d65cb00b82ffa04ee03347595aa20e41fe3555",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "release-23.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"musnix": "musnix",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"sops-nix": "sops-nix"
|
||||
}
|
||||
},
|
||||
@ -63,15 +86,14 @@
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709711091,
|
||||
"narHash": "sha256-L0rSIU9IguTG4YqSj4B/02SyTEz55ACq5t8gXpzteYc=",
|
||||
"lastModified": 1750119275,
|
||||
"narHash": "sha256-Rr7Pooz9zQbhdVxux16h7URa6mA80Pb/G07T4lHvh0M=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "25dd60fdd08fcacee2567a26ba6b91fe098941dc",
|
||||
"rev": "77c423a03b9b2b79709ea2cb63336312e78b72e2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
120
flake.nix
120
flake.nix
@ -2,41 +2,115 @@
|
||||
description = "Nixos config flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
home-manager.url = "github:nix-community/home-manager/release-25.05";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
sops-nix.url = "github:Mic92/sops-nix";
|
||||
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
musnix.url = "github:musnix/musnix";
|
||||
musnix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
home-manager,
|
||||
sops-nix,
|
||||
musnix,
|
||||
...
|
||||
} @ inputs: let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
nixosConfigurations."MaxNixosLaptop" = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs;};
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/MaxNixosLaptop/configuration.nix
|
||||
home-manager.nixosModules.default
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
}
|
||||
sops-nix.nixosModules.sops
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
# make unstable packages available via overlay
|
||||
(final: prev: {
|
||||
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
|
||||
})
|
||||
];
|
||||
config = {
|
||||
allowUnfreePredicate = pkg:
|
||||
builtins.elem (nixpkgs.lib.getName pkg) [
|
||||
"discord"
|
||||
"samsung-unified-linux-driver"
|
||||
"steam"
|
||||
"steam-unwrapped"
|
||||
"stm32cubemx"
|
||||
"obsidian"
|
||||
];
|
||||
};
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
"MaxNixosLaptop" = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit inputs system;
|
||||
};
|
||||
modules = [
|
||||
./hosts/MaxNixosLaptop/configuration.nix
|
||||
sops-nix.nixosModules.sops
|
||||
home-manager.nixosModules.default
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.sharedModules = [
|
||||
sops-nix.homeManagerModules.sops
|
||||
];
|
||||
}
|
||||
musnix.nixosModules.musnix
|
||||
{
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
# make unstable packages available via overlay
|
||||
(final: prev: {
|
||||
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
|
||||
})
|
||||
];
|
||||
config = {
|
||||
allowUnfreePredicate = pkg:
|
||||
builtins.elem (nixpkgs.lib.getName pkg) [
|
||||
"discord"
|
||||
"samsung-unified-linux-driver"
|
||||
"steam"
|
||||
"steam-unwrapped"
|
||||
"stm32cubemx"
|
||||
"obsidian"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
ServerIso = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
#./machine.nix
|
||||
(nixpkgs
|
||||
+ "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix")
|
||||
(nixpkgs + "/nixos/modules/installer/cd-dvd/channel.nix")
|
||||
({pkgs, ...}: {
|
||||
# Enable SSH in the boot process.
|
||||
systemd.services.sshd.wantedBy =
|
||||
pkgs.lib.mkForce ["multi-user.target"];
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
# your ssh key
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOLRNvgrjnBizuruEm6htmvc6F1uGath9T7WjAh6ogPD root@host"
|
||||
];
|
||||
isoImage.squashfsCompression = "gzip -Xcompression-level 1";
|
||||
networking = {
|
||||
usePredictableInterfaceNames = false;
|
||||
useDHCP = true;
|
||||
nameservers = ["1.1.1.1"];
|
||||
hostName = "host";
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
@ -10,178 +9,67 @@
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
# greetd login manager
|
||||
../../modules/nixos/greetd.nix
|
||||
# sway as window manager
|
||||
../../modules/nixos/sway.nix
|
||||
../../modules/nixos
|
||||
inputs.home-manager.nixosModules.default
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "MaxNixosLaptop"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# NIXOS
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
myConfig = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
desktop = true;
|
||||
gpu.amd.enable = true;
|
||||
laptop = true;
|
||||
network.hostName = "MaxNixosLaptop";
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.max = {
|
||||
isNormalUser = true;
|
||||
description = "Max Känner";
|
||||
extraGroups = ["networkmanager" "wheel"];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = {inherit inputs;};
|
||||
users = {
|
||||
"max" = import ./home.nix;
|
||||
};
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
unstable.bambu-studio
|
||||
neovim
|
||||
wget
|
||||
fprintd
|
||||
binutils
|
||||
usbutils
|
||||
pciutils
|
||||
qemu
|
||||
home-manager
|
||||
git
|
||||
gcc
|
||||
clang
|
||||
clang_multi
|
||||
libclang
|
||||
clang-tools
|
||||
alejandra
|
||||
libnotify
|
||||
gnomeExtensions.hibernate-status-button
|
||||
ffmpeg
|
||||
(let
|
||||
base = appimageTools.defaultFhsEnvArgs;
|
||||
in
|
||||
buildFHSEnv (base
|
||||
// {
|
||||
name = "fhs";
|
||||
targetPkgs = pkgs: (
|
||||
# pkgs.buildFHSUserEnv provides only a minimal FHS environment,
|
||||
# lacking many basic packages needed by most software.
|
||||
# Therefore, we need to add them manually.
|
||||
#
|
||||
# pkgs.appimageTools provides basic packages required by most software.
|
||||
(base.targetPkgs pkgs)
|
||||
++ [
|
||||
pkg-config
|
||||
ncurses
|
||||
# Feel free to add more packages here if needed.
|
||||
]
|
||||
);
|
||||
profile = "export FHS=1";
|
||||
runScript = "bash";
|
||||
extraOutputsToInstall = ["dev"];
|
||||
}))
|
||||
];
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
nerdfonts
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
programs.ssh.startAgent = true;
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
glfw
|
||||
wayland-protocols
|
||||
libxkbcommon
|
||||
xorg.libX11
|
||||
xorg.libXinerama
|
||||
xorg.libXcursor
|
||||
xorg.libXrandr
|
||||
xorg.libXi
|
||||
xorg.libXext
|
||||
libGL
|
||||
libGLU
|
||||
];
|
||||
|
||||
programs.zsh.enable = true;
|
||||
programs.steam.enable = true;
|
||||
|
||||
security.polkit.enable = true;
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
};
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# fingerprint unlock
|
||||
services.fprintd.enable = true;
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
services.udisks2.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
system.autoUpgrade = {
|
||||
services.udev = {
|
||||
enable = true;
|
||||
flake = inputs.self.outPath;
|
||||
flags = [
|
||||
"--update-input"
|
||||
"nixpkgs"
|
||||
"-L"
|
||||
packages = with pkgs; [
|
||||
picoprobe-udev-rules
|
||||
qmk-udev-rules
|
||||
game-devices-udev-rules
|
||||
android-udev-rules
|
||||
];
|
||||
dates = "09:00";
|
||||
randomizedDelaySec = "45min";
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
|
@ -1,28 +1,19 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
{...}: {
|
||||
imports = [
|
||||
# sway as windowmanager
|
||||
../../modules/home-manager/sway.nix
|
||||
# zsh config
|
||||
../../modules/home-manager/zsh.nix
|
||||
# foot terminal emulator
|
||||
../../modules/home-manager/foot.nix
|
||||
# often used terminal programs
|
||||
../../modules/home-manager/btop.nix
|
||||
../../modules/home-manager/bat.nix
|
||||
../../modules/home
|
||||
];
|
||||
|
||||
myConfig = {
|
||||
enable = true;
|
||||
desktop = true;
|
||||
laptop = true;
|
||||
};
|
||||
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
home.username = "max";
|
||||
home.homeDirectory = "/home/max";
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# This value determines the Home Manager release that your configuration is
|
||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||
# introduces backwards incompatible changes.
|
||||
@ -31,81 +22,4 @@
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
home.packages = with pkgs; [
|
||||
lazygit
|
||||
unzip
|
||||
rustup
|
||||
nextcloud-client
|
||||
firefox
|
||||
thunderbird
|
||||
xournalpp
|
||||
kicad
|
||||
prismlauncher
|
||||
steam
|
||||
blender
|
||||
mpd
|
||||
mpdris2
|
||||
mpc-cli
|
||||
ymuse
|
||||
flip-link
|
||||
bacon
|
||||
probe-rs
|
||||
betaflight-configurator
|
||||
loudgain
|
||||
youtube-dl
|
||||
dconf
|
||||
distrobox
|
||||
gyroflow
|
||||
libqalculate
|
||||
sops
|
||||
];
|
||||
|
||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||
# plain files is through 'home.file'.
|
||||
home.file = {
|
||||
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
||||
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
||||
# # symlink to the Nix store copy.
|
||||
# ".screenrc".source = dotfiles/screenrc;
|
||||
|
||||
# # You can also set the file content immediately.
|
||||
# ".gradle/gradle.properties".text = ''
|
||||
# org.gradle.console=verbose
|
||||
# org.gradle.daemon.idletimeout=3600000
|
||||
# '';
|
||||
};
|
||||
|
||||
# Home Manager can also manage your environment variables through
|
||||
# 'home.sessionVariables'. If you don't want to manage your shell through Home
|
||||
# Manager then you have to manually source 'hm-session-vars.sh' located at
|
||||
# either
|
||||
#
|
||||
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# /etc/profiles/per-user/max/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
services.nextcloud-client.enable = true;
|
||||
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
musicDirectory = "/home/max/Music/";
|
||||
};
|
||||
|
||||
services.mpdris2.enable = true;
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
|
@ -1,10 +0,0 @@
|
||||
{...}: {
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
map-syntax = ["*.ino:C++"];
|
||||
theme = "Solarized (dark)";
|
||||
style = "numbers,changes,header-filename,header-filesize";
|
||||
};
|
||||
};
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color_theme = "${pkgs.btop}/share/btop/themes/adapta.theme";
|
||||
theme_background = true;
|
||||
rounded_corners = true;
|
||||
graph_symbol = "braille";
|
||||
shown_boxes = "proc cpu mem net";
|
||||
update_ms = 1000;
|
||||
proc_sorting = "cpu lazy";
|
||||
proc_colors = true;
|
||||
proc_gradient = true;
|
||||
proc_per_core = true;
|
||||
proc_mem_bytes = true;
|
||||
cpu_graph_upper = "total";
|
||||
cpu_single_graph = true;
|
||||
show_uptime = true;
|
||||
check_temp = true;
|
||||
cpu_sensor = "Auto";
|
||||
show_coretemp = true;
|
||||
temp_scale = "celsius";
|
||||
base_10_sizes = false;
|
||||
show_cpu_freq = true;
|
||||
clock_format = "%H:%M";
|
||||
background_update = true;
|
||||
mem_graphs = true;
|
||||
show_swap = true;
|
||||
show_io_stat = true;
|
||||
net_download = 128;
|
||||
net_upload = 128;
|
||||
net_auto = false;
|
||||
show_battery = true;
|
||||
selected_battery = "Auto";
|
||||
};
|
||||
};
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
{...}: {
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
font = "FiraCode Nerd Font Mono:size=10";
|
||||
dpi-aware = "yes";
|
||||
};
|
||||
colors = {
|
||||
regular0 = "222222"; # black
|
||||
regular1 = "cc9393"; # red
|
||||
regular2 = "7f9f7f"; # green
|
||||
regular3 = "d0bf8f"; # yellow
|
||||
regular4 = "8cd0d3"; # blue
|
||||
regular5 = "dc8cc3"; # magenta
|
||||
regular6 = "93e0e3"; # cyan
|
||||
regular7 = "dcdccc"; # white
|
||||
|
||||
bright0 = "666666"; # black
|
||||
bright1 = "dca3a3"; # red
|
||||
bright2 = "bfebbf"; # green
|
||||
bright3 = "f0dfaf"; # yellow
|
||||
bright4 = "8cd0d3"; # blue
|
||||
bright5 = "fcace3"; # magenta
|
||||
bright6 = "b3ffff"; # cyan
|
||||
bright7 = "ffffff"; # white
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,224 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
waybar # status bar
|
||||
swaylock # screen locking
|
||||
swayidle # automatic screen locking after system idle time
|
||||
kanshi # hotswap displays
|
||||
foot # terminal
|
||||
keepassxc # used for secrets instead of gnome-keyring
|
||||
];
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
xdgAutostart = false;
|
||||
};
|
||||
|
||||
wrapperFeatures = {
|
||||
gtk = true;
|
||||
};
|
||||
|
||||
config = {
|
||||
input = {
|
||||
"*" = {
|
||||
xkb_layout = "de";
|
||||
xkb_options = "caps:ctrl_modifier";
|
||||
xkb_numlock = "enable";
|
||||
};
|
||||
"type:touchpad" = {
|
||||
tap = "enable";
|
||||
natural_scroll = "enable";
|
||||
};
|
||||
};
|
||||
modifier = "Mod4";
|
||||
keybindings = let
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
in
|
||||
lib.mkOptionDefault {
|
||||
# brightness
|
||||
"XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 5";
|
||||
"XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 5";
|
||||
# volume
|
||||
"XF86AudioRaiseVolume" = "exec '${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +1%'";
|
||||
"XF86AudioLowerVolume" = "exec '${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -1%'";
|
||||
"XF86AudioMute" = "exec '${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle'";
|
||||
|
||||
# custom pause mode similar to typical system shutdown menus
|
||||
"${modifier}+F12" = "mode pause-break";
|
||||
};
|
||||
# use foot as default terminal
|
||||
terminal = "foot";
|
||||
assigns = {
|
||||
"1" = [{app_id = "firefox";}];
|
||||
"2" = [{app_id = "foot";}];
|
||||
};
|
||||
bars = [];
|
||||
menu = "${pkgs.tofi}/bin/tofi-drun | ${pkgs.findutils}/bin/xargs swaymsg exec --";
|
||||
fonts = {
|
||||
names = ["FiraCode Nerd Font"];
|
||||
size = 11.0;
|
||||
};
|
||||
modes = {
|
||||
pause-break = {
|
||||
e = "exec --no-startup-id swaymsg exit, mode default";
|
||||
s = "exec --no-startup-id ${pkgs.dash}/bin/dash -c '${pkgs.swaylock}/bin/swaylock & systemctl suspend-then-hibernate', mode default";
|
||||
r = "exec --no-startup-id systemctl reboot";
|
||||
End = "exec --no-startup-id systemctl poweroff";
|
||||
Return = "mode default";
|
||||
Escape = "mode default";
|
||||
};
|
||||
};
|
||||
startup = [
|
||||
{command = "dbus-sway-environment";}
|
||||
{command = "configure-gtk";}
|
||||
{command = "${pkgs.keepassxc}/bin/keepassxc";}
|
||||
{command = "${pkgs.waybar}/bin/waybar";}
|
||||
{command = "${pkgs.foot}/bin/foot";}
|
||||
{command = "${pkgs.firefox}/bin/firefox";}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 26;
|
||||
modules-left = ["sway/workspaces" "sway/mode"];
|
||||
modules-right = ["sway/language" "clock" "battery"];
|
||||
|
||||
"sway/language" = {
|
||||
format = "{shortDescription}";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"clock" = {
|
||||
interval = 60;
|
||||
format = "{:%a %d.%m %I:%M}";
|
||||
};
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: #292828;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
margin-right: 10px;
|
||||
color: #ffffff;
|
||||
}
|
||||
#workspaces button:hover, #workspaces button:active {
|
||||
background-color: #292828;
|
||||
color: #ffffff;
|
||||
}
|
||||
#workspaces button.focused {
|
||||
background-color: #383737;
|
||||
}
|
||||
|
||||
#language {
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
#battery {
|
||||
margin-left: 7px;
|
||||
margin-right: 3px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
services.kanshi = {
|
||||
enable = true;
|
||||
profiles = {
|
||||
laptop.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "0,0";
|
||||
}
|
||||
];
|
||||
dock_luhbots.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "0,1080";
|
||||
}
|
||||
{
|
||||
criteria = "Dell Inc. DELL U2422HE GRCPH83";
|
||||
position = "0,0";
|
||||
}
|
||||
{
|
||||
criteria = "NEC Corporation E243WMi 7X313185NB";
|
||||
transform = "90";
|
||||
position = "1920,0";
|
||||
}
|
||||
];
|
||||
laptop_hannspree.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "320,1440";
|
||||
}
|
||||
{
|
||||
criteria = "HannStar Display Corp HC281UPB ";
|
||||
position = "0,0";
|
||||
mode = "3840x2160@60";
|
||||
scale = 1.5;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Theming
|
||||
gtk = {
|
||||
enable = true;
|
||||
cursorTheme = {
|
||||
package = pkgs.capitaine-cursors;
|
||||
name = "capitaine-cursors-white";
|
||||
size = 24;
|
||||
};
|
||||
iconTheme = {
|
||||
package = pkgs.whitesur-icon-theme;
|
||||
name = "WhiteSur-dark";
|
||||
};
|
||||
theme = {
|
||||
package = pkgs.whitesur-gtk-theme;
|
||||
name = "WhiteSur-Dark";
|
||||
};
|
||||
gtk3.extraConfig = {
|
||||
gtk-dialogs-use-header = false;
|
||||
gtk-cursor-theme-size = 0;
|
||||
gtk-toolbar-style = "GTK_TOOLBAR_BOTH_HORIZ";
|
||||
gtk-toolbar-icon-style = "GTK_ICON_SIZE_LARGE_TOOLBAR";
|
||||
gtk-button-images = 0;
|
||||
gtk-menu-images = 0;
|
||||
gtk-enable-event-sounds = 0;
|
||||
gtk-enable-input-feedback-sounds = 1;
|
||||
gtk-xft-antialias = 1;
|
||||
gtk-xft-hinting = 1;
|
||||
gtk-xft-hintstyle = "hintslight";
|
||||
gtk-xft-rgba = "none";
|
||||
};
|
||||
};
|
||||
home.pointerCursor = {
|
||||
package = pkgs.capitaine-cursors;
|
||||
name = "capitaine-cursors-white";
|
||||
size = 24;
|
||||
x11.enable = true;
|
||||
x11.defaultCursor = "capitaine-cursors-white";
|
||||
};
|
||||
xsession.enable = true;
|
||||
}
|
@ -1,78 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
enableCompletion = true;
|
||||
defaultKeymap = "emacs";
|
||||
dotDir = ".config/zsh";
|
||||
history.expireDuplicatesFirst = true;
|
||||
history.path = "$ZDOTDIR/.zsh_history";
|
||||
historySubstringSearch.enable = true;
|
||||
shellAliases = {
|
||||
ls = "${pkgs.eza}/bin/eza --icons -a --group-directories-first";
|
||||
diff = "diff --color=auto";
|
||||
grep = "grep --color=auto";
|
||||
ip = "ip --color=auto";
|
||||
mkdir = "mkdir -p";
|
||||
gst = "git status";
|
||||
gc = "git commit";
|
||||
ga = "git add";
|
||||
gpl = "git pull";
|
||||
gpu = "git push";
|
||||
gd = "git diff";
|
||||
gch = "git checkout";
|
||||
gs = "git switch";
|
||||
gre = "git restore";
|
||||
gr = "git remote";
|
||||
gcl = "git clone";
|
||||
glg = "git log --graph --abbrev-commit --decorate --format=format:'%C(bold green)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold yellow)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all";
|
||||
gb = "git branch";
|
||||
gm = "git merge";
|
||||
gf = "git fetch";
|
||||
rebuild = "~/dotfiles/nixos/rebuild.sh";
|
||||
};
|
||||
syntaxHighlighting.enable = true;
|
||||
syntaxHighlighting.highlighters = ["main" "brackets"];
|
||||
initExtra = ''
|
||||
# auto completion
|
||||
bindkey '^I' complete-word
|
||||
bindkey '^[[Z' autosuggest-accept
|
||||
# backspace
|
||||
bindkey '^[[3' delete-char
|
||||
# home / end go to beginning / end of line
|
||||
bindkey '^[[H' beginning-of-line
|
||||
bindkey '^[[F' end-of-line
|
||||
# ctrl+arrow jump word
|
||||
bindkey '^[[1;5D' backward-word
|
||||
bindkey '^[[1;5C' forward-word
|
||||
# ctrl+entf and ctrl+backspace delete word
|
||||
bindkey '^[[3;5~' delete-word
|
||||
bindkey '^H' backward-delete-word
|
||||
'';
|
||||
};
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
command_timeout = 5000;
|
||||
character = {
|
||||
success_symbol = "[](bold green)";
|
||||
error_symbol = "[](bold red)";
|
||||
};
|
||||
cmd_duration = {
|
||||
min_time = 500;
|
||||
show_milliseconds = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
options = ["--cmd cd"];
|
||||
};
|
||||
}
|
33
modules/home/default.nix
Normal file
33
modules/home/default.nix
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig;
|
||||
in {
|
||||
imports = [./git ./music ./programs ./shell ./sway];
|
||||
|
||||
options.myConfig = {
|
||||
enable = lib.mkEnableOption "custom home-manager config";
|
||||
desktop = lib.mkEnableOption "custom home-manager config for desktop use";
|
||||
laptop = lib.mkEnableOption "extra settings for laptop use";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
myConfig = {
|
||||
shell.enable = true;
|
||||
git.enable = true;
|
||||
|
||||
sway.enable = lib.mkIf cfg.desktop true;
|
||||
music.enable = lib.mkIf cfg.desktop true;
|
||||
programs.enable = lib.mkIf cfg.desktop true;
|
||||
|
||||
sway.laptop = lib.mkIf cfg.laptop true;
|
||||
};
|
||||
|
||||
xdg.enable = true;
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
};
|
||||
}
|
40
modules/home/git/default.nix
Normal file
40
modules/home/git/default.nix
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.git;
|
||||
in {
|
||||
imports = [./lazygit.nix];
|
||||
|
||||
options.myConfig.git = {
|
||||
enable = lib.mkEnableOption "git";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
myConfig.git.lazygit.enable = lib.mkDefault true;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
fetch.parallel = 0;
|
||||
init.defaultBranch = "main";
|
||||
pull.rebase = true;
|
||||
};
|
||||
delta = {
|
||||
enable = true;
|
||||
options = {
|
||||
decorations = {
|
||||
commit-decoration-style = "bold yellow box ul";
|
||||
file-decoration-style = "none";
|
||||
file-style = "bold yellow ul";
|
||||
};
|
||||
features = "decorations";
|
||||
whitespace-error-style = "22 reverse";
|
||||
};
|
||||
};
|
||||
userEmail = "max.kaenner@gmail.com";
|
||||
userName = "Max Känner";
|
||||
};
|
||||
};
|
||||
}
|
24
modules/home/git/lazygit.nix
Normal file
24
modules/home/git/lazygit.nix
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.git.lazygit;
|
||||
in {
|
||||
options.myConfig.git.lazygit = {
|
||||
enable = lib.mkEnableOption "lazygit, a git tui";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.lazygit = {
|
||||
enable = true;
|
||||
settings = {
|
||||
gui = {
|
||||
shwoRandomTip = false;
|
||||
nerdFontsVersion = "3";
|
||||
border = "rounded";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
18
modules/home/music/default.nix
Normal file
18
modules/home/music/default.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.music;
|
||||
in {
|
||||
imports = [./mpd.nix];
|
||||
|
||||
options.myConfig.music = {
|
||||
enable = lib.mkEnableOption "make the system ready for listening to music";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
myConfig.music.mpd.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
35
modules/home/music/mpd.nix
Normal file
35
modules/home/music/mpd.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.music.mpd;
|
||||
in {
|
||||
options.myConfig.music.mpd = {
|
||||
enable = lib.mkEnableOption "Music Player Daemon";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
mpc-cli
|
||||
ymuse
|
||||
];
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
musicDirectory = "${config.home.homeDirectory}/Music/";
|
||||
network.startWhenNeeded = true;
|
||||
extraConfig = ''
|
||||
restore_paused "yes"
|
||||
auto_update "yes"
|
||||
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "PipeWire Sound Server"
|
||||
}
|
||||
'';
|
||||
};
|
||||
services.mpd-mpris.enable = true;
|
||||
services.mpdris2.enable = true;
|
||||
};
|
||||
}
|
62
modules/home/programs/default.nix
Normal file
62
modules/home/programs/default.nix
Normal file
@ -0,0 +1,62 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.programs;
|
||||
in {
|
||||
imports = [./foot.nix ./thunderbird.nix ./nextcloud.nix ./udiskie.nix ./wezterm.nix ./rclone.nix];
|
||||
|
||||
options.myConfig.programs = {
|
||||
enable = lib.mkEnableOption "programs for desktop use";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
myConfig.programs = {
|
||||
foot.enable = lib.mkDefault true;
|
||||
wezterm.enable = lib.mkDefault true;
|
||||
thunderbird.enable = lib.mkDefault true;
|
||||
rclone.enable = lib.mkDefault true;
|
||||
udiskie.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
unzip
|
||||
firefox
|
||||
xournalpp
|
||||
prismlauncher
|
||||
steam
|
||||
blender
|
||||
betaflight-configurator
|
||||
loudgain
|
||||
yt-dlp
|
||||
dconf
|
||||
distrobox
|
||||
libqalculate
|
||||
sops
|
||||
pwvucontrol
|
||||
qpwgraph
|
||||
discord
|
||||
libreoffice-fresh
|
||||
mate.caja
|
||||
mate.atril
|
||||
mpv
|
||||
gimp
|
||||
freecad
|
||||
wine
|
||||
prusa-slicer
|
||||
kicad
|
||||
element-desktop
|
||||
chromium
|
||||
wl-clipboard
|
||||
gimp
|
||||
godot_4
|
||||
ripgrep-all
|
||||
stm32cubemx
|
||||
flatpak
|
||||
obsidian
|
||||
marksman
|
||||
];
|
||||
};
|
||||
}
|
45
modules/home/programs/foot.nix
Normal file
45
modules/home/programs/foot.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.programs.foot;
|
||||
in {
|
||||
options.myConfig.programs.foot = {
|
||||
enable = lib.mkEnableOption "foot, a lightweight wayland terminal emulator";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
font = "FiraCode Nerd Font Mono:size=10";
|
||||
dpi-aware = "yes";
|
||||
};
|
||||
colors = {
|
||||
background = "0a0807";
|
||||
foreground = "e6e2de";
|
||||
|
||||
regular0 = "26211e"; # black
|
||||
regular1 = "f75b72"; # red
|
||||
regular2 = "67af34"; # green
|
||||
regular3 = "c98b1a"; # yellow
|
||||
regular4 = "509af6"; # blue
|
||||
regular5 = "ca64f3"; # magenta
|
||||
regular6 = "1faeae"; # cyan
|
||||
regular7 = "c1b7b0"; # white
|
||||
|
||||
bright0 = "585049"; # black
|
||||
bright1 = "fb8590"; # red
|
||||
bright2 = "75c73b"; # green
|
||||
bright3 = "e49f27"; # yellow
|
||||
bright4 = "77b1fb"; # blue
|
||||
bright5 = "d68af7"; # magenta
|
||||
bright6 = "24c6c6"; # cyan
|
||||
bright7 = "f2f0ef"; # white
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
19
modules/home/programs/nextcloud.nix
Normal file
19
modules/home/programs/nextcloud.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.programs.nextcloud;
|
||||
in {
|
||||
options.myConfig.programs.nextcloud = {
|
||||
enable = lib.mkEnableOption "nextcloud client";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.nextcloud-client = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.nextcloud-client;
|
||||
};
|
||||
};
|
||||
}
|
125
modules/home/programs/rclone.nix
Normal file
125
modules/home/programs/rclone.nix
Normal file
@ -0,0 +1,125 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.programs.rclone;
|
||||
in {
|
||||
options.myConfig.programs.rclone = {
|
||||
enable = lib.mkEnableOption "nextcloud sync using rclone";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
sops = {
|
||||
age.keyFile = "/home/max/.config/sops/age/keys.txt";
|
||||
secrets = {
|
||||
"cloud/url" = {
|
||||
sopsFile = ../../../secrets/rclone.yaml;
|
||||
};
|
||||
"cloud/user" = {
|
||||
sopsFile = ../../../secrets/rclone.yaml;
|
||||
};
|
||||
"cloud/pass" = {
|
||||
sopsFile = ../../../secrets/rclone.yaml;
|
||||
};
|
||||
"luhbots/url" = {
|
||||
sopsFile = ../../../secrets/rclone.yaml;
|
||||
};
|
||||
"luhbots/user" = {
|
||||
sopsFile = ../../../secrets/rclone.yaml;
|
||||
};
|
||||
"luhbots/pass" = {
|
||||
sopsFile = ../../../secrets/rclone.yaml;
|
||||
};
|
||||
};
|
||||
|
||||
templates."rclone.conf".content = ''
|
||||
[cloud]
|
||||
type = webdav
|
||||
url = ${config.sops.placeholder."cloud/url"}
|
||||
vendor = nextcloud
|
||||
user = ${config.sops.placeholder."cloud/user"}
|
||||
pass = ${config.sops.placeholder."cloud/pass"}
|
||||
nextcloud_chunk_size = 128M
|
||||
|
||||
[luhbots]
|
||||
type = webdav
|
||||
url = ${config.sops.placeholder."luhbots/url"}
|
||||
vendor = nextcloud
|
||||
user = ${config.sops.placeholder."luhbots/user"}
|
||||
pass = ${config.sops.placeholder."luhbots/pass"}
|
||||
'';
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [rclone fuse3];
|
||||
|
||||
systemd.user = {
|
||||
services = {
|
||||
luhbots-mount = {
|
||||
Unit = {
|
||||
Description = "Mount the luhbots nextcloud";
|
||||
After = ["network-online.target"];
|
||||
};
|
||||
Service = {
|
||||
Type = "notify";
|
||||
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p \"%h/luhbots Nextcloud\"";
|
||||
ExecStart = "${pkgs.rclone}/bin/rclone --config=${config.sops.templates."rclone.conf".path} --vfs-cache-mode full --vfs-cache-max-age 1w mount \"luhbots:\" \"%h/luhbots Nextcloud\"";
|
||||
ExecStop = "/bin/fusermount -u \"%h/luhbots Nextcloud\"";
|
||||
Environment = ["PATH=/run/wrappers/bin/:$PATH"];
|
||||
};
|
||||
Install.WantedBy = ["default.target"];
|
||||
};
|
||||
music-mount = {
|
||||
Unit = {
|
||||
Description = "Mount the music directory from my cloud";
|
||||
After = ["network-online.target"];
|
||||
};
|
||||
Service = {
|
||||
Type = "notify";
|
||||
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p \"%h/Music\"";
|
||||
ExecStart = "${pkgs.rclone}/bin/rclone --config=${config.sops.templates."rclone.conf".path} --vfs-cache-mode full --vfs-cache-max-age 1w mount \"cloud:Music\" \"%h/Music\"";
|
||||
ExecStop = "/bin/fusermount -u \"%h/Music\"";
|
||||
Environment = ["PATH=/run/wrappers/bin/:$PATH"];
|
||||
};
|
||||
Install.WantedBy = ["default.target"];
|
||||
};
|
||||
videos-mount = {
|
||||
Unit = {
|
||||
Description = "Mount the videos directory from my cloud";
|
||||
After = ["network-online.target"];
|
||||
};
|
||||
Service = {
|
||||
Type = "notify";
|
||||
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p \"%h/Videos\"";
|
||||
ExecStart = "${pkgs.rclone}/bin/rclone --config=${config.sops.templates."rclone.conf".path} --vfs-cache-mode full --vfs-cache-max-age 1w mount \"cloud:Videos\" \"%h/Videos\"";
|
||||
ExecStop = "/bin/fusermount -u \"%h/Videos\"";
|
||||
Environment = ["PATH=/run/wrappers/bin/:$PATH"];
|
||||
};
|
||||
Install.WantedBy = ["default.target"];
|
||||
};
|
||||
sync-Documents = {
|
||||
Unit = {
|
||||
Description = "Sync the Documents folder with the cloud Documents folder using bisync";
|
||||
After = ["network-online.target"];
|
||||
};
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.rclone}/bin/rclone --config=${config.sops.templates."rclone.conf".path} --resilient --recover -v --conflict-resolve newer --exclude-from %h/Documents/sync-exclude.txt bisync cloud:Documents %h/Documents";
|
||||
};
|
||||
Install.WantedBy = ["default.target"];
|
||||
};
|
||||
};
|
||||
timers = {
|
||||
sync-Documents = {
|
||||
Unit.Description = "Sync Documents folder every half hour";
|
||||
Timer = {
|
||||
OnBootSec = "15min";
|
||||
OnUnitActiveSec = "30min";
|
||||
};
|
||||
Install.WantedBy = ["timers.target"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
155
modules/home/programs/thunderbird.nix
Normal file
155
modules/home/programs/thunderbird.nix
Normal file
@ -0,0 +1,155 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.programs.thunderbird;
|
||||
in {
|
||||
options.myConfig.programs.thunderbird = {
|
||||
enable = lib.mkEnableOption "thunderbird, a email client";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
accounts.email.accounts = {
|
||||
"google max" = {
|
||||
address = "max.kaenner@gmail.com";
|
||||
userName = "max.kaenner@gmail.com";
|
||||
realName = "Max Känner";
|
||||
flavor = "gmail.com";
|
||||
thunderbird = {
|
||||
enable = true;
|
||||
settings = id: {
|
||||
"mail.smtpserver.smtp_${id}.authMethod" = 10;
|
||||
"mail.server.server_${id}.authMethod" = 10;
|
||||
};
|
||||
};
|
||||
primary = true;
|
||||
};
|
||||
"google informatiker" = {
|
||||
address = "kaenner9@gmail.com";
|
||||
userName = "kaenner9@gmail.com";
|
||||
realName = "Max Känner";
|
||||
flavor = "gmail.com";
|
||||
thunderbird = {
|
||||
enable = true;
|
||||
settings = id: {
|
||||
"mail.smtpserver.smtp_${id}.authMethod" = 10;
|
||||
"mail.server.server_${id}.authMethod" = 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
"uni" = {
|
||||
address = "max.kaenner@stud.uni-hannover.de";
|
||||
userName = "max.kaenner@stud.uni-hannover.de";
|
||||
realName = "Max Känner";
|
||||
imap = {
|
||||
host = "mail.stud.uni-hannover.de";
|
||||
port = 993;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = false;
|
||||
};
|
||||
};
|
||||
smtp = {
|
||||
host = "smtp.uni-hannover.de";
|
||||
port = 587;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
};
|
||||
};
|
||||
thunderbird.enable = true;
|
||||
};
|
||||
"luhbots" = {
|
||||
address = "max.kaenner@luhbots-hannover.de";
|
||||
userName = "max.kaenner@luhbots-hannover.de";
|
||||
realName = "Max Känner";
|
||||
imap = {
|
||||
host = "mxe96b.netcup.net";
|
||||
port = 993;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = false;
|
||||
};
|
||||
};
|
||||
smtp = {
|
||||
host = "mxe96b.netcup.net";
|
||||
port = 465;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = false;
|
||||
};
|
||||
};
|
||||
thunderbird.enable = true;
|
||||
};
|
||||
"luhbots-alt" = {
|
||||
address = "max.kaenner@luhbots.de";
|
||||
userName = "max.kaenner@luhbots.de";
|
||||
realName = "Max Känner";
|
||||
imap = {
|
||||
host = "luhbots.de";
|
||||
port = 993;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = false;
|
||||
};
|
||||
};
|
||||
smtp = {
|
||||
host = "luhbots.de";
|
||||
port = 587;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
};
|
||||
};
|
||||
thunderbird.enable = true;
|
||||
};
|
||||
"gymstolz" = {
|
||||
address = "max.kaenner@gym-stolz.de";
|
||||
userName = "max.kaenner";
|
||||
realName = "Max Känner";
|
||||
imap = {
|
||||
host = "gym-stolz.de";
|
||||
port = 143;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
};
|
||||
};
|
||||
smtp = {
|
||||
host = "gym-stolz.de";
|
||||
port = 587;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
};
|
||||
};
|
||||
thunderbird.enable = true;
|
||||
};
|
||||
"max mkaenner" = {
|
||||
address = "max@mkaenner.de";
|
||||
aliases = ["admin@mkaenner.de"];
|
||||
userName = "max@mkaenner.de";
|
||||
realName = "Max Känner";
|
||||
imap = {
|
||||
host = "mail.mkaenner.de";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
smtp = {
|
||||
host = "mail.mkaenner.de";
|
||||
port = 465;
|
||||
tls.enable = true;
|
||||
};
|
||||
thunderbird.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
profiles.default = {
|
||||
isDefault = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
19
modules/home/programs/udiskie.nix
Normal file
19
modules/home/programs/udiskie.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.programs.udiskie;
|
||||
in {
|
||||
options.myConfig.programs.udiskie = {
|
||||
enable = lib.mkEnableOption "auto media mounting";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.udiskie = {
|
||||
enable = true;
|
||||
automount = true;
|
||||
notify = true;
|
||||
};
|
||||
};
|
||||
}
|
56
modules/home/programs/wezterm.nix
Normal file
56
modules/home/programs/wezterm.nix
Normal file
@ -0,0 +1,56 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.programs.wezterm;
|
||||
in {
|
||||
options.myConfig.programs.wezterm = {
|
||||
enable = lib.mkEnableOption "wezterm, a wayland terminal emulator";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
colorSchemes = {
|
||||
myTheme = {
|
||||
ansi = [
|
||||
"#26211e"
|
||||
"#f75b72"
|
||||
"#67af34"
|
||||
"#c98b1a"
|
||||
"#509af6"
|
||||
"#ca64f3"
|
||||
"#1faeae"
|
||||
"#c1b7b0"
|
||||
];
|
||||
brights = [
|
||||
"#585049"
|
||||
"#fb8590"
|
||||
"#75c73b"
|
||||
"#e49f27"
|
||||
"#77b1fb"
|
||||
"#d68af7"
|
||||
"#24c6c6"
|
||||
"#f2f0ef"
|
||||
];
|
||||
background = "#0a0807";
|
||||
foreground = "#e6e2de";
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
local wezterm = require 'wezterm'
|
||||
local config = wezterm.config_builder()
|
||||
|
||||
config.font = wezterm.font 'FiraCode Nerd Font Mono'
|
||||
config.front_end = 'WebGpu'
|
||||
config.enable_tab_bar = false
|
||||
config.color_scheme = 'myTheme'
|
||||
|
||||
return config
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
22
modules/home/shell/bat.nix
Normal file
22
modules/home/shell/bat.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.shell.bat;
|
||||
in {
|
||||
options.myConfig.shell.bat = {
|
||||
enable = lib.mkEnableOption "bat, a cat replacement with syntax highlighting";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
map-syntax = ["*.ino:C++"];
|
||||
theme = "Solarized (dark)";
|
||||
style = "numbers,changes,header-filename,header-filesize";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
52
modules/home/shell/btop.nix
Normal file
52
modules/home/shell/btop.nix
Normal file
@ -0,0 +1,52 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.shell.btop;
|
||||
in {
|
||||
options.myConfig.shell.btop = {
|
||||
enable = lib.mkEnableOption "btop, a system monitor";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color_theme = "${pkgs.btop}/share/btop/themes/adapta.theme";
|
||||
theme_background = true;
|
||||
rounded_corners = true;
|
||||
graph_symbol = "braille";
|
||||
shown_boxes = "proc cpu mem net";
|
||||
update_ms = 1000;
|
||||
proc_sorting = "cpu lazy";
|
||||
proc_colors = true;
|
||||
proc_gradient = true;
|
||||
proc_per_core = true;
|
||||
proc_mem_bytes = true;
|
||||
cpu_graph_upper = "total";
|
||||
cpu_single_graph = true;
|
||||
show_uptime = true;
|
||||
check_temp = true;
|
||||
cpu_sensor = "Auto";
|
||||
show_coretemp = true;
|
||||
temp_scale = "celsius";
|
||||
base_10_sizes = false;
|
||||
show_cpu_freq = true;
|
||||
clock_format = "%H:%M";
|
||||
background_update = true;
|
||||
mem_graphs = true;
|
||||
show_swap = true;
|
||||
show_io_stat = true;
|
||||
net_download = 128;
|
||||
net_upload = 128;
|
||||
net_auto = false;
|
||||
show_battery = true;
|
||||
selected_battery = "Auto";
|
||||
gpu_mirror_graph = false;
|
||||
custom_gpu_name0 = "Internal";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
23
modules/home/shell/default.nix
Normal file
23
modules/home/shell/default.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.shell;
|
||||
in {
|
||||
imports = [./zsh.nix ./bat.nix ./btop.nix ./neovim.nix ./direnv.nix];
|
||||
|
||||
options.myConfig.shell = {
|
||||
enable = lib.mkEnableOption "my shell environment";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
myConfig.shell = {
|
||||
zsh.enable = lib.mkDefault true;
|
||||
neovim.enable = lib.mkDefault true;
|
||||
btop.enable = lib.mkDefault true;
|
||||
bat.enable = lib.mkDefault true;
|
||||
direnv.enable = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
}
|
20
modules/home/shell/direnv.nix
Normal file
20
modules/home/shell/direnv.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.shell.direnv;
|
||||
in {
|
||||
options.myConfig.shell.direnv = {
|
||||
enable = lib.mkEnableOption "direnv for changing the environment when entering a directory";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
80
modules/home/shell/neovim.nix
Normal file
80
modules/home/shell/neovim.nix
Normal file
@ -0,0 +1,80 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.shell.neovim;
|
||||
in {
|
||||
options.myConfig.shell.neovim = {
|
||||
enable = lib.mkEnableOption "neovim";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
withNodeJs = true;
|
||||
defaultEditor = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
lazy-nvim
|
||||
];
|
||||
|
||||
extraLuaConfig = ''
|
||||
-- This file simply bootstraps the installation of Lazy.nvim and then calls other files for execution
|
||||
-- This file doesn't necessarily need to be touched, BE CAUTIOUS editing this file and proceed at your own risk.
|
||||
vim.g.gcc_bin_path = '${lib.getExe pkgs.gcc}'
|
||||
local lazypath = vim.env.LAZY or vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
|
||||
if not (vim.env.LAZY or (vim.uv or vim.loop).fs_stat(lazypath)) then
|
||||
-- stylua: ignore
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- validate that lazy is available
|
||||
if not pcall(require, "lazy") then
|
||||
-- stylua: ignore
|
||||
vim.api.nvim_echo({ { ("Unable to load lazy from: %s\n"):format(lazypath), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {})
|
||||
vim.fn.getchar()
|
||||
vim.cmd.quit()
|
||||
end
|
||||
|
||||
require "lazy_setup"
|
||||
'';
|
||||
extraPackages = with pkgs; [
|
||||
gnumake
|
||||
clang
|
||||
gcc
|
||||
zig
|
||||
cargo
|
||||
rust-analyzer
|
||||
nodejs
|
||||
nixd
|
||||
alejandra
|
||||
python3Full
|
||||
neocmakelsp
|
||||
ripgrep
|
||||
gdu
|
||||
bottom
|
||||
luajitPackages.luarocks-nix
|
||||
lua
|
||||
go
|
||||
statix
|
||||
deadnix
|
||||
tree-sitter
|
||||
texliveMedium
|
||||
biber
|
||||
gcc
|
||||
just-lsp
|
||||
marksman
|
||||
];
|
||||
};
|
||||
|
||||
# home.file.".config/nvim/lua".source = ./nvim-lua;
|
||||
xdg.configFile."nvim/lua" = {
|
||||
recursive = true;
|
||||
source = ./nvim-lua;
|
||||
};
|
||||
};
|
||||
}
|
23
modules/home/shell/nvim-lua/community.lua
Normal file
23
modules/home/shell/nvim-lua/community.lua
Normal file
@ -0,0 +1,23 @@
|
||||
return {
|
||||
"AstroNvim/astrocommunity",
|
||||
{ import = "astrocommunity.pack.bash" },
|
||||
{ import = "astrocommunity.pack.cmake" },
|
||||
{ import = "astrocommunity.pack.cpp" },
|
||||
{ import = "astrocommunity.pack.docker" },
|
||||
{ import = "astrocommunity.pack.html-css" },
|
||||
{ import = "astrocommunity.pack.json" },
|
||||
{ import = "astrocommunity.pack.just" },
|
||||
{ import = "astrocommunity.pack.lua" },
|
||||
{ import = "astrocommunity.pack.markdown" },
|
||||
{ import = "astrocommunity.pack.nix" },
|
||||
{ import = "astrocommunity.pack.python" },
|
||||
{ import = "astrocommunity.pack.rust" },
|
||||
{ import = "astrocommunity.pack.toml" },
|
||||
{ import = "astrocommunity.pack.yaml" },
|
||||
{ import = "astrocommunity.git.git-blame-nvim" },
|
||||
{ import = "astrocommunity.markdown-and-latex.vimtex" },
|
||||
{ import = "astrocommunity.lsp.lsp-lens-nvim" },
|
||||
{ import = "astrocommunity.lsp.lsp-signature-nvim" },
|
||||
{ import = "astrocommunity.lsp.nvim-lsp-file-operations" },
|
||||
{ import = "astrocommunity.bars-and-lines.vim-illuminate" },
|
||||
}
|
31
modules/home/shell/nvim-lua/lazy_setup.lua
Normal file
31
modules/home/shell/nvim-lua/lazy_setup.lua
Normal file
@ -0,0 +1,31 @@
|
||||
require("lazy").setup({
|
||||
{
|
||||
"AstroNvim/AstroNvim",
|
||||
version = "^4", -- Remove version tracking to elect for nighly AstroNvim
|
||||
import = "astronvim.plugins",
|
||||
opts = { -- AstroNvim options must be set here with the `import` key
|
||||
mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up
|
||||
maplocalleader = ",", -- This ensures the localleader key must be configured before Lazy is set up
|
||||
icons_enabled = true, -- Set to false to disable icons (if no Nerd Font is available)
|
||||
pin_plugins = nil, -- Default will pin plugins when tracking `version` of AstroNvim, set to true/false to override
|
||||
update_notifications = true, -- Enable/disable notification about running `:Lazy update` twice to update pinned plugins
|
||||
},
|
||||
},
|
||||
{ import = "community" },
|
||||
{ import = "plugins" },
|
||||
} --[[@as LazySpec]], {
|
||||
-- Configure any other `lazy.nvim` configuration options here
|
||||
install = { colorscheme = { "astrodark", "habamax" } },
|
||||
ui = { backdrop = 100 },
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins, add more to your liking
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
} --[[@as LazyConfig]])
|
41
modules/home/shell/nvim-lua/plugins/astrocore.lua
Normal file
41
modules/home/shell/nvim-lua/plugins/astrocore.lua
Normal file
@ -0,0 +1,41 @@
|
||||
---@type LazySpec
|
||||
return {
|
||||
"AstroNvim/astrocore",
|
||||
opts = {
|
||||
options = {
|
||||
opt = {
|
||||
relativenumber = false,
|
||||
number = true,
|
||||
spell = true,
|
||||
signcolumn = "yes",
|
||||
wrap = true,
|
||||
colorcolumn = "80,120",
|
||||
},
|
||||
g = {
|
||||
inlay_hints_enabled = true,
|
||||
},
|
||||
},
|
||||
lsp = {
|
||||
config = {
|
||||
rust_analyzer = {
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
cargo = {
|
||||
buildScripts = { enable = true },
|
||||
allFeatures = false,
|
||||
extraArgs = { "--release" },
|
||||
},
|
||||
installCargo = false,
|
||||
installRustc = false,
|
||||
procMacro = { enable = true },
|
||||
check = {
|
||||
command = "clippy",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
clangd = { capabilities = { offsetEncoding = "utf-8" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
8
modules/home/shell/nvim-lua/plugins/nvim-treesitter.lua
Normal file
8
modules/home/shell/nvim-lua/plugins/nvim-treesitter.lua
Normal file
@ -0,0 +1,8 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
config = function ()
|
||||
require("nvim-treesitter.install").compilers = {vim.g.gcc_bin_path}
|
||||
end,
|
||||
}
|
||||
}
|
76
modules/home/shell/nvim-lua/plugins/user.lua
Normal file
76
modules/home/shell/nvim-lua/plugins/user.lua
Normal file
@ -0,0 +1,76 @@
|
||||
---@type LazySpec
|
||||
return {
|
||||
-- {
|
||||
-- "catppuccin/nvim",
|
||||
-- name = "catppuccin",
|
||||
-- opts = {
|
||||
-- -- configuration options...
|
||||
-- flavor = "mocha",
|
||||
-- dim_inactive = {
|
||||
-- enable = true,
|
||||
-- shade = "light",
|
||||
-- percentage = 0.15,
|
||||
-- },
|
||||
-- color_overrides = {
|
||||
-- mocha = {
|
||||
-- base = "#26211e",
|
||||
-- crust = "#0a0807",
|
||||
-- mantle = "#585049",
|
||||
-- text = "#e6e2de",
|
||||
-- subtext0 = "#c6c2be",
|
||||
-- subtext1 = "#a6a29e",
|
||||
-- surface0 = "#585049",
|
||||
-- surface1 = "#c1b7b0",
|
||||
-- surface2 = "#f2f0ef",
|
||||
--
|
||||
-- red = "#f75b72",
|
||||
-- green = "#67af34",
|
||||
-- yellow = "#c98b1a",
|
||||
-- blue = "#509af6",
|
||||
-- pink = "#ca64f3",
|
||||
-- teal = "#1faeae",
|
||||
--
|
||||
-- bright_red = "#fb8590",
|
||||
-- bright_green = "#75c73b",
|
||||
-- bright_yellow = "#e49f27",
|
||||
-- bright_blue = "#77b1fb",
|
||||
-- bright_pink = "#d68af7",
|
||||
-- bright_teal = "#24c6c6",
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- {
|
||||
-- "AstroNvim/astroui",
|
||||
-- ---@type AstroUIOpts
|
||||
-- opts = {
|
||||
-- colorscheme = "catppuccin",
|
||||
-- },
|
||||
-- },
|
||||
{
|
||||
"p00f/clangd_extensions.nvim",
|
||||
optional = true,
|
||||
opts = { extensions = { autoSetHints = true } },
|
||||
init = function()
|
||||
--load clangd extensions when clangd attaches
|
||||
local augroup = vim.api.nvim_create_augroup("clangd_extensions", { clear = true })
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = augroup,
|
||||
desc = "Load clangd_extensions with clangd",
|
||||
callback = function(args)
|
||||
if assert(vim.lsp.get_client_by_id(args.data.client_id)).name == "clangd" then
|
||||
require("clangd_extensions")
|
||||
require("clangd_extensions.inlay_hints").setup_autocmd()
|
||||
require("clangd_extensions.inlay_hints").set_inlay_hints()
|
||||
vim.api.nvim_del_augroup_by_id(augroup)
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"simrat39/rust-tools.nvim",
|
||||
optional = true,
|
||||
opts = { tools = { inlay_hints = { auto = true } } },
|
||||
},
|
||||
}
|
88
modules/home/shell/zsh.nix
Normal file
88
modules/home/shell/zsh.nix
Normal file
@ -0,0 +1,88 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.shell.zsh;
|
||||
in {
|
||||
options.myConfig.shell.zsh = {
|
||||
enable = lib.mkEnableOption "Zsh, an advanced shell";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestion.enable = true;
|
||||
enableCompletion = true;
|
||||
defaultKeymap = "emacs";
|
||||
dotDir = ".config/zsh";
|
||||
history.expireDuplicatesFirst = true;
|
||||
history.path = "$ZDOTDIR/.zsh_history";
|
||||
historySubstringSearch.enable = true;
|
||||
shellAliases = {
|
||||
ls = "${pkgs.eza}/bin/eza --icons -a --group-directories-first";
|
||||
diff = "${pkgs.diffutils}/bin/diff --color=auto";
|
||||
grep = "${pkgs.gnugrep}/bin/grep --color=auto";
|
||||
ip = "${pkgs.iproute2}/bin/ip --color=auto";
|
||||
mkdir = "${pkgs.coreutils}/bin/mkdir -p";
|
||||
gst = "${pkgs.git}/bin/git status";
|
||||
gc = "${pkgs.git}/bin/git commit";
|
||||
ga = "${pkgs.git}/bin/git add";
|
||||
gpl = "${pkgs.git}/bin/git pull";
|
||||
gpu = "${pkgs.git}/bin/git push";
|
||||
gd = "${pkgs.git}/bin/git diff";
|
||||
gch = "${pkgs.git}/bin/git checkout";
|
||||
gs = "${pkgs.git}/bin/git switch";
|
||||
gre = "${pkgs.git}/bin/git restore";
|
||||
gr = "${pkgs.git}/bin/git remote";
|
||||
gcl = "${pkgs.git}/bin/git clone";
|
||||
glg = "${pkgs.git}/bin/git log --graph --abbrev-commit --decorate --format=format:'%C(bold green)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold yellow)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all";
|
||||
gb = "${pkgs.git}/bin/git branch";
|
||||
gm = "${pkgs.git}/bin/git merge";
|
||||
gf = "${pkgs.git}/bin/git fetch";
|
||||
};
|
||||
syntaxHighlighting.enable = true;
|
||||
syntaxHighlighting.highlighters = ["main" "brackets"];
|
||||
initContent = ''
|
||||
# auto completion
|
||||
bindkey '^I' complete-word
|
||||
bindkey '^[[Z' autosuggest-accept
|
||||
# backspace
|
||||
bindkey '^[[3' delete-char
|
||||
# home / end go to beginning / end of line
|
||||
bindkey '^[[H' beginning-of-line
|
||||
bindkey '^[[F' end-of-line
|
||||
# ctrl+arrow jump word
|
||||
bindkey '^[[1;5D' backward-word
|
||||
bindkey '^[[1;5C' forward-word
|
||||
# ctrl+entf and ctrl+backspace delete word
|
||||
bindkey '^[[3;5~' delete-word
|
||||
bindkey '^H' backward-delete-word
|
||||
'';
|
||||
};
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
command_timeout = 5000;
|
||||
character = {
|
||||
success_symbol = "[](bold green)";
|
||||
error_symbol = "[](bold red)";
|
||||
};
|
||||
cmd_duration = {
|
||||
min_time = 500;
|
||||
show_milliseconds = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
options = ["--cmd cd"];
|
||||
};
|
||||
};
|
||||
}
|
296
modules/home/sway/default.nix
Normal file
296
modules/home/sway/default.nix
Normal file
@ -0,0 +1,296 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.sway;
|
||||
|
||||
rotate_lisgd = pkgs.writeShellScriptBin "rotate_lisgd" ''
|
||||
# PREV_ORIENTATION and ORIENTATION are given by rot8
|
||||
|
||||
LISGD_INPUT=/dev/input/event14
|
||||
# open nwggrid by swiping up from the bottom edge
|
||||
LISGD_ACTIONS=("1,DU,B,*,R,${pkgs.sway}/bin/swaymsg exec ${pkgs.nwg-launchers}/bin/nwggrid -client")
|
||||
# close window by swiping down with 3 fingers
|
||||
LISGD_ACTIONS+=("3,UD,*,L,R,${pkgs.sway}/bin/swaymsg kill")
|
||||
|
||||
# move window left by swiping left with 2 fingers
|
||||
LISGD_ACTIONS+=("2,UD,*,*,R,${pkgs.sway}/bin/swaymsg move left")
|
||||
# move window down by swiping down with 2 fingers
|
||||
LISGD_ACTIONS+=("2,UD,*,*,R,${pkgs.sway}/bin/swaymsg move down")
|
||||
# move window up by swiping up with 2 fingers
|
||||
LISGD_ACTIONS+=("2,UD,*,*,R,${pkgs.sway}/bin/swaymsg move up")
|
||||
# move window right by swiping right with 2 fingers
|
||||
LISGD_ACTIONS+=("2,UD,*,*,R,${pkgs.sway}/bin/swaymsg move right")
|
||||
|
||||
LISGD_ACTION_OPTIONS=()
|
||||
for str in "''${LISGD_ACTIONS[@]}"; do
|
||||
LISGD_ACTION_OPTIONS+=("-g" "$str")
|
||||
done
|
||||
|
||||
${pkgs.killall}/bin/killall lisgd
|
||||
|
||||
${pkgs.lisgd}/bin/lisgd -v -d "$LISGD_INPUT" "''${LISGD_ACTION_OPTIONS[@]}" &
|
||||
'';
|
||||
|
||||
# bash script to let dbus know about impotant env variables and
|
||||
# propagate them to relevent services run at the end of sway config
|
||||
dbus-sway-environment = pkgs.writeShellScriptBin "dbus-sway-environment" ''
|
||||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
||||
systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
systemctl --user start pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
'';
|
||||
in {
|
||||
imports = [./kanshi.nix ./waybar.nix ./theme.nix ./mako.nix];
|
||||
|
||||
options.myConfig.sway = {
|
||||
enable = lib.mkEnableOption "sway, a lightweight window manager";
|
||||
laptop = lib.mkEnableOption "laptop config";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
myConfig.sway = {
|
||||
kanshi.enable = lib.mkDefault true;
|
||||
waybar.enable = lib.mkDefault true;
|
||||
theming.enable = lib.mkDefault true;
|
||||
mako.enable = lib.mkDefault true;
|
||||
waybar.battery = lib.mkIf cfg.laptop (lib.mkDefault true);
|
||||
waybar.backlight = lib.mkIf cfg.laptop (lib.mkDefault true);
|
||||
waybar.squeekboard = lib.mkIf cfg.laptop (lib.mkDefault true);
|
||||
kanshi.laptop = lib.mkIf cfg.laptop (lib.mkDefault true);
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
swaylock # screen locking
|
||||
swayidle # automatic screen locking after system idle time
|
||||
wezterm # terminal
|
||||
keepassxc # used for secrets instead of gnome-keyring
|
||||
|
||||
# fonts
|
||||
noto-fonts
|
||||
nerd-fonts.fira-code
|
||||
nerd-fonts.fira-mono
|
||||
fira
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
xdgAutostart = false;
|
||||
};
|
||||
|
||||
wrapperFeatures = {
|
||||
gtk = true;
|
||||
};
|
||||
|
||||
config = {
|
||||
output = let
|
||||
bgdir = ../../../assets;
|
||||
bg1080 = bgdir + "/bg1080.png";
|
||||
bg1080vert = bgdir + "/bg1080vert.png";
|
||||
bg4k = bgdir + "/bg4k.png";
|
||||
in
|
||||
lib.mkIf cfg.laptop {
|
||||
eDP-1 = {
|
||||
bg = "'${bg1080}' fit";
|
||||
};
|
||||
HDMI-A-1 = {
|
||||
bg = "'${bg4k}' fit";
|
||||
};
|
||||
DP-3 = {
|
||||
bg = "'${bg1080}' fit";
|
||||
};
|
||||
DP-4 = {
|
||||
bg = "'${bg1080}' fit";
|
||||
};
|
||||
DP-5 = {
|
||||
bg = "'${bg1080vert}' fit";
|
||||
};
|
||||
DP-6 = {
|
||||
bg = "'${bg1080}' fit";
|
||||
};
|
||||
DP-7 = {
|
||||
bg = "'${bg1080vert}' fit";
|
||||
};
|
||||
};
|
||||
|
||||
input = {
|
||||
"*" = {
|
||||
xkb_layout = "de";
|
||||
xkb_options = "caps:ctrl_modifier";
|
||||
xkb_numlock = "enable";
|
||||
};
|
||||
"type:touchpad" = lib.mkIf cfg.laptop {
|
||||
tap = "enable";
|
||||
natural_scroll = "enable";
|
||||
};
|
||||
# map laptop touchscreen to laptop display
|
||||
"1267:11676:ELAN2513:00_04F3:2D9C" = lib.mkIf cfg.laptop {
|
||||
tap = "enable";
|
||||
map_to_output = "'AU Optronics 0x4B2D Unknown'";
|
||||
};
|
||||
# map laptop stylus to laptop display
|
||||
"1267:11676:ELAN2513:00_04F3:2D9C_Stylus" = lib.mkIf cfg.laptop {
|
||||
tap = "enable";
|
||||
map_to_output = "'AU Optronics 0x4B2D Unknown'";
|
||||
};
|
||||
};
|
||||
|
||||
modifier = "Mod4";
|
||||
keybindings = let
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
in
|
||||
lib.mkOptionDefault {
|
||||
# special workspaces
|
||||
"${modifier}+1" = "workspace main";
|
||||
"${modifier}+2" = "workspace term";
|
||||
"${modifier}+3" = "workspace msg";
|
||||
"${modifier}+4" = "workspace music";
|
||||
"${modifier}+o" = "workspace obsidian";
|
||||
"${modifier}+Shift+1" = "move container to workspace main";
|
||||
"${modifier}+Shift+2" = "move container to workspace term";
|
||||
"${modifier}+Shift+3" = "move container to workspace msg";
|
||||
"${modifier}+Shift+4" = "move container to workspace music";
|
||||
|
||||
# screen capture
|
||||
"${modifier}+Print" = ''exec ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.wl-clipboard}/bin/wl-copy'';
|
||||
"${modifier}+Shift+Print" = ''exec ${pkgs.wf-recorder}/bin/wf-recorder -g "$(${pkgs.slurp}/bin/slurp)" -f "$HOME/Videos/screencapture_$(${pkgs.coreutils}/bin/date +%F-%T).mp4"'';
|
||||
|
||||
# brightness
|
||||
"XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -T 0.9";
|
||||
"XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -T 1.1";
|
||||
# volume
|
||||
"XF86AudioRaiseVolume" = "exec '${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +1%'";
|
||||
"XF86AudioLowerVolume" = "exec '${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -1%'";
|
||||
"XF86AudioMute" = "exec '${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle'";
|
||||
|
||||
# custom pause mode similar to typical system shutdown menus
|
||||
"${modifier}+F12" = "mode pause-break";
|
||||
};
|
||||
menu = "${pkgs.nwg-launchers}/bin/nwggrid -client";
|
||||
|
||||
# use wezterm as default terminal
|
||||
terminal = "${pkgs.wezterm}/bin/wezterm";
|
||||
assigns = {
|
||||
"main" = [{app_id = "firefox";}];
|
||||
"term" = [{app_id = "start-terminal";}];
|
||||
"msg" = [
|
||||
{title = "\\[Locked\\] - KeePassXC$";}
|
||||
{app_id = "thunderbird";}
|
||||
{app_id = "discord";}
|
||||
{app_id = "Element";}
|
||||
];
|
||||
"music" = [{app_id = "org.rncbc.qpwgraph";}];
|
||||
"obsidian" = [{app_id = "obsidian";} {class = "obsidian";}];
|
||||
};
|
||||
bars = [];
|
||||
|
||||
modes = {
|
||||
pause-break = {
|
||||
e = "exec --no-startup-id swaymsg exit, mode default";
|
||||
s = "exec --no-startup-id ${pkgs.dash}/bin/dash -c '${pkgs.swaylock}/bin/swaylock & systemctl suspend-then-hibernate', mode default";
|
||||
r = "exec --no-startup-id systemctl reboot";
|
||||
End = "exec --no-startup-id systemctl poweroff";
|
||||
Return = "mode default";
|
||||
Escape = "mode default";
|
||||
};
|
||||
};
|
||||
|
||||
startup =
|
||||
[
|
||||
{command = "${dbus-sway-environment}/bin/dbus-sway-environment";}
|
||||
{command = "${pkgs.nwg-launchers}/bin/nwggrid-server -fp";}
|
||||
{command = "${pkgs.keepassxc}/bin/keepassxc";}
|
||||
{command = "${pkgs.wezterm}/bin/wezterm start --class start-terminal";}
|
||||
{command = "${pkgs.networkmanagerapplet}/bin/nm-applet";}
|
||||
{command = "${pkgs.firefox}/bin/firefox";}
|
||||
{command = "${pkgs.obsidian}/bin/obsidian";}
|
||||
]
|
||||
++ lib.optionals cfg.laptop [
|
||||
{command = "${pkgs.squeekboard}/bin/squeekboard";}
|
||||
{command = "${pkgs.rot8}/bin/rot8 -n 10 -h ${rotate_lisgd}/bin/rotate_lisgd";}
|
||||
{command = "${rotate_lisgd}/bin/rotate_lisgd";}
|
||||
]
|
||||
++ lib.optional cfg.kanshi.enable
|
||||
{
|
||||
command = "${pkgs.kanshi}/bin/kanshictl reload";
|
||||
always = true;
|
||||
};
|
||||
|
||||
defaultWorkspace = "main";
|
||||
workspaceAutoBackAndForth = true;
|
||||
workspaceOutputAssign = lib.mkIf cfg.laptop [
|
||||
{
|
||||
workspace = "main";
|
||||
output = ["DP-3" "DP-4" "DP-6" "HDMI-A-1" "eDP-1"];
|
||||
}
|
||||
{
|
||||
workspace = "term";
|
||||
output = ["DP-5" "DP-4" "DP-7" "eDP-1"];
|
||||
}
|
||||
{
|
||||
workspace = "msg";
|
||||
output = ["eDP-1"];
|
||||
}
|
||||
{
|
||||
workspace = "music";
|
||||
output = ["eDP-1"];
|
||||
}
|
||||
{
|
||||
workspace = "5";
|
||||
output = ["DP-3" "DP-4" "DP-6" "HDMI-A-1" "eDP-1"];
|
||||
}
|
||||
{
|
||||
workspace = "obsidian";
|
||||
output = ["eDP-1"];
|
||||
}
|
||||
];
|
||||
|
||||
floating.criteria = [
|
||||
{
|
||||
title = "KeePassXC - Access Request";
|
||||
}
|
||||
{
|
||||
title = "Extension: (Tree Style Tab) - Close tabs? — Mozilla Firefox";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
extraConfig = lib.mkIf cfg.laptop ''
|
||||
bindswitch --reload --locked lid:on exec "[ $(${pkgs.sway}/bin/swaymsg -t get_outputs | ${pkgs.jq}/bin/jq '. | length') -gt 1 ] && ${pkgs.sway}/bin/swaymsg output eDP-1 disable"
|
||||
bindswitch --reload --locked lid:off output eDP-1 enable
|
||||
bindgesture --input-device=\'1267:11676:ELAN2513:00_04F3:2D9C\' swipe:3:down exec ${pkgs.nwg-launchers}/bin/nwggrid -client
|
||||
'';
|
||||
};
|
||||
|
||||
services.clipman.enable = true;
|
||||
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color = "313131";
|
||||
indicator-idle-visible = false;
|
||||
indicator-radius = 200;
|
||||
line-color = "00ffee";
|
||||
show-fai8led-attempts = true;
|
||||
};
|
||||
};
|
||||
|
||||
# install fonts
|
||||
fonts.fontconfig = {
|
||||
enable = true;
|
||||
defaultFonts = {
|
||||
emoji = ["Noto Color Emoji"];
|
||||
monospace = ["FiraCode Nerd Fonts" "FiraMono Nerd Font" "FiraMono" "NotoMono Nerd Font"];
|
||||
sansSerif = ["FiraSans" "NotoSans Nerd Font"];
|
||||
serif = ["NotoSerif Nerd Font"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
285
modules/home/sway/kanshi.nix
Normal file
285
modules/home/sway/kanshi.nix
Normal file
@ -0,0 +1,285 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.sway.kanshi;
|
||||
in {
|
||||
options.myConfig.sway.kanshi = {
|
||||
enable = lib.mkEnableOption "kanshi, a dynamic display recognizer";
|
||||
laptop = lib.mkEnableOption "laptop workspaces";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.kanshi = {
|
||||
enable = true;
|
||||
settings = lib.mkIf cfg.laptop [
|
||||
{
|
||||
profile.name = "laptop";
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "0,0";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "0,1080";
|
||||
}
|
||||
{
|
||||
criteria = "Dell Inc. DELL U2422HE GRCPH83";
|
||||
position = "0,0";
|
||||
}
|
||||
{
|
||||
criteria = "NEC Corporation E243WMi 7X313185NB";
|
||||
transform = "90";
|
||||
position = "1920,0";
|
||||
}
|
||||
];
|
||||
profile.exec = [
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=main] move workspace to DP-4"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=term] move workspace to DP-5"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=msg] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=music] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=5] move workspace to DP-4"
|
||||
];
|
||||
}
|
||||
{
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "0,1080";
|
||||
}
|
||||
{
|
||||
criteria = "Dell Inc. DELL U2422HE 8YCPH83";
|
||||
transform = "normal";
|
||||
position = "0,0";
|
||||
}
|
||||
{
|
||||
criteria = "Dell Inc. DELL P2422HE 28XL9M3";
|
||||
transform = "normal";
|
||||
position = "1920,0";
|
||||
}
|
||||
];
|
||||
profile.exec = [
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=main] move workspace to '\"Dell Inc. DELL U2422HE 8YCPH83\"'"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=term] move workspace to '\"Dell Inc. DELL P2422HE 28XL9M3\"'"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=msg] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=music] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=5] move workspace to '\"Dell Inc. DELL U2422HE 8YCPH83\"'"
|
||||
];
|
||||
}
|
||||
{
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "0,1080";
|
||||
}
|
||||
{
|
||||
criteria = "Dell Inc. DELL U2422HE 53DCH83";
|
||||
position = "0,0";
|
||||
}
|
||||
{
|
||||
criteria = "Dell Inc. DELL U2412M 0FFXD46I4U5S";
|
||||
transform = "90";
|
||||
position = "1920,0";
|
||||
}
|
||||
];
|
||||
profile.exec = [
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=main] move workspace to DP-6"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=term] move workspace to DP-7"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=msg] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=music] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=5] move workspace to DP-6"
|
||||
];
|
||||
}
|
||||
{
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "1080,1080";
|
||||
}
|
||||
{
|
||||
criteria = "Dell Inc. DELL P2422HE 4BXL9M3";
|
||||
position = "1080,0";
|
||||
}
|
||||
{
|
||||
criteria = "NEC Corporation E243WMi 75309334NB";
|
||||
transform = "90";
|
||||
position = "0,0";
|
||||
}
|
||||
];
|
||||
profile.exec = [
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=main] move workspace to DP-3"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=term] move workspace to DP-4"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=msg] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=music] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=5] move workspace to DP-3"
|
||||
];
|
||||
}
|
||||
{
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "1080,1080";
|
||||
}
|
||||
{
|
||||
criteria = "Dell Inc. DELL P2422HE JLXL9M3";
|
||||
position = "1080,0";
|
||||
}
|
||||
{
|
||||
criteria = "NEC Corporation E243WMi 59118576NB";
|
||||
transform = "90";
|
||||
position = "0,0";
|
||||
}
|
||||
];
|
||||
profile.exec = [
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=main] move workspace to DP-3"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=term] move workspace to DP-4"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=msg] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=music] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=5] move workspace to DP-3"
|
||||
];
|
||||
}
|
||||
{
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "0,1080";
|
||||
}
|
||||
{
|
||||
criteria = "Dell Inc. DELL P2422HE 7VWL9M3";
|
||||
position = "0,0";
|
||||
}
|
||||
{
|
||||
criteria = "ViewSonic Corporation VG2448 V5E201960167";
|
||||
transform = "90";
|
||||
position = "1920,0";
|
||||
}
|
||||
];
|
||||
profile.exec = [
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=main] move workspace to '\"Dell Inc. DELL P2422HE 7VWL9M3\"'"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=term] move workspace to '\"ViewSonic Corporation VG2448 V5E201960167\"'"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=msg] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=music] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=5] move workspace to '\"Dell Inc. DELL P2422HE 7VWL9M3\"'"
|
||||
];
|
||||
}
|
||||
{
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "1080,1080";
|
||||
}
|
||||
{
|
||||
criteria = "Dell Inc. DELL U2422HE 7HCPH83";
|
||||
position = "1080,0";
|
||||
}
|
||||
{
|
||||
criteria = "Dell Inc. DELL U2422HE 1XFFH83";
|
||||
transform = "90";
|
||||
position = "0,0";
|
||||
}
|
||||
];
|
||||
profile.exec = [
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=main] move workspace to '\"Dell Inc. DELL U2422HE 7HCPH83\"'"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=term] move workspace to '\"Dell Inc. DELL U2422HE 1XFFH83\"'"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=msg] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=music] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=5] move workspace to '\"Dell Inc. DELL U2422HE 7HCPH83\"'"
|
||||
];
|
||||
}
|
||||
{
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "1080,1080";
|
||||
}
|
||||
{
|
||||
criteria = "DP-3";
|
||||
position = "1080,0";
|
||||
}
|
||||
{
|
||||
criteria = "DP-1";
|
||||
transform = "90";
|
||||
position = "0,0";
|
||||
}
|
||||
];
|
||||
profile.exec = [
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=main] move workspace to DP-3"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=term] move workspace to DP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=msg] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=music] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=5] move workspace to DP-3"
|
||||
];
|
||||
}
|
||||
{
|
||||
profile.name = "docked-4k";
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "320,1440";
|
||||
}
|
||||
{
|
||||
criteria = "HannStar Display Corp HC281UPB ";
|
||||
position = "0,0";
|
||||
mode = "3840x2160@60";
|
||||
scale = 1.5;
|
||||
}
|
||||
];
|
||||
profile.exec = [
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=main] move workspace to HDMI-A-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=term] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=msg] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=music] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=5] move workspace to HDMI-A-1"
|
||||
];
|
||||
}
|
||||
{
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "0,0";
|
||||
}
|
||||
{
|
||||
criteria = "Hisense Electric Co., Ltd. HISENSE 0x00000001";
|
||||
position = "1920,0";
|
||||
}
|
||||
];
|
||||
profile.exec = [
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=main] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=term] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=msg] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=music] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=5] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=mirror] move workspace to HDMI-A-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=mirror] exec ${pkgs.wl-mirror}/bin/wl-mirror eDP-1"
|
||||
];
|
||||
}
|
||||
{
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "0,1080";
|
||||
}
|
||||
{
|
||||
criteria = "ViewSonic Corporation VG2448 V5E201864188";
|
||||
position = "0,0";
|
||||
}
|
||||
];
|
||||
profile.exec = [
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=main] move workspace to '\"ViewSonic Corporation VG2448 V5E201864188\"'"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=term] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=msg] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=music] move workspace to eDP-1"
|
||||
"${pkgs.sway}/bin/swaymsg [workspace=5] move workspace to '\"ViewSonic Corporation VG2448 V5E201864188\"'"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
31
modules/home/sway/mako.nix
Normal file
31
modules/home/sway/mako.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.sway.mako;
|
||||
in {
|
||||
options.myConfig.sway.mako = {
|
||||
enable = lib.mkEnableOption "mako, a notification deamon";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.mako = {
|
||||
enable = true;
|
||||
settings = {
|
||||
actions = true;
|
||||
anchor = "top-right";
|
||||
|
||||
border-radius = 10;
|
||||
border-size = 2;
|
||||
height = 100;
|
||||
width = 400;
|
||||
|
||||
default-timeout = 10000; # ms
|
||||
font = "FiraCode Nerd Font 11";
|
||||
icons = true;
|
||||
markup = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
129
modules/home/sway/theme.nix
Normal file
129
modules/home/sway/theme.nix
Normal file
@ -0,0 +1,129 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.sway.theming;
|
||||
|
||||
# currently, there is some friction between sway and gtk:
|
||||
# https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
|
||||
configure-gtk = pkgs.writeShellScriptBin "configure-gtk" ''
|
||||
gnome_schema=org.gnome.desktop.interface
|
||||
gsettings set $gnome_schema gtk-theme 'Dracula'
|
||||
'';
|
||||
in {
|
||||
options.myConfig.sway.theming = {
|
||||
enable = lib.mkEnableOption "theming for sway";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
wayland.windowManager.sway.config = {
|
||||
fonts = {
|
||||
names = ["FiraCode Nerd Font"];
|
||||
size = 11.0;
|
||||
};
|
||||
|
||||
colors = {
|
||||
background = "#00000000";
|
||||
focused = {
|
||||
border = "#00FFEE";
|
||||
background = "#4477AA";
|
||||
text = "#F0F0F0";
|
||||
childBorder = "#00FFEE";
|
||||
indicator = "#00AA88";
|
||||
};
|
||||
focusedInactive = {
|
||||
border = "#626262";
|
||||
background = "#444444";
|
||||
text = "#F0F0F0";
|
||||
childBorder = "#626262";
|
||||
indicator = "#00AA88";
|
||||
};
|
||||
placeholder = {
|
||||
border = "#313131";
|
||||
background = "#222222";
|
||||
text = "#F0F0F0";
|
||||
childBorder = "#313131";
|
||||
indicator = "#005544";
|
||||
};
|
||||
unfocused = {
|
||||
border = "#313131";
|
||||
background = "#222222";
|
||||
text = "#F0F0F0";
|
||||
childBorder = "#313131";
|
||||
indicator = "#00AA88";
|
||||
};
|
||||
urgent = {
|
||||
border = "#FF3131";
|
||||
background = "#882222";
|
||||
text = "#F0F0F0";
|
||||
childBorder = "#FF3131";
|
||||
indicator = "#00AA88";
|
||||
};
|
||||
};
|
||||
|
||||
focus.mouseWarping = true;
|
||||
|
||||
gaps = {
|
||||
inner = 5;
|
||||
smartGaps = true;
|
||||
smartBorders = "no_gaps";
|
||||
};
|
||||
window.titlebar = false;
|
||||
|
||||
startup = [
|
||||
{command = "${configure-gtk}/bin/configure-gtk";}
|
||||
];
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
cursorTheme = {
|
||||
package = pkgs.capitaine-cursors;
|
||||
name = "capitaine-cursors-white";
|
||||
size = 24;
|
||||
};
|
||||
iconTheme = {
|
||||
package = pkgs.whitesur-icon-theme;
|
||||
name = "WhiteSur-dark";
|
||||
};
|
||||
theme = {
|
||||
package = pkgs.whitesur-gtk-theme;
|
||||
name = "WhiteSur-Dark";
|
||||
};
|
||||
gtk3.extraConfig = {
|
||||
gtk-dialogs-use-header = false;
|
||||
gtk-cursor-theme-size = 0;
|
||||
gtk-toolbar-style = "GTK_TOOLBAR_BOTH_HORIZ";
|
||||
gtk-toolbar-icon-style = "GTK_ICON_SIZE_LARGE_TOOLBAR";
|
||||
gtk-button-images = 0;
|
||||
gtk-menu-images = 0;
|
||||
gtk-enable-event-sounds = 0;
|
||||
gtk-enable-input-feedback-sounds = 1;
|
||||
gtk-xft-antialias = 1;
|
||||
gtk-xft-hinting = 1;
|
||||
gtk-xft-hintstyle = "hintslight";
|
||||
gtk-xft-rgba = "none";
|
||||
};
|
||||
};
|
||||
home.pointerCursor = {
|
||||
package = pkgs.capitaine-cursors;
|
||||
name = "capitaine-cursors-white";
|
||||
size = 24;
|
||||
x11.enable = true;
|
||||
x11.defaultCursor = "capitaine-cursors-white";
|
||||
};
|
||||
xsession.enable = true;
|
||||
|
||||
services.mako.settings = {
|
||||
background-color = "#313131";
|
||||
border-color = "#00FFEE";
|
||||
progress-color = "#338833";
|
||||
text-color = "#e0e0e0";
|
||||
"urgency=low" = {
|
||||
border-color = "#008877";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
66
modules/home/sway/waybar.css
Normal file
66
modules/home/sway/waybar.css
Normal file
@ -0,0 +1,66 @@
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-size: 11px;
|
||||
font-family: "FiraCode Nerd Font";
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: #292828;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
margin-right: 2px;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
color: #ffffff;
|
||||
}
|
||||
#workspaces button:hover,
|
||||
#workspaces button:active {
|
||||
background-color: #606060;
|
||||
color: #ffffff;
|
||||
}
|
||||
#workspaces button.focused {
|
||||
background-color: #383737;
|
||||
color: #00ffee;
|
||||
}
|
||||
|
||||
#mpd {
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
#custom-squeekboard {
|
||||
border-width: 1px;
|
||||
border-style: none none none solid;
|
||||
border-color: #444444;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
#tray,
|
||||
#language,
|
||||
#network,
|
||||
#backlight,
|
||||
#clock,
|
||||
#wireplumber,
|
||||
#battery {
|
||||
border-width: 1px;
|
||||
border-style: none none none solid;
|
||||
border-color: #444444;
|
||||
padding-left: 3px;
|
||||
padding-right: 6px;
|
||||
}
|
||||
|
||||
#battery.warning {
|
||||
background-color: #ffd760;
|
||||
color: #111111;
|
||||
}
|
||||
|
||||
#battery.critical {
|
||||
background-color: #ff4040;
|
||||
color: #111111;
|
||||
}
|
148
modules/home/sway/waybar.nix
Normal file
148
modules/home/sway/waybar.nix
Normal file
@ -0,0 +1,148 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.sway.waybar;
|
||||
|
||||
schema = "org.gnome.desktop.a11y.applications";
|
||||
key = "screen-keyboard-enabled";
|
||||
|
||||
squeekboard_toggle = pkgs.writeShellScriptBin "squeekboard_toggle" ''
|
||||
if [ "$(gsettings get ${schema} ${key})" == "true" ]; then
|
||||
gsettings set ${schema} ${key} false
|
||||
else
|
||||
gsettings set ${schema} ${key} true
|
||||
fi
|
||||
'';
|
||||
|
||||
squeekboard_format = pkgs.writeShellScriptBin "squeekboard_format" ''
|
||||
if [ "$(gsettings get ${schema} ${key})" == "true" ]; then
|
||||
echo '{ "text": "", "tooltip": "enabled", "percentage": 100 }'
|
||||
else
|
||||
echo '{ "text": "", "tooltip": "disabled", "percentage": 0 }'
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
options.myConfig.sway.waybar = {
|
||||
enable = lib.mkEnableOption "waybar, a status bar for wayland compositors";
|
||||
squeekboard = lib.mkEnableOption "squeekboard";
|
||||
mpd = lib.mkEnableOption "mpd";
|
||||
battery = lib.mkEnableOption "battery";
|
||||
backlight = lib.mkEnableOption "backlight";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
wayland.windowManager.sway.config.startup = [{command = "${pkgs.waybar}/bin/waybar";}];
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 26;
|
||||
modules-left = ["sway/workspaces" "sway/mode"];
|
||||
modules-center = ["sway/window"];
|
||||
modules-right = ["mpd" "wireplumber" "tray" "custom/squeekboard" "sway/language" "clock" "backlight" "battery" "network"];
|
||||
|
||||
"sway/workspaces" = {
|
||||
disable-scroll = true;
|
||||
all-outputs = false;
|
||||
format = "<span size='150%'>{icon}</span> {name}";
|
||||
format-icons = {
|
||||
"main" = "";
|
||||
"term" = "";
|
||||
"msg" = "";
|
||||
"music" = "";
|
||||
"urgent" = "";
|
||||
"focused" = "";
|
||||
"default" = "";
|
||||
};
|
||||
};
|
||||
|
||||
"mpd" = lib.mkIf cfg.mpd {
|
||||
format = "{stateIcon}{consumeIcon}{randomIcon}{repeatIcon}{singleIcon} {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) {volume}";
|
||||
format-stopped = "{stateIcon}{randomIcon}{repeatIcon}{singleIcon} Stopped {volume}";
|
||||
format-disconnected = "";
|
||||
unkown-tag = "N/A";
|
||||
interval = 2;
|
||||
consume-icons = {
|
||||
on = " ";
|
||||
off = "";
|
||||
};
|
||||
random-icons = {
|
||||
on = " ";
|
||||
off = " ";
|
||||
};
|
||||
repeat-icons = {
|
||||
on = " ";
|
||||
off = " ";
|
||||
};
|
||||
single-icons = {
|
||||
on = " ";
|
||||
off = "";
|
||||
};
|
||||
state-icons = {
|
||||
paused = " ";
|
||||
playing = " ";
|
||||
};
|
||||
max-length = 50;
|
||||
};
|
||||
|
||||
"tray" = {
|
||||
spacing = 10;
|
||||
};
|
||||
|
||||
"custom/squeekboard" = lib.mkIf cfg.squeekboard {
|
||||
format = "{}";
|
||||
exec = "${squeekboard_format}/bin/squeekboard_format";
|
||||
return-type = "json";
|
||||
exec-on-event = true;
|
||||
interval = 2;
|
||||
on-click = "${squeekboard_toggle}/bin/squeekboard_toggle";
|
||||
};
|
||||
|
||||
"sway/language" = {
|
||||
format = "{shortDescription}";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"clock" = {
|
||||
interval = 60;
|
||||
format = "{:%a %d.%m %H:%M}";
|
||||
};
|
||||
|
||||
"backlight" = lib.mkIf cfg.backlight {
|
||||
format = "{percent}% {icon}";
|
||||
format-icons = ["" "" "" "" "" "" "" "" "" "" ""];
|
||||
};
|
||||
|
||||
"battery" = lib.mkIf cfg.battery {
|
||||
format = "{capacity}% {icon}";
|
||||
format-charging = "{capacity}% {icon}";
|
||||
format-icons = ["" "" "" "" "" "" "" "" "" "" ""];
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
};
|
||||
|
||||
"network" = {
|
||||
format-wifi = "{essid} ({signalStrength}%) ";
|
||||
format-ethernet = "{ipaddr}/{cidr} ";
|
||||
tooltip-format = "{ifname} via {gwaddr} ";
|
||||
format-disconnected = "";
|
||||
};
|
||||
|
||||
"wireplumber" = {
|
||||
format = "{volume}% {icon}";
|
||||
format-muted = "";
|
||||
format-icons = ["" "" ""];
|
||||
};
|
||||
};
|
||||
};
|
||||
style = ./waybar.css;
|
||||
};
|
||||
};
|
||||
}
|
BIN
modules/nixos/T-TeleSec_GlobalRoot_Class_2.crt
Normal file
BIN
modules/nixos/T-TeleSec_GlobalRoot_Class_2.crt
Normal file
Binary file not shown.
19
modules/nixos/bluetooth.nix
Normal file
19
modules/nixos/bluetooth.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.bluetooth;
|
||||
in {
|
||||
options.myConfig.bluetooth = {
|
||||
enable = lib.mkEnableOption "bluetooth";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
services.blueman.enable = true;
|
||||
};
|
||||
}
|
21
modules/nixos/bootloader.nix
Normal file
21
modules/nixos/bootloader.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.bootloader;
|
||||
in {
|
||||
options.myConfig.bootloader = {
|
||||
enable = lib.mkEnableOption "enable systemd bootloader";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
boot.loader = {
|
||||
timeout = 0;
|
||||
systemd-boot.enable = true;
|
||||
systemd-boot.memtest86.enable = true;
|
||||
systemd-boot.editor = false;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
}
|
21
modules/nixos/cache.nix
Normal file
21
modules/nixos/cache.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.cache;
|
||||
in {
|
||||
options.myConfig.cache = {
|
||||
enable = lib.mkEnableOption "extra binary caches";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
nix.settings = {
|
||||
substituters = ["https://nix-community.cachix.org/" "https://nixpkgs-python.cachix.org/"];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"nixpkgs-python.cachix.org-1:hxjI7pFxTyuTHn2NkvWCrAUcNZLNS3ZAvfYNuYifcEU="
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
47
modules/nixos/cups.nix
Normal file
47
modules/nixos/cups.nix
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.cups;
|
||||
in {
|
||||
options.myConfig.cups = {
|
||||
enable = lib.mkEnableOption "printing";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Enable CUPS to print documents.
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [pkgs.samsung-unified-linux-driver];
|
||||
};
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
hardware.printers = {
|
||||
ensurePrinters = [
|
||||
{
|
||||
name = "Samsung_ML-1630W_Series";
|
||||
location = "luhbots";
|
||||
deviceUri = "dnssd://Samsung%20ML-1630W%20Series%20(SEC00159937E684)._pdl-datastream._tcp.local/";
|
||||
model = "samsung/ML-1630W.ppd";
|
||||
ppdOptions = {
|
||||
PageSize = "A4";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "Brother_HL-L3210CW_series";
|
||||
location = "Max Zimmer";
|
||||
deviceUri = "dnssd://Brother%20HL-L3210CW%20series._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-900f0c617136";
|
||||
model = "drv:///sample.drv/generic.ppd";
|
||||
ppdOptions = {
|
||||
PageSize = "A4";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
70
modules/nixos/default.nix
Normal file
70
modules/nixos/default.nix
Normal file
@ -0,0 +1,70 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
system,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig;
|
||||
in {
|
||||
imports = [./bootloader.nix ./locale.nix ./greetd.nix ./rebuild.nix ./sops.nix ./sway.nix ./wifi.nix ./music.nix ./cups.nix ./gpu/amd.nix ./touch.nix ./cache.nix ./nix.nix ./update.nix ./podman.nix ./qemu.nix ./bluetooth.nix ./network.nix ./nix-ld.nix];
|
||||
|
||||
options.myConfig = {
|
||||
enable = lib.mkEnableOption "my custom config";
|
||||
desktop = lib.mkEnableOption "custom config with desktop support";
|
||||
laptop = lib.mkEnableOption "extra stuff for laptops like wifi";
|
||||
user = lib.mkOption {
|
||||
default = "max";
|
||||
example = "foo";
|
||||
description = "The main user working on this machine";
|
||||
type = lib.types.nonEmptyStr;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
myConfig = {
|
||||
bootloader.enable = true;
|
||||
locale.enable = true;
|
||||
rebuild.enable = true;
|
||||
cache.enable = true;
|
||||
autoUpdate.enable = true;
|
||||
podman.enable = true;
|
||||
qemu.enable = true;
|
||||
qemu.kvm = lib.mkIf (system == "x86_64-linux") true;
|
||||
network.enable = true;
|
||||
nix-ld.enable = true;
|
||||
|
||||
greetd.enable = lib.mkIf cfg.desktop true;
|
||||
sway.enable = lib.mkIf cfg.desktop true;
|
||||
music.enable = lib.mkIf cfg.desktop true;
|
||||
cups.enable = lib.mkIf cfg.desktop true;
|
||||
wifi.tray = lib.mkIf cfg.desktop true;
|
||||
|
||||
sway.laptop = lib.mkIf cfg.laptop true;
|
||||
wifi.enable = lib.mkIf cfg.laptop true;
|
||||
touch.enable = lib.mkIf cfg.laptop true;
|
||||
bluetooth.enable = lib.mkIf cfg.laptop true;
|
||||
};
|
||||
|
||||
users.users.${cfg.user} = {
|
||||
isNormalUser = true;
|
||||
description = "Max Känner";
|
||||
extraGroups = ["wheel" "dialout"];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = {inherit inputs;};
|
||||
users.${cfg.user} = import ../../hosts/${cfg.network.hostName}/home.nix;
|
||||
};
|
||||
|
||||
programs.ssh.startAgent = true;
|
||||
programs.zsh.enable = true;
|
||||
programs.steam.enable = true;
|
||||
|
||||
security.polkit.enable = true;
|
||||
|
||||
services.upower.enable = true;
|
||||
};
|
||||
}
|
49
modules/nixos/gpu/amd.nix
Normal file
49
modules/nixos/gpu/amd.nix
Normal file
@ -0,0 +1,49 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.gpu.amd;
|
||||
in {
|
||||
options.myConfig.gpu.amd = {
|
||||
enable = lib.mkEnableOption "enable amd gpu hardware acceleration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
boot.initrd.kernelModules = ["amdgpu"];
|
||||
services.xserver.videoDrivers = ["amdgpu"];
|
||||
|
||||
systemd.tmpfiles.rules = let
|
||||
rocmEnv = pkgs.symlinkJoin {
|
||||
name = "rocm-combined";
|
||||
paths = with pkgs.rocmPackages; [
|
||||
rocblas
|
||||
hipblas
|
||||
rocm-smi
|
||||
clr
|
||||
];
|
||||
};
|
||||
in [
|
||||
"L+ /opt/rocm - - - - ${rocmEnv}"
|
||||
];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
rocmPackages.clr.icd
|
||||
amdvlk
|
||||
];
|
||||
extraPackages32 = with pkgs; [
|
||||
driversi686Linux.amdvlk
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
glxinfo
|
||||
vulkan-tools
|
||||
gpu-viewer
|
||||
];
|
||||
};
|
||||
}
|
@ -1,69 +1,57 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
swayConfig = pkgs.writeText "greetd-sway-config" ''
|
||||
input * {
|
||||
xkb_layout "de"
|
||||
xkb_options "caps:ctrl_modifier"
|
||||
xkb_numlock "enable"
|
||||
}
|
||||
input "type:touchpad" {
|
||||
tap "enable"
|
||||
natural_scroll "enable"
|
||||
}
|
||||
|
||||
exec dbus-sway-environment
|
||||
exec configure-gtk
|
||||
# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet.
|
||||
exec "${pkgs.greetd.regreet}/bin/regreet; swaymsg exit"
|
||||
bindsym Mod4+shift+e exec swaynag \
|
||||
-t warning \
|
||||
-m 'What do you want to do?' \
|
||||
-b 'Poweroff' 'systemctl poweroff' \
|
||||
-b 'Reboot' 'systemctl reboot'
|
||||
cfg = config.myConfig.greetd;
|
||||
themeEnv = ''
|
||||
export XDG_DATA_DIRS="${pkgs.whitesur-gtk-theme}/share:$XDG_DATA_DIRS"
|
||||
export XDG_DATA_DIRS="${pkgs.whitesur-icon-theme}/share:$XDG_DATA_DIRS"
|
||||
export XDG_DATA_DIRS="${pkgs.whitesur-cursors}/share:$XDG_DATA_DIRS"
|
||||
'';
|
||||
in {
|
||||
programs.regreet = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background = {
|
||||
fit = "Containe";
|
||||
path = "~/Documents/Blender/desktop background Informatiker/render 4K new color.png";
|
||||
};
|
||||
gtk = {
|
||||
application_prefer_dark_theme = true;
|
||||
cursor_theme_name = "capitaine-cursors-white";
|
||||
font_name = "FiraCode Nerd Font";
|
||||
icon_theme_name = "WhiteSur-dark";
|
||||
theme_name = "WhiteSur-Dark";
|
||||
};
|
||||
commands = {
|
||||
reboot = ["systemctl" "reboot"];
|
||||
poweroff = ["systemctl" "poweroff"];
|
||||
options.myConfig.greetd = {
|
||||
enable = lib.mkEnableOption "greetd, a light weight greater deamon";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.extraInit = themeEnv;
|
||||
programs.regreet = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background = {
|
||||
fit = "Contain";
|
||||
path = ../../assets/bg4k.png;
|
||||
};
|
||||
GTK = {
|
||||
application_prefer_dark_theme = true;
|
||||
cursor_theme_name = lib.mkForce "capitaine-cursors-white";
|
||||
font_name = lib.mkForce "FiraCode Nerd Font 20";
|
||||
icon_theme_name = lib.mkForce "WhiteSur-dark";
|
||||
theme_name = lib.mkForce "WhiteSur-Dark";
|
||||
};
|
||||
commands = {
|
||||
reboot = ["systemctl" "reboot"];
|
||||
poweroff = ["systemctl" "poweroff"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
users.users.greeter = {
|
||||
isNormalUser = false;
|
||||
description = "Greeter";
|
||||
extraGroups = [];
|
||||
};
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
initial_session = {
|
||||
command = "${pkgs.sway}/bin/sway --config ${swayConfig}";
|
||||
user = "greeter";
|
||||
};
|
||||
users.users.greeter = {
|
||||
isNormalUser = false;
|
||||
description = "Greeter";
|
||||
extraGroups = [];
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc."greetd/environments".text = ''
|
||||
sway
|
||||
'';
|
||||
environment.etc."greetd/environments".text = ''
|
||||
sway
|
||||
'';
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
whitesur-gtk-theme
|
||||
whitesur-icon-theme
|
||||
whitesur-cursors
|
||||
];
|
||||
};
|
||||
}
|
||||
|
34
modules/nixos/locale.nix
Normal file
34
modules/nixos/locale.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.locale;
|
||||
in {
|
||||
options.myConfig.locale = {
|
||||
enable = lib.mkEnableOption "custom locale";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
};
|
||||
}
|
29
modules/nixos/music.nix
Normal file
29
modules/nixos/music.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.music;
|
||||
in {
|
||||
options.myConfig.music = {
|
||||
enable = lib.mkEnableOption "sound system";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
musnix = {
|
||||
enable = true;
|
||||
rtcqs.enable = true;
|
||||
};
|
||||
users.users.${config.myConfig.user}.extraGroups = ["audio"];
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
};
|
||||
}
|
26
modules/nixos/network.nix
Normal file
26
modules/nixos/network.nix
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.network;
|
||||
in {
|
||||
options.myConfig.network = {
|
||||
enable = lib.mkEnableOption "bluetooth";
|
||||
hostName = lib.mkOption {
|
||||
default = null;
|
||||
example = "host";
|
||||
description = "The host name of this machine";
|
||||
type = lib.types.nullOr lib.types.nonEmptyStr;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
networking = {
|
||||
hostName = cfg.hostName;
|
||||
firewall.enable = false;
|
||||
};
|
||||
|
||||
users.users.${config.myConfig.user}.extraGroups = ["networkmanager"];
|
||||
};
|
||||
}
|
19
modules/nixos/nix-ld.nix
Normal file
19
modules/nixos/nix-ld.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.nix-ld;
|
||||
in {
|
||||
options.myConfig.nix-ld = {
|
||||
enable = lib.mkEnableOption "ld replacement for external binaries";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [libclang stdenv.cc.cc];
|
||||
};
|
||||
};
|
||||
}
|
11
modules/nixos/nix.nix
Normal file
11
modules/nixos/nix.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{...}: {
|
||||
config = {
|
||||
nix.settings = {
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
auto-optimise-store = true;
|
||||
max-jobs = "auto";
|
||||
cores = 12;
|
||||
download-buffer-size = 524288000;
|
||||
};
|
||||
};
|
||||
}
|
20
modules/nixos/podman.nix
Normal file
20
modules/nixos/podman.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.podman;
|
||||
in {
|
||||
options.myConfig.podman = {
|
||||
enable = lib.mkEnableOption "podman";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
virtualisation.
|
||||
podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
};
|
||||
}
|
40
modules/nixos/qemu.nix
Normal file
40
modules/nixos/qemu.nix
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.qemu;
|
||||
in {
|
||||
options.myConfig.qemu = {
|
||||
enable = lib.mkEnableOption "qemu";
|
||||
kvm = lib.mkEnableOption "kvm for faster emulation of x86";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
virtualisation.
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu = {
|
||||
package =
|
||||
if cfg.kvm
|
||||
then pkgs.qemu_kvm
|
||||
else config.virtualisation.libvirtd.qemu.package;
|
||||
runAsRoot = true;
|
||||
swtpm.enable = true;
|
||||
ovmf = {
|
||||
enable = true;
|
||||
packages = [
|
||||
(pkgs.OVMF.override {
|
||||
secureBoot = true;
|
||||
tpmSupport = true;
|
||||
})
|
||||
.fd
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
# boot.binfmt.emulatedSystems = ["aarch64-linux"];
|
||||
users.users.${config.myConfig.user}.extraGroups = ["libvirtd"];
|
||||
};
|
||||
}
|
53
modules/nixos/rebuild.nix
Normal file
53
modules/nixos/rebuild.nix
Normal file
@ -0,0 +1,53 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.rebuild;
|
||||
|
||||
# script for rebuilding nixos
|
||||
rebuild = pkgs.writeShellScriptBin "rebuild" ''
|
||||
# A rebuild script that commits on a successful build
|
||||
set -e
|
||||
|
||||
# cd to your config dir
|
||||
pushd ~/dotfiles/nixos
|
||||
|
||||
# Edit your config
|
||||
$EDITOR
|
||||
|
||||
# Autoformat your nix files
|
||||
${pkgs.alejandra}/bin/alejandra . #&>/dev/null
|
||||
|
||||
# Shows your changes
|
||||
${pkgs.git}/bin/git diff -U0
|
||||
|
||||
echo "NixOS Rebuilding..."
|
||||
|
||||
# echo using sudo so we get feedback after unlocking
|
||||
sudo echo "Beginning rebuild"
|
||||
# Rebuild, output simplified errors, log trackebacks
|
||||
sudo nixos-rebuild switch
|
||||
|
||||
# Get current generation metadata
|
||||
current=$(nixos-rebuild list-generations | ${pkgs.gnugrep}/bin/grep current)
|
||||
|
||||
# Commit all changes with the gereation metadata
|
||||
${pkgs.git}/bin/git commit -am "$current"
|
||||
|
||||
# Back to where you were
|
||||
popd
|
||||
|
||||
# Notify all OK!
|
||||
${pkgs.libnotify}/bin/notify-send -e "NixOS Rebuilt OK!" --icon=software-update-available
|
||||
'';
|
||||
in {
|
||||
options.myConfig.rebuild = {
|
||||
enable = lib.mkEnableOption "rebuild script with automatic git commits";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [rebuild];
|
||||
};
|
||||
}
|
46
modules/nixos/sops.nix
Normal file
46
modules/nixos/sops.nix
Normal file
@ -0,0 +1,46 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.sops;
|
||||
in {
|
||||
options.myConfig.sops = {
|
||||
enable = lib.mkEnableOption "sops, an secrets manager";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
sops = {
|
||||
age.keyFile = "/home/max/.config/sops/age/keys.txt";
|
||||
secrets = {
|
||||
"home/ssid" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"home/psk" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"parents/ssid" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"parents/psk" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"eduroam/ident" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"eduroam/psk" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"luhbots/ssid" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"luhbots/ssid5" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"luhbots/psk" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,88 +1,47 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
# bash script to let dbus know about impotant env variables and
|
||||
# propagate them to relevent services run at the end of sway config
|
||||
dbus-sway-environment = pkgs.writeTextFile {
|
||||
name = "dubs-sway-environment";
|
||||
destination = "/bin/dbus-sway-environment";
|
||||
executable = true;
|
||||
text = ''
|
||||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
||||
systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
systemctl --user start pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
'';
|
||||
};
|
||||
|
||||
# currently, there is some friction between sway and gtk:
|
||||
# https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
|
||||
configure-gtk = pkgs.writeTextFile {
|
||||
name = "configure-gtk";
|
||||
destination = "/bin/configure-gtk";
|
||||
executable = true;
|
||||
text = let
|
||||
schema = pkgs.gsettings-desktop-schemas;
|
||||
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
|
||||
in ''
|
||||
gnome_schema=org.gnome.desktop.interface
|
||||
gsettings set $gnome_schema gtk-theme 'Dracula'
|
||||
'';
|
||||
};
|
||||
cfg = config.myConfig.sway;
|
||||
in {
|
||||
environment.systemPackages = with pkgs; [
|
||||
dbus # make dbus-update-activation-environment available in the path
|
||||
dbus-sway-environment
|
||||
configure-gtk
|
||||
wayland
|
||||
xdg-utils # for opening default programs when clicking links
|
||||
glib # gsettings
|
||||
dracula-theme # gtk theme
|
||||
gnome3.adwaita-icon-theme # default gnome cursors
|
||||
swaylock
|
||||
swayidle
|
||||
grim # screenshot functionality
|
||||
slurp # screenshot functionality
|
||||
wl-clipboard # wl-copy and wl-paste for copy/paste from stdin/stdout
|
||||
mako # notification system developed by swaywm maintainer
|
||||
wdisplays # tool to configure displays
|
||||
];
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
wireplumber.enable = true;
|
||||
options.myConfig.sway = {
|
||||
enable = lib.mkEnableOption "sway";
|
||||
laptop = lib.mkEnableOption "enable laptop things (backlight)";
|
||||
};
|
||||
|
||||
# xdg-desktop-portal works by exposing a series of D-Bus interfaces
|
||||
# known as portals under a well-known name
|
||||
# (org.freedesktop.portal.Desktop) and object path
|
||||
# (/org/freedesktop/portal/desktop).
|
||||
# The portal interfaces include APIs for file access, opening URIs,
|
||||
# printing and others.
|
||||
services.dbus.enable = true;
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
config.common.default = ["wlr" "gtk"];
|
||||
# gtk portal needed to make gtk apps happy
|
||||
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
dbus # make dbus-update-activation-environment available in the path
|
||||
libnotify
|
||||
];
|
||||
|
||||
# xdg-desktop-portal works by exposing a series of D-Bus interfaces
|
||||
# known as portals under a well-known name
|
||||
# (org.freedesktop.portal.Desktop) and object path
|
||||
# (/org/freedesktop/portal/desktop).
|
||||
# The portal interfaces include APIs for file access, opening URIs,
|
||||
# printing and others.
|
||||
services.dbus.enable = true;
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
config.common.default = ["wlr" "gtk"];
|
||||
# gtk portal needed to make gtk apps happy
|
||||
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
};
|
||||
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
};
|
||||
|
||||
# make brightness keys work
|
||||
users.users.${config.myConfig.user}.extraGroups = ["video" "input"];
|
||||
programs.light.enable = lib.mkIf cfg.laptop true;
|
||||
|
||||
# make swaylock work
|
||||
security.pam.services.swaylock = {};
|
||||
};
|
||||
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
};
|
||||
|
||||
# make brightness keys work
|
||||
users.users.max.extraGroups = ["video"];
|
||||
programs.light.enable = true;
|
||||
|
||||
# make swaylock work
|
||||
security.pam.services.swaylock = {};
|
||||
}
|
||||
|
18
modules/nixos/touch.nix
Normal file
18
modules/nixos/touch.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.touch;
|
||||
in {
|
||||
options.myConfig.touch = {
|
||||
enable = lib.mkEnableOption "touch screen";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services = {
|
||||
xserver.wacom.enable = true;
|
||||
libinput.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
33
modules/nixos/update.nix
Normal file
33
modules/nixos/update.nix
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.autoUpdate;
|
||||
in {
|
||||
options.myConfig.autoUpdate = {
|
||||
enable = lib.mkEnableOption "extra binary caches";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
system.autoUpgrade = {
|
||||
enable = false;
|
||||
flake = inputs.self.outPath;
|
||||
flags = [
|
||||
"--recreate-lock-file"
|
||||
"--commit-lock-file"
|
||||
"-L"
|
||||
];
|
||||
dates = "9:00";
|
||||
randomizedDelaySec = "45min";
|
||||
};
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "10:00";
|
||||
randomizedDelaySec = "45min";
|
||||
options = "--delete-older-than 14d";
|
||||
};
|
||||
};
|
||||
}
|
@ -1,32 +1,147 @@
|
||||
{config, ...}: {
|
||||
sops.secrets."wireless.env" = {};
|
||||
networking.wireless = {
|
||||
enable = true;
|
||||
userControlled.enable = true;
|
||||
environmentFile = config.sops.secrets."wireless.env".path;
|
||||
networks = {
|
||||
"@home_uuid@" = {
|
||||
psk = "@home_psk@";
|
||||
priority = 10;
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.wifi;
|
||||
in {
|
||||
options.myConfig.wifi = {
|
||||
enable = lib.mkEnableOption "wifi";
|
||||
tray = lib.mkEnableOption "nm tray entry";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.etc = let
|
||||
template = config.sops.templates;
|
||||
base = "NetworkManager/system-connections";
|
||||
in {
|
||||
"${base}/home.nmconnection".source = template."home.nmconnection".path;
|
||||
"${base}/parents.nmconnection".source = template."parents.nmconnection".path;
|
||||
"${base}/eduroam.nmconnection".source = template."eduroam.nmconnection".path;
|
||||
"${base}/luhbots.nmconnection".source = template."luhbots.nmconnection".path;
|
||||
"${base}/luhbots5.nmconnection".source = template."luhbots5.nmconnection".path;
|
||||
};
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
environment.systemPackages = lib.optional cfg.tray pkgs.nm-tray;
|
||||
|
||||
myConfig.sops.enable = true;
|
||||
sops = {
|
||||
secrets = {
|
||||
"home/ssid" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"home/psk" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"parents/ssid" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"parents/psk" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"eduroam/ident" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"eduroam/psk" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"luhbots/ssid" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"luhbots/ssid5" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
"luhbots/psk" = {
|
||||
sopsFile = ../../secrets/wifi.yaml;
|
||||
};
|
||||
};
|
||||
"@par_uuid@" = {
|
||||
psk = "@par_psk@";
|
||||
priority = 10;
|
||||
};
|
||||
"@luhbots_uuid@" = {
|
||||
psk = "@luhbots_psk@";
|
||||
priority = 5;
|
||||
};
|
||||
eduroam = {
|
||||
auth = ''
|
||||
key_mgmt=WPA-EAP
|
||||
eap=PWD
|
||||
identity="@eduroam_ident@"
|
||||
password="@eduroam_psk@"
|
||||
templates = let
|
||||
placeholder = config.sops.placeholder;
|
||||
in {
|
||||
"home.nmconnection".content = ''
|
||||
[connection]
|
||||
id=${placeholder."home/ssid"}
|
||||
type=wifi
|
||||
autoconnect-priority=10
|
||||
|
||||
[wifi]
|
||||
mode=infrastructure
|
||||
ssid=${placeholder."home/ssid"}
|
||||
|
||||
[wifi-security]
|
||||
key-mgmt=wpa-psk
|
||||
psk=${placeholder."home/psk"}
|
||||
'';
|
||||
"parents.nmconnection".content = ''
|
||||
[connection]
|
||||
id=${placeholder."parents/ssid"}
|
||||
type=wifi
|
||||
autoconnect-priority=10
|
||||
|
||||
[wifi]
|
||||
mode=infrastructure
|
||||
ssid=${placeholder."parents/ssid"}
|
||||
|
||||
[wifi-security]
|
||||
key-mgmt=wpa-psk
|
||||
psk=${placeholder."parents/psk"}
|
||||
'';
|
||||
"eduroam.nmconnection".content = ''
|
||||
[connection]
|
||||
id=eduroam
|
||||
type=wifi
|
||||
autoconnect-priority=0
|
||||
|
||||
[wifi]
|
||||
mode=infrastructure
|
||||
ssid=eduroam
|
||||
|
||||
[wifi-security]
|
||||
auth-alg=open
|
||||
key-mgmt=wpa-eap
|
||||
|
||||
[802-1x]
|
||||
anonymous-identity=anonymous@uni-hannover.de
|
||||
ca-cert=${./T-TeleSec_GlobalRoot_Class_2.crt}
|
||||
domain-suffix-match=radius-dfn.luis.uni-hannover.de
|
||||
eap=ttls;
|
||||
identity=${placeholder."eduroam/ident"}
|
||||
password=${placeholder."eduroam/psk"}
|
||||
phase2-auth=mschapv2
|
||||
'';
|
||||
"luhbots.nmconnection".content = ''
|
||||
[connection]
|
||||
id=${placeholder."luhbots/ssid"}
|
||||
type=wifi
|
||||
autoconnect-priority=5
|
||||
|
||||
[wifi]
|
||||
mode=infrastructure
|
||||
ssid=${placeholder."luhbots/ssid"}
|
||||
autoconnect-priority=0
|
||||
|
||||
[wifi-security]
|
||||
key-mgmt=wpa-psk
|
||||
psk=${placeholder."luhbots/psk"}
|
||||
'';
|
||||
"luhbots5.nmconnection".content = ''
|
||||
[connection]
|
||||
id=${placeholder."luhbots/ssid5"}
|
||||
type=wifi
|
||||
autoconnect-priority=10
|
||||
|
||||
[wifi]
|
||||
mode=infrastructure
|
||||
ssid=${placeholder."luhbots/ssid5"}
|
||||
autoconnect-priority=0
|
||||
|
||||
[wifi-security]
|
||||
key-mgmt=wpa-psk
|
||||
psk=${placeholder."luhbots/psk"}
|
||||
'';
|
||||
priority = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
users.extraUsers.max.extraGroups = ["wheel"];
|
||||
}
|
||||
|
33
rebuild.sh
33
rebuild.sh
@ -1,33 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# A rebuild script that commits on a successful build
|
||||
set -e
|
||||
|
||||
# cd to your config dir
|
||||
pushd ~/dotfiles/nixos/
|
||||
|
||||
# Edit your config
|
||||
$EDITOR
|
||||
|
||||
# Autoformat your nix files
|
||||
alejandra . #&>/dev/null
|
||||
|
||||
# Shows your changes
|
||||
git diff -U0 *.nix
|
||||
|
||||
echo "NixOS Rebuilding..."
|
||||
|
||||
# Rebuild, output simplified errors, log trackebacks
|
||||
sudo nixos-rebuild switch &>nixos-switch.log || (cat nixos-switch.log | grep --color error && false)
|
||||
|
||||
# Get current generation metadata
|
||||
current=$(nixos-rebuild list-generations | grep current)
|
||||
|
||||
# Commit all changes with the gereation metadata
|
||||
git commit -am "$current"
|
||||
|
||||
# Back to where you were
|
||||
popd
|
||||
|
||||
# Notify all OK!
|
||||
notify-send -e "NixOS Rebuilt OK!" --icon=software-update-available
|
23
secrets/rclone.yaml
Normal file
23
secrets/rclone.yaml
Normal file
@ -0,0 +1,23 @@
|
||||
cloud:
|
||||
url: ENC[AES256_GCM,data:BoSdQrtLNKYpaHIWUj5Ak8PGMJz3hj/z88XVBgN6AbyT2K/bC412p3oi+X9MmYATR3A=,iv:wez+v5kEN+niZmZXzaJoygHf4mqKVI6CINktAZe8WTs=,tag:20W87Kcn94smiLtX9mMdOw==,type:str]
|
||||
user: ENC[AES256_GCM,data:kFza,iv:OrDNF/h+xLuuyq2cpaHnQuRM1lwuXhe8Ue0rm/wRmkY=,tag:9t+hEx38r/yBIzWIFD0GnQ==,type:str]
|
||||
pass: ENC[AES256_GCM,data:p3c8PeE54fjCIJlwDMLmE9gaYexjcXFa05xExJkKJJTNcLKVhMqQCZxeBZReTKxK18dMbTHd6eaFqPKH,iv:IC2MFF4Aj01a9iE5SVk+Os/0sX+8COsD9p8Jdh98VSs=,tag:e/Z9CjP/iXsnGWtD5jlJlQ==,type:str]
|
||||
luhbots:
|
||||
url: ENC[AES256_GCM,data:5hnCSyNcr3un83FaNGYaiZdbxCJe87+hzpoRtWozbn0OW31pxONIEQnSikXh59/OlVJN9TEmv+bd3uO210NPoKUL0D2MWw==,iv:fvY7fLbiAVGq0hh4ifs/LRgixlZsIDczw0hpiUvFSw0=,tag:gXNgNWMDXnRMdyhTjnG6oA==,type:str]
|
||||
user: ENC[AES256_GCM,data:ucJ21fRmDKvHtyA=,iv:IYfNwBBWYxVb7ptwhfBiBgXwaoj5oCWg6gCI3WD8sjE=,tag:sB6/PJuquUL/GugpfzNMRw==,type:str]
|
||||
pass: ENC[AES256_GCM,data:3gkyN51YvL/SrtP3kbG4OVhc5KBzu33dYVx4u8pJs9h3GJ9Wh1A5NCaBFJa7VFWfKuysNmr4CQwQEYBX,iv:U5foeasbN/TrrR0mA1mNcqYWZFXHYIAqXLmP/RvC+Os=,tag:x7ck7quJG7npMGwi/ss3ZA==,type:str]
|
||||
sops:
|
||||
age:
|
||||
- recipient: age1d6ze98387f0gryqwvrdlcxgz3wgs607ach4duwmnp72dzaa63cxqchc78n
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBVQ0hJN2R0V1NJNnZEeHRD
|
||||
SDVxVmRFbXRVMjlSUkRKTHExY2I5S1BqVm1zCjRjM1J4Nm5xVG4wWVZLN2tMWGxH
|
||||
Qi90UEpZdmROdkE0RzRoUmt0cDVFRlEKLS0tIHN1ZjQ4VUM5aGNjN3RZcUVieW9C
|
||||
cVV3dFpNbjY1bkZtUlltanpSNDlPd28KQ4FQrC6KyZEzzkmByh07q1RAGnWnCNtr
|
||||
XTDQhlbSq/LdptpqNbUD2g9H9vC2CAC0av39ExvT55JiK4dEWmrwUA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-06-12T07:55:51Z"
|
||||
mac: ENC[AES256_GCM,data:WXOmWalZiENdsqVQqGfwXrt3OJ0HoMPNTHkk9C7oASv+wl1eX/7yryQ5GWgXe5GGqhBrtnKPIxKNDGABiXqA7zhR31Bp3Kctyztum8ygcv9+7rs2S+8Ya9LxC0/q/mhbsFOiu3UYw9icwig9rRXmx8I41VxaWGLbL/TLryFzWjI=,iv:ygdWjZespGdXVaMqdwbXIr1gD2SengMoAVHuUUswBEw=,tag:5DV6lEmIZvyzoj/JEh9sCw==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.10.2
|
@ -1,4 +1,16 @@
|
||||
wireless.env: ENC[AES256_GCM,data:JSJjKuLsEz7niHs1tOJP0a11Hn2rWw8b671v6Fmq/8Gx+z4Pbz4ndwnsuJOK1fWN0LILCUmKr0pKOIoF+iDWPHJLN0j7iRGQui1AMC10a6uOhCqe0ILPdcGLqIbbo3jEn3/64L4qCVkC7nfHWoOH5v9ccTpPSi90tfLFc/SCqUpeoF0o26v+edxqyEkN+eI01S4vBy7TWijL30BYOiCAI3Q8PDQ7YKwHQukRyApLI2F1DYl0YW/BXOwqvuAvcejXYsM2/Abl0zLnRClTj7War0PS7svVGIzE,iv:ZTI9d/usa4oEWWJ3n3VBmeX3uMuJbuHBxL7ds/dkxZM=,tag:h0c0jvddS0RA2NkQBl3/AQ==,type:str]
|
||||
home:
|
||||
ssid: ENC[AES256_GCM,data:NXV/fyH9brOD,iv:fwdot2Zotoxnng55p/bDT1KmO1oGozj8UadZYKgcF8k=,tag:fPF2N7TPq2TGjlfSLfryLQ==,type:str]
|
||||
psk: ENC[AES256_GCM,data:wrKsVQ/Ra8ruWPXLXolyHLyQul/7lFrBA72Cj14=,iv:BkGX4xxyqDdFXAw1Ur3YI4CAYJIW1dRjL8KYOgoxFVc=,tag:aP8wWk6UGEeZOVWhkiGT0g==,type:str]
|
||||
parents:
|
||||
ssid: ENC[AES256_GCM,data:NZEKQ2N1sC0=,iv:vvsnsH3lYbtXwSnQuInhceiE19Z+ZNszB20TL9BF40g=,tag:5YOljSW9Hht+MCNKhss/Sw==,type:str]
|
||||
psk: ENC[AES256_GCM,data:gjpdj21uLDiY,iv:k1RH2ybRkJccEqjkdv1Tz+qLS2EdGWdn+jRkUcTDLtY=,tag:IuwgoHt//GvyWVvDI2C/2g==,type:str]
|
||||
luhbots:
|
||||
ssid5: ENC[AES256_GCM,data:Bo0aJge7ZkrUhhA=,iv:1EmjRy1xK73xwhE+orUi2HLM9fM2zKxpxDHQnQgEdP0=,tag:P6PSTd34VByQEAhVGbXdNg==,type:str]
|
||||
ssid: ENC[AES256_GCM,data:MH0T/q45UCZL7w==,iv:SFwjqsojxvsu4k83mi69CypaAdzVhFXbebi9/wTsgaY=,tag:JxY5ftwiZp6jGM4ZxvpO/g==,type:str]
|
||||
psk: ENC[AES256_GCM,data:Fg8aRzPc6F0=,iv:5Se6YLTRRAP0Gc4WKPQ4vQHlZcG5mqLLqVLzeEaW/sI=,tag:1Ppw5ZyDSCb0atF8/tnSxg==,type:str]
|
||||
eduroam:
|
||||
ident: ENC[AES256_GCM,data:PXY5jOJ36+ko+a0PmtxViPHv5GvBwfBD32A=,iv:i6uFlawX0nQ7T25MF2OgwgeW43jaB2Y8pNYx9NMAVTc=,tag:veYmEFGz30AbYuHuQdA01w==,type:str]
|
||||
psk: ENC[AES256_GCM,data:imgGBACMHEiKAjLXS5SGfw==,iv:9onCAOrqO3/FHC0r+/Uep8IrIz7WaKTdRqQvbo9Jx40=,tag:S0/7iUdygV9eYOhq8dSwbg==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
@ -14,8 +26,8 @@ sops:
|
||||
d0FZc0x5UVhPQ09xUE5Qa1A0QkExVmcKkcy1i+nME0uHlLy8vCu8vgqSuR+0NqaD
|
||||
D+zKRKNdfJn1TLsoyDb4iDSeqp8nB9fZzQqIJshGRhlnqxuzIiYqqA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-03-08T22:34:29Z"
|
||||
mac: ENC[AES256_GCM,data:MPUKmmbm8aB0BV3yWTeEIAfDudRGo4GSW6LVNBMCVUp/GXNYw45C/w09/u2d6o1oBSIBOZP03mR18sSNpaz7t98iw+F5bArMqefP+nULdhz3D58Zqm8lcaSMVjqCOc8q1O2o/bbhiE3qXZoC2It85Xym1BiVO5fdbwFZVRPa3aY=,iv:Z7Cg8qQg1e3gMHITgU4TfQbBIEx8/9lyhiQVNuQ+/yA=,tag:n/1uaNgHmw7MheLz/+41nA==,type:str]
|
||||
lastmodified: "2025-05-05T13:46:43Z"
|
||||
mac: ENC[AES256_GCM,data:5V6dtgz6xDFXUqkTxAZ2mdNovMcz4rf64UJHp/oTY0Veqjesyx88etSz6y15E3CsKa4LQImBGtwfowVXa5eto5eBdO8fg07zzfSMT4lUmxPg/kTUJluLNpwph4HxP2mLo5h0o+4PDILuBrwS9ozOHOAzEj/iCKUmmmNFN598xkA=,iv:4MKHWixtku5pCSHfTgNmCIm5NHm5K6nVK1v589BFA9s=,tag:95ud48Qu1q016SCNFzciig==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.8.1
|
||||
version: 3.9.4
|
||||
|
Reference in New Issue
Block a user