Compare commits
79 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 77b487a709 | |||
| 2b239eb162 | |||
| 8e64e88d8f | |||
| 6276d9aee0 | |||
| 9471d1a4e6 | |||
| 77d8e42ec2 | |||
| 0dafb8cd52 | |||
| 8b12656149 | |||
| d622040d30 | |||
| 2bc05c2d6d | |||
| 5fa8444112 | |||
| 8874b33a5d | |||
| 521ccdc886 | |||
| 07b648db9a | |||
| da6be4946f | |||
| bc16c72707 | |||
| 3a26403590 | |||
| 5681a65c6f | |||
| 175087e9fd | |||
| 0b82ffa913 | |||
| 5d216dd56f | |||
| 48ea7cb6ea | |||
| 0f79022907 | |||
| c15ac6fca5 | |||
| e9ae808a7d | |||
| 8e085211f7 | |||
| 47c4f3143e | |||
| f1e914b927 | |||
| 210a3101de | |||
| 06f1f990f0 | |||
| 781e70287d | |||
| c030b045a2 | |||
| 6a29794575 | |||
| da9ad2523c | |||
| 052082d631 | |||
| 1aab77c302 | |||
| f146eaf0a5 | |||
| 0aabd4f527 | |||
| a22582502b | |||
| 0c7c791f19 | |||
| 87a1ebba2c | |||
| bc04896b63 | |||
| 1d823afe58 | |||
| 898f9f9320 | |||
| a89a98d233 | |||
| 1923c096aa | |||
| 1e72ccb391 | |||
| cbcc9e74c0 | |||
| 83e366a2b8 | |||
| 85333e6a3e | |||
| 6af195a3fd | |||
| 85497d5777 | |||
| 753e264c89 | |||
| 10a5a2265c | |||
| 29a09c53a6 | |||
| c608c2f856 | |||
| 86b7d4bda5 | |||
| e573bfd98a | |||
| 94901da15e | |||
| ecbd5e00a6 | |||
| d5b70b050c | |||
| 79eeb2a491 | |||
| f5930ae9e6 | |||
| aa3db27c77 | |||
| 44210e6bbb | |||
| 984d587d00 | |||
| 79be24d581 | |||
| 1518cd7db6 | |||
| ac7117c13d | |||
| 38d13f2fa7 | |||
| 8b1ae80c54 | |||
| 1f867808d2 | |||
| d8b20caf22 | |||
| fc2da628e8 | |||
| d4826d803e | |||
| a123682c93 | |||
| b3c8ee76e9 | |||
| 1d5a528cd1 | |||
| 891e80a3a9 |
Generated
+595
-36
@@ -1,5 +1,58 @@
|
||||
{
|
||||
"nodes": {
|
||||
"arion": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
"haskell-flake": "haskell-flake",
|
||||
"nixpkgs": [
|
||||
"frappix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733918465,
|
||||
"narHash": "sha256-hSuGa8Hh67EHr2x812Ay6WFyFT2BGKn+zk+FJWeKXPg=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "arion",
|
||||
"rev": "f01c95c10f9d4f04bb08d97b3233b530b180f12e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "arion",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"blank": {
|
||||
"locked": {
|
||||
"lastModified": 1625557891,
|
||||
"narHash": "sha256-O8/MWsPBGhhyPoPLHZAuoZiiHo9q6FLlEeIDEXuj6T4=",
|
||||
"owner": "divnix",
|
||||
"repo": "blank",
|
||||
"rev": "5a5d2684073d9f563072ed07c871d577a6c614a8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "divnix",
|
||||
"repo": "blank",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"call-flake": {
|
||||
"locked": {
|
||||
"lastModified": 1687380775,
|
||||
"narHash": "sha256-bmhE1TmrJG4ba93l9WQTLuYM53kwGQAjYHRvHOeuxWU=",
|
||||
"owner": "divnix",
|
||||
"repo": "call-flake",
|
||||
"rev": "74061f6c241227cd05e79b702db9a300a2e4131a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "divnix",
|
||||
"repo": "call-flake",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"clan-core": {
|
||||
"inputs": {
|
||||
"data-mesher": "data-mesher",
|
||||
@@ -19,11 +72,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772411144,
|
||||
"narHash": "sha256-WhXudztwPNnKXaqGX4DOqNfHzHdBSiGCvKGHM20pscw=",
|
||||
"lastModified": 1781517972,
|
||||
"narHash": "sha256-G8bIXFqifs/y62GNPwg20Ksf71raYwzmyN99gf1tXak=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "92cc85bc24eb31ce5725e1e72753129810ce3fe9",
|
||||
"revCount": 13201,
|
||||
"rev": "7fc62d0c25c7a97d7027a9c248e21c97c9b3acc1",
|
||||
"revCount": 14604,
|
||||
"type": "git",
|
||||
"url": "https://git.clan.lol/clan/clan-core"
|
||||
},
|
||||
@@ -48,11 +101,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772273147,
|
||||
"narHash": "sha256-Wzhoc6ifjTDZi8aVRH3fuLJPdd4ouNTTwwVhgoMcMek=",
|
||||
"rev": "d5de7a8d9e5726e678c94e62fe8ac3a809fee5da",
|
||||
"lastModified": 1778718524,
|
||||
"narHash": "sha256-pXLoI6Ax0EnUK6r34UM1vibVC7CfTu6j72R2692ZzPs=",
|
||||
"rev": "12c552ad547d87254f33f33bddd1a2cdbeac754d",
|
||||
"type": "tarball",
|
||||
"url": "https://git.clan.lol/api/v1/repos/clan/data-mesher/archive/d5de7a8d9e5726e678c94e62fe8ac3a809fee5da.tar.gz"
|
||||
"url": "https://git.clan.lol/api/v1/repos/clan/data-mesher/archive/12c552ad547d87254f33f33bddd1a2cdbeac754d.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
@@ -87,11 +140,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1771881364,
|
||||
"narHash": "sha256-A5uE/hMium5of/QGC6JwF5TGoDAfpNtW00T0s9u/PN8=",
|
||||
"lastModified": 1781152676,
|
||||
"narHash": "sha256-RxWs5ND31KzTG7wvMM+PMfUjyNpmIEr999lqNARaM5o=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "a4cb7bf73f264d40560ba527f9280469f1f081c6",
|
||||
"rev": "ff8702b4de27f72b4c78573dfb89ec74e36abdf1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -100,6 +153,39 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"dmerge": {
|
||||
"inputs": {
|
||||
"haumea": [
|
||||
"frappix",
|
||||
"std",
|
||||
"haumea"
|
||||
],
|
||||
"nixlib": [
|
||||
"frappix",
|
||||
"std",
|
||||
"lib"
|
||||
],
|
||||
"yants": [
|
||||
"frappix",
|
||||
"std",
|
||||
"yants"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1686862774,
|
||||
"narHash": "sha256-ojGtRQ9pIOUrxsQEuEPerUkqIJEuod9hIflfNkY+9CE=",
|
||||
"owner": "divnix",
|
||||
"repo": "dmerge",
|
||||
"rev": "9f7f7a8349d33d7bd02e0f2b484b1f076e503a96",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "divnix",
|
||||
"ref": "0.2.1",
|
||||
"repo": "dmerge",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
@@ -120,6 +206,146 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"frappix",
|
||||
"arion",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733312601,
|
||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"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_3": {
|
||||
"locked": {
|
||||
"lastModified": 1653893745,
|
||||
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"frappix": {
|
||||
"inputs": {
|
||||
"arion": "arion",
|
||||
"devshell": [
|
||||
"devshell"
|
||||
],
|
||||
"microvm": "microvm",
|
||||
"n2c": "n2c",
|
||||
"nixago": "nixago",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"std": "std"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1780907315,
|
||||
"narHash": "sha256-MR859lKVKeItsC5wnd1oniBar2lBTA+FJ7Bx4xN1Wpk=",
|
||||
"owner": "kurogeek",
|
||||
"repo": "frappix",
|
||||
"rev": "9c2bc4152bce6d91305bcf0563a8a715860c405d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "kurogeek",
|
||||
"repo": "frappix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"haskell-flake": {
|
||||
"locked": {
|
||||
"lastModified": 1675296942,
|
||||
"narHash": "sha256-u1X1sblozi5qYEcLp1hxcyo8FfDHnRUVX3dJ/tW19jY=",
|
||||
"owner": "srid",
|
||||
"repo": "haskell-flake",
|
||||
"rev": "c2cafce9d57bfca41794dc3b99c593155006c71e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "srid",
|
||||
"ref": "0.1.0",
|
||||
"repo": "haskell-flake",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"haumea": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"frappix",
|
||||
"std",
|
||||
"lib"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1685133229,
|
||||
"narHash": "sha256-FePm/Gi9PBSNwiDFq3N+DWdfxFq0UKsVVTJS3cQPn94=",
|
||||
"owner": "nix-community",
|
||||
"repo": "haumea",
|
||||
"rev": "34dd58385092a23018748b50f9b23de6266dffc2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "v0.2.2",
|
||||
"repo": "haumea",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -127,11 +353,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1768068402,
|
||||
"narHash": "sha256-bAXnnJZKJiF7Xr6eNW6+PhBf1lg2P1aFUO9+xgWkXfA=",
|
||||
"lastModified": 1781557312,
|
||||
"narHash": "sha256-QOIRYSUFSq7L5mY3dZymaVhcnne3tPgoR9riB0WocjA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "8bc5473b6bc2b6e1529a9c4040411e1199c43b4c",
|
||||
"rev": "c03e4752899e55705dfa63979abd885c582a5c48",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -155,22 +381,99 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"incl": {
|
||||
"inputs": {
|
||||
"nixlib": [
|
||||
"frappix",
|
||||
"std",
|
||||
"lib"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1693483555,
|
||||
"narHash": "sha256-Beq4WhSeH3jRTZgC1XopTSU10yLpK1nmMcnGoXO0XYo=",
|
||||
"owner": "divnix",
|
||||
"repo": "incl",
|
||||
"rev": "526751ad3d1e23b07944b14e3f6b7a5948d3007b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "divnix",
|
||||
"repo": "incl",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lib": {
|
||||
"locked": {
|
||||
"lastModified": 1722128034,
|
||||
"narHash": "sha256-L8rwzYPsLo/TYtydPJoQyYOfetuiyQYnTWYcyB8UE/s=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "d15f6f6021693898fcd2c6a9bb13707383da9bbc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"liminix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1760426231,
|
||||
"narHash": "sha256-r8c5PKtsxAvtQ/k17GH+WNvP47Lr+AbExLMPdLtvAKE=",
|
||||
"ref": "refs/heads/fix-gl-ar750",
|
||||
"rev": "3f1f7c08d440130cce9262a93ce78ed7969d93cd",
|
||||
"revCount": 1574,
|
||||
"lastModified": 1777223456,
|
||||
"narHash": "sha256-yqZ9OFSXoKgdT6nWwt2d0OFwmfQXASl73hhjtvAD11A=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "5f2abc0d2b30eb5878d60488a72138958c228976",
|
||||
"revCount": 1672,
|
||||
"type": "git",
|
||||
"url": "https://git.b4l.co.th/newedge/liminix"
|
||||
"url": "https://gti.telent.net/dan/liminix"
|
||||
},
|
||||
"original": {
|
||||
"ref": "refs/heads/fix-gl-ar750",
|
||||
"rev": "3f1f7c08d440130cce9262a93ce78ed7969d93cd",
|
||||
"type": "git",
|
||||
"url": "https://git.b4l.co.th/newedge/liminix"
|
||||
"url": "https://gti.telent.net/dan/liminix"
|
||||
}
|
||||
},
|
||||
"microvm": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"frappix",
|
||||
"nixpkgs"
|
||||
],
|
||||
"spectrum": "spectrum"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737981104,
|
||||
"narHash": "sha256-7AGmPPBgLHHWgzzFYDJcyhv/NiuCrpgzg8IyA7Q/H9o=",
|
||||
"owner": "astro",
|
||||
"repo": "microvm.nix",
|
||||
"rev": "3768f4937f38334898c67e03f40e244a57a74caa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "astro",
|
||||
"repo": "microvm.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"n2c": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730479402,
|
||||
"narHash": "sha256-79NLeNjpCa4mSasmFsE3QA6obURezF0TUO5Pm+1daog=",
|
||||
"owner": "nlewo",
|
||||
"repo": "nix2container",
|
||||
"rev": "5fb215a1564baa74ce04ad7f903d94ad6617e17a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nlewo",
|
||||
"repo": "nix2container",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
@@ -181,11 +484,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772379624,
|
||||
"narHash": "sha256-NG9LLTWlz4YiaTAiRGChbrzbVxBfX+Auq4Ab/SWmk4A=",
|
||||
"lastModified": 1781242433,
|
||||
"narHash": "sha256-bchLZZ3sRn740zyvD2icZSnNoTaanN0nw7l6fjVXO+E=",
|
||||
"owner": "nix-darwin",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "52d061516108769656a8bd9c6e811c677ec5b462",
|
||||
"rev": "aabb2037edfc0f210723b72cd5f528aab5dd3f0b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -207,13 +510,53 @@
|
||||
"url": "https://git.clan.lol/clan/nix-select/archive/main.tar.gz"
|
||||
}
|
||||
},
|
||||
"nixago": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixago-exts": [
|
||||
"frappix"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"frappix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1746801636,
|
||||
"narHash": "sha256-dlcKfIXp/eqFHzFm+DzseXAWWlpVwyk9cTvCKGtVKkw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixago",
|
||||
"rev": "8cc33f973ab3a891d8a41391e73ef451a783960b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixago",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1772173633,
|
||||
"narHash": "sha256-MOH58F4AIbCkh6qlQcwMycyk5SWvsqnS/TCfnqDlpj4=",
|
||||
"lastModified": 1712920918,
|
||||
"narHash": "sha256-1yxFvUcJfUphK9V91KufIQom7gCsztza0H4Rz2VCWUU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "92323443a56f4e9fc4e4b712e3119f66d0969297",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1781359544,
|
||||
"narHash": "sha256-iUuzKQcyXvopYDDzFpMK5eQKP3WIJExYny2kJtbgUcE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c0f3d81a7ddbc2b1332be0d8481a672b4f6004d6",
|
||||
"rev": "9f11f828c213641c2369a9f1fa31fe31557e3156",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -223,15 +566,102 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nosys": {
|
||||
"locked": {
|
||||
"lastModified": 1668010795,
|
||||
"narHash": "sha256-JBDVBnos8g0toU7EhIIqQ1If5m/nyBqtHhL3sicdPwI=",
|
||||
"owner": "divnix",
|
||||
"repo": "nosys",
|
||||
"rev": "feade0141487801c71ff55623b421ed535dbdefa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "divnix",
|
||||
"repo": "nosys",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"paisano": {
|
||||
"inputs": {
|
||||
"call-flake": "call-flake",
|
||||
"nixpkgs": [
|
||||
"frappix",
|
||||
"std",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nosys": "nosys",
|
||||
"yants": [
|
||||
"frappix",
|
||||
"std",
|
||||
"yants"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1708640854,
|
||||
"narHash": "sha256-EpcAmvIS4ErqhXtVEfd2GPpU/E/s8CCRSfYzk6FZ/fY=",
|
||||
"owner": "paisano-nix",
|
||||
"repo": "core",
|
||||
"rev": "adcf742bc9463c08764ca9e6955bd5e7dcf3a3fe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "paisano-nix",
|
||||
"ref": "0.2.0",
|
||||
"repo": "core",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"paisano-tui": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1708637035,
|
||||
"narHash": "sha256-R19YURSK+MY/Rw6FZnojQS9zuDh+OoTAyngQAjjoubc=",
|
||||
"owner": "paisano-nix",
|
||||
"repo": "tui",
|
||||
"rev": "231761b260587a64817e4ffae3afc15defaa15db",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "paisano-nix",
|
||||
"ref": "v0.5.0",
|
||||
"repo": "tui",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plasma-manager": {
|
||||
"inputs": {
|
||||
"home-manager": [
|
||||
"home-manager"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772361940,
|
||||
"narHash": "sha256-B1Cz+ydL1iaOnGlwOFld/C8lBECPtzhiy/pP93/CuyY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "plasma-manager",
|
||||
"rev": "a4b33606111c9c5dcd10009042bb710307174f51",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "plasma-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"clan-core": "clan-core",
|
||||
"devshell": "devshell",
|
||||
"flake-parts": "flake-parts",
|
||||
"frappix": "frappix",
|
||||
"home-manager": "home-manager",
|
||||
"import-tree": "import-tree",
|
||||
"liminix": "liminix",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"plasma-manager": "plasma-manager",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
}
|
||||
},
|
||||
@@ -243,11 +673,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772340640,
|
||||
"narHash": "sha256-1nq7+Kt5IUBD8Hu3nptVPbMf+22rNJoHT0t9L1X+GKA=",
|
||||
"lastModified": 1780547341,
|
||||
"narHash": "sha256-Gq8KNx5A7hBB3uGJaj6eQfLDIz5YdLu92gqBcvHvoUo=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "dec4d8eac700dcd2fe3c020857d3ee220ec147f1",
|
||||
"rev": "9ed65852b6257fbeae4355bc24ecfea307ca759a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -256,7 +686,114 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"spectrum": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1733308308,
|
||||
"narHash": "sha256-+RcbMAjSxV1wW5UpS9abIG1lFZC8bITPiFIKNnE7RLs=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "80c9e9830d460c944c8f730065f18bb733bc7ee2",
|
||||
"revCount": 792,
|
||||
"type": "git",
|
||||
"url": "https://spectrum-os.org/git/spectrum"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://spectrum-os.org/git/spectrum"
|
||||
}
|
||||
},
|
||||
"std": {
|
||||
"inputs": {
|
||||
"arion": [
|
||||
"frappix",
|
||||
"arion"
|
||||
],
|
||||
"blank": "blank",
|
||||
"devshell": [
|
||||
"frappix",
|
||||
"devshell"
|
||||
],
|
||||
"dmerge": "dmerge",
|
||||
"haumea": "haumea",
|
||||
"incl": "incl",
|
||||
"lib": "lib",
|
||||
"makes": [
|
||||
"frappix",
|
||||
"std",
|
||||
"blank"
|
||||
],
|
||||
"microvm": [
|
||||
"frappix",
|
||||
"microvm"
|
||||
],
|
||||
"n2c": [
|
||||
"frappix",
|
||||
"n2c"
|
||||
],
|
||||
"nixago": [
|
||||
"frappix",
|
||||
"nixago"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"frappix",
|
||||
"nixpkgs"
|
||||
],
|
||||
"paisano": "paisano",
|
||||
"paisano-tui": "paisano-tui",
|
||||
"terranix": [
|
||||
"frappix",
|
||||
"std",
|
||||
"blank"
|
||||
],
|
||||
"yants": "yants"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1738072995,
|
||||
"narHash": "sha256-jfwWnAVeQzIBS5Pex0xSUbGk88g1GFF2w+ohOtbRtcY=",
|
||||
"owner": "divnix",
|
||||
"repo": "std",
|
||||
"rev": "2874513c4b76be4c4200779814993b546fe4a909",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "divnix",
|
||||
"ref": "v0.33.4",
|
||||
"repo": "std",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1774449309,
|
||||
"narHash": "sha256-brhZ8DmuGtzkCYHJg4HEd602amKm89Y9ytsFZ5uWD1w=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "c29398b59d2048c4ab79345812849c9bd15e9150",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"ref": "future-26.11",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
@@ -278,11 +815,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1768158989,
|
||||
"narHash": "sha256-67vyT1+xClLldnumAzCTBvU0jLZ1YBcf4vANRWP3+Ak=",
|
||||
"lastModified": 1775636079,
|
||||
"narHash": "sha256-pc20NRoMdiar8oPQceQT47UUZMBTiMdUuWrYu2obUP0=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "e96d59dff5c0d7fddb9d113ba108f03c3ef99eca",
|
||||
"rev": "790751ff7fd3801feeaf96d7dc416a8d581265ba",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -290,6 +827,28 @@
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"yants": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"frappix",
|
||||
"std",
|
||||
"lib"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1686863218,
|
||||
"narHash": "sha256-kooxYm3/3ornWtVBNHM3Zh020gACUyFX2G0VQXnB+mk=",
|
||||
"owner": "divnix",
|
||||
"repo": "yants",
|
||||
"rev": "8f0da0dba57149676aa4817ec0c880fbde7a648d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "divnix",
|
||||
"repo": "yants",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
||||
@@ -19,6 +19,11 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
url = "github:nix-community/home-manager";
|
||||
};
|
||||
plasma-manager = {
|
||||
url = "github:nix-community/plasma-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.home-manager.follows = "home-manager";
|
||||
};
|
||||
import-tree.url = "github:vic/import-tree";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
treefmt-nix = {
|
||||
@@ -26,9 +31,14 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
liminix = {
|
||||
url = "git+https://git.b4l.co.th/newedge/liminix?ref=refs/heads/fix-gl-ar750&rev=3f1f7c08d440130cce9262a93ce78ed7969d93cd";
|
||||
url = "git+https://gti.telent.net/dan/liminix";
|
||||
flake = false;
|
||||
};
|
||||
frappix = {
|
||||
url = "github:kurogeek/frappix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.devshell.follows = "devshell";
|
||||
};
|
||||
};
|
||||
outputs =
|
||||
{
|
||||
@@ -45,6 +55,7 @@
|
||||
./fmt.nix
|
||||
./shell.nix
|
||||
|
||||
./overlays
|
||||
./machines
|
||||
./routers
|
||||
./inventories
|
||||
|
||||
+105
-74
@@ -1,5 +1,8 @@
|
||||
{
|
||||
imports = [ ./personal-computer.nix ];
|
||||
imports = [
|
||||
./personal-computer.nix
|
||||
./emmie.nix
|
||||
];
|
||||
clan = {
|
||||
inventory = {
|
||||
|
||||
@@ -7,6 +10,11 @@
|
||||
glom = [
|
||||
"vega"
|
||||
"ramus"
|
||||
"canopus"
|
||||
];
|
||||
poy = [
|
||||
"deneb"
|
||||
"bosona"
|
||||
];
|
||||
w = [ "sirius" ];
|
||||
b4l = [
|
||||
@@ -14,6 +22,7 @@
|
||||
"neptune"
|
||||
"rana"
|
||||
"petra"
|
||||
"alasia"
|
||||
];
|
||||
phonebox = [
|
||||
"neptune"
|
||||
@@ -27,29 +36,42 @@
|
||||
global-network = [
|
||||
"rana"
|
||||
"sirius"
|
||||
"hadar"
|
||||
"procyon"
|
||||
"alasia"
|
||||
];
|
||||
};
|
||||
|
||||
instances = {
|
||||
admin = {
|
||||
|
||||
sshd = {
|
||||
roles.server.tags."all" = { };
|
||||
roles.server.settings = {
|
||||
authorizedKeys = {
|
||||
"berwn" = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAB/raxJR8gASmquP63weHelbi+da2WBJR1DgzHPNz/f";
|
||||
"davhau" = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDuhpzDHBPvn8nv8RH1MRomDOaXyP4GziQm7r3MZ1Syk";
|
||||
"vi" =
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAmgyEGuY/r7SDlJgrzYmQqpcWS5W+fCzRi3OS59ne4W openpgp:0xFF687387";
|
||||
"kurogeek" =
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEcZ/p1Ofa9liwIzPWzNtONhJ7+FUWd2lCz33r81t8+w kurogeek@kurogeek";
|
||||
"matthewcroughan" =
|
||||
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIOJDRQfb1+7VK5tOe8W40iryfBWYRO6Uf1r2viDjmsJtAAAABHNzaDo=";
|
||||
"matthewcroughan-1" =
|
||||
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIDgsWq+G/tcr6eUQYT7+sJeBtRmOMabgFiIgIV44XNc6AAAABHNzaDo=";
|
||||
"matthewcroughan-2" =
|
||||
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIJMi3TAuwDtIeO4MsORlBZ31HzaV5bji1fFBPcC9/tWuAAAABHNzaDo=";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
root-password = {
|
||||
module = {
|
||||
name = "admin";
|
||||
name = "users";
|
||||
input = "clan-core";
|
||||
};
|
||||
roles.default.tags."all" = { };
|
||||
roles.default.settings.allowedKeys = {
|
||||
"berwn" = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAB/raxJR8gASmquP63weHelbi+da2WBJR1DgzHPNz/f";
|
||||
"davhau" = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDuhpzDHBPvn8nv8RH1MRomDOaXyP4GziQm7r3MZ1Syk";
|
||||
"vi" =
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAmgyEGuY/r7SDlJgrzYmQqpcWS5W+fCzRi3OS59ne4W openpgp:0xFF687387";
|
||||
"kurogeek" =
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEcZ/p1Ofa9liwIzPWzNtONhJ7+FUWd2lCz33r81t8+w kurogeek@kurogeek";
|
||||
"matthewcroughan" =
|
||||
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIOJDRQfb1+7VK5tOe8W40iryfBWYRO6Uf1r2viDjmsJtAAAABHNzaDo=";
|
||||
"matthewcroughan-1" =
|
||||
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIDgsWq+G/tcr6eUQYT7+sJeBtRmOMabgFiIgIV44XNc6AAAABHNzaDo=";
|
||||
"matthewcroughan-2" =
|
||||
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIJMi3TAuwDtIeO4MsORlBZ31HzaV5bji1fFBPcC9/tWuAAAABHNzaDo=";
|
||||
roles.default.settings = {
|
||||
user = "root";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -80,7 +102,13 @@
|
||||
name = "zerotier";
|
||||
input = "clan-core";
|
||||
};
|
||||
roles.controller.machines."vega" = { };
|
||||
roles.controller.machines."vega" = {
|
||||
settings.allowedIds = [
|
||||
"dbe44c0287" # Alex-gateway
|
||||
"b0e0b84fd3" # Alex
|
||||
"2bd36db8cc" # kurogeek-thinkpad
|
||||
];
|
||||
};
|
||||
roles.peer.tags.glom = { };
|
||||
};
|
||||
|
||||
@@ -89,10 +117,30 @@
|
||||
name = "zerotier";
|
||||
input = "clan-core";
|
||||
};
|
||||
roles.controller.machines."rigel" = { };
|
||||
roles.controller.machines."rigel" = {
|
||||
settings.allowedIds = [
|
||||
"dbe44c0287" # Alex-gateway
|
||||
"b0e0b84fd3" # Alex
|
||||
"2bd36db8cc" # kurogeek-thinkpad
|
||||
];
|
||||
};
|
||||
roles.peer.tags.b4l = { };
|
||||
};
|
||||
|
||||
poy-network = {
|
||||
module = {
|
||||
name = "zerotier";
|
||||
input = "clan-core";
|
||||
};
|
||||
roles.controller.machines."deneb" = {
|
||||
settings.allowedIps = [
|
||||
#kurogeek
|
||||
"fdfe:7bf:a795:4524:4c99:932b:d36d:b8cc"
|
||||
];
|
||||
};
|
||||
roles.peer.tags."poy" = { };
|
||||
};
|
||||
|
||||
yggdrasil-global-network = {
|
||||
module = {
|
||||
name = "yggdrasil";
|
||||
@@ -107,6 +155,23 @@
|
||||
];
|
||||
};
|
||||
|
||||
newedge-headscale = {
|
||||
module = {
|
||||
name = "headscale";
|
||||
input = "self";
|
||||
};
|
||||
roles.server.machines."alasia".settings = {
|
||||
public_url = "tailvpn.public.newedge.house";
|
||||
base_domain = "tailnet.newedge.house";
|
||||
advertise_routes = [ "10.0.10.0/24" ];
|
||||
nameservers = [
|
||||
"10.0.10.82"
|
||||
"1.1.1.1"
|
||||
"8.8.8.8"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
yggdrasil-phone-network = {
|
||||
module = {
|
||||
name = "yggdrasil";
|
||||
@@ -132,62 +197,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
pocket-id = {
|
||||
module = {
|
||||
name = "pocket-id";
|
||||
input = "self";
|
||||
};
|
||||
roles.default.machines.b4l = { };
|
||||
};
|
||||
nextcloud = {
|
||||
module = {
|
||||
name = "nextcloud";
|
||||
input = "self";
|
||||
};
|
||||
roles.default.machines.b4l = { };
|
||||
};
|
||||
stirling-pdf = {
|
||||
module = {
|
||||
name = "stirling-pdf";
|
||||
input = "self";
|
||||
};
|
||||
roles.default.machines.b4l = { };
|
||||
};
|
||||
actual-budget = {
|
||||
module = {
|
||||
name = "actual-budget";
|
||||
input = "self";
|
||||
};
|
||||
roles.default.machines.b4l = { };
|
||||
};
|
||||
victoriametrics = {
|
||||
module = {
|
||||
name = "victoriametrics";
|
||||
input = "self";
|
||||
};
|
||||
roles.default.machines.b4l = { };
|
||||
};
|
||||
vikunja = {
|
||||
module = {
|
||||
name = "vikunja";
|
||||
input = "self";
|
||||
};
|
||||
roles.default.machines.b4l = { };
|
||||
};
|
||||
grafana = {
|
||||
module = {
|
||||
name = "grafana";
|
||||
input = "self";
|
||||
};
|
||||
roles.default.machines.b4l = { };
|
||||
};
|
||||
paperless = {
|
||||
module = {
|
||||
name = "paperless";
|
||||
input = "self";
|
||||
};
|
||||
roles.default.machines.b4l = { };
|
||||
};
|
||||
pulse-stream = {
|
||||
module = {
|
||||
name = "pulse-stream";
|
||||
@@ -280,6 +289,28 @@
|
||||
dataDir = "/mnt/hdd/samba";
|
||||
};
|
||||
};
|
||||
|
||||
wordpress = {
|
||||
module = {
|
||||
name = "wordpress";
|
||||
input = "self";
|
||||
};
|
||||
roles.server.machines."tangra".settings = {
|
||||
tenants = [
|
||||
"poyfestival.com"
|
||||
];
|
||||
phpfpmOptions = ''
|
||||
upload_max_filesize=64M
|
||||
post_max_size=128M
|
||||
'';
|
||||
wpExtraConfig = ''
|
||||
define('WP_MEMORY_LIMIT', '256M');
|
||||
define('WP_DEBUG', false);
|
||||
define('WP_DEBUG_DISPLAY', false);
|
||||
define('WP_DEBUG_LOG', false);
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
username = "emmie";
|
||||
userhome = "/home/${username}";
|
||||
in
|
||||
{
|
||||
clan.inventory = {
|
||||
tags = {
|
||||
emmie = [ "rana" ];
|
||||
};
|
||||
|
||||
instances = {
|
||||
emmie-syncthing = {
|
||||
module = {
|
||||
name = "syncthing";
|
||||
input = "clan-core";
|
||||
};
|
||||
roles.peer.tags.emmie = { };
|
||||
roles.peer.settings = {
|
||||
folders = {
|
||||
Syncthing.path = "${userhome}/Share/Syncthing";
|
||||
Desktop.path = "${userhome}/Desktop";
|
||||
};
|
||||
extraDevices = {
|
||||
pixel7a = {
|
||||
id = "CEUJMEG-SOHXIJF-G2FT5QB-6MZW3EN-PONI3QN-HPEIOSU-IMSLGW7-XUU6BQK";
|
||||
name = "eris";
|
||||
addresses = [ "dynamic" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
roles.peer.extraModules = [
|
||||
{
|
||||
config.services.syncthing = {
|
||||
user = username;
|
||||
dataDir = "${userhome}/Share";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -14,14 +14,9 @@
|
||||
instances = {
|
||||
emmie-home = {
|
||||
module = {
|
||||
name = "home-user";
|
||||
name = "emmie-home";
|
||||
input = "self";
|
||||
};
|
||||
roles.default.settings = {
|
||||
username = "emmie";
|
||||
kbLayout = "us,th";
|
||||
kbOptions = "grp:win_space_toggle,grp:alt_shift_toggle";
|
||||
};
|
||||
roles.default.machines."rana" = { };
|
||||
};
|
||||
chocolate-home = {
|
||||
|
||||
+22
-1
@@ -22,13 +22,34 @@
|
||||
"installedAt": 1765343708
|
||||
},
|
||||
"rana": {
|
||||
"installedAt": 1768294839
|
||||
"installedAt": 1773134236
|
||||
},
|
||||
"petra": {
|
||||
"installedAt": 1769064458
|
||||
},
|
||||
"sirius": {
|
||||
"installedAt": 1770974584
|
||||
},
|
||||
"deneb": {
|
||||
"installedAt": 1775718970
|
||||
},
|
||||
"canopus": {
|
||||
"installedAt": 1775793532
|
||||
},
|
||||
"hadar": {
|
||||
"installedAt": 1774427255
|
||||
},
|
||||
"procyon": {
|
||||
"installedAt": 1775458442
|
||||
},
|
||||
"alasia": {
|
||||
"installedAt": 1778661666
|
||||
},
|
||||
"bosona": {
|
||||
"installedAt": 1779098893
|
||||
},
|
||||
"tangra": {
|
||||
"installedAt": 1779958921
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@
|
||||
# clan.core.networking.targetHost = "root@";
|
||||
|
||||
clan.core.settings.name = "adhil";
|
||||
# clan.meta.description = "Raspberry Pi 4 SBC board for one of w phone network. (With w office)";
|
||||
clan.core.settings.machine.description =
|
||||
"Raspberry Pi 4 SBC board for one of w phone network. (With w office)";
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
clan.core.settings.machine.description = "VM machine to host headplane instance";
|
||||
|
||||
nixpkgs.hostPlatform = {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
clan.core.sops.defaultGroups = [ "admins" ];
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
let
|
||||
hashDisk = disk: "os-${builtins.substring 0 5 (builtins.hashString "sha256" disk)}";
|
||||
os = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0";
|
||||
in
|
||||
{
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
|
||||
boot.zfs.forceImportRoot = false;
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"os-${hashDisk os}" = {
|
||||
type = "disk";
|
||||
device = os;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "nofail" ];
|
||||
};
|
||||
};
|
||||
system = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "zroot";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
zpool = {
|
||||
zroot = {
|
||||
type = "zpool";
|
||||
rootFsOptions = {
|
||||
mountpoint = "none";
|
||||
compression = "lz4";
|
||||
acltype = "posixacl";
|
||||
xattr = "sa";
|
||||
"com.sun:auto-snapshot" = "true";
|
||||
};
|
||||
options.ashift = "12";
|
||||
datasets = {
|
||||
"root" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "none";
|
||||
};
|
||||
"root/nixos" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "/";
|
||||
mountpoint = "/";
|
||||
};
|
||||
"root/home" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "/home";
|
||||
mountpoint = "/home";
|
||||
};
|
||||
"root/tmp" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/tmp";
|
||||
options = {
|
||||
mountpoint = "/tmp";
|
||||
sync = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,6 @@
|
||||
# clan.core.networking.targetHost = "root@";
|
||||
|
||||
clan.core.settings.name = "almach";
|
||||
# clan.meta.description = "Radxa X4 SBC board for one of w phone network.";
|
||||
clan.core.settings.machine.description = "Radxa X4 SBC board for one of w phone network.";
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
boot.zfs.forceImportRoot = true;
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"os-${hashDisk os}" = {
|
||||
|
||||
@@ -8,6 +8,6 @@
|
||||
# clan.core.networking.targetHost = "root@";
|
||||
|
||||
clan.core.settings.name = "alpheratz";
|
||||
# clan.meta.description = "Radxa X4 SBC board for one of w phone network.";
|
||||
clan.core.settings.machine.description = "Radxa X4 SBC board for one of w phone network.";
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
boot.zfs.forceImportRoot = true;
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"os-${hashDisk os}" = {
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
abDomain = "${config.clan.core.vars.generators.b4l-actual-budget.files.subdomain.value}.${config.networking.fqdn}";
|
||||
in
|
||||
{
|
||||
clan.core.vars.generators.b4l-actual-budget = {
|
||||
files.subdomain.secret = false;
|
||||
|
||||
prompts = {
|
||||
subdomain = {
|
||||
persist = true;
|
||||
type = "line";
|
||||
description = "Sub-domain for Actual Budget app. Default:(budget)";
|
||||
};
|
||||
};
|
||||
|
||||
script = ''cat $prompts/subdomain || echo -n "budget" > $out/subdomain'';
|
||||
};
|
||||
|
||||
services.actual = {
|
||||
settings = {
|
||||
allowedLoginMethods = [
|
||||
"password"
|
||||
"openid"
|
||||
];
|
||||
trustedProxies = [ "127.0.0.1" ];
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."${abDomain}" = {
|
||||
useACMEHost = "${config.networking.fqdn}";
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${builtins.toString config.services.actual.settings.port}";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
serviceName = "${config.networking.hostName}-grafana";
|
||||
gfDomain = "${
|
||||
config.clan.core.vars.generators."${serviceName}".files.subdomain.value
|
||||
}.${config.networking.fqdn}";
|
||||
|
||||
settingsFormatIni = pkgs.formats.ini {
|
||||
listToValue = concatMapStringsSep " " (generators.mkValueStringDefault { });
|
||||
mkKeyValue = generators.mkKeyValueDefault {
|
||||
mkValueString = v: if v == null then "" else generators.mkValueStringDefault { } v;
|
||||
} "=";
|
||||
};
|
||||
configFile = settingsFormatIni.generate "config.ini" config.services.grafana.settings;
|
||||
in
|
||||
{
|
||||
clan.core.vars.generators."${serviceName}" = {
|
||||
files = {
|
||||
adminpassword.secret = true;
|
||||
subdomain.secret = false;
|
||||
};
|
||||
prompts = {
|
||||
subdomain = {
|
||||
persist = true;
|
||||
type = "line";
|
||||
description = "Sub-domain for Grafana. Default:(grafana)";
|
||||
};
|
||||
adminpassword = {
|
||||
persist = true;
|
||||
type = "hidden";
|
||||
description = "Password for the admin user. Leave empty to auto-generate.";
|
||||
};
|
||||
};
|
||||
|
||||
runtimeInputs = [
|
||||
pkgs.xkcdpass
|
||||
pkgs.coreutils
|
||||
];
|
||||
|
||||
script = ''
|
||||
prompt_domain=$(cat "$prompts"/subdomain)
|
||||
if [[ -n "''${prompt_domain-}" ]]; then
|
||||
echo $prompt_domain | tr -d "\n" > "$out"/subdomain
|
||||
else
|
||||
echo -n "grafana" > "$out"/subdomain
|
||||
fi
|
||||
|
||||
prompt_password=$(cat "$prompts"/adminpassword)
|
||||
if [[ -n "''${prompt_password-}" ]]; then
|
||||
echo "$prompt_password" | tr -d "\n" > "$out"/adminpassword
|
||||
else
|
||||
xkcdpass --numwords 4 --delimiter - --count 1 | tr -d "\n" > "$out"/adminpassword
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.grafana.serviceConfig.ExecStartPre = [
|
||||
"+${pkgs.writeShellScript "grafana-set-password" ''
|
||||
${pkgs.grafana}/bin/grafana cli --homepath ${config.services.grafana.dataDir} --config ${configFile} admin reset-admin-password $(cat ${
|
||||
config.clan.core.vars.generators."${serviceName}".files.adminpassword.path
|
||||
})
|
||||
''}"
|
||||
];
|
||||
|
||||
services.nginx.virtualHosts."${gfDomain}" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "${config.networking.fqdn}";
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${builtins.toString config.services.grafana.settings.server.http_port}";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
ncDomain = "${config.clan.core.vars.generators.b4l-nextcloud.files.subdomain.value}.${config.networking.fqdn}";
|
||||
in
|
||||
{
|
||||
clan.core.vars.generators.b4l-nextcloud = {
|
||||
files.subdomain.secret = false;
|
||||
|
||||
prompts = {
|
||||
subdomain = {
|
||||
persist = true;
|
||||
type = "line";
|
||||
description = "Sub-domain for Nextcloud app. Default:(cloud)";
|
||||
};
|
||||
};
|
||||
|
||||
script = ''cat $prompts/subdomain || echo -n "cloud" > $out/subdomain'';
|
||||
};
|
||||
|
||||
services.nextcloud = {
|
||||
hostName = ncDomain;
|
||||
package = pkgs.nextcloud32;
|
||||
|
||||
settings = {
|
||||
|
||||
overwriteprotocol = "https";
|
||||
trusted_domains = [ ];
|
||||
trusted_proxies = [ ];
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."${ncDomain}" = {
|
||||
useACMEHost = "${config.networking.fqdn}";
|
||||
forceSSL = true;
|
||||
};
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
serviceName = "${config.networking.hostName}-paperless";
|
||||
domain-name = "${
|
||||
config.clan.core.vars.generators."${serviceName}".files.subdomain.value
|
||||
}.${config.networking.fqdn}";
|
||||
in
|
||||
{
|
||||
clan.core.vars.generators."${serviceName}" = {
|
||||
files = {
|
||||
subdomain.secret = false;
|
||||
adminpassword = {
|
||||
secret = true;
|
||||
owner = config.services.paperless.user;
|
||||
group = config.services.paperless.user;
|
||||
};
|
||||
};
|
||||
prompts = {
|
||||
subdomain = {
|
||||
persist = true;
|
||||
type = "line";
|
||||
description = "Sub-domain for Paperless. Default:(paperless)";
|
||||
};
|
||||
adminpassword = {
|
||||
persist = true;
|
||||
type = "hidden";
|
||||
description = "Password for the admin user. Leave empty to auto-generate.";
|
||||
};
|
||||
};
|
||||
|
||||
runtimeInputs = [
|
||||
pkgs.xkcdpass
|
||||
pkgs.coreutils
|
||||
];
|
||||
|
||||
script = ''
|
||||
prompt_domain=$(cat "$prompts"/subdomain)
|
||||
if [[ -n "''${prompt_domain-}" ]]; then
|
||||
echo $prompt_domain | tr -d "\n" > "$out"/subdomain
|
||||
else
|
||||
echo -n "paperless" > "$out"/subdomain
|
||||
fi
|
||||
|
||||
prompt_password=$(cat "$prompts"/adminpassword)
|
||||
if [[ -n "''${prompt_password-}" ]]; then
|
||||
echo "$prompt_password" | tr -d "\n" > "$out"/adminpassword
|
||||
else
|
||||
xkcdpass --numwords 4 --delimiter - --count 1 | tr -d "\n" > "$out"/adminpassword
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.toybox ];
|
||||
|
||||
services.paperless = {
|
||||
passwordFile = config.clan.core.vars.generators."${serviceName}".files.adminpassword.path;
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${domain-name}" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "${config.networking.fqdn}";
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${builtins.toString config.services.paperless.port}";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
pidDomain = "${config.clan.core.vars.generators.b4l-pocket-id.files.subdomain.value}.${config.networking.fqdn}";
|
||||
in
|
||||
{
|
||||
clan.core.vars.generators.b4l-pocket-id = {
|
||||
files.subdomain.secret = false;
|
||||
|
||||
prompts = {
|
||||
subdomain = {
|
||||
persist = true;
|
||||
type = "line";
|
||||
description = "Sub-domain for Pocket-ID app. Default:(auth)";
|
||||
};
|
||||
};
|
||||
|
||||
script = ''cat $prompts/subdomain || echo -n "auth" > $out/subdomain'';
|
||||
};
|
||||
|
||||
services.pocket-id = {
|
||||
settings = {
|
||||
APP_ENV = "production";
|
||||
APP_URL = "https://${pidDomain}";
|
||||
TRUST_PROXY = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${pidDomain}" = {
|
||||
useACMEHost = "${config.networking.fqdn}";
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${builtins.toString config.services.pocket-id.settings.PORT}";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
stDomain = "${config.clan.core.vars.generators.b4l-stirling-pdf.files.subdomain.value}.${config.networking.fqdn}";
|
||||
in
|
||||
{
|
||||
clan.core.vars.generators.b4l-stirling-pdf = {
|
||||
files.subdomain.secret = false;
|
||||
|
||||
prompts = {
|
||||
subdomain = {
|
||||
persist = true;
|
||||
type = "line";
|
||||
description = "Sub-domain for Stirling PDF app. Default:(pdf)";
|
||||
};
|
||||
};
|
||||
script = ''cat $prompts/subdomain || echo -n "pdf" > $out/subdomain'';
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${stDomain}" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "${config.networking.fqdn}";
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${builtins.toString config.services.stirling-pdf.environment.SERVER_PORT}";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
vmDomain = "${config.clan.core.vars.generators.b4l-victoriametrics.files.subdomain.value}.${config.networking.fqdn}";
|
||||
in
|
||||
{
|
||||
clan.core.vars.generators.b4l-victoriametrics = {
|
||||
files.subdomain.secret = false;
|
||||
files.adminuser.secret = false;
|
||||
files.adminpassword.secret = true;
|
||||
|
||||
prompts = {
|
||||
subdomain = {
|
||||
persist = true;
|
||||
type = "line";
|
||||
description = "Sub-domain for Victoria Metrics app. Default:(metrics)";
|
||||
};
|
||||
adminuser = {
|
||||
persist = true;
|
||||
type = "line";
|
||||
description = "Username for an admin user. Default:(admin)";
|
||||
};
|
||||
adminpassword = {
|
||||
persist = true;
|
||||
type = "hidden";
|
||||
description = "Password for the admin user. Leave empty to auto-generate.";
|
||||
};
|
||||
};
|
||||
|
||||
runtimeInputs = [
|
||||
pkgs.xkcdpass
|
||||
pkgs.coreutils
|
||||
];
|
||||
|
||||
script = ''
|
||||
prompt_domain=$(cat "$prompts"/subdomain)
|
||||
if [[ -n "''${prompt_domain-}" ]]; then
|
||||
echo $prompt_domain | tr -d "\n" > "$out"/subdomain
|
||||
else
|
||||
echo -n "metrics" > "$out"/subdomain
|
||||
fi
|
||||
|
||||
prompt_adminuser=$(cat "$prompts"/adminuser)
|
||||
if [[ -n "''${prompt_adminuser-}" ]]; then
|
||||
echo $prompt_adminuser | tr -d "\n" > "$out"/adminuser
|
||||
else
|
||||
echo -n "admin" > "$out"/adminuser
|
||||
fi
|
||||
|
||||
prompt_password=$(cat "$prompts"/adminpassword)
|
||||
if [[ -n "''${prompt_password-}" ]]; then
|
||||
echo "$prompt_password" | tr -d "\n" > "$out"/adminpassword
|
||||
else
|
||||
xkcdpass --numwords 4 --delimiter - --count 1 | tr -d "\n" > "$out"/adminpassword
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
services.victoriametrics = {
|
||||
extraOptions = [
|
||||
"-httpAuth.username=file://${config.clan.core.vars.generators.b4l-victoriametrics.files.adminuser.path}"
|
||||
"-httpAuth.password=file://${config.clan.core.vars.generators.b4l-victoriametrics.files.adminpassword.path}"
|
||||
];
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${vmDomain}" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "${config.networking.fqdn}";
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost${builtins.toString config.services.victoriametrics.listenAddress}";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
clan.core.vars.generators.b4l-vikunja = {
|
||||
files.subdomain.secret = false;
|
||||
|
||||
prompts = {
|
||||
subdomain = {
|
||||
persist = true;
|
||||
type = "line";
|
||||
description = "Sub-domain for Vikunja todo app. Default:(todo)";
|
||||
};
|
||||
};
|
||||
|
||||
script = ''cat $prompts/subdomain || echo "todo" > $out/subdomain'';
|
||||
};
|
||||
services.vikunja = {
|
||||
frontendHostname = "${config.clan.core.vars.generators.b4l-vikunja.files.subdomain.value}.${config.networking.fqdn}";
|
||||
};
|
||||
services.nginx.virtualHosts."${config.services.vikunja.frontendHostname}" = {
|
||||
useACMEHost = "${config.networking.fqdn}";
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "${config.services.vikunja.frontendScheme}://${config.services.vikunja.frontendHostname}:${builtins.toString config.services.vikunja.port}";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
sitename = "tempoerp.newedge.house";
|
||||
in
|
||||
{
|
||||
clan.core.settings.machine.description = "VM machine that host ERPNext for tempo";
|
||||
imports = [
|
||||
inputs.frappix.nixosModules.x86_64-linux.frappix
|
||||
];
|
||||
nixpkgs.overlays = [
|
||||
inputs.self.overlays.frappixFrappeOverlay
|
||||
inputs.self.overlays.frappixLibsOverlay
|
||||
inputs.self.overlays.frappixPythonOverlay
|
||||
inputs.self.overlays.frappixToolsOverlay
|
||||
];
|
||||
|
||||
clan.core.vars.generators.frappix = {
|
||||
files = {
|
||||
sslCertificate.secret = false;
|
||||
sslCertificateKey = {
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
secret = true;
|
||||
};
|
||||
adminPassword.secret = true;
|
||||
};
|
||||
runtimeInputs = with pkgs; [
|
||||
openssl
|
||||
xkcdpass
|
||||
];
|
||||
script = ''
|
||||
openssl req -x509 -newkey rsa:4096 -keyout $out/sslCertificateKey -out $out/sslCertificate -sha256 -days 3650 -nodes -subj "/C=TH/ST=ChiangMai/L=ChiangMai/O=kurogeek/CN=kurogeek.home"
|
||||
xkcdpass --numwords 4 --delimiter - --count 1 | tr -d "\n" > "$out"/adminPassword
|
||||
'';
|
||||
};
|
||||
|
||||
services.frappe = {
|
||||
enable = true;
|
||||
project = "poyerp";
|
||||
gunicorn_workers = 2;
|
||||
adminPassword = config.clan.core.vars.generators.frappix.files.adminPassword.path;
|
||||
apps = [
|
||||
pkgs.frappix.erpnext
|
||||
pkgs.frappix.hrms
|
||||
pkgs.frappix.crm
|
||||
];
|
||||
sites = {
|
||||
"${sitename}" = {
|
||||
domains = [ sitename ];
|
||||
apps = [
|
||||
"frappe"
|
||||
"erpnext"
|
||||
"hrms"
|
||||
"crm"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."${sitename}" = {
|
||||
sslCertificate = config.clan.core.vars.generators.frappix.files.sslCertificate.path;
|
||||
sslCertificateKey = config.clan.core.vars.generators.frappix.files.sslCertificateKey.path;
|
||||
};
|
||||
|
||||
nixpkgs.hostPlatform = {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
clan.core.vars.generators.nginx = {
|
||||
files = {
|
||||
sslCert = {
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
secret = true;
|
||||
};
|
||||
sslKey = {
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
secret = true;
|
||||
};
|
||||
};
|
||||
|
||||
runtimeInputs = [
|
||||
pkgs.openssl
|
||||
];
|
||||
script = ''
|
||||
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \
|
||||
-keyout $out/sslKey \
|
||||
-out $out/sslCert \
|
||||
-subj "/CN=localhost"
|
||||
'';
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
clan.core.sops.defaultGroups = [ "admins" ];
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
let
|
||||
hashDisk = disk: "os-${builtins.substring 0 5 (builtins.hashString "sha256" disk)}";
|
||||
os = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0";
|
||||
in
|
||||
{
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
|
||||
boot.zfs.forceImportRoot = true;
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"os-${hashDisk os}" = {
|
||||
type = "disk";
|
||||
device = os;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "nofail" ];
|
||||
};
|
||||
};
|
||||
system = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "zroot";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
zpool = {
|
||||
zroot = {
|
||||
type = "zpool";
|
||||
rootFsOptions = {
|
||||
mountpoint = "none";
|
||||
compression = "lz4";
|
||||
acltype = "posixacl";
|
||||
xattr = "sa";
|
||||
"com.sun:auto-snapshot" = "true";
|
||||
};
|
||||
options.ashift = "12";
|
||||
datasets = {
|
||||
"root" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "none";
|
||||
};
|
||||
"root/nixos" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "/";
|
||||
mountpoint = "/";
|
||||
};
|
||||
"root/home" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "/home";
|
||||
mountpoint = "/home";
|
||||
};
|
||||
"root/tmp" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/tmp";
|
||||
options = {
|
||||
mountpoint = "/tmp";
|
||||
sync = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,7 @@
|
||||
# clan.core.networking.targetHost = "root@";
|
||||
|
||||
clan.core.settings.name = "buna";
|
||||
# clan.meta.description = "Radxa X4 SBC board for one of w phone network. (With w whitehouse)";
|
||||
clan.core.settings.machine.description =
|
||||
"Radxa X4 SBC board for one of w phone network. (With w whitehouse)";
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
sitename = "glomerp.newedge.house";
|
||||
nbClientName = "netbird-b4l";
|
||||
in
|
||||
{
|
||||
clan.core.settings.machine.description = "VM machine that host ERPNext for glomglom";
|
||||
|
||||
imports = [ inputs.frappix.nixosModules.x86_64-linux.frappix ];
|
||||
nixpkgs.overlays = [
|
||||
inputs.self.overlays.frappixFrappeOverlay
|
||||
inputs.self.overlays.frappixLibsOverlay
|
||||
inputs.self.overlays.frappixPythonOverlay
|
||||
inputs.self.overlays.frappixToolsOverlay
|
||||
];
|
||||
|
||||
clan.core.vars.generators.frappix = {
|
||||
files = {
|
||||
sslCertificate.secret = false;
|
||||
sslCertificateKey = {
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
secret = true;
|
||||
};
|
||||
adminPassword.secret = true;
|
||||
};
|
||||
runtimeInputs = with pkgs; [
|
||||
openssl
|
||||
xkcdpass
|
||||
];
|
||||
script = ''
|
||||
openssl req -x509 -newkey rsa:4096 -keyout $out/sslCertificateKey -out $out/sslCertificate -sha256 -days 3650 -nodes -subj "/C=TH/ST=ChiangMai/L=ChiangMai/O=kurogeek/CN=kurogeek.home"
|
||||
xkcdpass --numwords 4 --delimiter - --count 1 | tr -d "\n" > "$out"/adminPassword
|
||||
'';
|
||||
};
|
||||
|
||||
services.frappe = {
|
||||
enable = true;
|
||||
project = "glomerp";
|
||||
gunicorn_workers = 2;
|
||||
adminPassword = config.clan.core.vars.generators.frappix.files.adminPassword.path;
|
||||
apps = [
|
||||
pkgs.frappix.erpnext
|
||||
pkgs.frappix.hrms
|
||||
];
|
||||
sites = {
|
||||
"${sitename}" = {
|
||||
domains = [ sitename ];
|
||||
apps = [
|
||||
"frappe"
|
||||
"erpnext"
|
||||
"hrms"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."${sitename}" = {
|
||||
sslCertificate = config.clan.core.vars.generators.frappix.files.sslCertificate.path;
|
||||
sslCertificateKey = config.clan.core.vars.generators.frappix.files.sslCertificateKey.path;
|
||||
};
|
||||
|
||||
nixpkgs.hostPlatform = {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
clan.core.vars.generators.nginx = {
|
||||
files = {
|
||||
sslCert = {
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
secret = true;
|
||||
};
|
||||
sslKey = {
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
secret = true;
|
||||
};
|
||||
};
|
||||
|
||||
runtimeInputs = [
|
||||
pkgs.openssl
|
||||
];
|
||||
script = ''
|
||||
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \
|
||||
-keyout $out/sslKey \
|
||||
-out $out/sslCert \
|
||||
-subj "/CN=localhost"
|
||||
'';
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
|
||||
# services.nginx.virtualHosts."${domain}" = {
|
||||
# forceSSL = true;
|
||||
# sslCertificate = config.clan.core.vars.generators.nginx.files.sslCert.path;
|
||||
# sslCertificateKey = config.clan.core.vars.generators.nginx.files.sslKey.path;
|
||||
# };
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
clan.core.sops.defaultGroups = [ "admins" ];
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
let
|
||||
hashDisk = disk: "os-${builtins.substring 0 5 (builtins.hashString "sha256" disk)}";
|
||||
os = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0";
|
||||
in
|
||||
{
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
|
||||
boot.zfs.forceImportRoot = true;
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"os-${hashDisk os}" = {
|
||||
type = "disk";
|
||||
device = os;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "nofail" ];
|
||||
};
|
||||
};
|
||||
system = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "zroot";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
zpool = {
|
||||
zroot = {
|
||||
type = "zpool";
|
||||
rootFsOptions = {
|
||||
mountpoint = "none";
|
||||
compression = "lz4";
|
||||
acltype = "posixacl";
|
||||
xattr = "sa";
|
||||
"com.sun:auto-snapshot" = "true";
|
||||
};
|
||||
options.ashift = "12";
|
||||
datasets = {
|
||||
"root" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "none";
|
||||
};
|
||||
"root/nixos" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "/";
|
||||
mountpoint = "/";
|
||||
};
|
||||
"root/home" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "/home";
|
||||
mountpoint = "/home";
|
||||
};
|
||||
"root/tmp" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/tmp";
|
||||
options = {
|
||||
mountpoint = "/tmp";
|
||||
sync = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,8 @@
|
||||
{ inputs, self, ... }:
|
||||
{
|
||||
inputs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
inputs.clan-core.flakeModules.default
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
sitename = "poyerp.newedge.house";
|
||||
in
|
||||
{
|
||||
clan.core.settings.machine.description = "VM machine that host ERPNext for poysound";
|
||||
imports = [
|
||||
inputs.frappix.nixosModules.x86_64-linux.frappix
|
||||
|
||||
# (import ../../lib/auto-accept-zerotier-members.nix {
|
||||
# memberIds = [
|
||||
# # Alex Caddy gateway
|
||||
# "dbe44c0287"
|
||||
# "e3d6559697"
|
||||
# ];
|
||||
# })
|
||||
];
|
||||
nixpkgs.overlays = [
|
||||
inputs.self.overlays.frappixFrappeOverlay
|
||||
inputs.self.overlays.frappixLibsOverlay
|
||||
inputs.self.overlays.frappixPythonOverlay
|
||||
inputs.self.overlays.frappixToolsOverlay
|
||||
];
|
||||
|
||||
clan.core.vars.generators.frappix = {
|
||||
files = {
|
||||
sslCertificate.secret = false;
|
||||
sslCertificateKey = {
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
secret = true;
|
||||
};
|
||||
adminPassword.secret = true;
|
||||
};
|
||||
runtimeInputs = with pkgs; [
|
||||
openssl
|
||||
xkcdpass
|
||||
];
|
||||
script = ''
|
||||
openssl req -x509 -newkey rsa:4096 -keyout $out/sslCertificateKey -out $out/sslCertificate -sha256 -days 3650 -nodes -subj "/C=TH/ST=ChiangMai/L=ChiangMai/O=kurogeek/CN=kurogeek.home"
|
||||
xkcdpass --numwords 4 --delimiter - --count 1 | tr -d "\n" > "$out"/adminPassword
|
||||
'';
|
||||
};
|
||||
|
||||
services.frappe = {
|
||||
enable = true;
|
||||
project = "poyerp";
|
||||
gunicorn_workers = 2;
|
||||
adminPassword = config.clan.core.vars.generators.frappix.files.adminPassword.path;
|
||||
apps = [
|
||||
pkgs.frappix.erpnext
|
||||
pkgs.frappix.hrms
|
||||
pkgs.frappix.crm
|
||||
];
|
||||
sites = {
|
||||
"${sitename}" = {
|
||||
domains = [ sitename ];
|
||||
apps = [
|
||||
"frappe"
|
||||
"erpnext"
|
||||
"hrms"
|
||||
"crm"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."${sitename}" = {
|
||||
sslCertificate = config.clan.core.vars.generators.frappix.files.sslCertificate.path;
|
||||
sslCertificateKey = config.clan.core.vars.generators.frappix.files.sslCertificateKey.path;
|
||||
};
|
||||
|
||||
nixpkgs.hostPlatform = {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
clan.core.vars.generators.nginx = {
|
||||
files = {
|
||||
sslCert = {
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
secret = true;
|
||||
};
|
||||
sslKey = {
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
secret = true;
|
||||
};
|
||||
};
|
||||
|
||||
runtimeInputs = [
|
||||
pkgs.openssl
|
||||
];
|
||||
script = ''
|
||||
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \
|
||||
-keyout $out/sslKey \
|
||||
-out $out/sslCert \
|
||||
-subj "/CN=localhost"
|
||||
'';
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
|
||||
# services.nginx.virtualHosts."${domain}" = {
|
||||
# forceSSL = true;
|
||||
# sslCertificate = config.clan.core.vars.generators.nginx.files.sslCert.path;
|
||||
# sslCertificateKey = config.clan.core.vars.generators.nginx.files.sslKey.path;
|
||||
# };
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
clan.core.sops.defaultGroups = [ "admins" ];
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
let
|
||||
hashDisk = disk: "os-${builtins.substring 0 5 (builtins.hashString "sha256" disk)}";
|
||||
os = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0";
|
||||
in
|
||||
{
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
|
||||
boot.zfs.forceImportRoot = true;
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"os-${hashDisk os}" = {
|
||||
type = "disk";
|
||||
device = os;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "nofail" ];
|
||||
};
|
||||
};
|
||||
system = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "zroot";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
zpool = {
|
||||
zroot = {
|
||||
type = "zpool";
|
||||
rootFsOptions = {
|
||||
mountpoint = "none";
|
||||
compression = "lz4";
|
||||
acltype = "posixacl";
|
||||
xattr = "sa";
|
||||
"com.sun:auto-snapshot" = "true";
|
||||
};
|
||||
options.ashift = "12";
|
||||
datasets = {
|
||||
"root" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "none";
|
||||
};
|
||||
"root/nixos" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "/";
|
||||
mountpoint = "/";
|
||||
};
|
||||
"root/home" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "/home";
|
||||
mountpoint = "/home";
|
||||
};
|
||||
"root/tmp" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/tmp";
|
||||
options = {
|
||||
mountpoint = "/tmp";
|
||||
sync = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,86 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
domain = "poy-inventory.newedge.house";
|
||||
in
|
||||
{
|
||||
clan.core.settings.machine.description = "VM machine that host Inventree system for Poy";
|
||||
|
||||
nixpkgs.hostPlatform = {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
clan.core.vars.generators.inventree = {
|
||||
files = {
|
||||
secret-key = {
|
||||
owner = "inventree";
|
||||
group = "inventree";
|
||||
secret = true;
|
||||
};
|
||||
oidc-key = {
|
||||
owner = "inventree";
|
||||
group = "inventree";
|
||||
secret = true;
|
||||
};
|
||||
admin-password = {
|
||||
owner = "inventree";
|
||||
group = "inventree";
|
||||
secret = true;
|
||||
};
|
||||
};
|
||||
runtimeInputs = [
|
||||
pkgs.pwgen
|
||||
pkgs.xkcdpass
|
||||
];
|
||||
script = ''
|
||||
pwgen -s 32 1 > $out/secret-key
|
||||
pwgen -s 32 1 > $out/oidc-key
|
||||
xkcdpass --numwords 4 --delimiter - --count 1 | tr -d "\n" > "$out"/admin-password
|
||||
'';
|
||||
};
|
||||
|
||||
clan.core.vars.generators.nginx = {
|
||||
files = {
|
||||
sslCert = {
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
secret = true;
|
||||
};
|
||||
sslKey = {
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
secret = true;
|
||||
};
|
||||
};
|
||||
|
||||
runtimeInputs = [
|
||||
pkgs.openssl
|
||||
];
|
||||
script = ''
|
||||
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \
|
||||
-keyout $out/sslKey \
|
||||
-out $out/sslCert \
|
||||
-subj "/CN=localhost"
|
||||
'';
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
|
||||
services.inventree = {
|
||||
enable = true;
|
||||
inherit domain;
|
||||
secretKeyFile = config.clan.core.vars.generators.inventree.files.secret-key.path;
|
||||
adminPasswordFile = config.clan.core.vars.generators.inventree.files.admin-password.path;
|
||||
settings.INVENTREE_SITE_URL = "https://${domain}";
|
||||
};
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
clan.core.sops.defaultGroups = [ "admins" ];
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
let
|
||||
hashDisk = disk: "os-${builtins.substring 0 5 (builtins.hashString "sha256" disk)}";
|
||||
os = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0";
|
||||
in
|
||||
{
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
|
||||
boot.zfs.forceImportRoot = true;
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"os-${hashDisk os}" = {
|
||||
type = "disk";
|
||||
device = os;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "nofail" ];
|
||||
};
|
||||
};
|
||||
system = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "zroot";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
zpool = {
|
||||
zroot = {
|
||||
type = "zpool";
|
||||
rootFsOptions = {
|
||||
mountpoint = "none";
|
||||
compression = "lz4";
|
||||
acltype = "posixacl";
|
||||
xattr = "sa";
|
||||
"com.sun:auto-snapshot" = "true";
|
||||
};
|
||||
options.ashift = "12";
|
||||
datasets = {
|
||||
"root" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "none";
|
||||
};
|
||||
"root/nixos" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "/";
|
||||
mountpoint = "/";
|
||||
};
|
||||
"root/home" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "/home";
|
||||
mountpoint = "/home";
|
||||
};
|
||||
"root/tmp" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/tmp";
|
||||
options = {
|
||||
mountpoint = "/tmp";
|
||||
sync = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,6 @@
|
||||
# clan.core.networking.targetHost = "root@";
|
||||
|
||||
clan.core.settings.name = "mirach";
|
||||
# clan.meta.description = "Radxa X4 SBC board for one of w phone network.";
|
||||
clan.core.settings.machine.description = "Radxa X4 SBC board for one of w phone network.";
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
boot.zfs.forceImportRoot = true;
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"os-${hashDisk os}" = {
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
};
|
||||
system.stateVersion = "25.11";
|
||||
clan.core.sops.defaultGroups = [ "admins" ];
|
||||
clan.core.networking.targetHost = "root@[${config.clan.core.vars.generators.zerotier.files.zerotier-ip.value}]";
|
||||
|
||||
networking.interfaces.enx00e04c106368.useDHCP = true; # recovery
|
||||
|
||||
@@ -57,6 +56,6 @@
|
||||
];
|
||||
|
||||
clan.core.settings.name = "neptune";
|
||||
# clan.meta.description = "Radxa SBC board for testing. (With vi)";
|
||||
clan.core.settings.machine.description = "Radxa SBC board for testing. (With vi)";
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
boot.zfs.forceImportRoot = true;
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"os-${hashDisk os}" = {
|
||||
|
||||
@@ -9,4 +9,5 @@
|
||||
};
|
||||
system.stateVersion = "25.11";
|
||||
clan.core.sops.defaultGroups = [ "admins" ];
|
||||
clan.core.settings.machine.description = "A personal computer for Chocolate Shop";
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
boot.zfs.forceImportRoot = true;
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"os-${hashDisk os}" = {
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
domain = "glom-inventory.newedge.house";
|
||||
in
|
||||
{
|
||||
clan.core.settings.machine.description = "VM machine that host Inventree system for Glom";
|
||||
|
||||
nixpkgs.hostPlatform = {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
clan.core.vars.generators.inventree = {
|
||||
files = {
|
||||
secret-key = {
|
||||
owner = "inventree";
|
||||
group = "inventree";
|
||||
secret = true;
|
||||
};
|
||||
oidc-key = {
|
||||
owner = "inventree";
|
||||
group = "inventree";
|
||||
secret = true;
|
||||
};
|
||||
admin-password = {
|
||||
owner = "inventree";
|
||||
group = "inventree";
|
||||
secret = true;
|
||||
};
|
||||
};
|
||||
runtimeInputs = [
|
||||
pkgs.pwgen
|
||||
pkgs.xkcdpass
|
||||
];
|
||||
script = ''
|
||||
pwgen -s 32 1 > $out/secret-key
|
||||
pwgen -s 32 1 > $out/oidc-key
|
||||
xkcdpass --numwords 4 --delimiter - --count 1 | tr -d "\n" > "$out"/admin-password
|
||||
'';
|
||||
};
|
||||
|
||||
clan.core.vars.generators.nginx = {
|
||||
files = {
|
||||
sslCert = {
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
secret = true;
|
||||
};
|
||||
sslKey = {
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
secret = true;
|
||||
};
|
||||
};
|
||||
|
||||
runtimeInputs = [
|
||||
pkgs.openssl
|
||||
];
|
||||
script = ''
|
||||
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \
|
||||
-keyout $out/sslKey \
|
||||
-out $out/sslCert \
|
||||
-subj "/CN=localhost"
|
||||
'';
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
|
||||
services.inventree = {
|
||||
enable = true;
|
||||
inherit domain;
|
||||
secretKeyFile = config.clan.core.vars.generators.inventree.files.secret-key.path;
|
||||
adminPasswordFile = config.clan.core.vars.generators.inventree.files.admin-password.path;
|
||||
settings.INVENTREE_SITE_URL = "https://${domain}";
|
||||
};
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
clan.core.sops.defaultGroups = [ "admins" ];
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
let
|
||||
hashDisk = disk: "os-${builtins.substring 0 5 (builtins.hashString "sha256" disk)}";
|
||||
os = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0";
|
||||
in
|
||||
{
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
|
||||
boot.zfs.forceImportRoot = true;
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"os-${hashDisk os}" = {
|
||||
type = "disk";
|
||||
device = os;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "nofail" ];
|
||||
};
|
||||
};
|
||||
system = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "zroot";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
zpool = {
|
||||
zroot = {
|
||||
type = "zpool";
|
||||
rootFsOptions = {
|
||||
mountpoint = "none";
|
||||
compression = "lz4";
|
||||
acltype = "posixacl";
|
||||
xattr = "sa";
|
||||
"com.sun:auto-snapshot" = "true";
|
||||
};
|
||||
options.ashift = "12";
|
||||
datasets = {
|
||||
"root" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "none";
|
||||
};
|
||||
"root/nixos" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "/";
|
||||
mountpoint = "/";
|
||||
};
|
||||
"root/home" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "/home";
|
||||
mountpoint = "/home";
|
||||
};
|
||||
"root/tmp" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/tmp";
|
||||
options = {
|
||||
mountpoint = "/tmp";
|
||||
sync = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,12 +6,9 @@
|
||||
};
|
||||
|
||||
clan.core.settings.name = "ramus";
|
||||
# clan.meta.description = ''
|
||||
# A Hetzner VPS machine own by Alex.
|
||||
# '';
|
||||
clan.core.settings.machine.description = "A Hetzner VPS machine own by Alex.";
|
||||
|
||||
clan.core.sops.defaultGroups = [ "admins" ];
|
||||
clan.core.networking.targetHost = "root@[${config.clan.core.vars.generators.zerotier.files.zerotier-ip.value}]";
|
||||
|
||||
clan.core.vars.generators.acme = {
|
||||
share = true;
|
||||
|
||||
@@ -14,6 +14,8 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
boot.zfs.forceImportRoot = true;
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"os-${hashDisk os}" = {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{ self, ... }:
|
||||
{ self, pkgs, ... }:
|
||||
{
|
||||
clan.core.settings.machine.description = "Emmie personal computer";
|
||||
|
||||
imports = [
|
||||
self.nixosModules.common
|
||||
];
|
||||
@@ -9,4 +11,12 @@
|
||||
};
|
||||
system.stateVersion = "25.11";
|
||||
clan.core.sops.defaultGroups = [ "admins" ];
|
||||
|
||||
boot.kernelParams = [
|
||||
"amdgpu.dcdebugmask=0x10"
|
||||
"amdgpu.cwsr_enable=0"
|
||||
"amdgpu.gpu_recovery=1"
|
||||
];
|
||||
|
||||
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_12;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
boot.zfs.forceImportRoot = true;
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"os-${hashDisk os}" = {
|
||||
@@ -53,6 +55,9 @@ in
|
||||
zroot = {
|
||||
type = "zpool";
|
||||
rootFsOptions = {
|
||||
encryption = "aes-256-gcm";
|
||||
keyformat = "passphrase";
|
||||
keylocation = "file:///tmp/secret.key";
|
||||
mountpoint = "none";
|
||||
compression = "lz4";
|
||||
acltype = "posixacl";
|
||||
|
||||
+779
-681
File diff suppressed because it is too large
Load Diff
@@ -1,16 +1,7 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
imports = [
|
||||
(import ../../lib/auto-accept-zerotier-members.nix {
|
||||
memberIds = [
|
||||
"dbe44c0287" # Alex-gateway
|
||||
"b0e0b84fd3" # Alex
|
||||
"2bd36db8cc" # kurogeek-thinkpad
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
clan.core.sops.defaultGroups = [ "admins" ];
|
||||
clan.core.networking.targetHost = "root@[${config.clan.core.vars.generators.zerotier.files.zerotier-ip.value}]";
|
||||
|
||||
clan.core.settings.machine.description = "Zima board computer for testing in B4L";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
## How to setup this machine.
|
||||
|
||||
This machine cannot be setup the same way as other machines are setup. Meaning that `clan machine install` won't work. Because of `disko` issue. So, below is how the machine is setup.
|
||||
|
||||
1. Build an image to flash to an sd-card using
|
||||
|
||||
```
|
||||
nix build -L --show-trace .\#nixosConfigurations.sirius.config.system.build.images.sd-card
|
||||
```
|
||||
|
||||
2. Import the `zdata`
|
||||
|
||||
```
|
||||
zpool import zdata
|
||||
```
|
||||
|
||||
3. Update configuration
|
||||
|
||||
```
|
||||
clan machine update sirius
|
||||
```
|
||||
@@ -1,13 +1,23 @@
|
||||
{
|
||||
config,
|
||||
self,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
self.nixosModules.common
|
||||
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
image.modules.sd-card = {
|
||||
disabledModules = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
clan.core.settings.machine.description = "w NAS";
|
||||
|
||||
clan.core.sops.defaultGroups = [ "admins" ];
|
||||
|
||||
nixpkgs.hostPlatform = {
|
||||
@@ -32,4 +42,55 @@
|
||||
options = "--delete-older-than 15d";
|
||||
};
|
||||
|
||||
boot.loader.grub.enable = false;
|
||||
boot.loader.generic-extlinux-compatible.enable = true;
|
||||
|
||||
boot.zfs.forceImportRoot = false;
|
||||
|
||||
boot.zfs.extraPools = [ "zdata" ];
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
|
||||
fileSystems."/mnt/hdd" = {
|
||||
device = "zdata/nas";
|
||||
fsType = "zfs";
|
||||
mountPoint = "/mnt/hdd";
|
||||
options = [
|
||||
"nofail"
|
||||
"zfsutil"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/var/lib" = {
|
||||
device = "zdata/service-data";
|
||||
fsType = "zfs";
|
||||
mountPoint = "/var/lib";
|
||||
options = [
|
||||
"x-initrd.mount"
|
||||
"nofail"
|
||||
"zfsutil"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services.heartbeat-push = {
|
||||
description = "Heartbeat push to uptime monitor";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.curl}/bin/curl -s -o /dev/null https://uptime.b4l.co.th/api/push/X0WCHAcY5gPf1U8If7BT1FLjpacZqGZu?status=up&msg=OK&ping=";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.timers.heartbeat-push = {
|
||||
description = "Heartbeat push timer";
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnBootSec = "60s";
|
||||
OnUnitActiveSec = "60s";
|
||||
Unit = "heartbeat-push.service";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
hashDisk = disk: "os-${builtins.substring 0 5 (builtins.hashString "sha256" disk)}";
|
||||
# os = "/dev/disk/by-id/mmc-SD64G_0x8336354b";
|
||||
vdev = [
|
||||
"/dev/disk/by-id/ata-ST20000NM002H-3KV133_ZYDBVV7Z"
|
||||
"/dev/disk/by-id/ata-ST20000NM002H-3KV133_ZYDBSJRE"
|
||||
];
|
||||
configTxt = pkgs.writeText "config.txt" ''
|
||||
[pi4]
|
||||
kernel=u-boot-rpi4.bin
|
||||
enable_gic=1
|
||||
|
||||
# Otherwise the resolution will be weird in most cases, compared to
|
||||
# what the pi3 firmware does by default.
|
||||
disable_overscan=1
|
||||
|
||||
# Supported in newer board revisions
|
||||
arm_boost=1
|
||||
|
||||
[all]
|
||||
# Boot in 64-bit mode.
|
||||
arm_64bit=1
|
||||
|
||||
# U-Boot needs this to work, regardless of whether UART is actually used or not.
|
||||
# Look in arch/arm/mach-bcm283x/Kconfig in the U-Boot tree to see if this is still
|
||||
# a requirement in the future.
|
||||
enable_uart=1
|
||||
|
||||
# Prevent the firmware from smashing the framebuffer setup done by the mainline kernel
|
||||
# when attempting to show low-voltage or overtemperature warnings.
|
||||
avoid_warnings=1
|
||||
'';
|
||||
in
|
||||
{
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
# boot.tmp.useTmpfs = true;
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
# "os-${hashDisk os}" = {
|
||||
# type = "disk";
|
||||
# device = os;
|
||||
# content = {
|
||||
# type = "gpt";
|
||||
# partitions = {
|
||||
# firmware = {
|
||||
# size = "60M";
|
||||
# priority = 1;
|
||||
# type = "0700";
|
||||
# content = {
|
||||
# type = "filesystem";
|
||||
# format = "vfat";
|
||||
# mountpoint = "/firmware";
|
||||
# postMountHook = toString (
|
||||
# pkgs.writeScript "postMountHook.sh" ''
|
||||
# (cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf *.dtb /mnt/firmware/)
|
||||
# cp ${pkgs.ubootRaspberryPi4_64bit}/u-boot.bin /mnt/firmware/u-boot-rpi4.bin
|
||||
# cp ${configTxt} /mnt/firmware/config.txt
|
||||
# ''
|
||||
# );
|
||||
# };
|
||||
# };
|
||||
# ESP = {
|
||||
# size = "2G";
|
||||
# type = "EF00";
|
||||
# content = {
|
||||
# type = "filesystem";
|
||||
# format = "vfat";
|
||||
# mountpoint = "/boot";
|
||||
# mountOptions = [ "umask=0077" ];
|
||||
# };
|
||||
# };
|
||||
# root = {
|
||||
# name = "root";
|
||||
# end = "-0";
|
||||
# content = {
|
||||
# type = "filesystem";
|
||||
# format = "f2fs";
|
||||
# mountpoint = "/";
|
||||
# extraArgs = [
|
||||
# "-O"
|
||||
# "extra_attr,inode_checksum,sb_checksum,compression"
|
||||
# ];
|
||||
# mountOptions = [ "compress_algorithm=zstd:6,compress_chksum,atgc,gc_merge,lazytime,nodiscard" ];
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
}
|
||||
// (lib.listToAttrs (
|
||||
map (disk: {
|
||||
name = "data-${hashDisk disk}";
|
||||
value = {
|
||||
type = "disk";
|
||||
device = disk;
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "zdata";
|
||||
};
|
||||
};
|
||||
}) vdev
|
||||
));
|
||||
zpool = {
|
||||
zdata = {
|
||||
type = "zpool";
|
||||
options.ashift = "12";
|
||||
rootFsOptions = {
|
||||
mountpoint = "none";
|
||||
compression = "lz4";
|
||||
acltype = "posixacl";
|
||||
xattr = "sa";
|
||||
"com.sun:auto-snapshot" = "true";
|
||||
};
|
||||
mode = {
|
||||
topology = {
|
||||
type = "topology";
|
||||
vdev = [
|
||||
{
|
||||
mode = "mirror";
|
||||
members = vdev;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
datasets = {
|
||||
"nas" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/mnt/hdd";
|
||||
mountOptions = [ "nofail" ];
|
||||
};
|
||||
"service-data" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/var/lib";
|
||||
mountOptions = [ "nofail" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,108 +0,0 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
hashDisk = disk: "os-${builtins.substring 0 5 (builtins.hashString "sha256" disk)}";
|
||||
os = "/dev/disk/by-id/mmc-SD64G_0x8336354b";
|
||||
vdev = [
|
||||
"/dev/disk/by-id/ata-ST20000NM002H-3KV133_ZYDBVV7Z"
|
||||
"/dev/disk/by-id/ata-ST20000NM002H-3KV133_ZYDBSJRE"
|
||||
];
|
||||
in
|
||||
{
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
boot.tmp.useTmpfs = true;
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"os-${hashDisk os}" = {
|
||||
type = "disk";
|
||||
device = os;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
end = "500M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
root = {
|
||||
name = "root";
|
||||
end = "-0";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "f2fs";
|
||||
mountpoint = "/";
|
||||
extraArgs = [
|
||||
"-O"
|
||||
"extra_attr,inode_checksum,sb_checksum,compression"
|
||||
];
|
||||
mountOptions = [ "compress_algorithm=zstd:6,compress_chksum,atgc,gc_merge,lazytime,nodiscard" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
// (lib.listToAttrs (
|
||||
map (disk: {
|
||||
name = "data-${hashDisk disk}";
|
||||
value = {
|
||||
type = "disk";
|
||||
device = disk;
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "zdata";
|
||||
};
|
||||
};
|
||||
}) vdev
|
||||
));
|
||||
zpool = {
|
||||
zdata = {
|
||||
type = "zpool";
|
||||
options.ashift = "12";
|
||||
rootFsOptions = {
|
||||
mountpoint = "none";
|
||||
compression = "lz4";
|
||||
acltype = "posixacl";
|
||||
xattr = "sa";
|
||||
"com.sun:auto-snapshot" = "true";
|
||||
};
|
||||
mode = {
|
||||
topology = {
|
||||
type = "topology";
|
||||
vdev = [
|
||||
{
|
||||
mode = "mirror";
|
||||
members = vdev;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
datasets = {
|
||||
"nas" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/mnt/hdd";
|
||||
mountOptions = [ "nofail" ];
|
||||
};
|
||||
"service-data" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/var/lib";
|
||||
mountOptions = [ "nofail" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,6 @@
|
||||
{
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
|
||||
fsType = "ext4";
|
||||
};
|
||||
}
|
||||
@@ -1,24 +1,14 @@
|
||||
{ inputs, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
(inputs.import-tree ./services)
|
||||
];
|
||||
system.stateVersion = "25.11";
|
||||
nixpkgs.hostPlatform = {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
boot.loader.grub.devices = [ "/dev/disk/by-id/FIXME" ];
|
||||
fileSystems = {
|
||||
"/".device = "/dev/FIXME";
|
||||
};
|
||||
networking.fqdn = "b4l.co.th";
|
||||
system.stateVersion = "25.11";
|
||||
clan.core.sops.defaultGroups = [ "admins" ];
|
||||
|
||||
security.acme.defaults.email = "admin@b4l.co.th";
|
||||
security.acme.acceptTerms = true;
|
||||
services.nginx.virtualHosts."${config.networking.fqdn}" = {
|
||||
enableACME = true;
|
||||
};
|
||||
clan.core.settings.name = "tangra";
|
||||
clan.core.settings.machine.description =
|
||||
"A Hetzner VPS machine own by Alex. This is a machine for poyfestival.com";
|
||||
|
||||
clan.core.sops.defaultGroups = [ "admins" ];
|
||||
|
||||
clan.core.vars.generators.acme = {
|
||||
share = true;
|
||||
@@ -33,4 +23,10 @@
|
||||
cat $prompts/email > $out/email
|
||||
'';
|
||||
};
|
||||
|
||||
users.users.nginx.extraGroups = [ "acme" ];
|
||||
|
||||
security.acme.acceptTerms = true;
|
||||
|
||||
imports = [ ];
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
{ ... }:
|
||||
let
|
||||
hashDisk = disk: "os-${builtins.substring 0 5 (builtins.hashString "sha256" disk)}";
|
||||
os = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_119349241";
|
||||
in
|
||||
{
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
|
||||
boot.zfs.forceImportRoot = true;
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"os-${hashDisk os}" = {
|
||||
type = "disk";
|
||||
device = os;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "nofail" ];
|
||||
};
|
||||
};
|
||||
system = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "zroot";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
zpool = {
|
||||
zroot = {
|
||||
type = "zpool";
|
||||
rootFsOptions = {
|
||||
mountpoint = "none";
|
||||
compression = "lz4";
|
||||
acltype = "posixacl";
|
||||
xattr = "sa";
|
||||
"com.sun:auto-snapshot" = "true";
|
||||
};
|
||||
options.ashift = "12";
|
||||
datasets = {
|
||||
"root" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "none";
|
||||
};
|
||||
"root/nixos" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "/";
|
||||
mountpoint = "/";
|
||||
};
|
||||
"root/home" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "/home";
|
||||
mountpoint = "/home";
|
||||
};
|
||||
"root/tmp" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/tmp";
|
||||
options = {
|
||||
mountpoint = "/tmp";
|
||||
sync = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,17 +10,11 @@
|
||||
|
||||
(inputs.import-tree ./services)
|
||||
|
||||
(import ../../lib/auto-accept-zerotier-members.nix {
|
||||
memberIds = [
|
||||
"dbe44c0287" # Alex-gateway
|
||||
"b0e0b84fd3" # Alex
|
||||
"2bd36db8cc" # kurogeek-thinkpad
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
clan.core.sops.defaultGroups = [ "admins" ];
|
||||
clan.core.networking.targetHost = "root@[${config.clan.core.vars.generators.zerotier.files.zerotier-ip.value}]";
|
||||
|
||||
clan.core.settings.machine.description = "Glom NAS";
|
||||
|
||||
nixpkgs.hostPlatform = {
|
||||
system = "x86_64-linux";
|
||||
|
||||
@@ -18,6 +18,8 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
boot.zfs.forceImportRoot = true;
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"os-${hashDisk os}" = {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
name = "service-actual-budget";
|
||||
|
||||
clan = {
|
||||
test.useContainers = false;
|
||||
directory = ./.;
|
||||
inventory = {
|
||||
machines.server = { };
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
'';
|
||||
|
||||
clan = {
|
||||
test.useContainers = false;
|
||||
directory = ./.;
|
||||
inventory = {
|
||||
machines.server = { };
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
{ ... }:
|
||||
{
|
||||
_class = "clan.service";
|
||||
manifest.name = "headscale";
|
||||
manifest.description = "An open source, self-hosted implementation of the Tailscale control server";
|
||||
manifest.readme = "An open source, self-hosted implementation of the Tailscale control server";
|
||||
manifest.categories = [ "System" ];
|
||||
|
||||
roles.server = {
|
||||
description = "A server role";
|
||||
|
||||
interface =
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
options = {
|
||||
public_url = lib.mkOption {
|
||||
type = with lib.types; nullOr str;
|
||||
default = config.services.headscale.settings.server_url;
|
||||
description = "Public URL for accessing the instance";
|
||||
};
|
||||
|
||||
base_domain = lib.mkOption {
|
||||
type = with lib.types; str;
|
||||
default = "";
|
||||
description = "Defines the base domain to create the hostnames for MagicDNS in Headscale. `base_domain` must be a FQDN, without the trailing dot. The FQDN of the hosts will be `hostname.base_domain (e.g. myhost.tailnet.example.com)";
|
||||
};
|
||||
|
||||
advertise_routes = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
default = [ ];
|
||||
description = "Expose physical subnet routes to your entire Tailscale network.";
|
||||
example = [ "192.168.1.0/24" ];
|
||||
};
|
||||
|
||||
nameservers = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
default = [
|
||||
"1.1.1.1"
|
||||
"8.8.8.8"
|
||||
];
|
||||
description = "List of nameservers to pass to Tailscale clients";
|
||||
example = [ "10.0.10.1" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
perInstance =
|
||||
{ settings, ... }:
|
||||
{
|
||||
nixosModule =
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
preAuthKeyFile = "/var/lib/headscale/preauth.key";
|
||||
|
||||
routes = lib.concatStringsSep "," settings.advertise_routes;
|
||||
in
|
||||
{
|
||||
|
||||
systemd.services.headscale-auto-enroll =
|
||||
let
|
||||
serverUser = "hcserver";
|
||||
in
|
||||
{
|
||||
description = "Enroll this machine into headscale automatically";
|
||||
after = [
|
||||
"headscale.service"
|
||||
"tailscaled.service"
|
||||
];
|
||||
requires = [
|
||||
"headscale.service"
|
||||
"tailscaled.service"
|
||||
];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
User = "root";
|
||||
};
|
||||
|
||||
path = [ pkgs.jq ];
|
||||
|
||||
script = ''
|
||||
set -euo pipefail
|
||||
|
||||
if ${pkgs.tailscale}/bin/tailscale status &>/dev/null; then
|
||||
echo "Already enrolled, skipping."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for i in $(seq 1 30); do
|
||||
${pkgs.headscale}/bin/headscale users list &>/dev/null && break
|
||||
sleep 1
|
||||
done
|
||||
|
||||
${pkgs.headscale}/bin/headscale users create ${serverUser} 2>/dev/null || true
|
||||
|
||||
USER_ID=$(${pkgs.headscale}/bin/headscale users list --name ${serverUser} -o json | jq '.[0].id')
|
||||
|
||||
KEY=$(${pkgs.headscale}/bin/headscale preauthkeys create \
|
||||
--user $USER_ID \
|
||||
--reusable \
|
||||
--expiration 30m \
|
||||
--output json | ${pkgs.jq}/bin/jq -r '.key')
|
||||
|
||||
echo "$KEY" > ${preAuthKeyFile}
|
||||
chmod 600 ${preAuthKeyFile}
|
||||
|
||||
${pkgs.tailscale}/bin/tailscale up \
|
||||
--login-server=https://${settings.public_url} \
|
||||
--authkey="$KEY" \
|
||||
--accept-routes \
|
||||
--advertise-routes=${routes}
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.headscale-approve-routes = {
|
||||
description = "Auto approve routes";
|
||||
after = [
|
||||
"headscale.service"
|
||||
"tailscaled.service"
|
||||
"headscale-auto-enroll.service"
|
||||
];
|
||||
requires = [
|
||||
"headscale.service"
|
||||
"tailscaled.service"
|
||||
"headscale-auto-enroll.service"
|
||||
];
|
||||
|
||||
path = [ pkgs.jq ];
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "root";
|
||||
};
|
||||
|
||||
script = ''
|
||||
set -euo pipefail
|
||||
NODE_ID=$(${pkgs.tailscale}/bin/tailscale status --json | jq '.Self.ID' | tr -d '"')
|
||||
${pkgs.headscale}/bin/headscale node approve-routes --identifier $NODE_ID --routes ${routes}
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
systemd.services.tailscaled-autoconnect.after = [
|
||||
"tailscaled.service"
|
||||
"headscale-auto-enroll.service"
|
||||
];
|
||||
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
useRoutingFeatures = "server";
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
config.services.headscale.port
|
||||
];
|
||||
|
||||
services.headscale = {
|
||||
enable = true;
|
||||
address = "0.0.0.0";
|
||||
settings.server_url = "https://${settings.public_url}";
|
||||
|
||||
settings.dns = {
|
||||
base_domain = settings.base_domain;
|
||||
override_local_dns = true;
|
||||
nameservers.global = settings.nameservers;
|
||||
magic_dns = false;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{ self, inputs, ... }:
|
||||
let
|
||||
module = ./default.nix;
|
||||
in
|
||||
{
|
||||
clan.modules = {
|
||||
headscale = module;
|
||||
};
|
||||
# perSystem =
|
||||
# { ... }:
|
||||
# {
|
||||
# clan.nixosTests.service-headplane = {
|
||||
# imports = [ ./tests/vm/default.nix ];
|
||||
# _module.args = { inherit self inputs; };
|
||||
#
|
||||
# clan.modules."@clan/headplane" = module;
|
||||
# };
|
||||
# };
|
||||
}
|
||||
@@ -2,5 +2,6 @@
|
||||
{
|
||||
clan.modules = {
|
||||
home-user = lib.modules.importApply ./home-user { };
|
||||
emmie-home = lib.modules.importApply ./home-user/emmie.nix { };
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
{ ... }:
|
||||
{
|
||||
_class = "clan.service";
|
||||
manifest.name = "emmie-home-manager";
|
||||
manifest.description = "Emmie's home-manager profile generator";
|
||||
manifest.readme = "Emmie's home-manager profile generator";
|
||||
manifest.categories = [ "System" ];
|
||||
|
||||
roles.default = {
|
||||
description = "a default role for the user";
|
||||
perInstance =
|
||||
{ ... }:
|
||||
{
|
||||
nixosModule =
|
||||
{ inputs, pkgs, ... }:
|
||||
let
|
||||
username = "emmie";
|
||||
in
|
||||
{
|
||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||
|
||||
users.users.${username} = {
|
||||
initialPassword = "";
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"audio"
|
||||
"video"
|
||||
"networkmanager"
|
||||
];
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
xkb.layout = "us,th";
|
||||
xkb.options = "grp:win_space_toggle,grp:alt_shift_toggle";
|
||||
};
|
||||
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
extraOpts = {
|
||||
"BlockThirdPartyCookies" = true;
|
||||
"ClearBrowsingDataOnExitList" = [
|
||||
"download_history"
|
||||
"cookies_and_other_site_data"
|
||||
"cached_images_and_files"
|
||||
"password_signin"
|
||||
"autofill"
|
||||
"site_settings"
|
||||
"hosted_app_data"
|
||||
];
|
||||
"BraveRewardsDisabled" = true;
|
||||
"BraveWalletDisabled" = true;
|
||||
"BraveAIChatEnabled" = false;
|
||||
"BraveNewsDisabled" = true;
|
||||
"BraveSpeedreaderEnabled" = false;
|
||||
"BraveWaybackMachineEnabled" = false;
|
||||
"BraveStatsPingEnabled" = false;
|
||||
"BraveWebDiscoveryEnabled" = false;
|
||||
"BravePlaylistEnabled" = false;
|
||||
"BraveVPNDisabled" = true;
|
||||
"TorDisabled" = true;
|
||||
"BraveP3AEnabled" = false;
|
||||
"BraveTalkDisabled" = true;
|
||||
"SyncDisabled" = false;
|
||||
"PasswordManagerEnabled" = false;
|
||||
"AutofillAddressEnabled" = false;
|
||||
"AutofillCreditCardEnabled" = false;
|
||||
"TranslateEnabled" = false;
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.${username} =
|
||||
{
|
||||
osConfig,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
dictionaries =
|
||||
with pkgs;
|
||||
(hunspellWithDicts (
|
||||
with hunspellDicts;
|
||||
[
|
||||
en-us-large
|
||||
th-th
|
||||
]
|
||||
));
|
||||
in
|
||||
{
|
||||
imports = [ inputs.plasma-manager.homeModules.plasma-manager ];
|
||||
|
||||
systemd.user.sessionVariables = {
|
||||
DICPATH = "${dictionaries}/share/hunspell";
|
||||
};
|
||||
|
||||
home = {
|
||||
homeDirectory = lib.mkForce "/home/${username}";
|
||||
stateVersion = osConfig.system.stateVersion;
|
||||
|
||||
packages = with pkgs; [
|
||||
libreoffice-qt6
|
||||
dictionaries
|
||||
|
||||
element-desktop
|
||||
signal-desktop
|
||||
brave
|
||||
keepassxc
|
||||
vlc
|
||||
thunderbird
|
||||
wasabiwallet
|
||||
protonmail-desktop
|
||||
];
|
||||
};
|
||||
programs.chromium.package = pkgs.brave;
|
||||
programs.home-manager.enable = true;
|
||||
services.syncthing.tray.enable = osConfig.services.syncthing.enable;
|
||||
programs.plasma.enable = true;
|
||||
programs.plasma.powerdevil = {
|
||||
AC = {
|
||||
autoSuspend.action = "shutDown";
|
||||
autoSuspend.idleTimeout = 1800;
|
||||
};
|
||||
battery = {
|
||||
autoSuspend.action = "shutDown";
|
||||
autoSuspend.idleTimeout = 1800;
|
||||
};
|
||||
lowBattery = {
|
||||
autoSuspend.action = "shutDown";
|
||||
autoSuspend.idleTimeout = 1800;
|
||||
};
|
||||
};
|
||||
};
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -22,4 +22,5 @@
|
||||
];
|
||||
};
|
||||
programs.home-manager.enable = true;
|
||||
services.syncthing.tray.enable = osConfig.services.syncthing.enable;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
name = "service-nextcloud";
|
||||
|
||||
clan = {
|
||||
test.useContainers = false;
|
||||
directory = ./.;
|
||||
inventory = {
|
||||
machines.server = { };
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
name = "service-paperless";
|
||||
|
||||
clan = {
|
||||
test.useContainers = false;
|
||||
directory = ./.;
|
||||
inventory = {
|
||||
machines.server = { };
|
||||
|
||||
@@ -5,5 +5,4 @@
|
||||
|
||||
services.displayManager.sddm.enable = lib.mkForce false;
|
||||
services.displayManager.gdm.enable = true;
|
||||
services.displayManager.gdm.wayland = true;
|
||||
}
|
||||
|
||||
@@ -22,11 +22,27 @@ let
|
||||
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [ pkgs.simple-scan ];
|
||||
nixpkgs.config.allowUnfreePredicate =
|
||||
pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"brgenml1lpr"
|
||||
"cups-brother-dcpt310"
|
||||
"cups-brother-dcpt720dw"
|
||||
"cups-brother-dcpt725dw"
|
||||
];
|
||||
# nixpkgs.config.allowUnfree = true;
|
||||
services.ipp-usb.enable = true;
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [
|
||||
pkgs.brlaser
|
||||
pkgs.gutenprint
|
||||
pkgs.brgenml1lpr
|
||||
pkgs.brgenml1cupswrapper
|
||||
pkgs.cups-brother-dcpt310
|
||||
pkgs.cups-brother-dcpt720dw
|
||||
pkgs.cups-brother-dcpt725dw
|
||||
];
|
||||
|
||||
extraFilesConf = ''
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
security.polkit.extraConfig = ''
|
||||
polkit.addRule(function(action, subject) {
|
||||
if ((action.id == "org.freedesktop.accounts.change-own-password")) {
|
||||
return polkit.Result.AUTH_SELF;
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
'';
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
'';
|
||||
|
||||
clan = {
|
||||
test.useContainers = false;
|
||||
directory = ./.;
|
||||
inventory = {
|
||||
machines.server = { };
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
name = "service-pocket-id";
|
||||
|
||||
clan = {
|
||||
test.useContainers = false;
|
||||
directory = ./.;
|
||||
inventory = {
|
||||
machines.server = { };
|
||||
|
||||
@@ -23,6 +23,7 @@ in
|
||||
'';
|
||||
|
||||
clan = {
|
||||
test.useContainers = false;
|
||||
directory = ./.;
|
||||
inventory = {
|
||||
machines.server = { };
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
name = "service-stirling-pdf";
|
||||
|
||||
clan = {
|
||||
test.useContainers = false;
|
||||
directory = ./.;
|
||||
inventory = {
|
||||
machines.server = { };
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
name = "service-victoriametrics";
|
||||
|
||||
clan = {
|
||||
test.useContainers = false;
|
||||
directory = ./.;
|
||||
inventory = {
|
||||
machines.server = { };
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
name = "service-vikunja";
|
||||
|
||||
clan = {
|
||||
test.useContainers = false;
|
||||
directory = ./.;
|
||||
inventory = {
|
||||
machines.server = { };
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
{ ... }:
|
||||
{
|
||||
_class = "clan.service";
|
||||
manifest.name = "wordpress";
|
||||
manifest.description = "wordpress with multi-tenant support and state of plugins and themes are allowed";
|
||||
manifest.readme = "wordpress with multi-tenant support and state of plugins and themes are allowed";
|
||||
manifest.categories = [ "System" ];
|
||||
|
||||
roles.server = {
|
||||
description = "A default server role";
|
||||
interface =
|
||||
{ lib, ... }:
|
||||
{
|
||||
options = {
|
||||
tenants = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
default = [ "localhost" ];
|
||||
description = "List of tenants website to host on the instance";
|
||||
example = [ "example.com" ];
|
||||
};
|
||||
phpfpmOptions = lib.mkOption {
|
||||
type = with lib.types; lines;
|
||||
default = "";
|
||||
description = "options appended to the PHP configuration file";
|
||||
};
|
||||
wpExtraConfig = lib.mkOption {
|
||||
type = with lib.types; lines;
|
||||
default = "";
|
||||
description = "Any additional text to be appended to the wp-config.php";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
perInstance =
|
||||
{ settings, ... }:
|
||||
{
|
||||
nixosModule =
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
user = "wordpress";
|
||||
|
||||
mkSafeDBName = domain: "wp_${builtins.replaceStrings [ "." ] [ "_" ] domain}";
|
||||
|
||||
mkWordpressSite = domain: {
|
||||
database = {
|
||||
name = mkSafeDBName domain;
|
||||
user = user;
|
||||
};
|
||||
package = wp-pkg domain;
|
||||
extraConfig = ''
|
||||
define('FS_METHOD', 'direct');
|
||||
''
|
||||
+ settings.wpExtraConfig;
|
||||
themes = { };
|
||||
};
|
||||
|
||||
stateDir = hostName: "/var/lib/wordpress/${hostName}";
|
||||
|
||||
wp-pkg =
|
||||
hostName:
|
||||
let
|
||||
upStreamSrc = pkgs.wordpress;
|
||||
in
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "wordpress-custom";
|
||||
version = upStreamSrc.version;
|
||||
src = upStreamSrc;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r * $out/
|
||||
|
||||
rm -rf $out/share/wordpress/wp-content/plugins
|
||||
rm -rf $out/share/wordpress/wp-content/themes
|
||||
|
||||
# symlink uploads directory
|
||||
ln -s "${stateDir hostName}"/wp-content/themes $out/share/wordpress/wp-content/themes
|
||||
ln -s "${stateDir hostName}"/wp-content/plugins $out/share/wordpress/wp-content/plugins
|
||||
ln -s "${stateDir hostName}"/wp-content/upgrade $out/share/wordpress/wp-content/upgrade
|
||||
|
||||
'';
|
||||
};
|
||||
webserver = config.services.${config.services.wordpress.webserver};
|
||||
in
|
||||
{
|
||||
services.wordpress.webserver = "nginx";
|
||||
|
||||
services.wordpress.sites = builtins.listToAttrs (
|
||||
map (tenant: {
|
||||
name = tenant;
|
||||
value = mkWordpressSite tenant;
|
||||
|
||||
}) settings.tenants
|
||||
);
|
||||
|
||||
systemd.tmpfiles.rules = lib.flatten (
|
||||
map (tenant: [
|
||||
"d '${stateDir tenant}/wp-content' 0750 ${user} ${webserver.group} - -"
|
||||
"d '${stateDir tenant}/wp-content/themes' 0750 ${user} ${webserver.group} - -"
|
||||
"Z '${stateDir tenant}/wp-content/themes' 0750 ${user} ${webserver.group} - -"
|
||||
"d '${stateDir tenant}/wp-content/plugins' 0750 ${user} ${webserver.group} - -"
|
||||
"Z '${stateDir tenant}/wp-content/plugins' 0750 ${user} ${webserver.group} - -"
|
||||
"d '${stateDir tenant}/wp-content/upgrade' 0750 ${user} ${webserver.group} - -"
|
||||
"Z '${stateDir tenant}/wp-content/upgrade' 0750 ${user} ${webserver.group} - -"
|
||||
]) settings.tenants
|
||||
);
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
|
||||
services.phpfpm.pools = builtins.listToAttrs (
|
||||
map (
|
||||
tenant: lib.nameValuePair "wordpress-${tenant}" { phpOptions = settings.phpfpmOptions; }
|
||||
) settings.tenants
|
||||
);
|
||||
|
||||
security.acme.acceptTerms = true;
|
||||
|
||||
users.users.nginx.extraGroups = [ "acme" ];
|
||||
|
||||
security.acme.certs = lib.listToAttrs (
|
||||
map (
|
||||
tenant:
|
||||
(lib.nameValuePair tenant {
|
||||
email = config.clan.core.vars.generators.acme.files.email.value;
|
||||
webroot = "/var/lib/acme/acme-challenge/${tenant}";
|
||||
})
|
||||
) settings.tenants
|
||||
);
|
||||
|
||||
services.nginx.clientMaxBodySize = "128m";
|
||||
|
||||
services.nginx.virtualHosts = lib.listToAttrs (
|
||||
map (
|
||||
tenant:
|
||||
(lib.nameValuePair tenant {
|
||||
forceSSL = true;
|
||||
useACMEHost = tenant;
|
||||
acmeRoot = config.security.acme.certs.${tenant}.webroot;
|
||||
})
|
||||
) settings.tenants
|
||||
);
|
||||
|
||||
clan.core.vars.generators.acme = {
|
||||
share = true;
|
||||
files.email.secret = false;
|
||||
|
||||
prompts.email = {
|
||||
type = "line";
|
||||
description = "Email for ACME registeration";
|
||||
};
|
||||
|
||||
script = ''
|
||||
cat $prompts/email > $out/email
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{ self, inputs, ... }:
|
||||
let
|
||||
module = ./default.nix;
|
||||
in
|
||||
{
|
||||
clan.modules = {
|
||||
wordpress = module;
|
||||
};
|
||||
perSystem =
|
||||
{ ... }:
|
||||
{
|
||||
clan.nixosTests.service-wordpress = {
|
||||
imports = [ ./tests/vm/default.nix ];
|
||||
_module.args = { inherit self inputs; };
|
||||
|
||||
clan.modules."@clan/wordpress" = module;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
{
|
||||
self,
|
||||
config,
|
||||
lib,
|
||||
hostPkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
name = "service-wordpress";
|
||||
result.update-vars =
|
||||
let
|
||||
relativeDir = lib.removePrefix "${self}/" (toString config.clan.directory);
|
||||
in
|
||||
hostPkgs.writeShellScriptBin "update-vars" ''
|
||||
set -x
|
||||
export PRJ_ROOT=$(git rev-parse --show-toplevel)
|
||||
${
|
||||
self.inputs.clan-core.packages.${hostPkgs.system}.clan-cli
|
||||
}/bin/clan-generate-test-vars $PRJ_ROOT/${relativeDir} ${config.name}
|
||||
'';
|
||||
|
||||
clan = {
|
||||
test.useContainers = false;
|
||||
directory = ./.;
|
||||
inventory = {
|
||||
machines.server = { };
|
||||
|
||||
instances = {
|
||||
wordpress-test = {
|
||||
module.name = "@clan/wordpress";
|
||||
module.input = "self";
|
||||
roles.server.machines."server".settings = {
|
||||
tenants = [
|
||||
"localhost"
|
||||
"site2.localhost"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nodes = {
|
||||
server = { };
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
|
||||
server.wait_for_unit("phpfpm-wordpress-localhost.service")
|
||||
server.wait_for_unit("phpfpm-wordpress-site2.localhost.service")
|
||||
|
||||
server.succeed("systemctl status phpfpm-wordpress-localhost.service")
|
||||
server.succeed("systemctl status phpfpm-wordpress-site2.localhost.service")
|
||||
server.wait_for_open_port(80)
|
||||
server.succeed("curl -H \"Host: localhost\" http://127.0.0.1:80 ")
|
||||
server.succeed("curl -H \"Host: site2.localhost\" http://127.0.0.1:80 ")
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"publickey": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
|
||||
"type": "age"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
26.11
|
||||
@@ -0,0 +1 @@
|
||||
fake_line_value
|
||||
@@ -5,6 +5,7 @@
|
||||
name = "service-yggdrasil";
|
||||
|
||||
clan = {
|
||||
test.useContainers = false;
|
||||
directory = ./.;
|
||||
inventory = {
|
||||
machines.server = { };
|
||||
|
||||
@@ -173,10 +173,10 @@ in
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
WorkingDirectory = "${file-uploader}";
|
||||
ExecStart = "${lib.getExe pkgs.nodejs_20} ${file-uploader}/src/be/index.js";
|
||||
ExecStart = "${lib.getExe pkgs.nodejs} ${file-uploader}/src/be/index.js";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
path = [ pkgs.nodejs_20 ];
|
||||
path = [ pkgs.nodejs ];
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
{ ... }:
|
||||
{ inputs, ... }:
|
||||
{
|
||||
flake.overlays = {
|
||||
packagesOverlay = import ../pkgs/overlay.nix;
|
||||
|
||||
frappixFrappeOverlay = inputs.frappix.frappeOverlay.x86_64-linux;
|
||||
frappixLibsOverlay = inputs.frappix.libsOverlay.x86_64-linux;
|
||||
frappixPythonOverlay = inputs.frappix.pythonOverlay.x86_64-linux;
|
||||
frappixToolsOverlay = inputs.frappix.toolsOverlay.x86_64-linux;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ buildNpmPackage {
|
||||
version = "1.0.0";
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
nodejs_20
|
||||
nodejs
|
||||
breakpointHook
|
||||
];
|
||||
|
||||
|
||||
@@ -5,5 +5,9 @@
|
||||
device = (import "${inputs.liminix}/devices/gl-ar750");
|
||||
liminix-config = import ./white-house/configuration.nix { inherit inputs; };
|
||||
};
|
||||
whitehouse-router-2 = import "${inputs.liminix}/default.nix" {
|
||||
device = (import "${inputs.liminix}/devices/gl-ar750");
|
||||
liminix-config = import ./white-house-2/configuration.nix { inherit inputs; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
{ inputs }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
secrets = {
|
||||
firewallRules = { };
|
||||
}
|
||||
// (import ./secrets.nix);
|
||||
wirelessConfig = {
|
||||
country_code = "TH";
|
||||
inherit (secrets) wpa_passphrase;
|
||||
wmm_enabled = 1;
|
||||
};
|
||||
svc = config.system.service;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
"${inputs.liminix}/modules/wlan.nix"
|
||||
"${inputs.liminix}/modules/ssh"
|
||||
"${modulesPath}/profiles/wap.nix"
|
||||
];
|
||||
|
||||
hostname = "whitehouse2";
|
||||
boot = {
|
||||
tftp = {
|
||||
freeSpaceBytes = 3 * 1024 * 1024;
|
||||
serverip = "${secrets.lan.prefix}.149";
|
||||
ipaddr = "${secrets.lan.prefix}.252";
|
||||
};
|
||||
};
|
||||
|
||||
services.sshd = svc.ssh.build {
|
||||
authorizedKeys.root = secrets.root.openssh.authorizedKeys.keys;
|
||||
};
|
||||
|
||||
users.root = secrets.root;
|
||||
|
||||
profile.wap = {
|
||||
interfaces = with config.hardware.networkInterfaces; [
|
||||
wan
|
||||
lan
|
||||
wlan
|
||||
wlan5
|
||||
];
|
||||
|
||||
wireless.networks = {
|
||||
"${secrets.ssid}" = {
|
||||
interface = config.hardware.networkInterfaces.wlan;
|
||||
hw_mode = "g";
|
||||
channel = "6";
|
||||
ieee80211n = 1;
|
||||
}
|
||||
// wirelessConfig;
|
||||
"${secrets.ssid}-5" = rec {
|
||||
interface = config.hardware.networkInterfaces.wlan5;
|
||||
hw_mode = "a";
|
||||
channel = 36;
|
||||
ht_capab = "[HT40+]";
|
||||
vht_oper_chwidth = 1;
|
||||
vht_oper_centr_freq_seg0_idx = channel + 6;
|
||||
ieee80211n = 1;
|
||||
ieee80211ac = 1;
|
||||
}
|
||||
// wirelessConfig;
|
||||
};
|
||||
};
|
||||
|
||||
system.service.network.forward.enableIPv4 = false;
|
||||
system.service.network.forward.enableIPv6 = false;
|
||||
|
||||
defaultProfile.packages = with pkgs; [
|
||||
busybox
|
||||
iw
|
||||
nftables
|
||||
];
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
wpa_passphrase = "";
|
||||
ssid = "GL-AR750";
|
||||
root = {
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEcZ/p1Ofa9liwIzPWzNtONhJ7+FUWd2lCz33r81t8+w kurogeek@kurogeek"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAB/raxJR8gASmquP63weHelbi+da2WBJR1DgzHPNz/f"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDuhpzDHBPvn8nv8RH1MRomDOaXyP4GziQm7r3MZ1Syk"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAmgyEGuY/r7SDlJgrzYmQqpcWS5W+fCzRi3OS59ne4W openpgp:0xFF687387"
|
||||
];
|
||||
};
|
||||
|
||||
lan = {
|
||||
prefix = "192.168.1";
|
||||
};
|
||||
}
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
[
|
||||
{
|
||||
"publickey": "age1yrqpfs0wtaxg9p9058g2gyq7kffjnnqdw26wa4a4uvjqkzvmq5wqvdtgxl",
|
||||
"type": "age"
|
||||
}
|
||||
]
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
[
|
||||
{
|
||||
"publickey": "age1xzasw9ggd9gf39nx90jpe4qu8p4nzke98e70t7e8sl9mutkgrd4s0elqcl",
|
||||
"type": "age"
|
||||
}
|
||||
]
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
[
|
||||
{
|
||||
"publickey": "age1w6fg9v57jesdv0ectnhynmy5vqdpf6hgyhnn5rejyj2xgghrud4q0jfcta",
|
||||
"type": "age"
|
||||
}
|
||||
]
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
[
|
||||
{
|
||||
"publickey": "age1wkly8nm7vsn7kdap5ucyw62rsxnk8xzt0e86wua73mcxxv2a9ahq05ljlx",
|
||||
"type": "age"
|
||||
}
|
||||
]
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
[
|
||||
{
|
||||
"publickey": "age1qdxqyqqs34cksjkzeww2c942w8xgm9x6d4zct4glwqg90ghve9qq6d944c",
|
||||
"type": "age"
|
||||
}
|
||||
]
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
[
|
||||
{
|
||||
"publickey": "age14wy7mauwmchu8u2pqqamxf6n9rw797l2sjwskxyw33gg7k78gvwq7cn0av",
|
||||
"type": "age"
|
||||
}
|
||||
]
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
[
|
||||
{
|
||||
"publickey": "age14pdszyzzu9lwzhxs7xz7k94knvgensay9qr4p6j9z8qnqnvqup8qpvk6ra",
|
||||
"type": "age"
|
||||
}
|
||||
]
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user