diff --git a/README.md b/README.md
index eef2f33..cac7224 100644
--- a/README.md
+++ b/README.md
@@ -18,6 +18,7 @@
- [Hyprland](#-hyprland)
- [SwayFX](#-swayfx)
- [Software](#-software)
+- [Network topology](#-network-topology)
- [Hosts description](#%EF%B8%8F-hosts-description)
- [Keyboard](#%EF%B8%8F-keyboard)
- [Special thanks](#%EF%B8%8F-special-thanks)
@@ -44,6 +45,9 @@
- [๐งฉ modules](home/users/maxmur/modules/) home manager user modules
- [๐ lib](lib/default.nix) helper functions for creating configurations
- [๐งฉ modules](modules/default.nix) common modules for nixos/nixDarwin/home-manager
+- [โป๏ธ overlays](overlays/) common overlays
+- [โ๏ธparts](parts/) flake parts modules
+- [๐pkgs](pkgs/) self-sealed packages
- [๐ฅ๏ธ system](system/default.nix) entry point for creating a machine
- [๐๏ธ machine](system/machine) machines configurations
- [๐ hostname](system/machine/pcbox/) starting the configuration of a specific machine
@@ -88,6 +92,14 @@ The images below may not represent the final system. Some parts may differ.
- Promt - [**`Starship`**](https://starship.rs/)
- Filemanager - [**`Yazi`**](https://github.com/sxyazi/yazi)
+## ๐ Network topology
+
+These diagrams show the network topology of my home network.
+
+![main.svg](assets/network/main.svg)
+
+![network.svg](assets/network/network.svg)
+
## ๐ฅ๏ธ Hosts description
| Hostname | Board | CPU | RAM | GPU | OS | State |
diff --git a/assets/network/main.svg b/assets/network/main.svg
new file mode 100644
index 0000000..e063590
--- /dev/null
+++ b/assets/network/main.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/network/network.svg b/assets/network/network.svg
new file mode 100644
index 0000000..79bc4c0
--- /dev/null
+++ b/assets/network/network.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/flake.lock b/flake.lock
index a9e4fb4..121ffe8 100644
--- a/flake.lock
+++ b/flake.lock
@@ -178,11 +178,11 @@
"yafas": "yafas"
},
"locked": {
- "lastModified": 1725043054,
- "narHash": "sha256-wNKROMH0TmS3yqpces3ldlRLE75Bec0gfmaP9DF6OPc=",
+ "lastModified": 1725738693,
+ "narHash": "sha256-nqsRStEB29KcTsMC52NdKFzd0PSudQHY6w6oRrNyLCM=",
"owner": "chaotic-cx",
"repo": "nyx",
- "rev": "1de4f25728a7f37785da5742f6d3fe98daffe83f",
+ "rev": "38451822a144faa53a7ee96d4f0478d94945b67a",
"type": "github"
},
"original": {
@@ -266,11 +266,11 @@
]
},
"locked": {
- "lastModified": 1724994893,
- "narHash": "sha256-yutISDGg6HUaZqCaa54EcsfTwew3vhNtt/FNXBBo44g=",
+ "lastModified": 1725628909,
+ "narHash": "sha256-xI0OSqPHcs/c/utJsU0Zvcp1VhejMI9mgwr68uHHlPs=",
"owner": "LnL7",
"repo": "nix-darwin",
- "rev": "c8d3157d1f768e382de5526bb38e74d2245cad04",
+ "rev": "76559183801030451e200c90a1627c1d82bb4910",
"type": "github"
},
"original": {
@@ -280,6 +280,28 @@
"type": "github"
}
},
+ "devshell": {
+ "inputs": {
+ "flake-utils": "flake-utils_3",
+ "nixpkgs": [
+ "nix-topology",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1713532798,
+ "narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=",
+ "owner": "numtide",
+ "repo": "devshell",
+ "rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "devshell",
+ "type": "github"
+ }
+ },
"disko": {
"inputs": {
"nixpkgs": [
@@ -287,11 +309,11 @@
]
},
"locked": {
- "lastModified": 1724895876,
- "narHash": "sha256-GSqAwa00+vRuHbq9O/yRv7Ov7W/pcMLis3HmeHv8a+Q=",
+ "lastModified": 1725377834,
+ "narHash": "sha256-tqoAO8oT6zEUDXte98cvA1saU9+1dLJQe3pMKLXv8ps=",
"owner": "nix-community",
"repo": "disko",
- "rev": "511388d837178979de66d14ca4a2ebd5f7991cd3",
+ "rev": "e55f9a8678adc02024a4877c2a403e3f6daf24fe",
"type": "github"
},
"original": {
@@ -332,11 +354,11 @@
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
- "lastModified": 1724999484,
- "narHash": "sha256-AIR8uYGteWS/RyHyZJAHQAUEJ/Mv4ktkPe2mzbJ2zCE=",
+ "lastModified": 1725690497,
+ "narHash": "sha256-5fT+96rV7Hx29HG+4/oBbr3V+yExKuLN2vcBcPbVBlU=",
"owner": "nix-community",
"repo": "fenix",
- "rev": "e3bb9176e807e2b166d54153ce8caea5cb2c6700",
+ "rev": "4b8d964df93d1f918ee6c4f003b3548c432cc866",
"type": "github"
},
"original": {
@@ -362,6 +384,22 @@
}
},
"flake-compat_2": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1696426674,
+ "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
+ "type": "github"
+ },
+ "original": {
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "type": "github"
+ }
+ },
+ "flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1673956053,
@@ -384,11 +422,11 @@
]
},
"locked": {
- "lastModified": 1725024810,
- "narHash": "sha256-ODYRm8zHfLTH3soTFWE452ydPYz2iTvr9T8ftDMUQ3E=",
+ "lastModified": 1725234343,
+ "narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=",
"owner": "hercules-ci",
"repo": "flake-parts",
- "rev": "af510d4a62d071ea13925ce41c95e3dec816c01d",
+ "rev": "567b938d64d4b4112ee253b9274472dc3a346eb6",
"type": "github"
},
"original": {
@@ -469,6 +507,42 @@
}
},
"flake-utils_3": {
+ "inputs": {
+ "systems": "systems_5"
+ },
+ "locked": {
+ "lastModified": 1701680307,
+ "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "flake-utils_4": {
+ "inputs": {
+ "systems": "systems_6"
+ },
+ "locked": {
+ "lastModified": 1710146030,
+ "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "flake-utils_5": {
"inputs": {
"systems": [
"stylix",
@@ -489,9 +563,9 @@
"type": "github"
}
},
- "flake-utils_4": {
+ "flake-utils_6": {
"inputs": {
- "systems": "systems_7"
+ "systems": "systems_9"
},
"locked": {
"lastModified": 1705309234,
@@ -560,6 +634,28 @@
"type": "github"
}
},
+ "gitignore_2": {
+ "inputs": {
+ "nixpkgs": [
+ "nix-topology",
+ "pre-commit-hooks",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1709087332,
+ "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "type": "github"
+ }
+ },
"gnome-shell": {
"flake": false,
"locked": {
@@ -585,11 +681,11 @@
]
},
"locked": {
- "lastModified": 1724435763,
- "narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=",
+ "lastModified": 1725694918,
+ "narHash": "sha256-+HsjshXpqNiJHLaJaK0JnIicJ/a1NquKcfn4YZ3ILgg=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be",
+ "rev": "aaebdea769a5c10f1c6e50ebdf5924c1a13f0cda",
"type": "github"
},
"original": {
@@ -605,11 +701,11 @@
]
},
"locked": {
- "lastModified": 1724435763,
- "narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=",
+ "lastModified": 1725863684,
+ "narHash": "sha256-HmdTBpuCsw35Ii35JUKO6AE6nae+kJliQb0XGd4hoLE=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be",
+ "rev": "be47a2bdf278c57c2d05e747a13ed31cef54a037",
"type": "github"
},
"original": {
@@ -779,7 +875,7 @@
},
"hyprlang_2": {
"inputs": {
- "nixpkgs": "nixpkgs_8"
+ "nixpkgs": "nixpkgs_9"
},
"locked": {
"lastModified": 1704287638,
@@ -847,11 +943,11 @@
},
"impermanence": {
"locked": {
- "lastModified": 1724489415,
- "narHash": "sha256-ey8vhwY/6XCKoh7fyTn3aIQs7WeYSYtLbYEG87VCzX4=",
+ "lastModified": 1725690722,
+ "narHash": "sha256-4qWg9sNh5g1qPGO6d/GV2ktY+eDikkBTbWSg5/iD2nY=",
"owner": "nix-community",
"repo": "impermanence",
- "rev": "c7f5b394397398c023000cf843986ee2571a1fd7",
+ "rev": "63f4d0443e32b0dd7189001ee1894066765d18a5",
"type": "github"
},
"original": {
@@ -869,11 +965,11 @@
]
},
"locked": {
- "lastModified": 1724999205,
- "narHash": "sha256-Lc9kb5hhUohcJlUye5Pu8BNYHDPIOUtejYySTvHTlio=",
+ "lastModified": 1725600800,
+ "narHash": "sha256-wst7p3RZ9kZUNzN22d27wU8YSBB7Grlx6Q03A7boRaU=",
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
- "rev": "a14f978f74e89213a5f565f827454dd6178b2bb5",
+ "rev": "2d050e65a71e02a1f19d1a35c086bd2e3dfb2cdb",
"type": "github"
},
"original": {
@@ -911,11 +1007,11 @@
},
"master": {
"locked": {
- "lastModified": 1725151913,
- "narHash": "sha256-EkY43zIALfs4z8LoVOdb+Hlt5Z36dC9/YcKH23tBKdM=",
+ "lastModified": 1725867797,
+ "narHash": "sha256-DW6NHvXHrWFUa0TY4TCf+M8uFIRhmV9H3smBZ2Pu7pk=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "5fcbdb939dcdf26e2262b74607c2676dbcedc961",
+ "rev": "cb97dfe6c051011be9cb13cd33103c907d9b2107",
"type": "github"
},
"original": {
@@ -969,6 +1065,27 @@
"type": "github"
}
},
+ "nix-topology": {
+ "inputs": {
+ "devshell": "devshell",
+ "flake-utils": "flake-utils_4",
+ "nixpkgs": "nixpkgs_5",
+ "pre-commit-hooks": "pre-commit-hooks"
+ },
+ "locked": {
+ "lastModified": 1725483443,
+ "narHash": "sha256-WzOlGMKV/51Fccn/OMHcm5yrqgbOJZrJIy1ya4pW0u8=",
+ "owner": "oddlama",
+ "repo": "nix-topology",
+ "rev": "8738d94670265beb166954c4e3a26e432f79f68c",
+ "type": "github"
+ },
+ "original": {
+ "owner": "oddlama",
+ "repo": "nix-topology",
+ "type": "github"
+ }
+ },
"nixpkgs": {
"locked": {
"lastModified": 1704893757,
@@ -1002,11 +1119,27 @@
},
"nixpkgs-stable_2": {
"locked": {
- "lastModified": 1721524707,
- "narHash": "sha256-5NctRsoE54N86nWd0psae70YSLfrOek3Kv1e8KoXe/0=",
+ "lastModified": 1710695816,
+ "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "614b4613980a522ba49f0d194531beddbb7220d3",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-23.11",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs-stable_3": {
+ "locked": {
+ "lastModified": 1725762081,
+ "narHash": "sha256-vNv+aJUW5/YurRy1ocfvs4q/48yVESwlC/yHzjkZSP8=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "556533a23879fc7e5f98dd2e0b31a6911a213171",
+ "rev": "dc454045f5b5d814e5862a6d057e7bb5c29edc05",
"type": "github"
},
"original": {
@@ -1016,13 +1149,27 @@
"type": "github"
}
},
+ "nixpkgs_10": {
+ "locked": {
+ "lastModified": 1708093448,
+ "narHash": "sha256-gohEm3/NVyu7WINFhRf83yJH8UM2ie/KY9Iw3VN6fiE=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "c7763249f02b7786b4ca36e13a4d7365cfba162f",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "type": "indirect"
+ }
+ },
"nixpkgs_2": {
"locked": {
- "lastModified": 1724819573,
- "narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=",
+ "lastModified": 1725634671,
+ "narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "71e91c409d1e654808b2621f28a327acfdad8dc2",
+ "rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c",
"type": "github"
},
"original": {
@@ -1066,27 +1213,27 @@
},
"nixpkgs_5": {
"locked": {
- "lastModified": 1721466660,
- "narHash": "sha256-pFSxgSZqZ3h+5Du0KvEL1ccDZBwu4zvOil1zzrPNb3c=",
+ "lastModified": 1715266358,
+ "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "6e14bbce7bea6c4efd7adfa88a40dac750d80100",
+ "rev": "f1010e0469db743d14519a1efd37e23f8513d714",
"type": "github"
},
"original": {
"owner": "NixOS",
- "ref": "nixpkgs-unstable",
+ "ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
- "lastModified": 1723415338,
- "narHash": "sha256-K/BVeDLkpswRSBh3APxc2gBNVFEMXGpnkuQz666FiTM=",
+ "lastModified": 1725534445,
+ "narHash": "sha256-Yd0FK9SkWy+ZPuNqUgmVPXokxDgMJoGuNpMEtkfcf84=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "6e8760f7f7121128e2037db44915a4a5450b6e67",
+ "rev": "9bb1e7571aadf31ddb4af77fc64b2d59580f9a39",
"type": "github"
},
"original": {
@@ -1098,31 +1245,31 @@
},
"nixpkgs_7": {
"locked": {
- "lastModified": 1723637854,
- "narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=",
- "owner": "nixos",
+ "lastModified": 1725194671,
+ "narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=",
+ "owner": "NixOS",
"repo": "nixpkgs",
- "rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9",
+ "rev": "b833ff01a0d694b910daca6e2ff4a3f26dee478c",
"type": "github"
},
"original": {
- "owner": "nixos",
- "ref": "nixos-unstable",
+ "owner": "NixOS",
+ "ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_8": {
"locked": {
- "lastModified": 1702645756,
- "narHash": "sha256-qKI6OR3TYJYQB3Q8mAZ+DG4o/BR9ptcv9UnRV2hzljc=",
+ "lastModified": 1725103162,
+ "narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "40c3c94c241286dd2243ea34d3aef8a488f9e4d0",
+ "rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b",
"type": "github"
},
"original": {
- "owner": "NixOS",
+ "owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
@@ -1130,26 +1277,28 @@
},
"nixpkgs_9": {
"locked": {
- "lastModified": 1708093448,
- "narHash": "sha256-gohEm3/NVyu7WINFhRf83yJH8UM2ie/KY9Iw3VN6fiE=",
- "owner": "NixOS",
+ "lastModified": 1702645756,
+ "narHash": "sha256-qKI6OR3TYJYQB3Q8mAZ+DG4o/BR9ptcv9UnRV2hzljc=",
+ "owner": "nixos",
"repo": "nixpkgs",
- "rev": "c7763249f02b7786b4ca36e13a4d7365cfba162f",
+ "rev": "40c3c94c241286dd2243ea34d3aef8a488f9e4d0",
"type": "github"
},
"original": {
- "id": "nixpkgs",
- "type": "indirect"
+ "owner": "NixOS",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
}
},
"powerlevel10k": {
"flake": false,
"locked": {
- "lastModified": 1724223745,
- "narHash": "sha256-H7DYDLNANFnws3pCANnMJAQIMDXCf9S+ggUOGUy1oO0=",
+ "lastModified": 1725532669,
+ "narHash": "sha256-1NfhbCMox666KPprJqC+yDPPAZi/5p7FSTtwbhKcYoI=",
"owner": "romkatv",
"repo": "powerlevel10k",
- "rev": "a42e374e25226d2032a38b38fc544ec1d65b0d01",
+ "rev": "d71edb83f9c7f045a0d528eeff3445ec3d518d71",
"type": "github"
},
"original": {
@@ -1158,6 +1307,34 @@
"type": "github"
}
},
+ "pre-commit-hooks": {
+ "inputs": {
+ "flake-compat": "flake-compat_2",
+ "flake-utils": [
+ "nix-topology",
+ "flake-utils"
+ ],
+ "gitignore": "gitignore_2",
+ "nixpkgs": [
+ "nix-topology",
+ "nixpkgs"
+ ],
+ "nixpkgs-stable": "nixpkgs-stable_2"
+ },
+ "locked": {
+ "lastModified": 1714478972,
+ "narHash": "sha256-q//cgb52vv81uOuwz1LaXElp3XAe1TqrABXODAEF6Sk=",
+ "owner": "cachix",
+ "repo": "pre-commit-hooks.nix",
+ "rev": "2849da033884f54822af194400f8dff435ada242",
+ "type": "github"
+ },
+ "original": {
+ "owner": "cachix",
+ "repo": "pre-commit-hooks.nix",
+ "type": "github"
+ }
+ },
"pre-commit-hooks-nix": {
"inputs": {
"flake-compat": [
@@ -1243,6 +1420,7 @@
"impermanence": "impermanence",
"lanzaboote": "lanzaboote",
"master": "master",
+ "nix-topology": "nix-topology",
"nixpkgs": [
"unstable"
],
@@ -1263,11 +1441,11 @@
"rust-analyzer-src": {
"flake": false,
"locked": {
- "lastModified": 1724937894,
- "narHash": "sha256-M/28TIG+fm5x3GtQ6qSGDw1NHS4nHttz0DM7JcDs4g8=",
+ "lastModified": 1725630423,
+ "narHash": "sha256-gNCLk3Zg7JlAwmWbVHTH6f3+iqdeQ4fheOotCZy8x5M=",
"owner": "rust-lang",
"repo": "rust-analyzer",
- "rev": "0ae42bd42576566540a84c62e118aa823edcf2ec",
+ "rev": "08c7bbc2dbe4dcc8968484f1a0e1e6fe7a1d4f6d",
"type": "github"
},
"original": {
@@ -1327,15 +1505,15 @@
},
"sops-nix": {
"inputs": {
- "nixpkgs": "nixpkgs_5",
- "nixpkgs-stable": "nixpkgs-stable_2"
+ "nixpkgs": "nixpkgs_6",
+ "nixpkgs-stable": "nixpkgs-stable_3"
},
"locked": {
- "lastModified": 1723501126,
- "narHash": "sha256-N9IcHgj/p1+2Pvk8P4Zc1bfrMwld5PcosVA0nL6IGdE=",
+ "lastModified": 1725765163,
+ "narHash": "sha256-rfd2c47iVSFI6bRYy5l8wRijRBaYDeU7dM8XCDUGqlA=",
"owner": "Mic92",
"repo": "sops-nix",
- "rev": "be0eec2d27563590194a9206f551a6f73d52fa34",
+ "rev": "b68757cd2c3fa66d6ccaa0d046ce42a9324e0070",
"type": "github"
},
"original": {
@@ -1346,11 +1524,11 @@
},
"stable": {
"locked": {
- "lastModified": 1725001927,
- "narHash": "sha256-eV+63gK0Mp7ygCR0Oy4yIYSNcum2VQwnZamHxYTNi+M=",
+ "lastModified": 1725693463,
+ "narHash": "sha256-ZPzhebbWBOr0zRWW10FfqfbJlan3G96/h3uqhiFqmwg=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "6e99f2a27d600612004fbd2c3282d614bfee6421",
+ "rev": "68e7dce0a6532e876980764167ad158174402c6f",
"type": "github"
},
"original": {
@@ -1369,19 +1547,19 @@
"base16-kitty": "base16-kitty",
"base16-tmux": "base16-tmux",
"base16-vim": "base16-vim",
- "flake-compat": "flake-compat_2",
- "flake-utils": "flake-utils_3",
+ "flake-compat": "flake-compat_3",
+ "flake-utils": "flake-utils_5",
"gnome-shell": "gnome-shell",
"home-manager": "home-manager_3",
- "nixpkgs": "nixpkgs_6",
- "systems": "systems_5"
+ "nixpkgs": "nixpkgs_7",
+ "systems": "systems_7"
},
"locked": {
- "lastModified": 1725126812,
- "narHash": "sha256-E0CrYq8A/gdBjb9qC3PGKfH9lwSESyFX6sRZXJxq4JE=",
+ "lastModified": 1725290973,
+ "narHash": "sha256-+jwXF9KI0HfvDgpsoJGvOdfOGGSKOrID1wQB79zjUbo=",
"owner": "danth",
"repo": "stylix",
- "rev": "3a4101c4f4abee41859c0cb98f6250f04c80d0f6",
+ "rev": "ef81ad9e85e60420cc83d4642619c14b57139d33",
"type": "github"
},
"original": {
@@ -1466,6 +1644,36 @@
}
},
"systems_6": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_7": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_8": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
@@ -1480,7 +1688,7 @@
"type": "github"
}
},
- "systems_7": {
+ "systems_9": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@@ -1497,14 +1705,14 @@
},
"treefmt-nix": {
"inputs": {
- "nixpkgs": "nixpkgs_7"
+ "nixpkgs": "nixpkgs_8"
},
"locked": {
- "lastModified": 1724833132,
- "narHash": "sha256-F4djBvyNRAXGusJiNYInqR6zIMI3rvlp6WiKwsRISos=",
+ "lastModified": 1725271838,
+ "narHash": "sha256-VcqxWT0O/gMaeWTTjf1r4MOyG49NaNxW4GHTO3xuThE=",
"owner": "numtide",
"repo": "treefmt-nix",
- "rev": "3ffd842a5f50f435d3e603312eefa4790db46af5",
+ "rev": "9fb342d14b69aefdf46187f6bb80a4a0d97007cd",
"type": "github"
},
"original": {
@@ -1515,11 +1723,11 @@
},
"unstable": {
"locked": {
- "lastModified": 1724819573,
- "narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=",
+ "lastModified": 1725634671,
+ "narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "71e91c409d1e654808b2621f28a327acfdad8dc2",
+ "rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c",
"type": "github"
},
"original": {
@@ -1536,7 +1744,7 @@
"nixpkgs": [
"nixpkgs"
],
- "systems": "systems_6"
+ "systems": "systems_8"
},
"locked": {
"lastModified": 1704466722,
@@ -1610,16 +1818,16 @@
},
"yandex-music": {
"inputs": {
- "flake-utils": "flake-utils_4",
- "nixpkgs": "nixpkgs_9",
+ "flake-utils": "flake-utils_6",
+ "nixpkgs": "nixpkgs_10",
"ymExe": "ymExe"
},
"locked": {
- "lastModified": 1725008655,
- "narHash": "sha256-M0UcnrYtlrRY1sN65UPXcgEAzcdSpKWeHn4kbLDRRaw=",
+ "lastModified": 1725496778,
+ "narHash": "sha256-c+OKyhbgpXMryc6QQH4b5cePlqyHeSfDh4kT2rU+Tpo=",
"owner": "cucumber-sp",
"repo": "yandex-music-linux",
- "rev": "8d7a26f3f3095044dd08422d9bca5607aa173103",
+ "rev": "98fed92683e2e5a49999d04b5559edd02eddf627",
"type": "github"
},
"original": {
@@ -1631,13 +1839,13 @@
"ymExe": {
"flake": false,
"locked": {
- "narHash": "sha256-GBSL5XmBPkAYGqRmO3CH6HOvt8Ltq0mU/MWoPbUneSk=",
+ "narHash": "sha256-JcdIfz+evOf0D5YlQsmOEzGVkCgcGHoEpbGzTIwkmgw=",
"type": "file",
- "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.14.0.exe"
+ "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.15.0.exe"
},
"original": {
"type": "file",
- "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.14.0.exe"
+ "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.15.0.exe"
}
},
"zsh-auto-notify": {
diff --git a/flake.nix b/flake.nix
index 57c8642..2ffa581 100644
--- a/flake.nix
+++ b/flake.nix
@@ -53,6 +53,10 @@
url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
};
+ nix-topology = {
+ url = "github:oddlama/nix-topology";
+ };
+
# MacOS configuration
darwin = {
url = "github:LnL7/nix-darwin/master";
diff --git a/home/modules/fuzzel/default.nix b/home/modules/fuzzel/default.nix
new file mode 100644
index 0000000..2d22a51
--- /dev/null
+++ b/home/modules/fuzzel/default.nix
@@ -0,0 +1,23 @@
+{ lib
+, config
+, ...
+}:
+
+with lib;
+
+let
+ cfg = config.module.fuzzel;
+in {
+ options = {
+ module.fuzzel = {
+ enable = mkEnableOption "Enable fuzzel app runner";
+ };
+ };
+
+ config = mkIf cfg.enable {
+ programs.fuzzel = {
+ enable = true;
+ };
+ };
+}
+
diff --git a/home/modules/hyprland/binds/default.nix b/home/modules/hyprland/binds/default.nix
index 345791f..bf1866d 100644
--- a/home/modules/hyprland/binds/default.nix
+++ b/home/modules/hyprland/binds/default.nix
@@ -14,8 +14,8 @@ let
brightnessControl = "${pkgs.brightnessctl}/bin/brightnessctl";
screenshotArea = "${pkgs.grimblast}/bin/grimblast --notify --freeze copy area";
screenshotScreen = "${pkgs.grimblast}/bin/grimblast --notify --freeze copy output";
- cliphist = "${pkgs.cliphist}/bin/cliphist list | rofi -dmenu | ${pkgs.cliphist}/bin/cliphist decode | ${pkgs.wl-clipboard}/bin/wl-copy";
- appLauncher = "rofi -show";
+ appLauncher = "${pkgs.fuzzel}/bin/fuzzel -T ${terminal}";
+ cliphist = "${pkgs.cliphist}/bin/cliphist list | ${appLauncher} -d | ${pkgs.cliphist}/bin/cliphist decode | ${pkgs.wl-clipboard}/bin/wl-copy";
in {
options = {
module.hyprland.binds.enable = mkEnableOption "Enables binds in Hyprland";
diff --git a/home/modules/sway/keybinds/default.nix b/home/modules/sway/keybinds/default.nix
index adfebbd..a1b27ab 100644
--- a/home/modules/sway/keybinds/default.nix
+++ b/home/modules/sway/keybinds/default.nix
@@ -26,10 +26,10 @@ let
terminal = "${pkgs.foot}/bin/foot";
screenshotArea = "${pkgs.slurp}/bin/slurp | ${pkgs.grim}/bin/grim -g - - | ${pkgs.wl-clipboard}/bin/wl-copy ";
screenshotScreen = "${pkgs.grim}/bin/grim -o $(swaymsg -t get_outputs | ${pkgs.jq}/bin/jq -r '.[] | select(.focused) | .name') - | ${pkgs.wl-clipboard}/bin/wl-copy";
- appLauncher = "${pkgs.rofi}/bin/rofi -monitor $(swaymsg -t get_outputs | ${pkgs.jq}/bin/jq '.[] | select(.focused) | .name' -r) -show";
+ appLauncher = "${pkgs.fuzzel}/bin/fuzzel -T ${terminal}";
audioControl = "${pkgs.pulseaudio}/bin/pactl";
brightnessControl = "${pkgs.brightnessctl}/bin/brightnessctl";
- clipHist = "${pkgs.cliphist}/bin/cliphist list | rofi -dmenu | ${pkgs.cliphist}/bin/cliphist decode | ${pkgs.wl-clipboard}/bin/wl-copy";
+ clipHist = "${pkgs.cliphist}/bin/cliphist list | ${appLauncher} -d | ${pkgs.cliphist}/bin/cliphist decode | ${pkgs.wl-clipboard}/bin/wl-copy";
notificationsApp = "${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw";
in {
options.module.sway.keybindings = {
diff --git a/home/modules/wofi/default.nix b/home/modules/wofi/default.nix
new file mode 100644
index 0000000..87aacf7
--- /dev/null
+++ b/home/modules/wofi/default.nix
@@ -0,0 +1,23 @@
+{ lib
+, config
+, ...
+}:
+
+with lib;
+
+let
+ cfg = config.module.wofi;
+in {
+ options = {
+ module.wofi = {
+ enable = mkEnableOption "Enable wofi app runner";
+ };
+ };
+
+ config = mkIf cfg.enable {
+ programs.wofi = {
+ enable = true;
+ };
+ };
+}
+
diff --git a/home/users/maxmur/default.nix b/home/users/maxmur/default.nix
index b569bfb..9766c77 100644
--- a/home/users/maxmur/default.nix
+++ b/home/users/maxmur/default.nix
@@ -34,7 +34,7 @@
hypridle.enable = wmEnable && isLinux && isWorkstation;
waybar.enable = wmEnable && isLinux && isWorkstation;
- rofi.enable = wmEnable && isLinux && isWorkstation;
+ fuzzel.enable = wmEnable && isLinux && isWorkstation;
swaync.enable = wmEnable && isLinux && isWorkstation;
btop.enable = true;
diff --git a/home/users/maxmur/modules/packages/default.nix b/home/users/maxmur/modules/packages/default.nix
index efb09f3..d0b8849 100644
--- a/home/users/maxmur/modules/packages/default.nix
+++ b/home/users/maxmur/modules/packages/default.nix
@@ -14,7 +14,7 @@ let
cfg = config.module.user.packages;
in {
options.module.user.packages = {
- enable = mkEnableOption "Enable maxmur packages";
+ enable = mkEnableOption "Enable user packages";
};
config = mkIf cfg.enable {
diff --git a/lib/default.nix b/lib/default.nix
index 26a98b4..26da2ad 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -12,17 +12,18 @@ let
commonModules = "${self}/modules";
# Helper function for generating host configs
- mkHost = hostname:
+ mkHost = machineDir:
{ username ? "user"
, stateVersion ? "24.05"
, platform ? "x86_64-linux"
+ , hostname ? machineDir
, isWorkstation ? false
, wm ? null
}:
let
- machineConfigurationPath = "${self}/system/machine/${hostname}";
+ machineConfigurationPath = "${self}/system/machine/${machineDir}";
machineConfigurationPathExist = builtins.pathExists machineConfigurationPath;
- machineModulesPath = "${self}/system/machine/${hostname}/modules";
+ machineModulesPath = "${self}/system/machine/${machineDir}/modules";
machineModulesPathExist = builtins.pathExists machineModulesPath;
swayEnable = wm == "sway";
@@ -37,6 +38,7 @@ let
username
stateVersion
platform
+ machineDir
isWorkstation
wm
homeModules
@@ -84,6 +86,9 @@ let
in {
forAllSystems = inputs.nixpkgs.lib.systems.flakeExposed;
+ # This function just add mkHost or mkHostDarwin before hosts attrset
+ # ex: pcbox = { username = "test"; stateVersion = "24.11"; }; ->
+ # pcbox = mkHost { username = "test"; stateVersion = "24.11"; };
genNixos = builtins.mapAttrs mkHost;
genDarwin = builtins.mapAttrs mkHostDarwin;
}
diff --git a/modules/stylix/default.nix b/modules/stylix/default.nix
index e170288..abf27e4 100644
--- a/modules/stylix/default.nix
+++ b/modules/stylix/default.nix
@@ -45,7 +45,7 @@ in {
sizes = {
applications = 11;
terminal = 11;
- popups = 11;
+ popups = 12;
desktop = 11;
};
diff --git a/overlays/nixpkgs/default.nix b/overlays/nixpkgs/default.nix
new file mode 100644
index 0000000..964ea7c
--- /dev/null
+++ b/overlays/nixpkgs/default.nix
@@ -0,0 +1,14 @@
+{ self
+, lib
+, ...
+}:
+
+let
+ overlaysPath = "${self}/overlays/nixpkgs";
+in {
+ # Read all directories from systemModules
+ imports = builtins.filter (module: lib.pathIsDirectory module) (
+ map (module: "${overlaysPath}/${module}") (builtins.attrNames (builtins.readDir overlaysPath))
+ );
+}
+
diff --git a/overlays/nixpkgs/master/default.nix b/overlays/nixpkgs/master/default.nix
new file mode 100644
index 0000000..6763c64
--- /dev/null
+++ b/overlays/nixpkgs/master/default.nix
@@ -0,0 +1,23 @@
+{ inputs
+, ...
+}:
+
+{
+ nixpkgs.overlays = [
+ # Default master
+ (final: _prev: {
+ master = import inputs.master {
+ inherit (final) system;
+ };
+ })
+
+ # Unfree master
+ (final: _prev: {
+ master-unfree = import inputs.master {
+ inherit (final) system;
+ config.allowUnfree = true;
+ };
+ })
+ ];
+}
+
diff --git a/overlays/nixpkgs/stable/default.nix b/overlays/nixpkgs/stable/default.nix
new file mode 100644
index 0000000..b98ff2c
--- /dev/null
+++ b/overlays/nixpkgs/stable/default.nix
@@ -0,0 +1,23 @@
+{ inputs
+, ...
+}:
+
+{
+ nixpkgs.overlays = [
+ # Default stable
+ (final: _prev: {
+ stable = import inputs.stable {
+ inherit (final) system;
+ };
+ })
+
+ # Unfree stable
+ (final: _prev: {
+ stable-unfree = import inputs.stable {
+ inherit (final) system;
+ config.allowUnfree = true;
+ };
+ })
+ ];
+}
+
diff --git a/overlays/nixpkgs/unstable/default.nix b/overlays/nixpkgs/unstable/default.nix
new file mode 100644
index 0000000..744e9a1
--- /dev/null
+++ b/overlays/nixpkgs/unstable/default.nix
@@ -0,0 +1,23 @@
+{ inputs
+, ...
+}:
+
+{
+ nixpkgs.overlays = [
+ # Default unstable
+ (final: _prev: {
+ unstable = import inputs.unstable {
+ inherit (final) system;
+ };
+ })
+
+ # Unfree unstable
+ (final: _prev: {
+ unstable-unfree = import inputs.unstable {
+ inherit (final) system;
+ config.allowUnfree = true;
+ };
+ })
+ ];
+}
+
diff --git a/parts/topology/default.nix b/parts/topology/default.nix
new file mode 100644
index 0000000..fbd2d18
--- /dev/null
+++ b/parts/topology/default.nix
@@ -0,0 +1,35 @@
+{ inputs
+, self
+, ...
+}:
+
+{
+ imports = [
+ inputs.nix-topology.flakeModule
+ ./timeweb
+ ./home
+ ];
+
+ perSystem = _: {
+ # For nix topology
+ topology.modules = [
+ ({ config, ... }:
+ let
+ inherit
+ (config.lib.topology)
+ mkInternet
+ mkConnection;
+ in {
+ inherit (self) nixosConfigurations;
+
+ nodes.internet = mkInternet {
+ connections = [
+ (mkConnection "mgts-bridge-router" "wan1")
+ (mkConnection "timeweb-router" "wan1")
+ ];
+ };
+ })
+ ];
+ };
+}
+
diff --git a/parts/topology/home/default.nix b/parts/topology/home/default.nix
new file mode 100644
index 0000000..3f92a1f
--- /dev/null
+++ b/parts/topology/home/default.nix
@@ -0,0 +1,140 @@
+{ self
+, ...
+}:
+
+{
+ perSystem = _: {
+ # For nix topology
+ topology.modules = [
+ ({ config, ... }:
+ let
+ inherit
+ (config.lib.topology)
+ mkRouter
+ mkSwitch
+ mkDevice
+ mkConnection;
+ in {
+ inherit (self) nixosConfigurations;
+
+ networks = {
+ mgts-bridge = {
+ name = "MGTS bridge network";
+ cidrv4 = "192.168.0.0/24";
+ };
+
+ home-maxmur = {
+ name = "Home maxmur";
+ cidrv4 = "192.168.1.0/24";
+ };
+ };
+
+ nodes = {
+ mgts-bridge-router = mkRouter "Bridge router" {
+ info = "MGTS Innbox G84";
+ image = ../images/Innbox_G84.png;
+
+ interfaceGroups = [
+ [ "eth1" ]
+ [ "wan1" ]
+ ];
+
+ interfaces = {
+ eth1 = {
+ addresses = [ "192.168.0.1" ];
+ network = "mgts-bridge";
+ };
+ };
+
+ connections = {
+ eth1 = mkConnection "main-router" "wan1";
+ };
+ };
+
+ main-router = mkRouter "Main Router" {
+ info = "Keenetic Giga";
+ image = ../images/keenetic-giga.png;
+
+ interfaceGroups = [
+ [ "eth1" "wifi" ]
+ [ "wan1" ]
+ ];
+
+ interfaces = {
+ eth1 = {
+ addresses = [ "192.168.1.1" ];
+ network = "home-maxmur";
+ };
+
+ wifi = {
+ addresses = [ "192.168.1.1" ];
+ network = "home-maxmur";
+ };
+
+ wan1 = {
+ addresses = [ "192.168.0.2" ];
+ network = "mgts-bridge";
+ };
+ };
+
+ connections = {
+ wifi = mkConnection "nbox" "wlp3s0";
+ };
+ };
+
+ switch-main = mkSwitch "Main Switch" {
+ info = "TP-Link TL-SG1016D";
+ image = ../images/TL-SG1016D.png;
+
+ interfaceGroups = [
+ [ "eth1" "eth2" "eth3" "eth4" "eth5" ]
+ ];
+
+ connections = {
+ eth1 = mkConnection "main-router" "eth1";
+ eth2 = mkConnection "pcbox" "eth0";
+ eth3 = mkConnection "rasp" "eth0";
+ eth4 = mkConnection "macbox" "eth0";
+ eth5 = mkConnection "mbox" "eth0";
+ };
+ };
+
+ macbox = mkDevice "macbox" {
+ deviceType = "device";
+ hardware.info = "Mac Mini";
+ deviceIcon = ../images/apple.png;
+
+ interfaces = {
+ eth0 = {
+ addresses = [ "192.168.1.75" ];
+ network = "home-maxmur";
+ };
+ };
+
+ interfaceGroups = [
+ [ "eth0" ]
+ ];
+ };
+
+ mbox = mkDevice "mbox" {
+ deviceType = "device";
+ hardware.info = "Mint box";
+ deviceIcon = ../images/linux-mint.png;
+
+ interfaces = {
+ eth0 = {
+ addresses = [ "192.168.1.80" ];
+ network = "home-maxmur";
+ };
+ };
+
+ interfaceGroups = [
+ [ "eth0" ]
+ ];
+ };
+ };
+ })
+ ];
+ };
+}
+
diff --git a/parts/topology/images/Innbox_G84.png b/parts/topology/images/Innbox_G84.png
new file mode 100644
index 0000000..f4da2a1
Binary files /dev/null and b/parts/topology/images/Innbox_G84.png differ
diff --git a/parts/topology/images/TL-SG1016D.png b/parts/topology/images/TL-SG1016D.png
new file mode 100644
index 0000000..f3f719b
Binary files /dev/null and b/parts/topology/images/TL-SG1016D.png differ
diff --git a/parts/topology/images/apple.png b/parts/topology/images/apple.png
new file mode 100644
index 0000000..668d25b
Binary files /dev/null and b/parts/topology/images/apple.png differ
diff --git a/parts/topology/images/keenetic-giga.png b/parts/topology/images/keenetic-giga.png
new file mode 100644
index 0000000..45e3254
Binary files /dev/null and b/parts/topology/images/keenetic-giga.png differ
diff --git a/parts/topology/images/linux-mint.png b/parts/topology/images/linux-mint.png
new file mode 100644
index 0000000..5cbec0c
Binary files /dev/null and b/parts/topology/images/linux-mint.png differ
diff --git a/parts/topology/images/services/gitlab.png b/parts/topology/images/services/gitlab.png
new file mode 100644
index 0000000..ed7687d
Binary files /dev/null and b/parts/topology/images/services/gitlab.png differ
diff --git a/parts/topology/images/timeweb.png b/parts/topology/images/timeweb.png
new file mode 100644
index 0000000..ddb0dc9
Binary files /dev/null and b/parts/topology/images/timeweb.png differ
diff --git a/parts/topology/timeweb/default.nix b/parts/topology/timeweb/default.nix
new file mode 100644
index 0000000..52bfd33
--- /dev/null
+++ b/parts/topology/timeweb/default.nix
@@ -0,0 +1,131 @@
+{ self
+, ...
+}:
+
+{
+ perSystem = _: {
+ # For nix topology
+ topology.modules = [
+ ({ config, ... }:
+ let
+ inherit
+ (config.lib.topology)
+ mkRouter
+ mkDevice
+ mkConnection;
+ in {
+ inherit (self) nixosConfigurations;
+
+ networks = {
+ timeweb-private = {
+ name = "Timeweb private";
+ cidrv4 = "10.20.0.0/16";
+ };
+
+ wireguard-private = {
+ name = "Wireguard private";
+ cidrv4 = "10.200.100.0/24";
+ };
+ };
+
+ nodes = {
+ timeweb-router = mkRouter "Timeweb router" {
+ info = "Timeweb internal router";
+ interfaceGroups = [
+ [ "eth1" ]
+ [ "wan1" ]
+ ];
+
+ interfaces = {
+ eth1 = {
+ addresses = [ "10.20.0.1" ];
+ network = "timeweb-private";
+ };
+ };
+
+ connections = {
+ eth1 = [
+ (mkConnection "site" "eth0")
+ (mkConnection "services" "eth0")
+ ];
+ };
+ };
+
+ site = mkDevice "site" {
+ deviceType = "device";
+ hardware.info = "Site hosting";
+ deviceIcon = ../images/timeweb.png;
+
+ interfaces = {
+ eth0 = {
+ addresses = [ "10.20.0.4" ];
+ network = "timeweb-private";
+ };
+
+ wg0 = {
+ addresses = [ "10.200.100.1" ];
+ network = "wireguard-private";
+ renderer.hidePhysicalConnections = false;
+ virtual = true;
+ type = "wireguard";
+ };
+ };
+
+ interfaceGroups = [
+ [ "eth0" ]
+ [ "wg0" ]
+ ];
+
+ services = {
+ nginx = {
+ name = "NGINX";
+ icon = "services.nginx";
+ details = {
+ "http" = { text = "0.0.0.0:80"; };
+ "https" = { text = "0.0.0.0:443"; };
+ };
+ };
+ };
+ };
+
+ services = mkDevice "services" {
+ deviceType = "device";
+ hardware.info = "Services hosting";
+ deviceIcon = ../images/timeweb.png;
+
+ interfaces = {
+ eth0 = {
+ addresses = [ "10.20.0.5" ];
+ network = "timeweb-private";
+ };
+ };
+
+ interfaceGroups = [
+ [ "eth0" ]
+ ];
+
+ services = {
+ nginx = {
+ name = "NGINX";
+ icon = "services.nginx";
+ details = {
+ "http" = { text = "0.0.0.0:80"; };
+ "https" = { text = "0.0.0.0:443"; };
+ };
+ };
+
+ gitlab = {
+ name = "Gitlab";
+ icon = ../images/services/gitlab.png;
+ details = {
+ "ssh" = { text = "0.0.0.0:4224"; };
+ };
+ };
+ };
+ };
+ };
+ })
+ ];
+ };
+}
+
diff --git a/system/default.nix b/system/default.nix
index fdac132..31960d9 100644
--- a/system/default.nix
+++ b/system/default.nix
@@ -1,5 +1,6 @@
{ lib
, inputs
+, self
, commonModules
, systemModules
, machineConfigurationPath
@@ -19,9 +20,11 @@
inputs.disko.nixosModules.disko
inputs.lanzaboote.nixosModules.lanzaboote
inputs.chaotic.nixosModules.default
+ inputs.nix-topology.nixosModules.default
"${commonModules}"
"${systemModules}"
+ "${self}/overlays/nixpkgs"
]
++ lib.optional machineConfigurationPathExist machineConfigurationPath
++ lib.optional machineModulesPathExist machineModulesPath;
@@ -31,6 +34,12 @@
# System version
system = { inherit stateVersion; };
# HostPlatform
- nixpkgs.hostPlatform = platform;
+ nixpkgs = {
+ overlays = [
+ inputs.nix-topology.overlays.default
+ ];
+
+ hostPlatform = platform;
+ };
}
diff --git a/system/machine/nbox/modules/hardware/network/default.nix b/system/machine/nbox/modules/hardware/network/default.nix
index 347e3f0..85bf955 100644
--- a/system/machine/nbox/modules/hardware/network/default.nix
+++ b/system/machine/nbox/modules/hardware/network/default.nix
@@ -1,6 +1,15 @@
_:
{
+ systemd.network = {
+ enable = true;
+
+ networks.wlp3s0 = {
+ matchConfig.Name = "wlp3s0";
+ address = [ "192.168.1.111/24" ];
+ };
+ };
+
networking = {
nameservers = [
"8.8.8.8"
diff --git a/system/machine/pcbox/modules/hardware/network/default.nix b/system/machine/pcbox/modules/hardware/network/default.nix
index 347e3f0..986c296 100644
--- a/system/machine/pcbox/modules/hardware/network/default.nix
+++ b/system/machine/pcbox/modules/hardware/network/default.nix
@@ -1,12 +1,17 @@
_:
{
- networking = {
- nameservers = [
- "8.8.8.8"
- "8.8.4.4"
- ];
+ systemd.network = {
+ enable = true;
+ networks.eth0 = {
+ matchConfig.Name = "eth0";
+ address = [ "192.168.1.50/24" ];
+ dns = [ "192.168.1.8" ];
+ };
+ };
+
+ networking = {
firewall = {
enable = true;
diff --git a/system/machine/rasp/default.nix b/system/machine/rasp/default.nix
index 6ae3193..65b6ff5 100644
--- a/system/machine/rasp/default.nix
+++ b/system/machine/rasp/default.nix
@@ -22,7 +22,20 @@ _:
services = {
unbound.enable = true;
- adguard-home.enable = true;
+
+ adguard-home = {
+ enable = true;
+ httpAddress = "192.168.1.8";
+
+ bindHosts = [
+ "192.168.1.8"
+ "127.0.0.1"
+ ];
+
+ dnsRewrites = [
+ { domain = "gitlab.maxmur.info"; anwser = "192.168.1.8"; }
+ ];
+ };
};
};
}
diff --git a/system/machine/rasp/modules/hardware/network/default.nix b/system/machine/rasp/modules/hardware/network/default.nix
index 86627df..410400b 100644
--- a/system/machine/rasp/modules/hardware/network/default.nix
+++ b/system/machine/rasp/modules/hardware/network/default.nix
@@ -1,6 +1,17 @@
-_:
+{ config
+, ...
+}:
{
+ systemd.network = {
+ enable = true;
+
+ networks.eth0 = {
+ matchConfig.Name = "eth0";
+ address = [ "192.168.1.8/24" ];
+ };
+ };
+
networking = {
nameservers = [
"192.168.1.8"
@@ -26,5 +37,29 @@ _:
];
};
};
+
+ topology.self = {
+ services = {
+ nginx.details = {
+ "https" = { text = "0.0.0.0:443"; };
+ "gitlab ssh" = { text = "0.0.0.0:4224"; };
+ "syncthing web" = { text = "0.0.0.0:8384"; };
+ };
+
+ adguardhome.details = {
+ "dns" = { text = "192.168.1.8:53"; };
+ };
+ };
+
+ interfaces.wg0 = {
+ addresses = [ "10.200.100.3" ];
+ renderer.hidePhysicalConnections = false;
+ virtual = true;
+ type = "wireguard";
+ physicalConnections = [
+ (config.lib.topology.mkConnection "site" "wg0")
+ ];
+ };
+ };
}
diff --git a/system/modules/services/adguard-home/default.nix b/system/modules/services/adguard-home/default.nix
index e866143..e141b20 100644
--- a/system/modules/services/adguard-home/default.nix
+++ b/system/modules/services/adguard-home/default.nix
@@ -11,13 +11,57 @@ in {
options = {
module.services.adguard-home = {
enable = mkEnableOption "Enables adguard-home";
+
+ httpAddress = mkOption {
+ type = types.str;
+ default = "0.0.0.0";
+ };
+
+ bindHosts = mkOption {
+ type = types.listOf types.str;
+ default = [ "0.0.0.0" ];
+ };
+
+ dnsRewrites = mkOption {
+ type = types.listOf types.attrs;
+ default = [ ];
+ };
};
};
config = mkIf cfg.enable {
services.adguardhome = {
enable = true;
+ port = 3000;
mutableSettings = true;
+
+ settings = {
+ auth_attempts = 3;
+ block_auth_min = 5;
+ http.address = "${cfg.httpAddress}:3000";
+ dhcp.enabled = false;
+
+ statistics = {
+ enabled = true;
+ interval = "8760h";
+ };
+
+ dns = {
+ bind_hosts = cfg.bindHosts;
+ ratelimit = 0;
+ rewrites = cfg.dnsRewrites;
+
+ upstream_dns = [
+ "tls://dns.google"
+ "tls://common.dot.dns.yandex.net"
+ ];
+
+ bootstrap_dns = [
+ "9.9.9.10"
+ "149.112.112.10"
+ ];
+ };
+ };
};
};
}