Compare commits
523 Commits
04ac0c9d43
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 806e8900b4 | |||
| 5731f191f7 | |||
| c6b84a7c49 | |||
| cbebf1639f | |||
| 4ae1389378 | |||
| 2fd2e5f2aa | |||
| e950b4c162 | |||
| 06385f94f6 | |||
| 03bec1dcaf | |||
| cff3aec197 | |||
| e2a6515ad6 | |||
| 63559c16ac | |||
| 846d33ac50 | |||
| 9a98e3256f | |||
| f525b68345 | |||
| 0c7cafdc17 | |||
| eff446334d | |||
| 97c84ff716 | |||
| f0860c2602 | |||
| 54d4d5aadf | |||
| 3b386828af | |||
| 300b407208 | |||
| 711b1f198e | |||
| fada73a69c | |||
| cd1392517a | |||
| 04e238810c | |||
| a727cf8722 | |||
| 8016b58416 | |||
| 1ccbb3eb6c | |||
| 55783a7780 | |||
| c0443e73e6 | |||
| 1316fe9169 | |||
| f5cba81ace | |||
| e6d45592df | |||
| f1637d0497 | |||
| ab691de708 | |||
| f8e4ddce82 | |||
| 64b5a8c65b | |||
| 41ebb79c2a | |||
| 068d260470 | |||
| b34ad76811 | |||
| c79f76efa1 | |||
| 87a4cc6455 | |||
| 0bcab64638 | |||
| 59fe61b835 | |||
| c25a1c26f5 | |||
| 5cc628cfd9 | |||
| 8b67d7b8fb | |||
| 69797b6b01 | |||
| 7853bc389d | |||
| a1417b9514 | |||
| dcc347a717 | |||
| 4b32b5a3e7 | |||
| a87eb1994f | |||
| bdac2cafee | |||
| 86a1071b1b | |||
| 11048faa79 | |||
| 58eec1d59d | |||
| 00a830c3c4 | |||
| 94a2ed6c8a | |||
| 42d2399c42 | |||
| 8704160c10 | |||
| 74d813c5e8 | |||
| 0c7291d3eb | |||
| 10e69d4eff | |||
| 72ecac11b7 | |||
| db8f72308b | |||
| 59a6dc79f0 | |||
| 297b993992 | |||
| 0df6aee231 | |||
| 33d139bdf6 | |||
| effeddf963 | |||
| 79c8e5061b | |||
| 1636b715b5 | |||
| c00be80234 | |||
| 7fb7498acc | |||
| 449dbcff24 | |||
| 317bc368e9 | |||
| d3689592e8 | |||
| e6a810d833 | |||
| 21579b281f | |||
| 68bdc0c85e | |||
| 64973efb33 | |||
| bed86c50dd | |||
| df6268f8c3 | |||
| 09ff97278c | |||
| 445e6a8c8b | |||
| b860c0ead1 | |||
| ed863b4ab1 | |||
| 498fd77851 | |||
| 19537a1499 | |||
| b7c9ca3ccc | |||
| 8c66096e81 | |||
| e6b2a1d3ee | |||
| 93b4b2730f | |||
| e9988b21ff | |||
| d6e9904bfc | |||
| aea1919a44 | |||
| da7ad42da9 | |||
| 13e5c8410e | |||
| c8cfd433ae | |||
| 60dd114bcc | |||
| ac12242060 | |||
| c3f12243d8 | |||
| e296f298b1 | |||
| f656be3dfb | |||
| eb5b08c8f0 | |||
| fa9ca0ec63 | |||
| fd10360294 | |||
| 0237820306 | |||
| 64b6b6b763 | |||
| 78b1b26b91 | |||
| 44eb6492f2 | |||
| 597f51e7b2 | |||
| c1684a80f7 | |||
| f3a90a0fe8 | |||
| 11089070ba | |||
| 8697469f5f | |||
| fa6abcfd98 | |||
| 7f0629f313 | |||
| 1a088bc501 | |||
| 0f70cf9bbc | |||
| fbf6864350 | |||
| b3058b25a6 | |||
| 1ec2681731 | |||
| 2c0bfcbcdd | |||
| 51942d5e10 | |||
| 6dbbe36327 | |||
| 2dec58998d | |||
| f3d0db4a63 | |||
| d4e2841833 | |||
| e1eb4569a8 | |||
| a9d1fd2316 | |||
| fc3ed73055 | |||
| 488a6437c3 | |||
| b40400ed71 | |||
| 1dcb262114 | |||
| 5e9b353529 | |||
| 12c0bd71dd | |||
| 930596db1a | |||
| 6643b584f9 | |||
| 2205f7ca57 | |||
| 784a3f213e | |||
| 98da646e59 | |||
| 12d8b7746b | |||
| 529e9f994f | |||
| be86d9b31b | |||
| 7ac91b21b3 | |||
| 851911f491 | |||
| a0da606694 | |||
| 8a8b48a6cc | |||
| 7dd49cd8e4 | |||
| a00a888676 | |||
| 536a76ca80 | |||
| 41b13580dc | |||
| 74b0d63f26 | |||
| e91def66b5 | |||
| 9325a6b079 | |||
| f9e66ff1a0 | |||
| 98c81001f7 | |||
| 002bd38906 | |||
| 1a52dd8041 | |||
| 67f75bcd97 | |||
| 1bba167d6d | |||
| f418f3dfa5 | |||
| 0c5ab6519d | |||
| e58d6118ea | |||
| aecbdb243d | |||
| 4cc510d584 | |||
| 1ab353746d | |||
| 05fd4f67b1 | |||
| d134f6e849 | |||
| 03c66ccc13 | |||
| dd44fd8b0c | |||
| 5226ade22c | |||
| e162e47b1d | |||
| 6541a307bc | |||
| 2be4a81c03 | |||
| 2d52f92795 | |||
| 3a47aa53d0 | |||
| 9b01209ef0 | |||
| 1372c8f1ce | |||
| b264cddcda | |||
| 8f3ded4029 | |||
| f15a6b92ae | |||
| 15f6577c84 | |||
| 48d8f13145 | |||
| 5de8af47ff | |||
| 75586a64f3 | |||
| 06edfb2795 | |||
| 0603de3f11 | |||
| 2f4419eb59 | |||
| 4bccbb92f4 | |||
| f41ca1867e | |||
| 9a0dfc4cca | |||
| d7875217bd | |||
| 89328fe7e7 | |||
| d9338b280e | |||
| 51f15e3305 | |||
| bbd135bad9 | |||
| 94ae66c7eb | |||
| b72a7f5660 | |||
| a73ed8e3f0 | |||
| 3e42c24435 | |||
| fbce7e8f2b | |||
| e0ae6fd31e | |||
| 6e70652719 | |||
| cc0b9cef25 | |||
| 8e07c32238 | |||
| d2ea2395f0 | |||
| b4d7f9c3d2 | |||
| 33cf8a4f0a | |||
| 94a1ca970f | |||
| 1238fa76db | |||
| 58e0b82520 | |||
| b4bac11cf9 | |||
| bb45b7b08a | |||
| 9a07fe0d59 | |||
| 5c8ebb84bb | |||
| 6dfacb91da | |||
| 128a560bb0 | |||
| 86fbc59bcf | |||
| 82e15df890 | |||
| a60a5b738b | |||
| 191a54670e | |||
| 7949acb8f0 | |||
| 11e881b1cc | |||
| 2223acef57 | |||
| b1d54ce420 | |||
| d3c63aa684 | |||
| dac6771f58 | |||
| cf784f3847 | |||
| e9c4339640 | |||
| 386c4d6561 | |||
| 66171880bc | |||
| 65430099bf | |||
| a65cfacb79 | |||
| c6a21aee85 | |||
| 514e4864ca | |||
| 69d16e38a8 | |||
| e86a839bd7 | |||
| 65f878b20d | |||
| b893475db6 | |||
| 1ada91d5ef | |||
| 42bf08084e | |||
| 50d192c809 | |||
| c028bad2a6 | |||
| 9b218f88fa | |||
| 276823d2aa | |||
| ab47a1ea52 | |||
| 4a7615b50c | |||
| ea37cbe865 | |||
| 8cc337ca0e | |||
| f99cb4f761 | |||
| 6abef03321 | |||
| f584fb2e32 | |||
| b7763031dd | |||
| 761624c21c | |||
| 43d87cb6b3 | |||
| be310b9ae7 | |||
| 39fb19f62e | |||
| f7041607d7 | |||
| 6ef3081bd1 | |||
| c69e8ed0ef | |||
| 9e3023c26b | |||
| 3a6c6673eb | |||
| c6baa8fc5b | |||
| 9a89b1ee6a | |||
| eda60a7fec | |||
| e69f8348be | |||
| 23b4035da1 | |||
| 02427aca71 | |||
| 03274e6e46 | |||
| bf994f7e13 | |||
| 3696bab033 | |||
| ea2a03037a | |||
| 0947941c11 | |||
| c48ecab2bd | |||
| 55b1cae63b | |||
| 76a072d274 | |||
| 346907fce4 | |||
| 86810b6105 | |||
| eba2b6e52f | |||
| 96e4476934 | |||
| 560f36b18e | |||
| 0c9d45ad39 | |||
| e39eeac850 | |||
| 46cc39c91f | |||
| 9f7b03679a | |||
| 96ab25c6ad | |||
| d530844886 | |||
| 8bb52d7df6 | |||
| 05d4280ad6 | |||
| 90b99dbf19 | |||
| f96f7182c4 | |||
| bd8b5f1327 | |||
| d13b59e7ac | |||
| 69b47de1fc | |||
| 06cb547197 | |||
| f0ec952442 | |||
| 2fab28204d | |||
| 9b32b8a6db | |||
| 71e6fbcef4 | |||
| 1b140efc19 | |||
| 8c21db0a08 | |||
| d5a7657410 | |||
| e5b8871d4e | |||
| a6808a984e | |||
| e5f6a4bc69 | |||
| eb857b8d03 | |||
| 712aaab720 | |||
| 778433b318 | |||
| 7440ef91b4 | |||
| 265a526c8b | |||
| 6cd5770452 | |||
| 66d2dde112 | |||
| 7974a95659 | |||
| 8b605d692f | |||
| b911a7931e | |||
| 574b2c058b | |||
| f4f69a4a25 | |||
| 640c5911f6 | |||
| be74b8caaf | |||
| be199acad3 | |||
| 3335542d54 | |||
| e008cd4d89 | |||
| 4dbffa89c2 | |||
| c89816839a | |||
| b5b1e07f3a | |||
| 340ea873ce | |||
| 1fa30bdb94 | |||
| f480a1f8c9 | |||
| fd3f3639bd | |||
| be4f0c5e6b | |||
| 46f546a0e0 | |||
| 22535fbbaf | |||
| 10cf6bba46 | |||
| f07c4ae0d3 | |||
| c1f8c704b3 | |||
| 0aa7f459dd | |||
| 15dfb83bb7 | |||
| 6b8a9a2152 | |||
| 482f1b5912 | |||
| 78277afa8a | |||
| 680454c6b2 | |||
| ec1a12e2a1 | |||
| 960af2d43b | |||
| a7e636e7a2 | |||
| 099b8e40b2 | |||
| 32bf3e0bc0 | |||
| 905de63f78 | |||
| c977f9d3a2 | |||
| bc666ecab5 | |||
| 8e0d66eff5 | |||
| c657f03912 | |||
| 2ec608c5ae | |||
| 6a3a44b2f0 | |||
| 1c96a54c52 | |||
| 30d55ebb5a | |||
| daf0ea1169 | |||
| bd20e9a29b | |||
| f8d3994ad9 | |||
| 3b376d7657 | |||
| 082f0bdcc5 | |||
| 137e3753da | |||
| c012163715 | |||
| be4b7c7d82 | |||
| 6c88dcd775 | |||
| a1f0bf30cd | |||
| 873230cfe3 | |||
| 1bf5944f11 | |||
| ff5e0d6bb2 | |||
| 795bca39f8 | |||
| 707e839517 | |||
| a9db2c09e7 | |||
| c657dae471 | |||
| d1237dab12 | |||
| 61bcc8776f | |||
| e05dc795b3 | |||
| eafa73042a | |||
| e36f899e93 | |||
| 671b5f92c0 | |||
| 4e3d74795b | |||
| 036969de6e | |||
| 793956deba | |||
| f3ecc2cfc6 | |||
| c212117355 | |||
| 7c61d646a6 | |||
| ea3c826c63 | |||
| f9eca3ebde | |||
| 10f8d192fd | |||
| d187ede4f6 | |||
| 2faa4e8618 | |||
| f967055296 | |||
| e665f8e46d | |||
| cc834fd85d | |||
| e4e6db94aa | |||
| c3883abef9 | |||
| 7097253186 | |||
| a08a4ac461 | |||
| ceb211ae51 | |||
| 2a5613bdee | |||
| 112782fa91 | |||
| f34031285b | |||
| f07d4a4060 | |||
| 5876d03f45 | |||
| ce6885a76e | |||
| d8058560b1 | |||
| 0c1f0a4639 | |||
| 2d09cfeea1 | |||
| 892ae40180 | |||
| 4a1cd4804d | |||
| 31fa6033b0 | |||
| b88445e529 | |||
| e3597c147a | |||
| e1e1b316cf | |||
| 184e939bb6 | |||
| 103c8e803a | |||
| 160ae56e03 | |||
| d178e340b4 | |||
| e2ec5cae11 | |||
| d9261385de | |||
| b0c84b9b27 | |||
| d036eb2512 | |||
| 83f48b3403 | |||
| 9d56a9bd10 | |||
| 86272d668d | |||
| 7f224bd6fc | |||
| 3d0bd560fb | |||
| 214c833821 | |||
| 8e519e9ad1 | |||
| a706f7c5cb | |||
| f49edaf975 | |||
| 8545cccd46 | |||
| 6e28e26d5a | |||
| 538b6051e2 | |||
| 91f6c637de | |||
| 0280315031 | |||
| 54dd1d2321 | |||
| 7d77da5619 | |||
| 668e6117fd | |||
| 9cb4e51316 | |||
| 43fde8741b | |||
| feec4dd416 | |||
| 9a1a025ec9 | |||
| 20731b35ca | |||
| 784a783fff | |||
| 65f7cad037 | |||
| bd1cfad6f9 | |||
| 154dd13425 | |||
| 504ae33109 | |||
| d07fbe229b | |||
| 632362235b | |||
| 9e11e7cb70 | |||
| 0829506111 | |||
| ee6893038a | |||
| 02156b877e | |||
| 64a2588a11 | |||
| b9d3b14b23 | |||
| f17ac4ce4f | |||
| bce5fdf68a | |||
| bd1323c2d8 | |||
| 5ad050b056 | |||
| d4a11b9ba2 | |||
| 86f16a2394 | |||
| 35fa4a55da | |||
| bb9f3f390f | |||
| e2de1c34e3 | |||
| 6f7f078dd9 | |||
| 8e3092fc0f | |||
| f5ba6bf991 | |||
| 2cd6e41686 | |||
| 0a87520fe7 | |||
| c5f1cb3624 | |||
| 1520b9872b | |||
| 6fba3fd698 | |||
| cf67655b3d | |||
| e441f92216 | |||
| bf5df9d23a | |||
| 4a79ac63d7 | |||
| f7c4059445 | |||
| cbd4b177ba | |||
| 97a62eaa24 | |||
| eeb29a80f4 | |||
| 6b98345a97 | |||
| c3457da03c | |||
| 85c96cd78b | |||
| 9698873c0b | |||
| 6be91c5617 | |||
| 32d95647f8 | |||
| c811e4d4df | |||
| 4eeed736ad | |||
| 325e4c63d5 | |||
| 6474b10e9f | |||
| 0ce461f34d | |||
| bb3d875d77 | |||
| fcd33c7924 | |||
| dc6c5ed8d4 | |||
| f850d4ff1a | |||
| b52c8dff65 | |||
| 1ca0f169fb | |||
| f3fe568d7a | |||
| 65ec180ad6 | |||
| 515e8cb86d | |||
| 1b9c2564ff | |||
| d5dbc09e2c | |||
| 14c3f7ad1b | |||
| cbdc9b0d7c | |||
| 38bd11aea7 | |||
| e74d097f0f | |||
| 4d5be9828f | |||
| fb77aba463 | |||
| f133c4e4b3 | |||
| 92d4984e36 | |||
| 01a329efc9 | |||
| 6e94fbde00 | |||
| c091282f94 | |||
| b122fc88f7 | |||
| f33df39f60 | |||
| 006537f264 | |||
| e7ce67509d | |||
| 4161c7f4d3 | |||
| 37e0823d35 |
16
.sops.yaml
16
.sops.yaml
@@ -3,21 +3,7 @@ keys:
|
||||
- &laptop age1yqgyp2uxz4lzrc9f9ka0mfjl5fr6ahf8nf24nlmran2wulg6fpvq9hyp9q
|
||||
- &android age12pnf36uqesjmy3e0lythfnpwam3zg5mv8m936fc4jphy4ces2fdqwn0s74
|
||||
creation_rules:
|
||||
- path_regex: homebox/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *homebox
|
||||
- path_regex: laptop/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *laptop
|
||||
- path_regex: nathan/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *laptop
|
||||
- *homebox
|
||||
- *android
|
||||
- path_regex: system-config/secrets.yaml$
|
||||
- path_regex: system/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *laptop
|
||||
|
||||
821
flake.lock
generated
821
flake.lock
generated
File diff suppressed because it is too large
Load Diff
159
flake.nix
159
flake.nix
@@ -2,30 +2,15 @@
|
||||
description = "Nixos config flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||
#nixpkgs.url = "git+ssh://gitea@gitea.blunkall.us/Blunkall-Technologies/nixpkgs?ref=nixos-24.11";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
|
||||
nixpkgs-us.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
#nixpkgs-us.url = "git+ssh://gitea@gitea.blunkall.us/Blunkall-Technologies/nixpkgs?ref=nixos-unstable";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-25.05";
|
||||
#url = "git+ssh://gitea@gitea.blunkall.us/Blunkall-Technologies/home-manager?ref=release-24.11";
|
||||
url = "github:nix-community/home-manager/release-25.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
home-manager-us = {
|
||||
url = "github:nix-community/home-manager/master";
|
||||
#url = "git+ssh://gitea@gitea.blunkall.us/Blunkall-Technologies/home-manager?ref=release-24.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs-us";
|
||||
};
|
||||
|
||||
nix-on-droid = {
|
||||
url = "github:nix-community/nix-on-droid";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.home-manager.follows = "home-manager";
|
||||
};
|
||||
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -36,145 +21,25 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
|
||||
import-tree.url = "github:vic/import-tree";
|
||||
|
||||
firefox-addons = {
|
||||
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
||||
|
||||
#simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
|
||||
|
||||
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
||||
#hyprland.url = "git+ssh://gitea@gitea.blunkall.us/Blunkall-Technologies/hyprland?submodules=1";
|
||||
|
||||
nixvim.url = "git+ssh://gitea@gitea.blunkall.us/Blunkall-Technologies/Moirai";
|
||||
#nixvim.url = "git+https://gitea.blunkall.us/Blunkall-Technologies/Moirai";
|
||||
nixvim.url = "git+https://gitea.esotericbytes.com/Blunkall-Technologies/Moirai";
|
||||
#nixvim.url = "git+file:///home/nathan/Projects/Moirai";
|
||||
|
||||
aurora.url = "git+https://gitea.esotericbytes.com/Blunkall-Technologies/Aurora";
|
||||
#aurora.url = "git+file:///home/nathan/Projects/Aurora";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... } @ inputs: {
|
||||
|
||||
nixosConfigurations = {
|
||||
|
||||
homebox = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inputs = inputs // {
|
||||
nathan = import ./home-manager/users/nathan;
|
||||
home-manager-config = import ./home-manager;
|
||||
inherit self;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
./system-config/configuration/homebox
|
||||
./system-config
|
||||
];
|
||||
};
|
||||
|
||||
laptop = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inputs = inputs // {
|
||||
nathan = import ./home-manager/users/nathan;
|
||||
home-manager-config = import ./home-manager;
|
||||
inherit self;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
./system-config/configuration/laptop
|
||||
./system-config
|
||||
];
|
||||
};
|
||||
|
||||
jesstop = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inputs = inputs // {
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
./system-config/configuration/jesstop
|
||||
./system-config
|
||||
];
|
||||
};
|
||||
|
||||
pi4 = {
|
||||
system = "aarch64-linux";
|
||||
specialArgs = {
|
||||
inputs = inputs // {
|
||||
nathan-home-manager = import ./home-manager/users/nathan;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
./system-config/configuration/pi4
|
||||
./system-config
|
||||
];
|
||||
};
|
||||
|
||||
live = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inputs = inputs // {
|
||||
nathan-home-manager = import ./home-manager/users/nathan;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
./system-config/configuration/live
|
||||
./system-config
|
||||
];
|
||||
};
|
||||
|
||||
container = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inputs = inputs // {
|
||||
nathan-home-manager = import ./home-manager/users/nathan;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
./system-config/configuration/sandbox-nathan
|
||||
./system-config
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nixOnDroidConfigurations.default = inputs.nix-on-droid.lib.nixOnDroidConfiguration {
|
||||
pkgs = import nixpkgs {
|
||||
system = "aarch64-linux";
|
||||
overlays = [ inputs.nix-on-droid.overlays.default ];
|
||||
};
|
||||
|
||||
modules = [
|
||||
./system-config/configuration/android
|
||||
];
|
||||
|
||||
extraSpecialArgs = {
|
||||
inputs = inputs // {
|
||||
nathan = import ./home-manager/users/nathan;
|
||||
home-manager-config = import ./home-manager;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
homeConfigurations = {
|
||||
nathan = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs {
|
||||
system = builtins.currentSystem;
|
||||
};
|
||||
|
||||
modules = [
|
||||
./home-manager
|
||||
{
|
||||
homeconfig = {
|
||||
username = "nathan";
|
||||
graphical = false;
|
||||
minimal = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
outputs = { ... } @ inputs:
|
||||
inputs.flake-parts.lib.mkFlake { inherit inputs; }
|
||||
(inputs.import-tree [ ./modules ]);
|
||||
}
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
{ config, lib, ... }: {
|
||||
|
||||
imports = [
|
||||
./programs
|
||||
./services
|
||||
];
|
||||
|
||||
options.homeconfig = with lib; {
|
||||
host = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
};
|
||||
|
||||
graphical = mkOption {
|
||||
type = with types; bool;
|
||||
default = true;
|
||||
};
|
||||
|
||||
standalone.enable = mkOption {
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
home.username = lib.mkDefault config.homeconfig.name;
|
||||
|
||||
home.homeDirectory = lib.mkDefault "/home/${config.home.username}";
|
||||
|
||||
programs.home-manager.enable = config.homeconfig.standalone.enable;
|
||||
};
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
options.homeconfig.calcurse.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.calcurse.enable {
|
||||
home.packages = with pkgs; [
|
||||
calcurse
|
||||
libnotify
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{ config, lib, pkgs, inputs, ... }: {
|
||||
|
||||
imports = [
|
||||
./git
|
||||
./nh
|
||||
./hyprland
|
||||
./hyprpanel
|
||||
./terminal
|
||||
./rofi
|
||||
./pywal
|
||||
./swaylock
|
||||
./calcurse
|
||||
./firefox
|
||||
];
|
||||
|
||||
config = lib.mkIf (config.homeconfig.host != "android") {
|
||||
|
||||
home.packages = lib.mkIf (!config.homeconfig.wal.enable) [
|
||||
inputs.nixvim.packages.${pkgs.system}.default
|
||||
];
|
||||
|
||||
home.sessionVariables.EDITOR = "nvim";
|
||||
};
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
{ config, lib, pkgs, inputs, ... }: {
|
||||
|
||||
options.homeconfig.firefox.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.firefox.enable {
|
||||
|
||||
home.sessionVariables.BROWSER = "${config.programs.firefox.package}/bin/firefox";
|
||||
|
||||
home.packages = lib.mkIf config.homeconfig.wal.enable [
|
||||
pkgs.pywalfox-native
|
||||
];
|
||||
|
||||
home.file.".mozilla/native-messaging-hosts/pywalfox.json".text = let
|
||||
pywalfox-wrapper = pkgs.writeShellScriptBin "pywalfox-wrapper" ''
|
||||
${pkgs.pywalfox-native}/bin/pywalfox start
|
||||
'';
|
||||
in lib.replaceStrings [ "<path>" ] [
|
||||
"${pywalfox-wrapper}/bin/pywalfox-wrapper"
|
||||
] (lib.readFile "${pkgs.pywalfox-native}/lib/python3.12/site-packages/pywalfox/assets/manifest.json");
|
||||
|
||||
|
||||
programs.firefox = {
|
||||
|
||||
enable = true;
|
||||
package = pkgs.firefox;
|
||||
|
||||
profiles.nathan = {
|
||||
search = {
|
||||
default = "ddg";
|
||||
privateDefault = "ddg";
|
||||
};
|
||||
bookmarks = {
|
||||
force = true;
|
||||
settings = [
|
||||
{
|
||||
name = "toolbar";
|
||||
toolbar = true;
|
||||
bookmarks = [
|
||||
{
|
||||
name = "NixOS Search - Packages";
|
||||
url = "https://search.nixos.org/packages";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
extensions.packages = with inputs.firefox-addons.packages.${pkgs.system}; [
|
||||
ublock-origin
|
||||
keepassxc-browser
|
||||
pywalfox
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
{ config, lib, ... }: {
|
||||
|
||||
options.homeconfig.git.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.git.enable {
|
||||
|
||||
sops = {
|
||||
secrets = {
|
||||
"git/username" = {};
|
||||
"git/email" = {};
|
||||
};
|
||||
|
||||
templates.gitconfig.content = ''
|
||||
[user]
|
||||
name = "${config.sops.placeholder."git/username"}"
|
||||
email = "${config.sops.placeholder."git/email"}"
|
||||
'';
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
includes = [
|
||||
{ path = "${config.sops.templates.gitconfig.path}"; }
|
||||
];
|
||||
|
||||
extraConfig = {
|
||||
init = {
|
||||
defaultBranch = "master";
|
||||
};
|
||||
url = {
|
||||
"ssh://gitea@gitea.blunkall.us/" = {
|
||||
insteadOf = [
|
||||
"blunkall:"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
options.homeconfig.hyprland.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.hyprland.enable {
|
||||
|
||||
home.sessionVariables.NIX_OZONE_WL = "1";
|
||||
|
||||
programs.kitty.enable = lib.mkDefault true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
pyprland
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
|
||||
enable = true;
|
||||
|
||||
systemd = {
|
||||
enable = true;
|
||||
variables = [ "--all" ];
|
||||
};
|
||||
|
||||
extraConfig = let
|
||||
monitor = if config.homeconfig.host == "laptop" then ''
|
||||
monitor=eDP-1,1920x1080@300,0x0,1
|
||||
'' else if config.homeconfig.host == "homebox" then ''
|
||||
monitor=HDMI-A-2,1920x1080@60,0x0,1
|
||||
monitor=HEADLESS-2,1920x1080@60,0x0,1
|
||||
exec-once=hyprctl output create headless HEADLESS-2
|
||||
exec-once=hyprctl keyword monitor HDMI-A-2,disable
|
||||
exec-once=${pkgs.wayvnc}/bin/wayvnc 0.0.0.0 -o HEADLESS-2
|
||||
'' else if config.homeconfig.host == "container" then ''
|
||||
monitor=HEADLESS-2,1920x1080@60,0x0,1
|
||||
exec-once=hyprctl output create headless HEADLESS-2
|
||||
exec-once=${pkgs.wayvnc}/bin/wayvnc 0.0.0.0 -o HEADLESS-2
|
||||
'' else '''';
|
||||
in monitor + ''
|
||||
source = /home/nathan/.config/hypr/main.conf
|
||||
'';
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{ config, lib, ... }: {
|
||||
|
||||
options.homeconfig.hyprpanel.enable = with lib; mkOption {
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.hyprpanel.enable {
|
||||
|
||||
programs.hyprpanel = {
|
||||
enable = true;
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
{ config, lib, ... }: {
|
||||
|
||||
options.homeconfig.nh.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.nh.enable {
|
||||
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
flake = "${config.home.homeDirectory}/Projects/Olympus";
|
||||
|
||||
clean = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
extraArgs = "--keep 5 --keep-since 5d";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{ config, lib, pkgs, inputs, ... }: {
|
||||
|
||||
options.homeconfig.wal.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.wal.enable {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
inputs.nixvim.packages.${pkgs.system}.pywal
|
||||
|
||||
pywal16
|
||||
imagemagick
|
||||
];
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
options.homeconfig.rofi.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.rofi.enable {
|
||||
programs.rofi = {
|
||||
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland;
|
||||
|
||||
cycle = true;
|
||||
|
||||
theme = "/home/nathan/.cache/wal/colors-rofi-dark.rasi";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
options.homeconfig.swaylock.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.swaylock.enable {
|
||||
|
||||
home.packages = with pkgs; [ swaylock-effects ];
|
||||
};
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
home.packages = with pkgs; [ oh-my-posh ];
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
|
||||
shellAliases = {
|
||||
ls = "eza";
|
||||
ll = "ls -l";
|
||||
|
||||
ksh = "kitten ssh";
|
||||
|
||||
vi = "nvim";
|
||||
vim = "nvim";
|
||||
|
||||
};
|
||||
|
||||
bashrcExtra = ''
|
||||
source ${pkgs.blesh}/share/blesh/ble.sh
|
||||
'';
|
||||
|
||||
initExtra = if config.homeconfig.wal.enable then (lib.mkBefore ''
|
||||
cat ${config.home.homeDirectory}/.cache/wal/sequences
|
||||
eval "$(oh-my-posh init bash --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)"
|
||||
'') else (lib.mkBefore ''
|
||||
eval "$(oh-my-posh init bash --config ${config.home.homeDirectory}/.config/ohmyposh/ohmyposh.toml)"
|
||||
'');
|
||||
};
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.bat = {
|
||||
|
||||
enable = true;
|
||||
|
||||
extraPackages = with pkgs.bat-extras; [
|
||||
batman
|
||||
batpipe
|
||||
batgrep
|
||||
batdiff
|
||||
batwatch
|
||||
prettybat
|
||||
];
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{ ... }: {
|
||||
|
||||
imports = [
|
||||
./bat
|
||||
./bash
|
||||
./eza
|
||||
./fzf
|
||||
./tmux
|
||||
./kitty
|
||||
./zoxide
|
||||
./zsh
|
||||
./ssh
|
||||
];
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.eza = {
|
||||
|
||||
enable = true;
|
||||
|
||||
enableZshIntegration = true;
|
||||
|
||||
extraOptions = [
|
||||
"--color=auto"
|
||||
];
|
||||
|
||||
git = true;
|
||||
|
||||
icons = "auto";
|
||||
};
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.fzf = {
|
||||
|
||||
enable = true;
|
||||
|
||||
enableZshIntegration = true;
|
||||
|
||||
tmux = {
|
||||
#enableShellIntegration = true;
|
||||
|
||||
#shellIntegrationOptions = [];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.kitty = {
|
||||
|
||||
enable = true;
|
||||
|
||||
font = {
|
||||
name = "FiraCode Nerd Font";
|
||||
size = 12;
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
|
||||
confirm_os_window_close 0
|
||||
|
||||
include ${config.home.homeDirectory}/.cache/wal/colors-kitty.conf
|
||||
|
||||
disable_ligatures never
|
||||
|
||||
dynamic_background_opacity yes
|
||||
|
||||
tab_bar_edge top
|
||||
|
||||
map ctrl+shift+t new_tab
|
||||
map ctrl+shift+w close_tab
|
||||
|
||||
map ctrl+tab next_tab
|
||||
map ctrl+shift+tab previous_tab
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.ssh = {
|
||||
|
||||
enable = true;
|
||||
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.tmux = {
|
||||
|
||||
enable = true;
|
||||
|
||||
clock24 = true;
|
||||
|
||||
mouse = true;
|
||||
|
||||
baseIndex = 1;
|
||||
|
||||
keyMode = "vi";
|
||||
|
||||
prefix = "C-b";
|
||||
|
||||
shell = "${pkgs.zsh}/bin/zsh";
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.zoxide = {
|
||||
|
||||
enable = true;
|
||||
|
||||
enableZshIntegration = true;
|
||||
|
||||
options = [
|
||||
"--cmd cd"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{}: {}
|
||||
@@ -1,5 +0,0 @@
|
||||
{ ... }: {
|
||||
imports = [
|
||||
./mpd
|
||||
];
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
options = {
|
||||
homeconfig.mpd.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.mpd.enable {
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
network.startWhenNeeded = true;
|
||||
network.port = 6600;
|
||||
network.listenAddress = "127.0.0.1";
|
||||
musicDirectory = "/home/nathan/Music";
|
||||
extraConfig = ''
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "Audio1"
|
||||
}
|
||||
audio_output {
|
||||
type "fifo"
|
||||
name "visualizer"
|
||||
path "/tmp/mpd.fifo"
|
||||
format "44100:16:1"
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
services.mpdris2 = {
|
||||
enable = true;
|
||||
mpd.host = "127.0.0.1";
|
||||
mpd.port = 6600;
|
||||
package = pkgs.mpdris2;
|
||||
mpd.musicDirectory = "/home/nathan/Music";
|
||||
notifications = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
{ config, lib, pkgs, inputs, ... }: {
|
||||
|
||||
imports = [
|
||||
# ./programs
|
||||
# ./services
|
||||
./packages
|
||||
./dotfiles
|
||||
];
|
||||
|
||||
config = {
|
||||
|
||||
homeconfig = {
|
||||
mpd.enable = lib.mkDefault true;
|
||||
calcurse.enable = lib.mkDefault true;
|
||||
git.enable = lib.mkDefault true;
|
||||
nh.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
home.pointerCursor = lib.mkIf config.homeconfig.graphical {
|
||||
gtk.enable = true;
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Classic";
|
||||
size = 16;
|
||||
};
|
||||
|
||||
gtk = lib.mkIf config.homeconfig.graphical {
|
||||
enable = true;
|
||||
theme.name = "Tokyonight-Dark";
|
||||
theme.package = pkgs.tokyonight-gtk-theme;
|
||||
iconTheme.package = pkgs.rose-pine-icon-theme;
|
||||
iconTheme.name = "rose-pine-moon";
|
||||
};
|
||||
|
||||
sops = {
|
||||
age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
|
||||
defaultSopsFile = ./secrets.yaml;
|
||||
defaultSopsFormat = "yaml";
|
||||
};
|
||||
/*
|
||||
nix = {
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
builders = ''
|
||||
ssh://remote-builder@blunkall.us
|
||||
'';
|
||||
builders-use-substituters = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.ssh.matchBlocks = {
|
||||
"builder" = {
|
||||
hostname = "blunkall.us";
|
||||
user = "remote-builder";
|
||||
identityFile = config.sops.secrets."".path;
|
||||
port = 2222;
|
||||
};
|
||||
};
|
||||
*/
|
||||
services.mpris-proxy.enable = true;
|
||||
|
||||
programs.ssh.enable = true;
|
||||
|
||||
};
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{ config, lib, ... }: {
|
||||
|
||||
home.file = {
|
||||
".config/hypr" = { source = ./hypr; recursive = true; };
|
||||
".config/swaylock" = { source = ./swaylock; recursive = true; };
|
||||
".config/wal/templates" = { source = ./wal/templates; recursive = true; };
|
||||
".config/ohmyposh" = { source = ./ohmyposh; recursive = true; };
|
||||
"Pictures/Wallpaper" = { source = ./Wallpaper; recursive = true; };
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
[pyprland]
|
||||
plugins = [
|
||||
"scratchpads"
|
||||
]
|
||||
|
||||
[scratchpads.nvim]
|
||||
animation = "fromTop"
|
||||
command = "kitty --class scratchpad-nvim -e nvim ~/Projects"
|
||||
lazy = false
|
||||
class = "scratchpad-nvim"
|
||||
margin = 100
|
||||
multi = true
|
||||
excludes = "*"
|
||||
|
||||
[scratchpads.free]
|
||||
animation = "fromBottom"
|
||||
command = "kitty --class scratchpad -e tmux"
|
||||
class = "scratchpad"
|
||||
lazy = false
|
||||
margin = 100
|
||||
multi = true
|
||||
excludes = "*"
|
||||
@@ -1,18 +0,0 @@
|
||||
$foregroundCol = 0xff{foreground.strip}
|
||||
$backgroundCol = 0xff{background.strip}
|
||||
$color0 = 0xff{color0.strip}
|
||||
$color1 = 0xff{color1.strip}
|
||||
$color2 = 0xff{color2.strip}
|
||||
$color3 = 0xff{color3.strip}
|
||||
$color4 = 0xff{color4.strip}
|
||||
$color5 = 0xff{color5.strip}
|
||||
$color6 = 0xff{color6.strip}
|
||||
$color7 = 0xff{color7.strip}
|
||||
$color8 = 0xff{color8.strip}
|
||||
$color9 = 0xff{color9.strip}
|
||||
$color10 = 0xff{color10.strip}
|
||||
$color11 = 0xff{color11.strip}
|
||||
$color12 = 0xff{color12.strip}
|
||||
$color13 = 0xff{color13.strip}
|
||||
$color14 = 0xff{color14.strip}
|
||||
$color15 = 0xff{color15.strip}
|
||||
@@ -1,100 +0,0 @@
|
||||
{ config, lib, pkgs, inputs, ... }: let
|
||||
system = "x86_64-linux";
|
||||
|
||||
pkgs-us = import inputs.nixpkgs-us {
|
||||
inherit system;
|
||||
};
|
||||
|
||||
in {
|
||||
|
||||
imports = [
|
||||
./scripts
|
||||
];
|
||||
|
||||
options.homeconfig.minimal = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
nixpkgs.config = lib.mkIf (!config.homeconfig.minimal) {
|
||||
allowUnfree = true;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; ([
|
||||
sops
|
||||
killall
|
||||
btop
|
||||
zip
|
||||
unzip
|
||||
rsync
|
||||
curl
|
||||
wget
|
||||
] ++ (if config.homeconfig.graphical then [
|
||||
grim
|
||||
slurp
|
||||
xfce.thunar
|
||||
wl-clipboard
|
||||
blueberry
|
||||
lxqt.lxqt-policykit
|
||||
] else []) ++ (if !config.homeconfig.minimal then [
|
||||
cava
|
||||
android-tools
|
||||
neovim-remote
|
||||
gcc
|
||||
zulu
|
||||
|
||||
(python312.withPackages (ps: with ps; [
|
||||
gpustat
|
||||
numpy
|
||||
matplotlib
|
||||
scipy
|
||||
pandas
|
||||
pyaudio
|
||||
pyusb
|
||||
debugpy
|
||||
requests
|
||||
]))
|
||||
|
||||
fastfetch
|
||||
ncmpcpp
|
||||
playerctl
|
||||
mpc-cli
|
||||
ffmpeg
|
||||
|
||||
] else []) ++ (if !config.homeconfig.minimal && config.homeconfig.graphical then [
|
||||
handbrake
|
||||
quickemu
|
||||
bottles
|
||||
|
||||
brightnessctl
|
||||
libdbusmenu-gtk3
|
||||
lmms
|
||||
|
||||
#unfree {
|
||||
geogebra
|
||||
spotify
|
||||
discord
|
||||
#}
|
||||
pkgs-us.rustdesk-flutter
|
||||
pkgs-us.mpv
|
||||
vlc
|
||||
pavucontrol
|
||||
rpi-imager
|
||||
tigervnc
|
||||
keepassxc
|
||||
|
||||
#3D modeling/printing
|
||||
blender
|
||||
freecad-wayland
|
||||
cura-appimage
|
||||
|
||||
#productivity
|
||||
libreoffice
|
||||
|
||||
#games
|
||||
prismlauncher
|
||||
] else []));
|
||||
};
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
options = {
|
||||
homeScripts.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeScripts.enable {
|
||||
home.packages = [
|
||||
|
||||
#scripts
|
||||
(pkgs.writeShellScriptBin "_systemRebuild" ''
|
||||
${pkgs.nh}/bin/nh os switch --ask /home/nathan/Projects/Olympus
|
||||
echo //////Enter to close//////
|
||||
read
|
||||
'')
|
||||
|
||||
|
||||
(pkgs.writeShellScriptBin "randWallpaper" ''
|
||||
file=$(ls /home/nathan/Pictures/Wallpaper/ | shuf -n 1)
|
||||
setWallpaper /home/nathan/Pictures/Wallpaper/$file
|
||||
'')
|
||||
|
||||
(pkgs.writeShellScriptBin "setWallpaper" ''
|
||||
img=''$(realpath ''${1:-~/.config/background})
|
||||
chmod 600 ~/.config/background
|
||||
${pkgs.hyprpanel}/bin/hyprpanel sw ''$img
|
||||
changeColors ''$img ''$2
|
||||
'')
|
||||
|
||||
(pkgs.writeShellScriptBin "changeColors" ''
|
||||
|
||||
if [[ $(ls ~/.config/ | grep bga) != bga ]]; then
|
||||
echo 100 > ~/.config/bga
|
||||
fi
|
||||
|
||||
alpha=''${2:-`cat ~/.config/bga`}
|
||||
|
||||
img=''$(realpath ''${1:-~/.config/background})
|
||||
|
||||
if [[ $alpha -lt 0 ]]; then
|
||||
$alpha=0
|
||||
fi
|
||||
|
||||
if [[ $alpha -gt 100 ]]; then
|
||||
$alpha=100
|
||||
fi
|
||||
|
||||
wal -i $img -a $alpha --cols16 -n
|
||||
|
||||
echo $alpha > ~/.config/bga
|
||||
|
||||
sleep 0.4
|
||||
|
||||
pywalfox update &
|
||||
|
||||
[[ $(pidof cava) != "" ]] && pkill -USR1 cava &
|
||||
|
||||
for i in $(ls /run/user/1000 | grep nvim); do nvr -s --servername /run/user/1000/$i --remote-send '<cmd>colorscheme pywal<CR>'; done
|
||||
|
||||
pkill -USR1 kitty
|
||||
'')
|
||||
|
||||
(pkgs.writeShellScriptBin "onSystemStart" ''
|
||||
${pkgs.hyprpanel}/bin/hyprpanel &
|
||||
randWallpaper &
|
||||
pypr &
|
||||
lxqt-policykit-agent &
|
||||
hyprctl setcursor Bibata-Modern-Classic 16 &
|
||||
sleep 3
|
||||
hyprctl reload &
|
||||
#tmux new-session -s hyprland
|
||||
'')
|
||||
|
||||
(pkgs.writeShellScriptBin "colorPrefix" ''
|
||||
exec -a "$0" "$@" &
|
||||
sleep 0.4 && changeColors &
|
||||
'')
|
||||
|
||||
] ++ (if config.homeconfig.standalone.enable then [
|
||||
|
||||
(pkgs.writeShellScriptBin "_homeRebuild" ''
|
||||
${pkgs.nh}/bin/nh home switch --ask /home/nathan/Projects/Olympus
|
||||
echo //////Enter to close//////
|
||||
read
|
||||
'')
|
||||
] else []);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
options.homeconfig.calcurse.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.calcurse.enable {
|
||||
home.packages = with pkgs; [
|
||||
calcurse
|
||||
libnotify
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{ config, lib, pkgs, inputs, ... }: {
|
||||
|
||||
imports = [
|
||||
./ags
|
||||
./git
|
||||
./nh
|
||||
./hyprland
|
||||
./terminal
|
||||
./rofi
|
||||
./pywal
|
||||
./swaylock
|
||||
./calcurse
|
||||
./firefox
|
||||
];
|
||||
|
||||
config = {
|
||||
|
||||
home.packages = lib.mkIf (!config.homeconfig.wal.enable) [
|
||||
inputs.nixvim.packages.${pkgs.system}.default
|
||||
];
|
||||
|
||||
home.sessionVariables.EDITOR = "nvim";
|
||||
};
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
{ config, lib, pkgs, inputs, ... }: {
|
||||
|
||||
options.homeconfig.firefox.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.firefox.enable {
|
||||
|
||||
home.sessionVariables.BROWSER = "${config.programs.firefox.package}/bin/firefox";
|
||||
|
||||
home.packages = lib.mkIf config.homeconfig.wal.enable [
|
||||
pkgs.pywalfox-native
|
||||
];
|
||||
|
||||
home.file.".mozilla/native-messaging-hosts/pywalfox.json".text = let
|
||||
pywalfox-wrapper = pkgs.writeShellScriptBin "pywalfox-wrapper" ''
|
||||
${pkgs.pywalfox-native}/bin/pywalfox start
|
||||
'';
|
||||
in lib.replaceStrings [ "<path>" ] [
|
||||
"${pywalfox-wrapper}/bin/pywalfox-wrapper"
|
||||
] (lib.readFile "${pkgs.pywalfox-native}/lib/python3.12/site-packages/pywalfox/assets/manifest.json");
|
||||
|
||||
|
||||
programs.firefox = {
|
||||
|
||||
enable = true;
|
||||
package = pkgs.firefox;
|
||||
|
||||
profiles.nathan = {
|
||||
search = {
|
||||
default = "ddg";
|
||||
privateDefault = "ddg";
|
||||
};
|
||||
bookmarks = {
|
||||
force = true;
|
||||
settings = [
|
||||
{
|
||||
name = "toolbar";
|
||||
toolbar = true;
|
||||
bookmarks = [
|
||||
{
|
||||
name = "NixOS Search - Packages";
|
||||
url = "https://search.nixos.org/packages";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
extensions.packages = with inputs.firefox-addons.packages.${pkgs.system}; [
|
||||
ublock-origin
|
||||
keepassxc-browser
|
||||
pywalfox
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
{ config, lib, ... }: {
|
||||
|
||||
options.homeconfig.git.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.git.enable {
|
||||
|
||||
sops = {
|
||||
secrets = {
|
||||
"git/username" = {};
|
||||
"git/email" = {};
|
||||
};
|
||||
|
||||
templates.gitconfig.content = ''
|
||||
[user]
|
||||
name = "${config.sops.placeholder."git/username"}"
|
||||
email = "${config.sops.placeholder."git/email"}"
|
||||
'';
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
includes = [
|
||||
{ path = "${config.sops.templates.gitconfig.path}"; }
|
||||
];
|
||||
|
||||
extraConfig = {
|
||||
init = {
|
||||
defaultBranch = "master";
|
||||
};
|
||||
url = {
|
||||
"ssh://gitea@gitea.blunkall.us/" = {
|
||||
insteadOf = [
|
||||
"blunkall:"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
options.homeconfig.hyprland.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.hyprland.enable {
|
||||
|
||||
home.sessionVariables.NIX_OZONE_WL = "1";
|
||||
|
||||
programs.kitty.enable = lib.mkDefault true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
pyprland
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
|
||||
enable = true;
|
||||
|
||||
systemd = {
|
||||
enable = true;
|
||||
variables = [ "--all" ];
|
||||
};
|
||||
|
||||
extraConfig = let
|
||||
monitor = if config.homeconfig.host == "laptop" then ''
|
||||
monitor=eDP-1,1920x1080@60,0x0,1
|
||||
'' else if config.homeconfig.host == "homebox" then ''
|
||||
monitor=HDMI-A-2,1920x1080@60,0x0,1
|
||||
monitor=HEADLESS-2,1920x1080@60,0x0,1
|
||||
exec-once=hyprctl output create headless HEADLESS-2
|
||||
exec-once=hyprctl keyword monitor HDMI-A-2,disable
|
||||
exec-once=${pkgs.wayvnc}/bin/wayvnc 0.0.0.0 -o HEADLESS-2
|
||||
'' else '''';
|
||||
in monitor + ''
|
||||
source = /home/nathan/.config/hypr/main.conf
|
||||
'';
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
{ config, lib, ... }: {
|
||||
|
||||
options.homeconfig.nh.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.nh.enable {
|
||||
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
flake = "${config.home.homeDirectory}/Projects/Olympus";
|
||||
|
||||
clean = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
extraArgs = "--keep 5 --keep-since 5d";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{ config, lib, pkgs, inputs, ... }: {
|
||||
|
||||
options.homeconfig.wal.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.wal.enable {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
||||
inputs.nixvim.packages.${pkgs.system}.pywal
|
||||
|
||||
pywal16
|
||||
imagemagick
|
||||
];
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
options.homeconfig.rofi.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.rofi.enable {
|
||||
programs.rofi = {
|
||||
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland;
|
||||
|
||||
cycle = true;
|
||||
|
||||
theme = "/home/nathan/.cache/wal/colors-rofi-dark.rasi";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
options.homeconfig.swaylock.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.swaylock.enable {
|
||||
|
||||
home.packages = with pkgs; [ swaylock-effects ];
|
||||
};
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
home.packages = with pkgs; [ oh-my-posh ];
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
blesh.enable = true;
|
||||
|
||||
shellAliases = {
|
||||
ls = "eza";
|
||||
ll = "ls -l";
|
||||
|
||||
ksh = "kitten ssh";
|
||||
|
||||
vi = "nvim";
|
||||
vim = "nvim";
|
||||
|
||||
};
|
||||
|
||||
initContent = if config.homeconfig.wal.enable then (lib.mkBefore ''
|
||||
cat ${config.home.homeDirectory}/.cache/wal/sequences
|
||||
eval "$(oh-my-posh init bash --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)"
|
||||
'') else (lib.mkBefore ''
|
||||
eval "$(oh-my-posh init bash --config ${config.home.homeDirectory}/.config/ohmyposh/ohmyposh.toml)"
|
||||
'');
|
||||
};
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.bat = {
|
||||
|
||||
enable = true;
|
||||
|
||||
extraPackages = with pkgs.bat-extras; [
|
||||
batman
|
||||
batpipe
|
||||
batgrep
|
||||
batdiff
|
||||
batwatch
|
||||
prettybat
|
||||
];
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
{ ... }: {
|
||||
|
||||
imports = [
|
||||
./bat
|
||||
./eza
|
||||
./fzf
|
||||
./tmux
|
||||
./kitty
|
||||
./zoxide
|
||||
./zsh
|
||||
];
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.eza = {
|
||||
|
||||
enable = true;
|
||||
|
||||
enableZshIntegration = true;
|
||||
|
||||
extraOptions = [
|
||||
"--color=auto"
|
||||
];
|
||||
|
||||
git = true;
|
||||
|
||||
icons = "auto";
|
||||
};
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.fzf = {
|
||||
|
||||
enable = true;
|
||||
|
||||
enableZshIntegration = true;
|
||||
|
||||
tmux = {
|
||||
#enableShellIntegration = true;
|
||||
|
||||
#shellIntegrationOptions = [];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.kitty = {
|
||||
|
||||
enable = true;
|
||||
|
||||
font = {
|
||||
name = "FiraCode Nerd Font";
|
||||
size = 12;
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
|
||||
confirm_os_window_close 0
|
||||
|
||||
include ${config.home.homeDirectory}/.cache/wal/colors-kitty.conf
|
||||
|
||||
disable_ligatures never
|
||||
|
||||
dynamic_background_opacity yes
|
||||
|
||||
tab_bar_edge top
|
||||
|
||||
map ctrl+shift+t new_tab
|
||||
map ctrl+shift+w close_tab
|
||||
|
||||
map ctrl+tab next_tab
|
||||
map ctrl+shift+tab previous_tab
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.tmux = {
|
||||
|
||||
enable = true;
|
||||
|
||||
clock24 = true;
|
||||
|
||||
mouse = true;
|
||||
|
||||
baseIndex = 1;
|
||||
|
||||
keyMode = "vi";
|
||||
|
||||
prefix = "C-b";
|
||||
|
||||
shell = "${pkgs.zsh}/bin/zsh";
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.zoxide = {
|
||||
|
||||
enable = true;
|
||||
|
||||
enableZshIntegration = true;
|
||||
|
||||
options = [
|
||||
"--cmd cd"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,158 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
oh-my-posh
|
||||
];
|
||||
|
||||
programs.zsh = {
|
||||
|
||||
enable = true;
|
||||
|
||||
enableCompletion = true;
|
||||
|
||||
autosuggestion.enable = true;
|
||||
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
shellAliases = {
|
||||
ls = "eza";
|
||||
ll = "ls -l";
|
||||
|
||||
ksh = "kitten ssh";
|
||||
|
||||
vi = "nvim";
|
||||
vim = "nvim";
|
||||
|
||||
};
|
||||
|
||||
history = {
|
||||
size = 5000;
|
||||
ignoreAllDups = true;
|
||||
ignoreSpace = true;
|
||||
share = true;
|
||||
};
|
||||
|
||||
initContent = if config.homeconfig.wal.enable then (lib.mkBefore ''
|
||||
cat ${config.home.homeDirectory}/.cache/wal/sequences
|
||||
eval "$(oh-my-posh init zsh --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)"
|
||||
'') else (lib.mkBefore ''
|
||||
eval "$(oh-my-posh init zsh --config ${config.home.homeDirectory}/.config/ohmyposh/ohmyposh.toml)"
|
||||
'');
|
||||
|
||||
};
|
||||
|
||||
home.file.".config/wal/templates/ohmyposh.toml".text = ''
|
||||
#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
|
||||
|
||||
version = 2
|
||||
final_space = true
|
||||
console_title_template = '{{{{ .Shell }}}} in {{{{ .Folder }}}}'
|
||||
|
||||
[[blocks]]
|
||||
type = 'prompt'
|
||||
alignment = 'left'
|
||||
newline = true
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'os'
|
||||
style = 'diamond'
|
||||
trailing_diamond = ''
|
||||
background = 'p:c1'
|
||||
foreground = 'p:c12'
|
||||
template = ' {{{{ .Icon }}}} '
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'session'
|
||||
style = 'diamond'
|
||||
trailing_diamond = ''
|
||||
background = 'p:c2'
|
||||
foreground = 'p:c14'
|
||||
template = '{{{{ .UserName }}}}@{{{{ .HostName }}}}'
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'path'
|
||||
style = 'diamond'
|
||||
trailing_diamond = ''
|
||||
background = 'p:c4'
|
||||
foreground = 'p:c13'
|
||||
template = '{{{{ .Path }}}}'
|
||||
|
||||
[blocks.segments.properties]
|
||||
style = 'full'
|
||||
|
||||
[[blocks]]
|
||||
type = 'prompt'
|
||||
overflow = 'hidden'
|
||||
alignment = 'right'
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'executiontime'
|
||||
style = 'diamond'
|
||||
leading_diamond = ''
|
||||
background = 'p:c4'
|
||||
foreground = 'p:c13'
|
||||
template = '{{{{ .FormattedMs }}}}'
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'time'
|
||||
style = 'diamond'
|
||||
leading_diamond = ''
|
||||
background = 'p:c2'
|
||||
foreground = 'p:c14'
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'shell'
|
||||
style = 'diamond'
|
||||
leading_diamond = ''
|
||||
background = 'p:c1'
|
||||
foreground = 'p:c12'
|
||||
|
||||
[[blocks]]
|
||||
type = 'prompt'
|
||||
alignment = 'left'
|
||||
newline = true
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'text'
|
||||
style = 'plain'
|
||||
background = 'transparent'
|
||||
foreground_templates = [
|
||||
"{{{{ if gt .Code 0 }}}}p:c13{{{{end}}}}",
|
||||
"{{{{ if eq .Code 0 }}}}p:c14{{{{end}}}}",
|
||||
]
|
||||
template = "{{{{ if gt .Code 0 }}}}!❭ {{{{else}}}}❭ {{{{end}}}}"
|
||||
|
||||
[transient_prompt]
|
||||
foreground_templates = [
|
||||
"{{{{ if gt .Code 0 }}}}p:c13{{{{end}}}}",
|
||||
"{{{{ if eq .Code 0 }}}}p:c14{{{{end}}}}",
|
||||
]
|
||||
background = 'transparent'
|
||||
template = "{{{{ if gt .Code 0 }}}}!❭ {{{{else}}}}❭ {{{{end}}}}"
|
||||
|
||||
[secondary_prompt]
|
||||
background = 'transparent'
|
||||
forground = 'p:c14'
|
||||
template = "❭❭ "
|
||||
|
||||
|
||||
[palette]
|
||||
|
||||
c0 = "{color0}"
|
||||
c1 = "{color1}"
|
||||
c2 = "{color2}"
|
||||
c3 = "{color3}"
|
||||
c4 = "{color4}"
|
||||
c5 = "{color5}"
|
||||
c6 = "{color6}"
|
||||
c7 = "{color7}"
|
||||
c8 = "{color8}"
|
||||
c9 = "{color9}"
|
||||
c10 = "{color10}"
|
||||
c11 = "{color11}"
|
||||
c12 = "{color12}"
|
||||
c13 = "{color13}"
|
||||
c14 = "{color14}"
|
||||
c15 = "{color15}"
|
||||
'';
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{}: {}
|
||||
@@ -1,6 +0,0 @@
|
||||
{ ... }: {
|
||||
imports = [
|
||||
./mpd
|
||||
./wayvnc
|
||||
];
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
options = {
|
||||
homeconfig.mpd.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.mpd.enable {
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
network.startWhenNeeded = true;
|
||||
network.port = 6600;
|
||||
network.listenAddress = "127.0.0.1";
|
||||
musicDirectory = "/home/nathan/Music";
|
||||
extraConfig = ''
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "Audio1"
|
||||
}
|
||||
audio_output {
|
||||
type "fifo"
|
||||
name "visualizer"
|
||||
path "/tmp/mpd.fifo"
|
||||
format "44100:16:1"
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
services.mpdris2 = {
|
||||
enable = true;
|
||||
mpd.host = "127.0.0.1";
|
||||
mpd.port = 6600;
|
||||
package = pkgs.mpdris2;
|
||||
mpd.musicDirectory = "/home/nathan/Music";
|
||||
notifications = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
{ config, lib, pkgs, inputs, ... }: {
|
||||
|
||||
options.homeconfig.wayvnc.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
disabledModules = [
|
||||
];
|
||||
|
||||
imports = [
|
||||
(import "${inputs.home-manager-us}/modules/services/wayvnc.nix" {
|
||||
inherit config;
|
||||
inherit lib;
|
||||
pkgs = (import inputs.nixpkgs-us { system = "x86_64-linux"; });
|
||||
})
|
||||
];
|
||||
|
||||
config = lib.mkIf config.homeconfig.wayvnc.enable {
|
||||
home.packages = with pkgs; [
|
||||
novnc
|
||||
];
|
||||
|
||||
services.wayvnc = {
|
||||
enable = true;
|
||||
|
||||
autoStart = true;
|
||||
|
||||
settings = {
|
||||
address = "0.0.0.0";
|
||||
|
||||
port = 5900;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
16
modules/features/aurora-greeter.nix
Normal file
16
modules/features/aurora-greeter.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ inputs, ... }: {
|
||||
|
||||
flake.nixosModules.aurora-greeter = { config, lib, pkgs, ... }: {
|
||||
|
||||
imports = [
|
||||
inputs.aurora.nixosModules.default
|
||||
];
|
||||
|
||||
config = {
|
||||
|
||||
services.aurora-greeter = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
236
modules/features/authentik.nix
Normal file
236
modules/features/authentik.nix
Normal file
@@ -0,0 +1,236 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.authentik = { config, lib, pkgs, ... }: let
|
||||
|
||||
hostPort = 9005;
|
||||
|
||||
subdomain = "auth";
|
||||
|
||||
name = "authentik";
|
||||
|
||||
in {
|
||||
|
||||
config = {
|
||||
|
||||
networking.firewall.interfaces = {
|
||||
"ve-traefik" = {
|
||||
allowedTCPPorts = [ hostPort ];
|
||||
};
|
||||
};
|
||||
|
||||
sops.secrets = {
|
||||
"authentik/pass" = {};
|
||||
"authentik/secret_key" = {};
|
||||
};
|
||||
|
||||
sops.templates."authentik.env" = {
|
||||
content = ''
|
||||
PG_PASS=${config.sops.placeholder."authentik/pass"}
|
||||
SECRET_KEY=${config.sops.placeholder."authentik/secret_key"}
|
||||
'';
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers."authentik-postgresql" = {
|
||||
image = "docker.io/library/postgres:16-alpine";
|
||||
environment = {
|
||||
"POSTGRES_DB" = "authentik";
|
||||
"POSTGRES_PASSWORD" = "\${PG_PASS}";
|
||||
"POSTGRES_USER" = "authentik";
|
||||
};
|
||||
environmentFiles = [ config.sops.templates."authentik.env".path ];
|
||||
volumes = [
|
||||
"authentik_database:/var/lib/postgresql/data:rw"
|
||||
];
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--health-cmd=pg_isready -d \${POSTGRES_DB} -U \${POSTGRES_USER}"
|
||||
"--health-interval=30s"
|
||||
"--health-retries=5"
|
||||
"--health-start-period=20s"
|
||||
"--health-timeout=5s"
|
||||
"--network-alias=postgresql"
|
||||
"--network=authentik_default"
|
||||
];
|
||||
};
|
||||
systemd.services."docker-authentik-postgresql" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 90 "1m";
|
||||
RestartSec = lib.mkOverride 90 "100ms";
|
||||
RestartSteps = lib.mkOverride 90 9;
|
||||
};
|
||||
after = [
|
||||
"docker-network-authentik_default.service"
|
||||
"docker-volume-authentik_database.service"
|
||||
];
|
||||
requires = [
|
||||
"docker-network-authentik_default.service"
|
||||
"docker-volume-authentik_database.service"
|
||||
];
|
||||
partOf = [
|
||||
"docker-compose-authentik-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"docker-compose-authentik-root.target"
|
||||
];
|
||||
};
|
||||
virtualisation.oci-containers.containers."authentik-server" = {
|
||||
image = "ghcr.io/goauthentik/server:2025.12.2";
|
||||
environment = {
|
||||
"AUTHENTIK_POSTGRESQL__HOST" = "postgresql";
|
||||
"AUTHENTIK_POSTGRESQL__NAME" = "authentik";
|
||||
"AUTHENTIK_POSTGRESQL__PASSWORD" = "\${PG_PASS}";
|
||||
"AUTHENTIK_POSTGRESQL__USER" = "authentik";
|
||||
"AUTHENTIK_SECRET_KEY" = "\${SECRET_KEY}";
|
||||
};
|
||||
environmentFiles = [ config.sops.templates."authentik.env".path ];
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.${name}.entrypoints" = "websecure,localsecure";
|
||||
"traefik.http.routers.${name}.rule" = "Host(`${subdomain}.esotericbytes.com`)";
|
||||
"traefik.http.routers.${name}.service" = "${name}";
|
||||
"traefik.http.routers.${name}.tls.certResolver" = "cloudflare";
|
||||
|
||||
"traefik.http.services.${name}.loadbalancer.server.url" = "http://192.168.101.1:${builtins.toString hostPort}";
|
||||
|
||||
|
||||
"traefik.http.middlewares.authentik.forwardauth.address" = "https://auth.esotericbytes.com/outpost.goauthentik.io/auth/traefik";
|
||||
"traefik.http.middlewares.authentik.forwardauth.trustForwardHeader" = "true";
|
||||
"traefik.http.middlewares.authentik.forwardauth.authResponseHeaders" = "X-authentik-username,X-authentik-groups,X-authentik-entitlements,X-authentik-email,X-authentik-name,X-authentik-uid,X-authentik-jwt,X-authentik-meta-jwks,X-authentik-meta-outpost,X-authentik-meta-provider,X-authentik-meta-app,X-authentik-meta-version";
|
||||
|
||||
};
|
||||
volumes = [
|
||||
"/etc/Authentik/custom-templates:/templates:rw"
|
||||
"/etc/Authentik/data:/data:rw"
|
||||
];
|
||||
ports = [
|
||||
"${builtins.toString hostPort}:9000/tcp"
|
||||
#"9443:9443/tcp"
|
||||
];
|
||||
cmd = [ "server" ];
|
||||
dependsOn = [
|
||||
"authentik-postgresql"
|
||||
];
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--network-alias=server"
|
||||
"--network-alias=authentik-server"
|
||||
"--network-alias=${name}"
|
||||
"--ip=192.168.101.6"
|
||||
];
|
||||
networks = [
|
||||
"docker-main"
|
||||
"authentik_default"
|
||||
];
|
||||
};
|
||||
systemd.services."docker-authentik-server" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 90 "1m";
|
||||
RestartSec = lib.mkOverride 90 "100ms";
|
||||
RestartSteps = lib.mkOverride 90 9;
|
||||
};
|
||||
after = [
|
||||
"docker-network-authentik_default.service"
|
||||
"docker-network-setup.service"
|
||||
];
|
||||
requires = [
|
||||
"docker-network-authentik_default.service"
|
||||
"docker-network-setup.service"
|
||||
];
|
||||
partOf = [
|
||||
"docker-compose-authentik-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"docker-compose-authentik-root.target"
|
||||
];
|
||||
};
|
||||
virtualisation.oci-containers.containers."authentik-worker" = {
|
||||
image = "ghcr.io/goauthentik/server:2025.12.2";
|
||||
environment = {
|
||||
"AUTHENTIK_POSTGRESQL__HOST" = "postgresql";
|
||||
"AUTHENTIK_POSTGRESQL__NAME" = "authentik";
|
||||
"AUTHENTIK_POSTGRESQL__PASSWORD" = "\${PG_PASS}";
|
||||
"AUTHENTIK_POSTGRESQL__USER" = "authentik";
|
||||
"AUTHENTIK_SECRET_KEY" = "\${SECRET_KEY}";
|
||||
};
|
||||
environmentFiles = [ config.sops.templates."authentik.env".path ];
|
||||
volumes = [
|
||||
"/etc/Authentik/certs:/certs:rw"
|
||||
"/etc/Authentik/custom-templates:/templates:rw"
|
||||
"/etc/Authentik/data:/data:rw"
|
||||
"/var/run/docker.sock:/var/run/docker.sock:rw"
|
||||
];
|
||||
cmd = [ "worker" ];
|
||||
dependsOn = [
|
||||
"authentik-postgresql"
|
||||
];
|
||||
user = "root";
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--network-alias=worker"
|
||||
"--network=authentik_default"
|
||||
];
|
||||
};
|
||||
systemd.services."docker-authentik-worker" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 90 "1m";
|
||||
RestartSec = lib.mkOverride 90 "100ms";
|
||||
RestartSteps = lib.mkOverride 90 9;
|
||||
};
|
||||
after = [
|
||||
"docker-network-authentik_default.service"
|
||||
];
|
||||
requires = [
|
||||
"docker-network-authentik_default.service"
|
||||
];
|
||||
partOf = [
|
||||
"docker-compose-authentik-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"docker-compose-authentik-root.target"
|
||||
];
|
||||
};
|
||||
|
||||
# Networks
|
||||
systemd.services."docker-network-authentik_default" = {
|
||||
path = [ pkgs.docker ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
ExecStop = "docker network rm -f authentik_default";
|
||||
};
|
||||
script = ''
|
||||
docker network inspect authentik_default || docker network create authentik_default
|
||||
'';
|
||||
partOf = [ "docker-compose-authentik-root.target" ];
|
||||
wantedBy = [ "docker-compose-authentik-root.target" ];
|
||||
};
|
||||
|
||||
# Volumes
|
||||
systemd.services."docker-volume-authentik_database" = {
|
||||
path = [ pkgs.docker ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
script = ''
|
||||
docker volume inspect authentik_database || docker volume create authentik_database --driver=local
|
||||
'';
|
||||
partOf = [ "docker-compose-authentik-root.target" ];
|
||||
wantedBy = [ "docker-compose-authentik-root.target" ];
|
||||
};
|
||||
|
||||
# Root service
|
||||
# When started, this will automatically create all resources and start
|
||||
# the containers. When stopped, this will teardown all resources.
|
||||
systemd.targets."docker-compose-authentik-root" = {
|
||||
unitConfig = {
|
||||
Description = "Root target generated by compose2nix.";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
20
modules/features/avahi.nix
Normal file
20
modules/features/avahi.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.avahi = { config, lib, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
services.avahi = {
|
||||
|
||||
enable = true;
|
||||
ipv4 = true;
|
||||
ipv6 = true;
|
||||
openFirewall = true;
|
||||
nssmdns4 = true;
|
||||
wideArea = true;
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
39
modules/features/code-server.nix
Normal file
39
modules/features/code-server.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.code-server = { config, lib, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
containers.code-server = {
|
||||
|
||||
autoStart = true;
|
||||
privateNetwork = true;
|
||||
hostAddress = "192.168.100.10";
|
||||
localAddress = "192.168.100.31";
|
||||
|
||||
config = {
|
||||
|
||||
services.code-server = {
|
||||
enable = true;
|
||||
|
||||
hashedPassword = "1$WFYzcW1TNmpYM1ZKU3lielNCaXAyRkF2K3FjPQ$bSeeV4bvL2uiDYKiQjBLJPAO13/gNjYVgw8YKFtTQDI";
|
||||
|
||||
disableUpdateCheck = true;
|
||||
|
||||
disableTelemetry = true;
|
||||
|
||||
disableGettingStartedOverride = true;
|
||||
|
||||
auth = "none";
|
||||
|
||||
host = "0.0.0.0";
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 4444 ];
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
96
modules/features/default.nix
Normal file
96
modules/features/default.nix
Normal file
@@ -0,0 +1,96 @@
|
||||
{ inputs, ... }: {
|
||||
|
||||
flake.nixosModules.default = { config, lib, pkgs, ... }: {
|
||||
|
||||
imports = [
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
|
||||
config = {
|
||||
|
||||
nix = {
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
channel.enable = false;
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
builders-use-substitutes = (config.sops.secrets ? "remoteBuildKey");
|
||||
|
||||
substituters = lib.mkIf config.programs.hyprland.enable ["https://hyprland.cachix.org"];
|
||||
trusted-substituters = lib.mkIf config.programs.hyprland.enable ["https://hyprland.cachix.org"];
|
||||
trusted-public-keys = lib.mkIf config.programs.hyprland.enable ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
|
||||
};
|
||||
|
||||
distributedBuilds = lib.mkDefault (config.sops.secrets ? "remoteBuildKey");
|
||||
buildMachines = lib.mkIf (config.sops.secrets ? "remoteBuildKey") [
|
||||
{
|
||||
hostName = "esotericbytes.com";
|
||||
sshUser = "remote-builder";
|
||||
sshKey = config.sops.secrets."remoteBuildKey".path;
|
||||
supportedFeatures = [
|
||||
"nixos-test"
|
||||
"benchmark"
|
||||
"big-parallel"
|
||||
"kvm"
|
||||
];
|
||||
systems = [ "x86_64-linux" "aarch64-linux" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
users.users."remote-builder" = lib.mkIf (builtins.any
|
||||
(x: (builtins.match "^remoteBuildClientKeys/.+" x) != null)
|
||||
(builtins.attrNames config.sops.secrets)
|
||||
) {
|
||||
isNormalUser = true;
|
||||
createHome = false;
|
||||
};
|
||||
|
||||
sops.templates."remote-builder" = lib.mkIf (builtins.any
|
||||
(x: (builtins.match "^remoteBuildClientKeys/.+" x) != null)
|
||||
(builtins.attrNames config.sops.secrets)
|
||||
) {
|
||||
content = builtins.concatStringsSep ''''\n'' (builtins.map
|
||||
(y: config.sops.placeholder.${y})
|
||||
(builtins.filter
|
||||
(x: (builtins.match "^remoteBuildClientKeys/.+" x) != null)
|
||||
(builtins.attrNames config.sops.secrets)
|
||||
)
|
||||
);
|
||||
path = "/etc/ssh/authorized_keys.d/remote-builder";
|
||||
owner = "remote-builder";
|
||||
};
|
||||
|
||||
sops = {
|
||||
age.keyFile = "/var/lib/sops/age/keys.txt";
|
||||
defaultSopsFormat = "yaml";
|
||||
};
|
||||
|
||||
programs.fuse.userAllowOther = true;
|
||||
|
||||
home-manager = {
|
||||
backupFileExtension = "backup";
|
||||
useUserPackages = true;
|
||||
sharedModules = [];
|
||||
};
|
||||
|
||||
time.timeZone = lib.mkDefault "America/Chicago";
|
||||
|
||||
i18n = lib.mkDefault {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
1
modules/features/docker-mailserver.nix
Normal file
1
modules/features/docker-mailserver.nix
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
49
modules/features/docker.nix
Normal file
49
modules/features/docker.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.docker = { config, lib, pkgs, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
networking.nat.internalInterfaces = [ "docker0" "docker-main" ];
|
||||
|
||||
virtualisation = {
|
||||
docker = {
|
||||
enable = true;
|
||||
storageDriver = "btrfs";
|
||||
};
|
||||
|
||||
oci-containers = {
|
||||
backend = "docker";
|
||||
};
|
||||
};
|
||||
|
||||
hardware.nvidia-container-toolkit.enable = lib.mkDefault (builtins.any
|
||||
(x: x == "nvidia")
|
||||
config.services.xserver.videoDrivers
|
||||
);
|
||||
|
||||
systemd.services."docker-network-setup" = {
|
||||
path = [ pkgs.docker ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
ExecStop = "docker network rm -f docker-main";
|
||||
};
|
||||
script = ''
|
||||
docker network inspect docker-main ||
|
||||
docker network create -d bridge docker-main \
|
||||
--attachable --subnet 192.168.101.0/24 --ip-range 192.168.101.0/24 \
|
||||
--gateway 192.168.101.1 \
|
||||
-o "com.docker.network.bridge.name"="docker-main" \
|
||||
-o "com.docker.network.bridge.trusted_host_interfaces"="wt0:ve-netbird:ve-traefik"
|
||||
'';
|
||||
wantedBy = [ "docker-net.target" ];
|
||||
};
|
||||
|
||||
systemd.targets."docker-net" = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
38
modules/features/dynamicDNS.nix
Normal file
38
modules/features/dynamicDNS.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.dynamicDNS = { config, lib, pkgs, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
systemd.timers.dynamicDNS = {
|
||||
|
||||
wantedBy = [ "timers.target" ];
|
||||
|
||||
timerConfig = {
|
||||
|
||||
OnBootSec = "5m";
|
||||
|
||||
OnUnitActiveSec = "1h";
|
||||
|
||||
Unit = "dynamicDNS.service";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.dynamicDNS = {
|
||||
|
||||
name = "dynamicDNS.service";
|
||||
|
||||
serviceConfig = {
|
||||
|
||||
Type = "oneshot";
|
||||
|
||||
LoadCredential = [ "cloudflare-api-key" ];
|
||||
|
||||
};
|
||||
|
||||
script = '''';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
258
modules/features/gitea.nix
Normal file
258
modules/features/gitea.nix
Normal file
@@ -0,0 +1,258 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.gitea = { config, lib, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
networking = {
|
||||
nat.internalInterfaces = [ "ve-gitea" ];
|
||||
};
|
||||
|
||||
sops.secrets = {
|
||||
"gitea/dbpass" = {};
|
||||
};
|
||||
|
||||
containers.gitea = {
|
||||
|
||||
autoStart = true;
|
||||
privateNetwork = true;
|
||||
hostAddress = "192.168.100.10";
|
||||
localAddress = "192.168.100.20";
|
||||
|
||||
bindMounts = {
|
||||
"/etc/gitea/data" = {
|
||||
hostPath = "/ssd1/Gitea/data";
|
||||
isReadOnly = false;
|
||||
};
|
||||
};
|
||||
|
||||
extraFlags = [
|
||||
"--load-credential=dbpass:${config.sops.secrets."gitea/dbpass".path}"
|
||||
];
|
||||
|
||||
config = {
|
||||
|
||||
systemd.services.secrets_setup = {
|
||||
wantedBy = [ "gitea.service" ];
|
||||
|
||||
serviceConfig = {
|
||||
LoadCredential = [
|
||||
"dbpass"
|
||||
];
|
||||
};
|
||||
|
||||
script = ''
|
||||
cat ''${CREDENTIALS_DIRECTORY}/dbpass > /etc/gitea/dbpass
|
||||
chown gitea:gitea /etc/gitea/*
|
||||
'';
|
||||
};
|
||||
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
|
||||
stateDir = "/etc/gitea/data";
|
||||
|
||||
dump.enable = false;
|
||||
|
||||
appName = "Gitea";
|
||||
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = "gitea.esotericbytes.com";
|
||||
HTTP_PORT = 3000;
|
||||
ROOT_URL = "https://gitea.esotericbytes.com/";
|
||||
};
|
||||
service = {
|
||||
DISABLE_REGISTRATION = false;
|
||||
ALLOW_ONLY_EXTERNAL_REGISTRATION = true;
|
||||
REQUIRE_SIGNIN_VIEW = false;
|
||||
};
|
||||
oauth2_client = {
|
||||
ENABLE_AUTO_REGISTRATION = true;
|
||||
};
|
||||
session.COOKIE_SECURE = true;
|
||||
|
||||
cron = {
|
||||
ENABLED = true;
|
||||
RUN_AT_START = true;
|
||||
};
|
||||
|
||||
repository = {
|
||||
DEFAULT_BRANCH = "master";
|
||||
};
|
||||
};
|
||||
|
||||
database = {
|
||||
passwordFile = "/etc/gitea/dbpass";
|
||||
type = "postgres";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
PermitRootLogin = lib.mkForce "no";
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
};
|
||||
ports = [ 2222 ];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 3000 ];
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
flake.nixosModules.gitea-docker = { config, lib, pkgs, ... }: let
|
||||
|
||||
subdomain = "gitea";
|
||||
|
||||
name = "gitea";
|
||||
|
||||
in {
|
||||
|
||||
config = {
|
||||
|
||||
|
||||
virtualisation.oci-containers.containers."${name}" = {
|
||||
image = "docker.gitea.com/gitea:1.25.4";
|
||||
|
||||
# unstable, waiting for 26.05
|
||||
#pull = "newer";
|
||||
|
||||
hostname = "${subdomain}.esotericbytes.com";
|
||||
|
||||
networks = [
|
||||
"docker-main"
|
||||
];
|
||||
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.${name}.entrypoints" = "localsecure";
|
||||
"traefik.http.routers.${name}.rule" = "Host(`${subdomain}.esotericbytes.com`)";
|
||||
"traefik.http.routers.${name}.service" = "${name}";
|
||||
"traefik.http.routers.${name}.tls.certResolver" = "cloudflare";
|
||||
|
||||
"traefik.http.services.${name}.loadbalancer.server.port" = "3000";
|
||||
|
||||
|
||||
"traefik.tcp.routers.${name}-ssh.entrypoints" = "gitea-ssh";
|
||||
"traefik.tcp.routers.${name}-ssh.rule" = "HostSNI(`*`)";
|
||||
"traefik.tcp.routers.${name}-ssh.service" = "${name}-ssh";
|
||||
|
||||
"traefik.tcp.services.${name}-ssh.loadbalancer.server.port" = "22";
|
||||
};
|
||||
|
||||
ports = [
|
||||
];
|
||||
|
||||
extraOptions = [
|
||||
"--ip=192.168.101.20"
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"vol_gitea:/data"
|
||||
];
|
||||
|
||||
environment = {
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers."${name}-db" = {
|
||||
image = "docker.io/library/postgres:14";
|
||||
|
||||
# unstable, waiting for 26.05
|
||||
#pull = "newer";
|
||||
|
||||
hostname = "${name}-db";
|
||||
|
||||
networks = [
|
||||
"docker-main"
|
||||
];
|
||||
|
||||
labels = {
|
||||
};
|
||||
|
||||
ports = [
|
||||
];
|
||||
|
||||
extraOptions = [
|
||||
"--ip=192.168.101.21"
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"/etc/gitea/db:/var/lib/postgresql/data"
|
||||
];
|
||||
|
||||
environment = {
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."docker-gitea" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 90 "1m";
|
||||
RestartSec = lib.mkOverride 90 "100ms";
|
||||
RestartSteps = lib.mkOverride 90 9;
|
||||
};
|
||||
after = [
|
||||
"docker-network-setup.service"
|
||||
"docker-volume-gitea.service"
|
||||
"docker-gitea-db.service"
|
||||
];
|
||||
requires = [
|
||||
"docker-network-setup.service"
|
||||
"docker-volume-gitea.service"
|
||||
"docker-gitea-db.service"
|
||||
];
|
||||
partOf = [
|
||||
"docker-compose-gitea-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"docker-compose-gitea-root.target"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services."docker-gitea-db" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 90 "1m";
|
||||
RestartSec = lib.mkOverride 90 "100ms";
|
||||
RestartSteps = lib.mkOverride 90 9;
|
||||
};
|
||||
after = [
|
||||
"docker-network-setup.service"
|
||||
];
|
||||
requires = [
|
||||
"docker-network-setup.service"
|
||||
];
|
||||
partOf = [
|
||||
"docker-compose-gitea-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"docker-compose-gitea-root.target"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services."docker-volume-gitea" = {
|
||||
path = [ pkgs.docker ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
script = ''
|
||||
docker volume inspect vol_gitea || docker volume create vol_gitea --driver=local
|
||||
'';
|
||||
partOf = [ "docker-compose-gitea-root.target" ];
|
||||
wantedBy = [ "docker-compose-gitea-root.target" ];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
16
modules/features/home-assistant/configuration.yaml
Normal file
16
modules/features/home-assistant/configuration.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
# Loads default set of integrations. Do not remove.
|
||||
default_config:
|
||||
|
||||
# Load frontend themes from the themes folder
|
||||
frontend:
|
||||
themes: !include_dir_merge_named themes
|
||||
|
||||
automation: !include automations.yaml
|
||||
script: !include scripts.yaml
|
||||
scene: !include scenes.yaml
|
||||
|
||||
http:
|
||||
use_x_forwarded_for: true
|
||||
trusted_proxies:
|
||||
- 192.168.101.11
|
||||
63
modules/features/home-assistant/home-assistant.nix
Normal file
63
modules/features/home-assistant/home-assistant.nix
Normal file
@@ -0,0 +1,63 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.home-assistant = { config, lib, ... }: let
|
||||
|
||||
subdomain = "hass";
|
||||
|
||||
name = "home-assistant";
|
||||
|
||||
in {
|
||||
|
||||
config = {
|
||||
|
||||
environment.etc."home-assistant/configuration.yaml".source = ./configuration.yaml;
|
||||
|
||||
virtualisation.oci-containers.containers.home-assistant = {
|
||||
image = "ghcr.io/home-assistant/home-assistant:stable";
|
||||
|
||||
# unstable, waiting for 26.05
|
||||
#pull = "newer";
|
||||
|
||||
hostname = "${subdomain}.esotericbytes.com";
|
||||
|
||||
networks = [
|
||||
"docker-main"
|
||||
];
|
||||
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.${name}.entrypoints" = "localsecure";
|
||||
"traefik.http.routers.${name}.rule" = "Host(`${subdomain}.esotericbytes.com`)";
|
||||
"traefik.http.routers.${name}.service" = "${name}";
|
||||
"traefik.http.routers.${name}.tls.certResolver" = "cloudflare";
|
||||
|
||||
#"traefik.http.services.${name}.loadbalancer.server.url" = "http://192.168.100.10:${builtins.toString hostPort}";
|
||||
"traefik.http.services.${name}.loadbalancer.server.port" = "8123";
|
||||
};
|
||||
|
||||
environment = {
|
||||
TZ = "America/Chicago";
|
||||
};
|
||||
|
||||
extraOptions = [
|
||||
"--ip=192.168.101.13"
|
||||
];
|
||||
|
||||
ports = [
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"vol_home-assistant:/config/"
|
||||
"/etc/home-assistant/configuration.yaml:/config/configuration.yaml"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
flake.nixosModules.home-assistant-vm = { config, lib, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
28
modules/features/hyprland.nix
Normal file
28
modules/features/hyprland.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ inputs, ... }: {
|
||||
|
||||
flake.nixosModules.hyprland = { config, lib, pkgs, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
programs.hyprland = let
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
#pkgs-us = import inputs.nixpkgs-us { inherit system; };
|
||||
in {
|
||||
enable = true;
|
||||
|
||||
withUWSM = false;
|
||||
|
||||
xwayland.enable = true;
|
||||
|
||||
systemd.setPath.enable = true;
|
||||
|
||||
package = inputs.hyprland.packages.${system}.hyprland;
|
||||
|
||||
portalPackage = inputs.hyprland.packages.${system}.xdg-desktop-portal-hyprland;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
117
modules/features/jellyfin.nix
Normal file
117
modules/features/jellyfin.nix
Normal file
@@ -0,0 +1,117 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.jellyfin = { config, lib, pkgs, ... }: let
|
||||
|
||||
subdomain = "watch";
|
||||
|
||||
name = "jellyfin";
|
||||
|
||||
in {
|
||||
|
||||
config = {
|
||||
|
||||
networking.firewall.allowedUDPPorts = [ 7359 ];
|
||||
|
||||
virtualisation.oci-containers.containers.jellyfin = {
|
||||
image = "jellyfin/jellyfin:10.11.6";
|
||||
|
||||
# unstable, waiting for 26.05
|
||||
#pull = "newer";
|
||||
|
||||
hostname = "${subdomain}.esotericbytes.com";
|
||||
|
||||
networks = [
|
||||
"docker-main"
|
||||
];
|
||||
|
||||
ports = [
|
||||
"7359:7359/udp"
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"vol_jellyfin-config:/config"
|
||||
"vol_jellyfin-cache:/cache"
|
||||
|
||||
"/etc/jellyfin/media:/media"
|
||||
];
|
||||
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.${name}.entrypoints" = "websecure,localsecure";
|
||||
"traefik.http.routers.${name}.rule" = "Host(`${subdomain}.esotericbytes.com`)";
|
||||
"traefik.http.routers.${name}.service" = "${name}";
|
||||
"traefik.http.routers.${name}.tls.certResolver" = "cloudflare";
|
||||
|
||||
"traefik.http.services.${name}.loadbalancer.server.port" = "8096";
|
||||
};
|
||||
|
||||
extraOptions = lib.mkMerge [
|
||||
(lib.mkIf config.hardware.nvidia-container-toolkit.enable [
|
||||
"--device=nvidia.com/gpu=all"
|
||||
])
|
||||
[ "--ip=192.168.101.21" ]
|
||||
];
|
||||
|
||||
environment = {
|
||||
JELLYFIN_PublishedServerUrl = "https://${subdomain}.esotericbytes.com";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."docker-jellyfin" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 90 "1m";
|
||||
RestartSec = lib.mkOverride 90 "100ms";
|
||||
RestartSteps = lib.mkOverride 90 9;
|
||||
};
|
||||
after = [
|
||||
"docker-network-setup.service"
|
||||
"docker-volume-jellyfin-config.service"
|
||||
"docker-volume-jellyfin-cache.service"
|
||||
];
|
||||
requires = [
|
||||
"docker-network-setup.service"
|
||||
"docker-volume-jellyfin-config.service"
|
||||
"docker-volume-jellyfin-cache.service"
|
||||
];
|
||||
partOf = [
|
||||
"docker-compose-jellyfin-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"docker-compose-jellyfin-root.target"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services."docker-volume-jellyfin-config" = {
|
||||
path = [ pkgs.docker ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
script = ''
|
||||
docker volume inspect vol_jellyfin-config || docker volume create vol_jellyfin-config --driver=local
|
||||
'';
|
||||
partOf = [ "docker-compose-jellyfin-root.target" ];
|
||||
wantedBy = [ "docker-compose-jellyfin-root.target" ];
|
||||
};
|
||||
|
||||
systemd.services."docker-volume-jellyfin-cache" = {
|
||||
path = [ pkgs.docker ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
script = ''
|
||||
docker volume inspect vol_jellyfin-cache || docker volume create vol_jellyfin-cache --driver=local
|
||||
'';
|
||||
partOf = [ "docker-compose-jellyfin-root.target" ];
|
||||
wantedBy = [ "docker-compose-jellyfin-root.target" ];
|
||||
};
|
||||
|
||||
systemd.targets."docker-compose-jellyfin-root" = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
28
modules/features/kdePlasma6.nix
Normal file
28
modules/features/kdePlasma6.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.kdePlasma6 = { config, lib, pkgs, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
kdePackages.discover # Optional: Install if you use Flatpak or fwupd firmware update sevice
|
||||
kdePackages.kcalc # Calculator
|
||||
kdePackages.kcharselect # Tool to select and copy special characters from all installed fonts
|
||||
kdePackages.kcolorchooser # A small utility to select a color
|
||||
kdePackages.kolourpaint # Easy-to-use paint program
|
||||
kdePackages.ksystemlog # KDE SystemLog Application
|
||||
kdePackages.sddm-kcm # Configuration module for SDDM
|
||||
kdiff3 # Compares and merges 2 or 3 files or directories
|
||||
kdePackages.isoimagewriter # Optional: Program to write hybrid ISO files onto USB disks
|
||||
kdePackages.partitionmanager # Optional Manage the disk devices, partitions and file systems on your computer
|
||||
hardinfo2 # System information and benchmarks for Linux systems
|
||||
haruna # Open source video player built with Qt/QML and libmpv
|
||||
wayland-utils # Wayland utilities
|
||||
wl-clipboard # Command-line copy/paste utilities for Wayland
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
1
modules/features/kiwix.nix
Normal file
1
modules/features/kiwix.nix
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
1
modules/features/minecraft.nix
Normal file
1
modules/features/minecraft.nix
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
100
modules/features/n8n.nix
Normal file
100
modules/features/n8n.nix
Normal file
@@ -0,0 +1,100 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.n8n = { config, lib, pkgs, ... }: let
|
||||
|
||||
subdomain = "n8n";
|
||||
|
||||
name = "n8n";
|
||||
|
||||
in {
|
||||
|
||||
config = {
|
||||
|
||||
|
||||
virtualisation.oci-containers.containers."${name}" = {
|
||||
image = "docker.n8n.io/n8nio/n8n";
|
||||
|
||||
# unstable, waiting for 26.05
|
||||
#pull = "newer";
|
||||
|
||||
hostname = "${subdomain}.esotericbytes.com";
|
||||
|
||||
networks = [
|
||||
"docker-main"
|
||||
];
|
||||
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.${name}.entrypoints" = "localsecure";
|
||||
"traefik.http.routers.${name}.rule" = "Host(`${subdomain}.esotericbytes.com`)";
|
||||
"traefik.http.routers.${name}.service" = "${name}";
|
||||
"traefik.http.routers.${name}.tls.certResolver" = "cloudflare";
|
||||
|
||||
"traefik.http.services.${name}.loadbalancer.server.port" = "5678";
|
||||
};
|
||||
|
||||
ports = [
|
||||
];
|
||||
|
||||
extraOptions = [
|
||||
"--ip=192.168.101.2"
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"vol_n8n:/etc/n8n"
|
||||
];
|
||||
|
||||
environment = {
|
||||
GENERIC_TIMEZONE = "America/Chicago";
|
||||
TZ = "America/Chicago";
|
||||
N8N_DIAGNOSTICS_ENABLED = "false";
|
||||
N8N_VERSION_NOTIFICATIONS_ENABLED = "false";
|
||||
N8N_TEMPLATES_ENABLED = "false";
|
||||
|
||||
EXTERNAL_FRONTEND_HOOKS_URLS = "";
|
||||
N8N_DIAGNOSTICS_CONFIG_FRONTEND = "";
|
||||
N8N_DIAGNOSTICS_CONFIG_BACKEND = "";
|
||||
|
||||
N8N_SECURE_COOKIE = "false";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."docker-n8n" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 90 "1m";
|
||||
RestartSec = lib.mkOverride 90 "100ms";
|
||||
RestartSteps = lib.mkOverride 90 9;
|
||||
};
|
||||
after = [
|
||||
"docker-network-setup.service"
|
||||
"docker-volume-n8n.service"
|
||||
];
|
||||
requires = [
|
||||
"docker-network-setup.service"
|
||||
"docker-volume-n8n.service"
|
||||
];
|
||||
partOf = [
|
||||
"docker-compose-n8n-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"docker-compose-n8n-root.target"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services."docker-volume-n8n" = {
|
||||
path = [ pkgs.docker ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
script = ''
|
||||
docker volume inspect vol_n8n || docker volume create vol_n8n --driver=local
|
||||
'';
|
||||
partOf = [ "docker-compose-n8n-root.target" ];
|
||||
wantedBy = [ "docker-compose-n8n-root.target" ];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
27
modules/features/netbird/config/management.json
Normal file
27
modules/features/netbird/config/management.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"Stuns": [
|
||||
{
|
||||
"Proto": "udp",
|
||||
"URI": "stun:vpn.esotericbytes.com:3478"
|
||||
}
|
||||
],
|
||||
"Relay": {
|
||||
"Addresses": ["rels://vpn.esotericbytes.com:443"],
|
||||
"CredentialsTTL": "24h",
|
||||
"Secret": "0qSIu/S2sXHJbo0SyBNm4SFxAItRoPLKR4wjnW/Zsgc"
|
||||
},
|
||||
"Signal": {
|
||||
"Proto": "https",
|
||||
"URI": "vpn.esotericbytes.com:443"
|
||||
},
|
||||
"Datadir": "/var/lib/netbird",
|
||||
"DataStoreEncryptionKey": "FZnQt+JqAC8GEXUSJwhrgo0vn4PoDetoAhjUx9nSJR0=",
|
||||
"EmbeddedIdP": {
|
||||
"Enabled": true,
|
||||
"Issuer": "https://vpn.esotericbytes.com/oauth2",
|
||||
"DashboardRedirectURIs": [
|
||||
"https://vpn.esotericbytes.com/nb-auth",
|
||||
"https://vpn.esotericbytes.com/nb-silent-auth"
|
||||
]
|
||||
}
|
||||
}
|
||||
258
modules/features/netbird/netbird.nix
Normal file
258
modules/features/netbird/netbird.nix
Normal file
@@ -0,0 +1,258 @@
|
||||
{ inputs, ... }: {
|
||||
|
||||
|
||||
flake.nixosModules.netbird = { config, lib, pkgs, ... }: {
|
||||
|
||||
config = let
|
||||
pkgs-us = import inputs.nixpkgs-us {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
in {
|
||||
|
||||
services.netbird = {
|
||||
enable = lib.mkDefault true;
|
||||
|
||||
clients.default = {
|
||||
port = 51820;
|
||||
name = "netbird";
|
||||
interface = "wt0";
|
||||
hardened = false;
|
||||
|
||||
ui = {
|
||||
enable = lib.mkDefault config.hardware.graphics.enable;
|
||||
#package = pkgs-us.netbird-ui;
|
||||
#package = pkgs.netbird-ui;
|
||||
};
|
||||
};
|
||||
|
||||
package = pkgs-us.netbird;
|
||||
#package = pkgs.netbird;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
flake.nixosModules.netbird-docker = { config, lib, pkgs, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
networking.firewall.allowedUDPPorts = [ 3478 ];
|
||||
|
||||
sops.secrets."netbird/secret_key" = {};
|
||||
|
||||
sops.templates."netbird-relay.env" = {
|
||||
content = ''
|
||||
NB_AUTH_SECRET=${config.sops.placeholder."netbird/secret_key"}
|
||||
NB_LOG_LEVEL=info
|
||||
NB_LISTEN_ADDRESS=:80
|
||||
NB_EXPOSED_ADDRESS=rels://vpn.esotericbytes.com:443
|
||||
NB_ENABLE_STUN=true
|
||||
NB_STUN_LOG_LEVEL=info
|
||||
NB_STUN_PORTS=3478
|
||||
'';
|
||||
};
|
||||
|
||||
environment.etc."netbird/management.json".source = ./config/management.json;
|
||||
|
||||
# Containers
|
||||
virtualisation.oci-containers.containers."netbird-dashboard" = {
|
||||
image = "netbirdio/dashboard:v2.30.1";
|
||||
environment = {
|
||||
"AUTH_AUDIENCE" = "netbird-dashboard";
|
||||
"AUTH_AUTHORITY" = "https://vpn.esotericbytes.com/oauth2";
|
||||
"AUTH_CLIENT_ID" = "netbird-dashboard";
|
||||
"AUTH_CLIENT_SECRET" = "";
|
||||
"AUTH_REDIRECT_URI" = "/nb-auth";
|
||||
"AUTH_SILENT_REDIRECT_URI" = "/nb-silent-auth";
|
||||
"AUTH_SUPPORTED_SCOPES" = "openid profile email groups";
|
||||
"LETSENCRYPT_DOMAIN" = "none";
|
||||
"NETBIRD_MGMT_API_ENDPOINT" = "https://vpn.esotericbytes.com";
|
||||
"NETBIRD_MGMT_GRPC_API_ENDPOINT" = "https://vpn.esotericbytes.com";
|
||||
"NGINX_SSL_PORT" = "443";
|
||||
"USE_AUTH0" = "false";
|
||||
};
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.netbird-dashboard.entrypoints" = "websecure";
|
||||
"traefik.http.routers.netbird-dashboard.priority" = "1";
|
||||
"traefik.http.routers.netbird-dashboard.rule" = "Host(`vpn.esotericbytes.com`)";
|
||||
"traefik.http.routers.netbird-dashboard.tls" = "true";
|
||||
"traefik.http.services.netbird-dashboard.loadbalancer.server.port" = "80";
|
||||
};
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--network-alias=dashboard"
|
||||
"--network=docker-main"
|
||||
"--ip=192.168.101.5"
|
||||
];
|
||||
};
|
||||
systemd.services."docker-netbird-dashboard" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 90 "1m";
|
||||
RestartSec = lib.mkOverride 90 "100ms";
|
||||
RestartSteps = lib.mkOverride 90 9;
|
||||
};
|
||||
partOf = [
|
||||
"docker-compose-netbird-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"docker-compose-netbird-root.target"
|
||||
];
|
||||
};
|
||||
virtualisation.oci-containers.containers."netbird-management" = {
|
||||
image = "netbirdio/management:0.64.4";
|
||||
volumes = [
|
||||
"/etc/netbird/management.json:/etc/netbird/management.json:rw"
|
||||
"netbird_netbird_management:/var/lib/netbird:rw"
|
||||
];
|
||||
cmd = [ "--port" "80" "--log-file" "console" "--log-level" "info" "--disable-anonymous-metrics=false" "--single-account-mode-domain=netbird.selfhosted" "--dns-domain=netbird.selfhosted" "--idp-sign-key-refresh-enabled" ];
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.netbird-api.entrypoints" = "websecure";
|
||||
"traefik.http.routers.netbird-api.rule" = "Host(`vpn.esotericbytes.com`) && PathPrefix(`/api`)";
|
||||
"traefik.http.routers.netbird-api.service" = "netbird-api";
|
||||
"traefik.http.routers.netbird-api.tls" = "true";
|
||||
"traefik.http.routers.netbird-mgmt-grpc.entrypoints" = "websecure";
|
||||
"traefik.http.routers.netbird-mgmt-grpc.rule" = "Host(`vpn.esotericbytes.com`) && PathPrefix(`/management.ManagementService/`)";
|
||||
"traefik.http.routers.netbird-mgmt-grpc.service" = "netbird-mgmt-grpc";
|
||||
"traefik.http.routers.netbird-mgmt-grpc.tls" = "true";
|
||||
"traefik.http.routers.netbird-mgmt-ws.entrypoints" = "websecure";
|
||||
"traefik.http.routers.netbird-mgmt-ws.rule" = "Host(`vpn.esotericbytes.com`) && PathPrefix(`/ws-proxy/management`)";
|
||||
"traefik.http.routers.netbird-mgmt-ws.service" = "netbird-mgmt-ws";
|
||||
"traefik.http.routers.netbird-mgmt-ws.tls" = "true";
|
||||
"traefik.http.routers.netbird-oauth2.entrypoints" = "websecure";
|
||||
"traefik.http.routers.netbird-oauth2.rule" = "Host(`vpn.esotericbytes.com`) && PathPrefix(`/oauth2`)";
|
||||
"traefik.http.routers.netbird-oauth2.service" = "netbird-oauth2";
|
||||
"traefik.http.routers.netbird-oauth2.tls" = "true";
|
||||
"traefik.http.services.netbird-api.loadbalancer.server.port" = "80";
|
||||
"traefik.http.services.netbird-mgmt-grpc.loadbalancer.server.port" = "80";
|
||||
"traefik.http.services.netbird-mgmt-grpc.loadbalancer.server.scheme" = "h2c";
|
||||
"traefik.http.services.netbird-mgmt-ws.loadbalancer.server.port" = "80";
|
||||
"traefik.http.services.netbird-oauth2.loadbalancer.server.port" = "80";
|
||||
};
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--network-alias=management"
|
||||
"--network=docker-main"
|
||||
"--ip=192.168.101.4"
|
||||
];
|
||||
};
|
||||
systemd.services."docker-netbird-management" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 90 "1m";
|
||||
RestartSec = lib.mkOverride 90 "100ms";
|
||||
RestartSteps = lib.mkOverride 90 9;
|
||||
};
|
||||
after = [
|
||||
"docker-volume-netbird_netbird_management.service"
|
||||
];
|
||||
requires = [
|
||||
"docker-volume-netbird_netbird_management.service"
|
||||
];
|
||||
partOf = [
|
||||
"docker-compose-netbird-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"docker-compose-netbird-root.target"
|
||||
];
|
||||
};
|
||||
virtualisation.oci-containers.containers."netbird-relay" = {
|
||||
image = "netbirdio/relay:0.64.4";
|
||||
|
||||
environmentFiles = [ config.sops.templates."netbird-relay.env".path ];
|
||||
|
||||
ports = [
|
||||
"3478:3478/udp"
|
||||
];
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.netbird-relay.entrypoints" = "websecure";
|
||||
"traefik.http.routers.netbird-relay.rule" = "Host(`vpn.esotericbytes.com`) && PathPrefix(`/relay`)";
|
||||
"traefik.http.routers.netbird-relay.tls" = "true";
|
||||
"traefik.http.services.netbird-relay.loadbalancer.server.port" = "80";
|
||||
};
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--network-alias=relay"
|
||||
"--network=docker-main"
|
||||
"--ip=192.168.101.3"
|
||||
];
|
||||
};
|
||||
systemd.services."docker-netbird-relay" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 90 "1m";
|
||||
RestartSec = lib.mkOverride 90 "100ms";
|
||||
RestartSteps = lib.mkOverride 90 9;
|
||||
};
|
||||
partOf = [
|
||||
"docker-compose-netbird-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"docker-compose-netbird-root.target"
|
||||
];
|
||||
};
|
||||
virtualisation.oci-containers.containers."netbird-signal" = {
|
||||
image = "netbirdio/signal:0.64.4";
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.netbird-signal-grpc.entrypoints" = "websecure";
|
||||
"traefik.http.routers.netbird-signal-grpc.rule" = "Host(`vpn.esotericbytes.com`) && PathPrefix(`/signalexchange.SignalExchange/`)";
|
||||
"traefik.http.routers.netbird-signal-grpc.service" = "netbird-signal-grpc";
|
||||
"traefik.http.routers.netbird-signal-grpc.tls" = "true";
|
||||
"traefik.http.routers.netbird-signal-ws.entrypoints" = "websecure";
|
||||
"traefik.http.routers.netbird-signal-ws.rule" = "Host(`vpn.esotericbytes.com`) && PathPrefix(`/ws-proxy/signal`)";
|
||||
"traefik.http.routers.netbird-signal-ws.service" = "netbird-signal-ws";
|
||||
"traefik.http.routers.netbird-signal-ws.tls" = "true";
|
||||
"traefik.http.services.netbird-signal-grpc.loadbalancer.server.port" = "10000";
|
||||
"traefik.http.services.netbird-signal-grpc.loadbalancer.server.scheme" = "h2c";
|
||||
"traefik.http.services.netbird-signal-ws.loadbalancer.server.port" = "80";
|
||||
};
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--network-alias=signal"
|
||||
"--network=docker-main"
|
||||
];
|
||||
};
|
||||
systemd.services."docker-netbird-signal" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 90 "1m";
|
||||
RestartSec = lib.mkOverride 90 "100ms";
|
||||
RestartSteps = lib.mkOverride 90 9;
|
||||
};
|
||||
partOf = [
|
||||
"docker-compose-netbird-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"docker-compose-netbird-root.target"
|
||||
];
|
||||
};
|
||||
|
||||
# Volumes
|
||||
systemd.services."docker-volume-netbird_netbird_management" = {
|
||||
path = [ pkgs.docker ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
script = ''
|
||||
docker volume inspect netbird_netbird_management || docker volume create netbird_netbird_management
|
||||
'';
|
||||
partOf = [ "docker-compose-netbird-root.target" ];
|
||||
wantedBy = [ "docker-compose-netbird-root.target" ];
|
||||
};
|
||||
|
||||
# Root service
|
||||
# When started, this will automatically create all resources and start
|
||||
# the containers. When stopped, this will teardown all resources.
|
||||
systemd.targets."docker-compose-netbird-root" = {
|
||||
unitConfig = {
|
||||
Description = "Root target generated by compose2nix.";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
113
modules/features/nextcloud.nix
Normal file
113
modules/features/nextcloud.nix
Normal file
@@ -0,0 +1,113 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.nextcloud = { config, lib, pkgs, ... }: let
|
||||
|
||||
subdomain = "cloud";
|
||||
|
||||
name = "nextcloud";
|
||||
|
||||
in {
|
||||
|
||||
config = {
|
||||
|
||||
virtualisation.oci-containers.containers."nextcloud-aio-mastercontainer" = {
|
||||
image = "ghcr.io/nextcloud-releases/all-in-one:20260122_105751";
|
||||
|
||||
serviceName = "docker-nextcloud";
|
||||
|
||||
# unstable, waiting for 26.05
|
||||
#pull = "newer";
|
||||
|
||||
hostname = "${subdomain}.esotericbytes.com";
|
||||
|
||||
networks = [
|
||||
"docker-main"
|
||||
];
|
||||
|
||||
ports = [
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"nextcloud_aio_mastercontainer:/mnt/docker-aio-config"
|
||||
"/run/docker.sock:/var/run/docker.sock:ro"
|
||||
];
|
||||
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.${name}.entrypoints" = "websecure,localsecure";
|
||||
"traefik.http.routers.${name}.rule" = "Host(`${subdomain}.esotericbytes.com`)";
|
||||
"traefik.http.routers.${name}.service" = "${name}";
|
||||
"traefik.http.routers.${name}.tls.certResolver" = "cloudflare";
|
||||
|
||||
"traefik.http.routers.${name}.middlewares" = "nextcloud-chain";
|
||||
|
||||
"traefik.http.middlewares.https-redirect.redirectScheme.scheme" = "https";
|
||||
|
||||
"traefik.http.middlewares.nextcloud-secure-headers.headers.hostsProxyHeaders" = "X-Forwarded-Host";
|
||||
"traefik.http.middlewares.nextcloud-secure-headers.headers.referrerPolicy" = "same-origin";
|
||||
|
||||
"traefik.http.middlewares.nextcloud-chain.chain.middlewares" = "https-redirect,nextcloud-secure-headers";
|
||||
|
||||
|
||||
#"traefik.http.services.${name}.loadbalancer.server.port" = "11000";
|
||||
"traefik.http.services.${name}.loadbalancer.server.url" = "http://192.168.101.1:11000";
|
||||
};
|
||||
|
||||
extraOptions = [
|
||||
"--ip=192.168.101.17"
|
||||
];
|
||||
|
||||
environment = {
|
||||
APACHE_PORT = "11000";
|
||||
APACHE_IP = "0.0.0.0";
|
||||
APACHE_ADDITIONAL_NETWORK = "docker-main";
|
||||
|
||||
SKIP_DOMAIN_VALIDATION = "true";
|
||||
|
||||
TALK_PORT = "3479";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."docker-nextcloud" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 90 "1m";
|
||||
RestartSec = lib.mkOverride 90 "100ms";
|
||||
RestartSteps = lib.mkOverride 90 9;
|
||||
};
|
||||
after = [
|
||||
"docker-network-setup.service"
|
||||
"docker-volume-nextcloud.service"
|
||||
];
|
||||
requires = [
|
||||
"docker-network-setup.service"
|
||||
"docker-volume-nextcloud.service"
|
||||
];
|
||||
partOf = [
|
||||
"docker-compose-nextcloud-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"docker-compose-nextcloud-root.target"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services."docker-volume-nextcloud" = {
|
||||
path = [ pkgs.docker ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
script = ''
|
||||
docker volume inspect nextcloud_aio_mastercontainer || docker volume create nextcloud_aio_mastercontainer --driver=local
|
||||
'';
|
||||
partOf = [ "docker-compose-nextcloud-root.target" ];
|
||||
wantedBy = [ "docker-compose-nextcloud-root.target" ];
|
||||
};
|
||||
|
||||
systemd.targets."docker-compose-nextcloud-root" = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
41
modules/features/nginx.nix
Normal file
41
modules/features/nginx.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.nginx = { config, lib, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
containers.esotericbytes-com = {
|
||||
|
||||
autoStart = true;
|
||||
privateNetwork = true;
|
||||
hostAddress = "192.168.100.10";
|
||||
localAddress = "192.168.100.13";
|
||||
|
||||
bindMounts = {
|
||||
"/var/www/data" = {
|
||||
hostPath = "/ssd1/esotericbytes-com/data";
|
||||
isReadOnly = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
"esotericbytes.com" = {
|
||||
enableACME = false;
|
||||
forceSSL = false;
|
||||
root = "/var/www/data";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
78
modules/features/novnc.nix
Normal file
78
modules/features/novnc.nix
Normal file
@@ -0,0 +1,78 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.novnc = { config, lib, pkgs, ... }: {
|
||||
|
||||
config = {
|
||||
systemd.services.novnc = {
|
||||
enable = true;
|
||||
|
||||
path = with pkgs; [
|
||||
novnc
|
||||
ps
|
||||
];
|
||||
|
||||
script = ''
|
||||
novnc --listen 80 --vnc 127.0.0.1:5900
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
Type = "exec";
|
||||
};
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
};
|
||||
};
|
||||
|
||||
flake.nixosModules.novnc-container = { config, lib, pkgs, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
networking = {
|
||||
firewall.interfaces."ve-novnc" = {
|
||||
allowedTCPPorts = [ 5900 ];
|
||||
allowedUDPPorts = [ 5900 ];
|
||||
};
|
||||
};
|
||||
|
||||
containers.novnc = {
|
||||
|
||||
autoStart = true;
|
||||
privateNetwork = true;
|
||||
hostAddress = "192.168.100.10";
|
||||
localAddress = "192.168.100.30";
|
||||
|
||||
config = {
|
||||
|
||||
systemd.services.novnc = {
|
||||
enable = true;
|
||||
|
||||
path = with pkgs; [
|
||||
novnc
|
||||
ps
|
||||
];
|
||||
|
||||
script = ''
|
||||
novnc --listen 80 --vnc 192.168.100.10:5900
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
Type = "exec";
|
||||
};
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
41
modules/features/ntfy.nix
Normal file
41
modules/features/ntfy.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.ntfy = { config, lib, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
containers.ntfy = {
|
||||
|
||||
autoStart = true;
|
||||
privateNetwork = true;
|
||||
hostAddress = "192.168.100.10";
|
||||
localAddress = "192.168.100.19";
|
||||
|
||||
config = {
|
||||
|
||||
services.ntfy-sh = {
|
||||
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
|
||||
base-url = "https://ntfy.esotericbytes.com";
|
||||
|
||||
listen-http = ":80";
|
||||
|
||||
behind-proxy = true;
|
||||
|
||||
upstream-base-url = "https://ntfy.sh";
|
||||
|
||||
auth-default-access = "deny-all";
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
91
modules/features/ollama.nix
Normal file
91
modules/features/ollama.nix
Normal file
@@ -0,0 +1,91 @@
|
||||
{ inputs, ... }: {
|
||||
|
||||
flake.nixosModules.ollama = { config, lib, ... }: {
|
||||
|
||||
config = {
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
acceleration = "cuda";
|
||||
environmentVariables = {
|
||||
OLLAMA_CONTEXT_LENGTH = lib.mkDefault "16000";
|
||||
};
|
||||
package = let
|
||||
pkgs-us = import inputs.nixpkgs-us {
|
||||
system = "x86_64-linux";
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in pkgs-us.ollama-cuda;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
flake.nixosModules.ollama-docker = { config, lib, pkgs, ... }: let
|
||||
|
||||
hostPort = 11434;
|
||||
|
||||
subdomain = "ollama";
|
||||
|
||||
name = "ollama";
|
||||
|
||||
in {
|
||||
|
||||
config = {
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
ollama
|
||||
];
|
||||
|
||||
networking.firewall.interfaces = {
|
||||
"ve-traefik" = {
|
||||
allowedTCPPorts = [ hostPort ];
|
||||
};
|
||||
|
||||
"ve-openwebui" = {
|
||||
allowedTCPPorts = [ hostPort ];
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers.ollama = {
|
||||
image = "ollama/ollama:latest";
|
||||
|
||||
# unstable, waiting for 26.05
|
||||
#pull = "newer";
|
||||
|
||||
hostname = "${subdomain}.esotericbytes.com";
|
||||
|
||||
networks = [
|
||||
"docker-main"
|
||||
];
|
||||
|
||||
ports = [
|
||||
"${builtins.toString hostPort}:11434"
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"vol_ollama:/root/.ollama"
|
||||
];
|
||||
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.${name}.entrypoints" = "localsecure";
|
||||
"traefik.http.routers.${name}.rule" = "Host(`${subdomain}.esotericbytes.com`)";
|
||||
"traefik.http.routers.${name}.service" = "${name}";
|
||||
"traefik.http.routers.${name}.tls.certResolver" = "cloudflare";
|
||||
|
||||
#"traefik.http.services.ollama.loadbalancer.server.url" = "http://192.168.100.10:${builtins.toString hostPort}";
|
||||
"traefik.http.services.${name}.loadbalancer.server.port" = "11434";
|
||||
};
|
||||
|
||||
extraOptions = lib.mkIf config.hardware.nvidia-container-toolkit.enable [
|
||||
"--device=nvidia.com/gpu=all"
|
||||
"--ip=192.168.101.22"
|
||||
];
|
||||
|
||||
environment = {
|
||||
OLLAMA_CONTEXT_LENGTH = lib.mkDefault "32000";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
19
modules/features/openssh.nix
Normal file
19
modules/features/openssh.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.openssh = { config, lib, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
openFirewall = lib.mkDefault true;
|
||||
settings = {
|
||||
PermitRootLogin = lib.mkForce "no";
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
94
modules/features/openwebui.nix
Normal file
94
modules/features/openwebui.nix
Normal file
@@ -0,0 +1,94 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.openwebui = { config, lib, pkgs, ... }: let
|
||||
|
||||
subdomain = "ai";
|
||||
|
||||
name = "openwebui";
|
||||
|
||||
in {
|
||||
|
||||
config = {
|
||||
|
||||
virtualisation.oci-containers.containers.openwebui = {
|
||||
image = "ghcr.io/open-webui/open-webui:v0.7.2";
|
||||
|
||||
# unstable, waiting for 26.05
|
||||
#pull = "newer";
|
||||
|
||||
hostname = "${subdomain}.esotericbytes.com";
|
||||
|
||||
networks = [
|
||||
"docker-main"
|
||||
];
|
||||
|
||||
/*ports = [
|
||||
"${builtins.toString hostPort}:8080"
|
||||
];*/
|
||||
|
||||
volumes = [
|
||||
"vol_openwebui:/app/backend/data"
|
||||
];
|
||||
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.${name}.entrypoints" = "localsecure";
|
||||
"traefik.http.routers.${name}.rule" = "Host(`${subdomain}.esotericbytes.com`)";
|
||||
"traefik.http.routers.${name}.service" = "${name}";
|
||||
"traefik.http.routers.${name}.tls.certResolver" = "cloudflare";
|
||||
|
||||
"traefik.http.services.${name}.loadbalancer.server.port" = "8080";
|
||||
};
|
||||
|
||||
extraOptions = lib.mkIf config.hardware.nvidia-container-toolkit.enable [
|
||||
"--device=nvidia.com/gpu=all"
|
||||
"--ip=192.168.101.8"
|
||||
];
|
||||
|
||||
environment = {
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."docker-openwebui" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 90 "1m";
|
||||
RestartSec = lib.mkOverride 90 "100ms";
|
||||
RestartSteps = lib.mkOverride 90 9;
|
||||
};
|
||||
after = [
|
||||
"docker-network-setup.service"
|
||||
"docker-volume-openwebui.service"
|
||||
];
|
||||
requires = [
|
||||
"docker-network-setup.service"
|
||||
"docker-volume-openwebui.service"
|
||||
];
|
||||
partOf = [
|
||||
"docker-compose-openwebui-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"docker-compose-openwebui-root.target"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services."docker-volume-openwebui" = {
|
||||
path = [ pkgs.docker ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
script = ''
|
||||
docker volume inspect vol_openwebui || docker volume create vol_openwebui --driver=local
|
||||
'';
|
||||
partOf = [ "docker-compose-openwebui-root.target" ];
|
||||
wantedBy = [ "docker-compose-openwebui-root.target" ];
|
||||
};
|
||||
|
||||
systemd.targets."docker-compose-openwebui-root" = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
12
modules/features/packages.nix
Normal file
12
modules/features/packages.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ inputs, ... }: {
|
||||
|
||||
flake.nixosModules.default = { pkgs, ... }: {
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
age
|
||||
sops
|
||||
inputs.disko.packages.${pkgs.stdenv.hostPlatform.system}.disko-install
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
167
modules/features/passbolt/docker-compose.nix-txt
Normal file
167
modules/features/passbolt/docker-compose.nix-txt
Normal file
@@ -0,0 +1,167 @@
|
||||
# Auto-generated by compose2nix.
|
||||
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# Runtime
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
autoPrune.enable = true;
|
||||
};
|
||||
virtualisation.oci-containers.backend = "docker";
|
||||
|
||||
# Containers
|
||||
virtualisation.oci-containers.containers."passbolt-db" = {
|
||||
image = "mariadb:10.11";
|
||||
environment = {
|
||||
"MYSQL_DATABASE" = "passbolt";
|
||||
"MYSQL_PASSWORD" = "P4ssb0lt";
|
||||
"MYSQL_RANDOM_ROOT_PASSWORD" = "true";
|
||||
"MYSQL_USER" = "passbolt";
|
||||
};
|
||||
volumes = [
|
||||
"passbolt_database_volume:/var/lib/mysql:rw"
|
||||
];
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--network-alias=db"
|
||||
"--network=passbolt_default"
|
||||
];
|
||||
};
|
||||
systemd.services."docker-passbolt-db" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 90 "1m";
|
||||
RestartSec = lib.mkOverride 90 "100ms";
|
||||
RestartSteps = lib.mkOverride 90 9;
|
||||
};
|
||||
after = [
|
||||
"docker-network-passbolt_default.service"
|
||||
"docker-volume-passbolt_database_volume.service"
|
||||
];
|
||||
requires = [
|
||||
"docker-network-passbolt_default.service"
|
||||
"docker-volume-passbolt_database_volume.service"
|
||||
];
|
||||
partOf = [
|
||||
"docker-compose-passbolt-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"docker-compose-passbolt-root.target"
|
||||
];
|
||||
};
|
||||
virtualisation.oci-containers.containers."passbolt-passbolt" = {
|
||||
image = "passbolt/passbolt:latest-ce";
|
||||
environment = {
|
||||
"APP_FULL_BASE_URL" = "https://passbolt.local";
|
||||
"DATASOURCES_DEFAULT_DATABASE" = "passbolt";
|
||||
"DATASOURCES_DEFAULT_HOST" = "db";
|
||||
"DATASOURCES_DEFAULT_PASSWORD" = "P4ssb0lt";
|
||||
"DATASOURCES_DEFAULT_USERNAME" = "passbolt";
|
||||
};
|
||||
volumes = [
|
||||
"passbolt_gpg_volume:/etc/passbolt/gpg:rw"
|
||||
"passbolt_jwt_volume:/etc/passbolt/jwt:rw"
|
||||
];
|
||||
ports = [
|
||||
"80:80/tcp"
|
||||
"443:443/tcp"
|
||||
];
|
||||
cmd = [ "/usr/bin/wait-for.sh" "-t" "0" "db:3306" "--" "/docker-entrypoint.sh" ];
|
||||
dependsOn = [
|
||||
"passbolt-db"
|
||||
];
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--network-alias=passbolt"
|
||||
"--network=passbolt_default"
|
||||
];
|
||||
};
|
||||
systemd.services."docker-passbolt-passbolt" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 90 "1m";
|
||||
RestartSec = lib.mkOverride 90 "100ms";
|
||||
RestartSteps = lib.mkOverride 90 9;
|
||||
};
|
||||
after = [
|
||||
"docker-network-passbolt_default.service"
|
||||
"docker-volume-passbolt_gpg_volume.service"
|
||||
"docker-volume-passbolt_jwt_volume.service"
|
||||
];
|
||||
requires = [
|
||||
"docker-network-passbolt_default.service"
|
||||
"docker-volume-passbolt_gpg_volume.service"
|
||||
"docker-volume-passbolt_jwt_volume.service"
|
||||
];
|
||||
partOf = [
|
||||
"docker-compose-passbolt-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"docker-compose-passbolt-root.target"
|
||||
];
|
||||
};
|
||||
|
||||
# Networks
|
||||
systemd.services."docker-network-passbolt_default" = {
|
||||
path = [ pkgs.docker ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
ExecStop = "docker network rm -f passbolt_default";
|
||||
};
|
||||
script = ''
|
||||
docker network inspect passbolt_default || docker network create passbolt_default
|
||||
'';
|
||||
partOf = [ "docker-compose-passbolt-root.target" ];
|
||||
wantedBy = [ "docker-compose-passbolt-root.target" ];
|
||||
};
|
||||
|
||||
# Volumes
|
||||
systemd.services."docker-volume-passbolt_database_volume" = {
|
||||
path = [ pkgs.docker ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
script = ''
|
||||
docker volume inspect passbolt_database_volume || docker volume create passbolt_database_volume
|
||||
'';
|
||||
partOf = [ "docker-compose-passbolt-root.target" ];
|
||||
wantedBy = [ "docker-compose-passbolt-root.target" ];
|
||||
};
|
||||
systemd.services."docker-volume-passbolt_gpg_volume" = {
|
||||
path = [ pkgs.docker ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
script = ''
|
||||
docker volume inspect passbolt_gpg_volume || docker volume create passbolt_gpg_volume
|
||||
'';
|
||||
partOf = [ "docker-compose-passbolt-root.target" ];
|
||||
wantedBy = [ "docker-compose-passbolt-root.target" ];
|
||||
};
|
||||
systemd.services."docker-volume-passbolt_jwt_volume" = {
|
||||
path = [ pkgs.docker ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
script = ''
|
||||
docker volume inspect passbolt_jwt_volume || docker volume create passbolt_jwt_volume
|
||||
'';
|
||||
partOf = [ "docker-compose-passbolt-root.target" ];
|
||||
wantedBy = [ "docker-compose-passbolt-root.target" ];
|
||||
};
|
||||
|
||||
# Root service
|
||||
# When started, this will automatically create all resources and start
|
||||
# the containers. When stopped, this will teardown all resources.
|
||||
systemd.targets."docker-compose-passbolt-root" = {
|
||||
unitConfig = {
|
||||
Description = "Root target generated by compose2nix.";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
}
|
||||
1
modules/features/passbolt/passbolt.nix
Normal file
1
modules/features/passbolt/passbolt.nix
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
80
modules/features/pihole.nix
Normal file
80
modules/features/pihole.nix
Normal file
@@ -0,0 +1,80 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.pihole = { config, lib, ... }: let
|
||||
|
||||
hostPort = 9001;
|
||||
|
||||
subdomain = "pihole";
|
||||
|
||||
name = "pihole";
|
||||
|
||||
in {
|
||||
|
||||
config = {
|
||||
|
||||
virtualisation.docker.daemon.settings.dns = [ "192.168.101.12" ];
|
||||
|
||||
environment.etc."resolv.conf" = {
|
||||
enable = true;
|
||||
text = ''
|
||||
nameserver 127.0.0.1
|
||||
nameserver 1.1.1.1
|
||||
nameserver 1.0.0.1
|
||||
options edns0
|
||||
'';
|
||||
|
||||
user = "root";
|
||||
mode = "0664";
|
||||
};
|
||||
|
||||
networking.firewall.interfaces = {
|
||||
"ve-traefik" = {
|
||||
allowedTCPPorts = [ hostPort ];
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers.pihole = {
|
||||
image = "pihole/pihole:latest";
|
||||
|
||||
# unstable, waiting for 26.05
|
||||
#pull = "newer";
|
||||
|
||||
hostname = "${subdomain}.esotericbytes.com";
|
||||
|
||||
networks = [
|
||||
"docker-main"
|
||||
];
|
||||
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.${name}.entrypoints" = "localsecure";
|
||||
"traefik.http.routers.${name}.rule" = "Host(`${subdomain}.esotericbytes.com`)";
|
||||
"traefik.http.routers.${name}.service" = "${name}";
|
||||
"traefik.http.routers.${name}.tls.certResolver" = "cloudflare";
|
||||
|
||||
#"traefik.http.services.${name}.loadbalancer.server.url" = "http://192.168.100.10:${builtins.toString hostPort}";
|
||||
"traefik.http.services.${name}.loadbalancer.server.port" = "80";
|
||||
};
|
||||
|
||||
extraOptions = [
|
||||
"--ip=192.168.101.12"
|
||||
];
|
||||
|
||||
ports = [
|
||||
"${builtins.toString hostPort}:80"
|
||||
"127.0.0.1:53:53/tcp"
|
||||
"127.0.0.1:53:53/udp"
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"vol_pihole:/etc/pihole"
|
||||
];
|
||||
|
||||
environment = {
|
||||
FTLCONF_webserver_api_password = "7567";
|
||||
FTLCONF_dns_listeningMode = "ALL";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
47
modules/features/pipewire.nix
Normal file
47
modules/features/pipewire.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.pipewire = { config, lib, pkgs, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
# Enable sound with pipewire.
|
||||
#sound.enable = true;
|
||||
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
package = pkgs.pipewire;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
extraConfig.pipewire-pulse."92-low-latency" = {
|
||||
context.modules = [
|
||||
{
|
||||
name = "libpipewire-module-protocol-pulse";
|
||||
args = {
|
||||
pulse.min.req = "32/48000";
|
||||
pulse.default.req = "32/48000";
|
||||
pulse.max.req = "32/48000";
|
||||
pulse.min.quantum = "32/48000";
|
||||
pulse.max.quantum = "32/48000";
|
||||
};
|
||||
}
|
||||
];
|
||||
stream.properties = {
|
||||
node.latency = "32/48000";
|
||||
resample.quality = 1;
|
||||
};
|
||||
};
|
||||
# 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)
|
||||
wireplumber.enable = true;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
60
modules/features/portainer.nix
Normal file
60
modules/features/portainer.nix
Normal file
@@ -0,0 +1,60 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.portainer = { config, lib, ... }: let
|
||||
|
||||
hostPort = 9000;
|
||||
|
||||
subdomain = "portainer";
|
||||
|
||||
name = "portainer";
|
||||
|
||||
in {
|
||||
|
||||
config = {
|
||||
|
||||
networking.firewall.interfaces = {
|
||||
"ve-traefik" = {
|
||||
allowedTCPPorts = [ hostPort ];
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers.portainer = {
|
||||
image = "portainer/portainer-ce:latest";
|
||||
|
||||
# unstable, waiting for 26.05
|
||||
#pull = "newer";
|
||||
|
||||
hostname = "${subdomain}.esotericbytes.com";
|
||||
|
||||
networks = [
|
||||
"docker-main"
|
||||
];
|
||||
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.${name}.entrypoints" = "localsecure";
|
||||
"traefik.http.routers.${name}.rule" = "Host(`${subdomain}.esotericbytes.com`)";
|
||||
"traefik.http.routers.${name}.service" = "${name}";
|
||||
"traefik.http.routers.${name}.tls.certResolver" = "cloudflare";
|
||||
|
||||
#"traefik.http.services.${name}.loadbalancer.server.url" = "http://192.168.100.10:${builtins.toString hostPort}";
|
||||
"traefik.http.services.${name}.loadbalancer.server.port" = "9000";
|
||||
};
|
||||
|
||||
ports = [
|
||||
"127.0.0.1:8000:8000"
|
||||
"${builtins.toString hostPort}:9000"
|
||||
];
|
||||
|
||||
extraOptions = [
|
||||
"--ip=192.168.101.10"
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"vol_portainer:/data"
|
||||
"/run/docker.sock:/var/run/docker.sock"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
1
modules/features/rustdesk/default.nix
Normal file
1
modules/features/rustdesk/default.nix
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
77
modules/features/rustdesk/docker-compose.nix-txt
Normal file
77
modules/features/rustdesk/docker-compose.nix-txt
Normal file
@@ -0,0 +1,77 @@
|
||||
# Auto-generated by compose2nix.
|
||||
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# Runtime
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
autoPrune.enable = true;
|
||||
};
|
||||
virtualisation.oci-containers.backend = "docker";
|
||||
|
||||
# Containers
|
||||
virtualisation.oci-containers.containers."hbbr" = {
|
||||
image = "rustdesk/rustdesk-server:latest";
|
||||
volumes = [
|
||||
"/home/nathan/Projects/Olympus/system/virtualization/docker/rustdesk/data:/root:rw"
|
||||
];
|
||||
cmd = [ "hbbr" ];
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--network=host"
|
||||
];
|
||||
};
|
||||
systemd.services."docker-hbbr" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 90 "1m";
|
||||
RestartSec = lib.mkOverride 90 "100ms";
|
||||
RestartSteps = lib.mkOverride 90 9;
|
||||
};
|
||||
partOf = [
|
||||
"docker-compose-rustdesk-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"docker-compose-rustdesk-root.target"
|
||||
];
|
||||
};
|
||||
virtualisation.oci-containers.containers."hbbs" = {
|
||||
image = "rustdesk/rustdesk-server:latest";
|
||||
volumes = [
|
||||
"/home/nathan/Projects/Olympus/system/virtualization/docker/rustdesk/data:/root:rw"
|
||||
];
|
||||
cmd = [ "hbbs" ];
|
||||
dependsOn = [
|
||||
"hbbr"
|
||||
];
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--network=host"
|
||||
];
|
||||
};
|
||||
systemd.services."docker-hbbs" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 90 "1m";
|
||||
RestartSec = lib.mkOverride 90 "100ms";
|
||||
RestartSteps = lib.mkOverride 90 9;
|
||||
};
|
||||
partOf = [
|
||||
"docker-compose-rustdesk-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"docker-compose-rustdesk-root.target"
|
||||
];
|
||||
};
|
||||
|
||||
# Root service
|
||||
# When started, this will automatically create all resources and start
|
||||
# the containers. When stopped, this will teardown all resources.
|
||||
systemd.targets."docker-compose-rustdesk-root" = {
|
||||
unitConfig = {
|
||||
Description = "Root target generated by compose2nix.";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
}
|
||||
77
modules/features/sandbox.nix
Normal file
77
modules/features/sandbox.nix
Normal file
@@ -0,0 +1,77 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.sandbox = { config, lib, self, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
networking = {
|
||||
|
||||
nat.internalInterfaces = [ "ve-sandbox" ];
|
||||
};
|
||||
containers.sandbox = {
|
||||
|
||||
autoStart = true;
|
||||
privateNetwork = true;
|
||||
hostAddress = "192.168.100.10";
|
||||
localAddress = "192.168.100.32";
|
||||
|
||||
ephemeral = true;
|
||||
|
||||
timeoutStartSec = "3min";
|
||||
|
||||
flake = "${self}";
|
||||
|
||||
/*bindMounts = {
|
||||
"/dev/nvidia0" = {
|
||||
hostPath = "/dev/nvidia0";
|
||||
isReadOnly = false;
|
||||
};
|
||||
"/dev/nvidiactl" = {
|
||||
hostPath = "/dev/nvidiactl";
|
||||
isReadOnly = false;
|
||||
};
|
||||
"/dev/nvidia-uvm" = {
|
||||
hostPath = "/dev/nvidia-uvm";
|
||||
isReadOnly = false;
|
||||
};
|
||||
"/dev/nvidia-modeset" = {
|
||||
hostPath = "/dev/nvidia-modeset";
|
||||
isReadOnly = false;
|
||||
};
|
||||
"/dev/nvidia-uvm-tools" = {
|
||||
hostPath = "/dev/nvidia-uvm-tools";
|
||||
isReadOnly = false;
|
||||
};
|
||||
};
|
||||
|
||||
allowedDevices = [
|
||||
{
|
||||
node = "/dev/nvidia0";
|
||||
modifier = "rw";
|
||||
}
|
||||
{
|
||||
node = "/dev/nvidiactl";
|
||||
modifier = "rw";
|
||||
}
|
||||
{
|
||||
node = "/dev/nvidia-uvm";
|
||||
modifier = "rw";
|
||||
}
|
||||
{
|
||||
node = "/dev/nvidia-modeset";
|
||||
modifier = "rw";
|
||||
}
|
||||
{
|
||||
node = "/dev/nvidia-uvm-tools";
|
||||
modifier = "rw";
|
||||
}
|
||||
];*/
|
||||
|
||||
config = {
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
32
modules/features/sddm.nix
Normal file
32
modules/features/sddm.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.sddm = { config, lib, pkgs, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
qt.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [ (sddm-astronaut.override { embeddedTheme = "pixel_sakura"; }) ];
|
||||
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
autoNumlock = true;
|
||||
theme = "sddm-astronaut-theme"; #"${inputs.tokyo-night-sddm-theme { inherit pkgs; }}";
|
||||
enableHidpi = true;
|
||||
/*extraPackages = with pkgs; [
|
||||
libsForQt5.qtsvg
|
||||
libsForQt5.qtquickcontrols2
|
||||
libsForQt5.qtgraphicaleffects
|
||||
];*/
|
||||
|
||||
package = lib.mkDefault pkgs.kdePackages.sddm;
|
||||
extraPackages = with pkgs; [
|
||||
kdePackages.qtsvg
|
||||
kdePackages.qtvirtualkeyboard
|
||||
kdePackages.qtmultimedia
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
57
modules/features/searxng/searxng.nix
Normal file
57
modules/features/searxng/searxng.nix
Normal file
@@ -0,0 +1,57 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.searxng = { config, lib, ... }: let
|
||||
|
||||
subdomain = "searxng";
|
||||
|
||||
name = "searxng";
|
||||
|
||||
in {
|
||||
|
||||
config = {
|
||||
|
||||
environment.etc."searxng/settings.yml".source = ./settings.yml;
|
||||
|
||||
virtualisation.oci-containers.containers.searxng = {
|
||||
image = "searxng/searxng:latest";
|
||||
|
||||
# unstable, waiting for 26.05
|
||||
#pull = "newer";
|
||||
|
||||
hostname = "${subdomain}.esotericbytes.com";
|
||||
|
||||
networks = [
|
||||
"docker-main"
|
||||
];
|
||||
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.${name}.entrypoints" = "localsecure";
|
||||
"traefik.http.routers.${name}.rule" = "Host(`${subdomain}.esotericbytes.com`)";
|
||||
"traefik.http.routers.${name}.service" = "${name}";
|
||||
"traefik.http.routers.${name}.tls.certResolver" = "cloudflare";
|
||||
|
||||
#"traefik.http.services.${name}.loadbalancer.server.url" = "http://192.168.100.10:${builtins.toString hostPort}";
|
||||
"traefik.http.services.${name}.loadbalancer.server.port" = "8080";
|
||||
};
|
||||
|
||||
ports = [
|
||||
];
|
||||
|
||||
extraOptions = [
|
||||
"--ip=192.168.101.9"
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"vol_searxng_settings:/etc/searxng/"
|
||||
"vol_searxng_data:/var/cache/searxng/"
|
||||
"/etc/searxng/settings.yml:/etc/searxng/settings.yml"
|
||||
];
|
||||
|
||||
environment = {
|
||||
SEARXNG_SECRET = "2e8b4fcf4c0f46b097496f2d5715dbb061bd5cac78c64d0f5a0bee27f013f3c0";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
2820
modules/features/searxng/settings.yml
Normal file
2820
modules/features/searxng/settings.yml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
||||
remoteBuildClientKeys:
|
||||
laptop: ENC[AES256_GCM,data:SZRAZ36nSueWVLcdvpgZpltp/aORqAObFWhgqtIrTYccoK/3F7l0J+VJzF51FASa6spbGJL2BSbzOygyal609pvJc9Hb9bIN85GMzV1P4lha62iC8dkuVLXezPU=,iv:veQJxL4QTxFg2UKm2+I3RQXyuwW2rXEV/gXIQ7nBtlY=,tag:9C9Ltzwz823yY029p9K41A==,type:str]
|
||||
pi4: ENC[AES256_GCM,data:zT7V70DbBj5OIl5dTkUjvdqrxSiPcc+oFvL7R2ZAuytSQWdo9MR+WuuhN1Zeo0Ho9eGcbS+Qwr/Vs+yIYU+XaUlgawHM6aiUXoQmQE/yJFOPYUcmi0R4mxD0nkPZ0w==,iv:HQ+bxpeHZq9cezF6omZ1OMecfOw74pXzBujndhXnLPM=,tag:AM5O21nYzb4xzybOPvBwRg==,type:str]
|
||||
android: ENC[AES256_GCM,data:srkEb7oAxcN5++sTWQo43C8M4JNpfeeJlcGLGUA6gp74kcES1HnIs87ZtCik121oMSYD15LZ8p/x/AV2QdGMobQFxoMQ2NEehhP66n2EoXcEos3BXqUlbphiBGMRfVK9+w==,iv:bmDbVfVSZLU+EsZh/GBBY9QVcfHZJB9gLZYeI3NYoGY=,tag:biE4/DN7z2wRyFBjK7vEnQ==,type:str]
|
||||
sops:
|
||||
age:
|
||||
- recipient: age1yqgyp2uxz4lzrc9f9ka0mfjl5fr6ahf8nf24nlmran2wulg6fpvq9hyp9q
|
||||
@@ -30,7 +31,7 @@ sops:
|
||||
NXNhczV5Y3o3dmJ2RVk3eDBRd1FDdEkK4ELlB6suN3R3GJ6XRQCvE9mgiXUOMFs3
|
||||
Yi+VfJTi3pkUQEi8MZP64Nl6IR5dXjUoPXFhBNcplmLf09JDjH4LJQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-08-23T16:06:28Z"
|
||||
mac: ENC[AES256_GCM,data:dcpOmQuv2/EWWnSFYpNYHjKH8OcIzfL8kUYue0kfLQKv/H17bwjUDGxQ0nEwQHWYFpIw91yho3pjDEgGozc59jkzwCocLVtDAhd8P6ywKdv2xxjhjj0T0Y7N92XdANBzZ7Jxg97gpViQO6zyQa9VMJkZlYaVWdtS+B2Hf0xCnY0=,iv:K/0ycnxtroF3lElq00nQJR8FWX6npmD1U+3q8Pb4rpM=,tag:r1MWo3jBT6A3jnjBCQP9Ow==,type:str]
|
||||
lastmodified: "2025-08-26T22:28:31Z"
|
||||
mac: ENC[AES256_GCM,data:hTEenm/UO84leu7alRdWlicKKrwNlaRR7ZQzhDtOCUcXemvwe30WkSq2mdzOnSo0uMSg1HZIlna8oRUd31ENe1aWfl69PlYPxEicmN5UHykVboXydw6m0yPoAqHj+nqG/vkWsVp0JN8HvTc59mzD+1DfydhJA3m0juaa81w5GsY=,iv:HBkE78QhX1wZANpvDW7nOIOTKBdCv0/dUc1Xv5+OQmQ=,tag:6I2z8MgZxnXjqd4iikA9nQ==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.10.2
|
||||
13
modules/features/steam.nix
Normal file
13
modules/features/steam.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.steam = { config, lib, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
75
modules/features/traefik/config/routing.yml
Normal file
75
modules/features/traefik/config/routing.yml
Normal file
@@ -0,0 +1,75 @@
|
||||
http:
|
||||
routers:
|
||||
|
||||
homepageSecure:
|
||||
entryPoints:
|
||||
- "websecure"
|
||||
- "localsecure"
|
||||
rule: "Host(`esotericbytes.com`) || Host(`www.esotericbytes.com`)"
|
||||
service: "homepage"
|
||||
middlewares:
|
||||
- authentik
|
||||
tls:
|
||||
certResolver: "cloudflare"
|
||||
|
||||
code-server:
|
||||
entryPoints:
|
||||
- "localsecure"
|
||||
rule: "Host(`code.esotericbytes.com`)"
|
||||
service: "code-server"
|
||||
tls:
|
||||
certResolver: "cloudflare"
|
||||
|
||||
gitea:
|
||||
entryPoints:
|
||||
- "localsecure"
|
||||
- "websecure"
|
||||
rule: "Host(`gitea.esotericbytes.com`)"
|
||||
service: "gitea"
|
||||
tls:
|
||||
certResolver: "cloudflare"
|
||||
|
||||
octoprint:
|
||||
entryPoints:
|
||||
- "localsecure"
|
||||
#- "websecure"
|
||||
rule: "Host(`3dp.esotericbytes.com`)"
|
||||
service: "octoprint"
|
||||
tls:
|
||||
certResolver: "cloudflare"
|
||||
|
||||
services:
|
||||
homepage:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://192.168.100.13:80"
|
||||
|
||||
code-server:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://192.168.100.31:4444"
|
||||
|
||||
gitea:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://192.168.100.20:3000"
|
||||
|
||||
octoprint:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://rpi-3dp.local"
|
||||
passHostHeader: true
|
||||
|
||||
tcp:
|
||||
routers:
|
||||
gitea-ssh:
|
||||
entryPoints:
|
||||
- "gitea-ssh"
|
||||
rule: "HostSNI(`*`)"
|
||||
service: "gitea-ssh"
|
||||
|
||||
services:
|
||||
gitea-ssh:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- address: "192.168.100.20:2222"
|
||||
87
modules/features/traefik/config/traefik.yml
Normal file
87
modules/features/traefik/config/traefik.yml
Normal file
@@ -0,0 +1,87 @@
|
||||
providers:
|
||||
docker:
|
||||
exposedByDefault: false
|
||||
file:
|
||||
filename: "/etc/traefik/routing.yml"
|
||||
|
||||
serversTransport:
|
||||
insecureSkipVerify: true
|
||||
|
||||
api:
|
||||
dashboard: true
|
||||
|
||||
global:
|
||||
checknewversion: true
|
||||
sendanonymoususage: false
|
||||
|
||||
entryPoints:
|
||||
web:
|
||||
address: ":81"
|
||||
http:
|
||||
redirections:
|
||||
entryPoint:
|
||||
to: "websecure"
|
||||
scheme: "https"
|
||||
|
||||
websecure:
|
||||
address: ":444"
|
||||
asDefault: true
|
||||
transport:
|
||||
respondingTimeouts:
|
||||
readTimeout: 24h
|
||||
http:
|
||||
tls:
|
||||
certResolver: "cloudflare"
|
||||
domains:
|
||||
main: "esotericbytes.com"
|
||||
sans:
|
||||
- "*.esotericbytes.com"
|
||||
encodedCharacters:
|
||||
allowEncodedSlash: true
|
||||
allowEncodedQuestionMark: true
|
||||
allowEncodedPercent: true
|
||||
|
||||
local:
|
||||
address: ":80"
|
||||
http:
|
||||
redirections:
|
||||
entryPoint:
|
||||
to: "localsecure"
|
||||
scheme: "https"
|
||||
|
||||
localsecure:
|
||||
address: ":443"
|
||||
asDefault: true
|
||||
transport:
|
||||
respondingTimeouts:
|
||||
readTimeout: 24h
|
||||
http:
|
||||
tls:
|
||||
certResolver: "cloudflare"
|
||||
domains:
|
||||
main: "esotericbytes.com"
|
||||
sans:
|
||||
- "*.esotericbytes.com"
|
||||
encodedCharacters:
|
||||
allowEncodedSlash: true
|
||||
allowEncodedQuestionMark: true
|
||||
allowEncodedPercent: true
|
||||
gitea-ssh:
|
||||
address: ":2222"
|
||||
|
||||
log:
|
||||
level: "INFO"
|
||||
filePath: "/etc/traefik/logs/traefik.log"
|
||||
format: "json"
|
||||
|
||||
certificatesResolvers:
|
||||
cloudflare:
|
||||
acme:
|
||||
storage: "/etc/traefik/acme.json"
|
||||
keyType: "EC256"
|
||||
dnsChallenge:
|
||||
provider: "cloudflare"
|
||||
resolvers:
|
||||
- "1.1.1.1:53"
|
||||
- "1.0.0.1:53"
|
||||
|
||||
106
modules/features/traefik/traefik.nix
Normal file
106
modules/features/traefik/traefik.nix
Normal file
@@ -0,0 +1,106 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.traefik = { config, lib, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 81 443 444 2222 ];
|
||||
|
||||
sops.secrets = {
|
||||
"traefik/cf_email" = {};
|
||||
"traefik/cf_api_key" = {};
|
||||
};
|
||||
|
||||
sops.templates."traefik.env" = {
|
||||
content = ''
|
||||
CF_API_EMAIL=${config.sops.placeholder."traefik/cf_email"}
|
||||
CF_DNS_API_TOKEN=${config.sops.placeholder."traefik/cf_api_key"}
|
||||
'';
|
||||
};
|
||||
|
||||
environment.etc = (builtins.listToAttrs (builtins.map (x: {
|
||||
name = "traefik/${x}";
|
||||
value = {
|
||||
source = ./config/${x};
|
||||
mode = "0664";
|
||||
};
|
||||
}) (builtins.attrNames (builtins.readDir ./config))));
|
||||
|
||||
/*environment.etc."traefik/traefik.yml" = {
|
||||
source = ./config/traefik.yml;
|
||||
};
|
||||
environment.etc."traefik/routing.yml" = {
|
||||
source = ./config/routing.yml;
|
||||
};*/
|
||||
|
||||
virtualisation.oci-containers.containers.traefik = {
|
||||
|
||||
image = "traefik:v3.6";
|
||||
|
||||
environment = {
|
||||
TRAEFIK_CERTIFICATESRESOLVERS_CLOUDFLARE_ACME_EMAIL = "\${CF_API_EMAIL}";
|
||||
};
|
||||
|
||||
environmentFiles = [ config.sops.templates."traefik.env".path ];
|
||||
|
||||
volumes = [
|
||||
"/etc/traefik/:/etc/traefik/"
|
||||
"/run/docker.sock:/var/run/docker.sock"
|
||||
];
|
||||
|
||||
networks = [
|
||||
"docker-main"
|
||||
];
|
||||
|
||||
ports = [
|
||||
"80:80"
|
||||
"81:81"
|
||||
"443:443"
|
||||
"444:444"
|
||||
"2222:2222"
|
||||
];
|
||||
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.dashboard.rule" = "Host(`traefik.esotericbytes.com`)";
|
||||
"traefik.http.routers.dashboard.entrypoints" = "websecure,localsecure";
|
||||
"traefik.http.routers.dashboard.service" = "api@internal";
|
||||
"traefik.http.routers.dashboard.tls.certResolver" = "cloudflare";
|
||||
};
|
||||
|
||||
extraOptions = [
|
||||
"--ip=192.168.101.11"
|
||||
];
|
||||
|
||||
log-driver = "journald";
|
||||
};
|
||||
systemd.services."docker-traefik" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 90 "1m";
|
||||
RestartSec = lib.mkOverride 90 "100ms";
|
||||
RestartSteps = lib.mkOverride 90 9;
|
||||
};
|
||||
after = [
|
||||
"docker-network-setup.service"
|
||||
];
|
||||
requires = [
|
||||
"docker-network-setup.service"
|
||||
];
|
||||
partOf = [
|
||||
"docker-compose-traefik-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"docker-compose-traefik-root.target"
|
||||
];
|
||||
};
|
||||
|
||||
# Root service
|
||||
# When started, this will automatically create all resources and start
|
||||
# the containers. When stopped, this will teardown all resources.
|
||||
systemd.targets."docker-compose-traefik-root" = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
22
modules/features/virtual-machines.nix
Normal file
22
modules/features/virtual-machines.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.virtual-machines = { config, lib, pkgs, ... }: {
|
||||
|
||||
config = {
|
||||
programs.virt-manager.enable = true;
|
||||
|
||||
virtualisation = {
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu.swtpm.enable = true;
|
||||
};
|
||||
|
||||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; lib.mkIf config.hardware.graphics.enable [
|
||||
virt-viewer
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
46
modules/features/wyoming.nix
Normal file
46
modules/features/wyoming.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.wyoming = { config, lib, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
services.wyoming = {
|
||||
|
||||
piper = {
|
||||
|
||||
servers.piper = {
|
||||
enable = lib.mkDefault true;
|
||||
voice = "en-us-ryan-medium";
|
||||
uri = "tcp://0.0.0.0:11435";
|
||||
};
|
||||
};
|
||||
|
||||
openwakeword = {
|
||||
enable = lib.mkDefault true;
|
||||
uri = "tcp://0.0.0.0:11432";
|
||||
|
||||
threshold = 0.5;
|
||||
customModelsDirectories = [
|
||||
#./wake_words
|
||||
];
|
||||
};
|
||||
|
||||
faster-whisper = {
|
||||
servers.whisper = {
|
||||
enable = lib.mkDefault true;
|
||||
device = "auto";
|
||||
language = "en";
|
||||
model = "medium.en";
|
||||
uri = "tcp://0.0.0.0:11433";
|
||||
};
|
||||
};
|
||||
|
||||
satellite = {
|
||||
enable = lib.mkDefault true;
|
||||
uri = "tcp://0.0.0.0:11431";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user