Compare commits
42
Commits
26bfa56268
..
nixvim
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2b6e843eb | ||
|
|
09b138391b | ||
|
|
0aa0cc0e0d | ||
|
|
5d9cd9d835 | ||
|
|
656fc82d7f | ||
|
|
f37b4db130 | ||
|
|
52c6a60404 | ||
|
|
f7c68efe3d | ||
|
|
07c53ac387 | ||
|
|
0ea3a46059 | ||
|
|
b4443ea131 | ||
|
|
e47eef6e56 | ||
|
|
f4ac164633 | ||
|
|
b14d48b3e2 | ||
|
|
3475d0cde1 | ||
|
|
65d251504a | ||
|
|
2b24333e3f | ||
|
|
8d0589e157 | ||
|
|
bb549a8ad9 | ||
|
|
9ab0508157 | ||
|
|
ca6e2b5a57 | ||
|
|
ce139a1eec | ||
|
|
679d18b278 | ||
|
|
b4f0765591 | ||
|
|
01753a10f6 | ||
|
|
125edfb31b | ||
|
|
58a47d94fb | ||
|
|
81a7e80360 | ||
|
|
44d14fca6d | ||
|
|
8770e95bbe | ||
|
|
2ecc910de4 | ||
|
|
40f0dc0d45 | ||
|
|
7a276567c6 | ||
|
|
5a4b51112f | ||
|
|
e008288d52 | ||
|
|
1dcd29fd96 | ||
|
|
64b031ceba | ||
|
|
f3ddbb162c | ||
|
|
d0cb1b5090 | ||
|
|
7c2a09a360 | ||
|
|
933afc7d11 | ||
|
|
42e60a3bb5 |
No files matched your search
@@ -0,0 +1,5 @@
|
|||||||
|
## Me
|
||||||
|
|
||||||
|
[mcp_servers.nixos]
|
||||||
|
command = "nix"
|
||||||
|
args = ["run", "github:utensils/mcp-nixos", "--"]
|
||||||
@@ -1,3 +1 @@
|
|||||||
- Evaluate Plasma Manager when Plasma 6.7 support improves
|
|
||||||
- Review system-wide package list periodically
|
- Review system-wide package list periodically
|
||||||
- Add additional hosts
|
|
||||||
Generated
+193
-35
@@ -1,5 +1,28 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"agenix": {
|
||||||
|
"inputs": {
|
||||||
|
"darwin": "darwin",
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1770165109,
|
||||||
|
"narHash": "sha256-9VnK6Oqai65puVJ4WYtCTvlJeXxMzAp/69HhQuTdl/I=",
|
||||||
|
"owner": "ryantm",
|
||||||
|
"repo": "agenix",
|
||||||
|
"rev": "b027ee29d959fda4b60b57566d64c98a202e0feb",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "ryantm",
|
||||||
|
"repo": "agenix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"apple-fonts": {
|
"apple-fonts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"ci": "ci",
|
"ci": "ci",
|
||||||
@@ -14,11 +37,11 @@
|
|||||||
"sf-pro": "sf-pro"
|
"sf-pro": "sf-pro"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1786018145,
|
"lastModified": 1787373040,
|
||||||
"narHash": "sha256-4cjJFmq6JC0Gk9wWt3aZzqovtmM9mikrDWjsBL2ZWu8=",
|
"narHash": "sha256-mSpL69LSAA/+cQx+v9tC2XC/DD7cUepUmhiMx0/Hw64=",
|
||||||
"owner": "Lyndeno",
|
"owner": "Lyndeno",
|
||||||
"repo": "apple-fonts.nix",
|
"repo": "apple-fonts.nix",
|
||||||
"rev": "66b5379c6a429ad4ea6ff3943cc1f651df55cc70",
|
"rev": "69f20e9ba294420e4b6407a827c6b5aea3afcc12",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -73,15 +96,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1784665499,
|
"lastModified": 1788011267,
|
||||||
"narHash": "sha256-9BMxlTxCCDAeoNLtb1a/st7udtTIJep+wpUzquA29VU=",
|
"narHash": "sha256-mEq2kU+ljompTToZ44Afvm7d/rHJ5iMBl0tjZuyShJs=",
|
||||||
"owner": "nix-community",
|
"owner": "Mic92",
|
||||||
"repo": "bun2nix",
|
"repo": "bun2nix",
|
||||||
"rev": "0f2a1f0b6f42cebe3b149bf62d38754c5e0e9729",
|
"rev": "5765b0614591f75ee8ba5596e81ae85c167d1071",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "Mic92",
|
||||||
|
"ref": "fix-structured-attrs-hook",
|
||||||
"repo": "bun2nix",
|
"repo": "bun2nix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -108,6 +132,28 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"darwin": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"agenix",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1744478979,
|
||||||
|
"narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=",
|
||||||
|
"owner": "lnl7",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"rev": "43975d782b418ebf4969e9ccba82466728c2851b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "lnl7",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
@@ -116,11 +162,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1785627969,
|
"lastModified": 1788450739,
|
||||||
"narHash": "sha256-4dtXQk/NMePegK/nWp5NSeuZKLATItOq61lpEvmXqGw=",
|
"narHash": "sha256-glZLQlzIn1fXH6PazR2iUmTo7kzzyYSshrWhLS9TqCU=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "427bf4bd9435fdf21321c8cc628c24efc14c0f7a",
|
"rev": "31729ca8cbdb4fa927b34e5f4353e6a83f39e993",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -130,6 +176,27 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts_2": {
|
"flake-parts_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1787559586,
|
||||||
|
"narHash": "sha256-onL0VLf9vPllmT0H/OlURIU5r5t5WIEl7t4tVNKT0Nw=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "9d0d87172c374f89da73c1cfe6d81ae62feac1f1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts_3": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
@@ -150,15 +217,36 @@
|
|||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
"agenix",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1786031233,
|
"lastModified": 1745494811,
|
||||||
"narHash": "sha256-TIDlLTLI1/pB7IqgjzcKQjpODQsZE2oII4XGG9B6KjI=",
|
"narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "7834e82588860aaf780cec1366524456a70898d7",
|
"rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1788458226,
|
||||||
|
"narHash": "sha256-UZTAlg8iKVEmyEXakzKmukrzFIKrXezYsRy9vajDrGw=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "aa308770461dcf22c333a5e8a31c8bddbde5bee9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -172,15 +260,15 @@
|
|||||||
"bun2nix": "bun2nix",
|
"bun2nix": "bun2nix",
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"systems": "systems",
|
"systems": "systems_2",
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1786236470,
|
"lastModified": 1788481344,
|
||||||
"narHash": "sha256-eIRMdjSQKSUf5aug00ycVSsO+8kIVQy5bH+K28U9LfE=",
|
"narHash": "sha256-3jEfPEkegrp3ps+VuNT0i+kI4hhfDKoSICoUzZrXDOE=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "llm-agents.nix",
|
"repo": "llm-agents.nix",
|
||||||
"rev": "bd89b8dd8837cc8d3098524c7cfe08c884ad5569",
|
"rev": "496d8f2d508dcd4673a1480cd58b3e9bf3400c15",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -210,11 +298,11 @@
|
|||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1786241478,
|
"lastModified": 1788408011,
|
||||||
"narHash": "sha256-K/jbo7rTV0jRcDdHKL9VxGURqH61OJcCat9al7q9oMg=",
|
"narHash": "sha256-VErLyHIT3U4x64a2G6J6wplB4yDPIpMXlhUpBjUMNEE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-vscode-extensions",
|
"repo": "nix-vscode-extensions",
|
||||||
"rev": "c7e586ad09d79ab867b055b818d4122334ff6dfe",
|
"rev": "f848614222a7ef023998450a6f6773e10f8adf83",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -256,11 +344,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1785975029,
|
"lastModified": 1788372231,
|
||||||
"narHash": "sha256-X44cn5rzytELc3NNoQsh0aLkjWA/QzPfc6HPQmsG3sU=",
|
"narHash": "sha256-7aqErvrAEz/5OcPA5p3M+tVOqeYc4oJXkNIPXfCqxAw=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "70ce234312134a463ba7728e94da2486a1d237ac",
|
"rev": "9387b3fcc0c23c86661636da63faabad4235a0a6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -288,11 +376,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1786106723,
|
"lastModified": 1788316716,
|
||||||
"narHash": "sha256-zDSUbpoeo/9ZmD2+wXnzxoo1+uhL8vxc0b8yuYMKYq0=",
|
"narHash": "sha256-bc7rSpXIdn9QWGNqfWcPZWOhEVF8NoeAZkWq0XWnf/k=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "f13ff45afd1bb73e640eaa08a7066dbed07e3238",
|
"rev": "3ed67ec0a4d3c7ab4ae1f04f8ee8df07bfa506a2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -302,6 +390,42 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs_5": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1789844176,
|
||||||
|
"narHash": "sha256-COQmpo4lFIzMgUjr3ntDpjH0NwrCnf7N0uhR+6WPGP8=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "79b35bf0bda5cd110f856aa5b5b2c5ba4460dbf5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixvim": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts_2",
|
||||||
|
"nixpkgs": "nixpkgs_5",
|
||||||
|
"systems": "systems_3"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1788190018,
|
||||||
|
"narHash": "sha256-59BAfH0txPAZrPBF4QJqwvUWppD+ICrcjA1LZAmPnrQ=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"rev": "41844750e55f17b1385d5b09ca7ade5f11f49506",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ny": {
|
"ny": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@@ -339,12 +463,14 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"agenix": "agenix",
|
||||||
"apple-fonts": "apple-fonts",
|
"apple-fonts": "apple-fonts",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager_2",
|
||||||
"llm-agents": "llm-agents",
|
"llm-agents": "llm-agents",
|
||||||
"nix-flatpak": "nix-flatpak",
|
"nix-flatpak": "nix-flatpak",
|
||||||
"nix-vscode-extensions": "nix-vscode-extensions",
|
"nix-vscode-extensions": "nix-vscode-extensions",
|
||||||
"nixpkgs": "nixpkgs_4",
|
"nixpkgs": "nixpkgs_4",
|
||||||
|
"nixvim": "nixvim",
|
||||||
"plasma-manager": "plasma-manager",
|
"plasma-manager": "plasma-manager",
|
||||||
"sidra": "sidra",
|
"sidra": "sidra",
|
||||||
"vscode-server": "vscode-server"
|
"vscode-server": "vscode-server"
|
||||||
@@ -441,11 +567,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1785827118,
|
"lastModified": 1788475513,
|
||||||
"narHash": "sha256-tS2eSSpa1uLPUyIAJBpf00+A9KSHpC92gKMLavmHuio=",
|
"narHash": "sha256-JRZ3eQpeeExv3mR1icbZAjToe7MPm8XleJML0UsrAHg=",
|
||||||
"owner": "wimpysworld",
|
"owner": "wimpysworld",
|
||||||
"repo": "sidra",
|
"repo": "sidra",
|
||||||
"rev": "0597e5438fe98fef935cb528c2c9aa5db60171c9",
|
"rev": "257dce10bd6805633d99e5cdae6897d014619dcc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -469,6 +595,38 @@
|
|||||||
"type": "github"
|
"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": {
|
||||||
|
"flake": false,
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
"treefmt-nix": {
|
"treefmt-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -477,11 +635,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1785945821,
|
"lastModified": 1786901030,
|
||||||
"narHash": "sha256-NLSyTCW4K4ofhNBllt3omPasm6QpralXH1DBZOc91Dw=",
|
"narHash": "sha256-WSFCsDSE5ffgD2MqzkM2CYjeFiKhRF/dJUN8uedb6YE=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "ae7910970dddc408fe6ab1c8e4b277bb21d72dc0",
|
"rev": "27b3b12a8e6375f28ebe122f07d230ca5459bbfa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -492,7 +650,7 @@
|
|||||||
},
|
},
|
||||||
"vscode-server": {
|
"vscode-server": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts_2"
|
"flake-parts": "flake-parts_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1784312229,
|
"lastModified": 1784312229,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
description = "NixOS configuration for my homelab";
|
description = "my nixos configurations";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
@@ -21,11 +21,16 @@
|
|||||||
url = "github:gmodena/nix-flatpak/?ref=latest";
|
url = "github:gmodena/nix-flatpak/?ref=latest";
|
||||||
};
|
};
|
||||||
vscode-server.url = "github:nix-community/nixos-vscode-server";
|
vscode-server.url = "github:nix-community/nixos-vscode-server";
|
||||||
|
nixvim.url = "github:nix-community/nixvim";
|
||||||
llm-agents.url = "github:numtide/llm-agents.nix";
|
llm-agents.url = "github:numtide/llm-agents.nix";
|
||||||
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
|
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
|
||||||
|
agenix = {
|
||||||
|
url = "github:ryantm/agenix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, apple-fonts, home-manager, plasma-manager, sidra, vscode-server, nix-vscode-extensions, ... }@inputs: {
|
outputs = { self, nixpkgs, apple-fonts, home-manager, plasma-manager, sidra, vscode-server, nix-vscode-extensions, agenix, ... }@inputs: {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
miku-homelab = nixpkgs.lib.nixosSystem {
|
miku-homelab = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
@@ -36,6 +41,7 @@
|
|||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
inputs.nix-flatpak.nixosModules.nix-flatpak
|
inputs.nix-flatpak.nixosModules.nix-flatpak
|
||||||
vscode-server.nixosModules.default
|
vscode-server.nixosModules.default
|
||||||
|
agenix.nixosModules.default
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
inputs.nix-vscode-extensions.overlays.default
|
inputs.nix-vscode-extensions.overlays.default
|
||||||
@@ -48,8 +54,34 @@
|
|||||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||||
home-manager.sharedModules = [
|
home-manager.sharedModules = [
|
||||||
plasma-manager.homeModules.plasma-manager
|
plasma-manager.homeModules.plasma-manager
|
||||||
|
inputs.nixvim.homeModules.nixvim
|
||||||
];
|
];
|
||||||
home-manager.users.emmatherock = import ./home/emmatherock/home.nix;
|
home-manager.users.emmatherock = { osConfig, ... }: {
|
||||||
|
imports = [ ./home/emmatherock/core.nix ] ++ osConfig.myHomeProfile.extraPrograms;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
vps = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
|
||||||
|
specialArgs = { inherit inputs; };
|
||||||
|
modules = [
|
||||||
|
./hosts/vps
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
vscode-server.nixosModules.default
|
||||||
|
agenix.nixosModules.default
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||||
|
home-manager.sharedModules = [
|
||||||
|
inputs.nixvim.homeModules.nixvim
|
||||||
|
];
|
||||||
|
home-manager.users.emmatherock = { osConfig, ... }: {
|
||||||
|
imports = [ ./home/emmatherock/core.nix ] ++ osConfig.myHomeProfile.extraPrograms;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,8 +5,9 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.packages = with agents; [
|
home.packages = with agents; [
|
||||||
antigravity-cli
|
|
||||||
codex
|
codex
|
||||||
|
codex-acp
|
||||||
claude-code
|
claude-code
|
||||||
|
claude-agent-acp
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./git.nix
|
||||||
|
./shell.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
programs.btop.enable = true;
|
||||||
|
|
||||||
|
# Per-project toolchain resolution (nix-shell / flake devShell), used by
|
||||||
|
# nixvim's LSP servers so they don't need language toolchains installed globally.
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
fastfetch
|
||||||
|
];
|
||||||
|
|
||||||
|
home.stateVersion = "25.11";
|
||||||
|
}
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
imports = [
|
|
||||||
./agents.nix
|
|
||||||
./audio.nix
|
|
||||||
./desktop-apps.nix
|
|
||||||
./deskflow.nix
|
|
||||||
./gaming.nix
|
|
||||||
./git.nix
|
|
||||||
./media.nix
|
|
||||||
./packages.nix
|
|
||||||
./plasma.nix
|
|
||||||
./shell.nix
|
|
||||||
./vscode.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
home.stateVersion = "25.11";
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,286 @@
|
|||||||
|
# Declarative Neovim config via nixvim. Goal: a real, lean IDE — not a
|
||||||
|
# feature-for-feature VSCode clone. Every plugin here earns its place.
|
||||||
|
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
vimAlias = true; # `vim` -> nvim, handy when SSH'd into the VPS/homelab
|
||||||
|
|
||||||
|
colorschemes.catppuccin = {
|
||||||
|
enable = true;
|
||||||
|
settings.flavour = "mocha";
|
||||||
|
};
|
||||||
|
|
||||||
|
globals.mapleader = " ";
|
||||||
|
|
||||||
|
# --- System clipboard over OSC 52, so "+y / "+p work over SSH
|
||||||
|
# (Termius -> VPS/homelab) without a local clipboard provider.
|
||||||
|
# Requires Neovim 0.10+ for vim.ui.clipboard.osc52; confirmed
|
||||||
|
# present (Neovim 0.12.5 on the pinned nixpkgs as of 2026-09).
|
||||||
|
extraConfigLua = ''
|
||||||
|
vim.g.clipboard = {
|
||||||
|
name = "OSC 52",
|
||||||
|
copy = {
|
||||||
|
["+"] = require("vim.ui.clipboard.osc52").copy("+"),
|
||||||
|
["*"] = require("vim.ui.clipboard.osc52").copy("*"),
|
||||||
|
},
|
||||||
|
paste = {
|
||||||
|
["+"] = require("vim.ui.clipboard.osc52").paste("+"),
|
||||||
|
["*"] = require("vim.ui.clipboard.osc52").paste("*"),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
opts = {
|
||||||
|
number = true;
|
||||||
|
relativenumber = true;
|
||||||
|
shiftwidth = 2;
|
||||||
|
tabstop = 2;
|
||||||
|
expandtab = true;
|
||||||
|
termguicolors = true;
|
||||||
|
signcolumn = "yes";
|
||||||
|
scrolloff = 8;
|
||||||
|
};
|
||||||
|
|
||||||
|
# --- File explorer ---
|
||||||
|
plugins.neo-tree = {
|
||||||
|
enable = true;
|
||||||
|
settings.window.width = 30;
|
||||||
|
};
|
||||||
|
|
||||||
|
# --- Fuzzy finder: files, grep, buffers, LSP symbols ---
|
||||||
|
plugins.telescope = {
|
||||||
|
enable = true;
|
||||||
|
extensions.fzf-native.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# --- Treesitter: syntax highlighting/parsing for your stack ---
|
||||||
|
plugins.treesitter = {
|
||||||
|
enable = true;
|
||||||
|
settings.ensure_installed = [
|
||||||
|
"nix" "bash" "lua" "markdown" "json" "yaml"
|
||||||
|
"rust" "go" "gomod" "c" "cpp" "c_sharp" "python"
|
||||||
|
"javascript" "typescript" "tsx" "vue" "html" "css" "dockerfile"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# --- LSP: one server per language/toolchain you use ---
|
||||||
|
plugins.lsp = {
|
||||||
|
enable = true;
|
||||||
|
servers = {
|
||||||
|
nixd.enable = true;
|
||||||
|
bashls.enable = true;
|
||||||
|
rust_analyzer = {
|
||||||
|
enable = true;
|
||||||
|
installCargo = true;
|
||||||
|
installRustc = true;
|
||||||
|
};
|
||||||
|
gopls.enable = true;
|
||||||
|
clangd.enable = true; # C / C++
|
||||||
|
csharp_ls.enable = true;
|
||||||
|
pyright.enable = true;
|
||||||
|
ts_ls.enable = true; # JS/TS, React
|
||||||
|
volar.enable = true; # Vue
|
||||||
|
html.enable = true;
|
||||||
|
cssls.enable = true;
|
||||||
|
tailwindcss.enable = true;
|
||||||
|
jsonls.enable = true;
|
||||||
|
dockerls.enable = true;
|
||||||
|
docker_compose_language_service.enable = true;
|
||||||
|
};
|
||||||
|
keymaps.lspBuf = {
|
||||||
|
"gd" = "definition";
|
||||||
|
"gr" = "references";
|
||||||
|
"K" = "hover";
|
||||||
|
"<leader>rn" = "rename";
|
||||||
|
"<leader>ca" = "code_action";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# --- Autocompletion ---
|
||||||
|
plugins.cmp = {
|
||||||
|
enable = true;
|
||||||
|
settings.sources = [
|
||||||
|
{ name = "nvim_lsp"; }
|
||||||
|
{ name = "luasnip"; }
|
||||||
|
{ name = "path"; }
|
||||||
|
{ name = "buffer"; }
|
||||||
|
];
|
||||||
|
settings.snippet.expand = ''
|
||||||
|
function(args)
|
||||||
|
require("luasnip").lsp_expand(args.body)
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
settings.mapping = {
|
||||||
|
"<Tab>" = ''
|
||||||
|
cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
elseif require("luasnip").expand_or_jumpable() then
|
||||||
|
require("luasnip").expand_or_jump()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s" })
|
||||||
|
'';
|
||||||
|
"<S-Tab>" = ''
|
||||||
|
cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
elseif require("luasnip").jumpable(-1) then
|
||||||
|
require("luasnip").jump(-1)
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s" })
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
plugins.cmp-nvim-lsp.enable = true;
|
||||||
|
plugins.cmp_luasnip.enable = true;
|
||||||
|
plugins.cmp-path.enable = true;
|
||||||
|
plugins.cmp-buffer.enable = true;
|
||||||
|
|
||||||
|
# --- Snippets ---
|
||||||
|
plugins.luasnip = {
|
||||||
|
enable = true;
|
||||||
|
fromVscode = [ { paths = "${pkgs.vimPlugins.friendly-snippets}"; } ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# --- Pairs and surrounding text ---
|
||||||
|
plugins.nvim-autopairs.enable = true;
|
||||||
|
plugins.nvim-surround.enable = true;
|
||||||
|
|
||||||
|
# --- Format on save ---
|
||||||
|
plugins.conform-nvim = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
format_on_save = {
|
||||||
|
lsp_fallback = true;
|
||||||
|
timeout_ms = 500;
|
||||||
|
};
|
||||||
|
formatters_by_ft = {
|
||||||
|
rust = [ "rustfmt" ];
|
||||||
|
go = [ "gofmt" ];
|
||||||
|
c = [ "clang-format" ];
|
||||||
|
cpp = [ "clang-format" ];
|
||||||
|
python = [ "black" ];
|
||||||
|
javascript = [ "prettier" ];
|
||||||
|
typescript = [ "prettier" ];
|
||||||
|
javascriptreact = [ "prettier" ];
|
||||||
|
typescriptreact = [ "prettier" ];
|
||||||
|
vue = [ "prettier" ];
|
||||||
|
nix = [ "nixpkgs-fmt" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# --- Git: gutter signs, hunk stage/reset, blame ---
|
||||||
|
plugins.gitsigns.enable = true;
|
||||||
|
|
||||||
|
# --- Git: interactive status/commit/diff/blame ---
|
||||||
|
plugins.fugitive.enable = true;
|
||||||
|
|
||||||
|
# --- Statusline ---
|
||||||
|
plugins.lualine.enable = true;
|
||||||
|
|
||||||
|
# --- Discoverable keybindings while you're still learning ---
|
||||||
|
plugins.which-key.enable = true;
|
||||||
|
|
||||||
|
# --- AI agent: CodeCompanion, curated natively in nixvim ---
|
||||||
|
# Configured to reuse your existing `claude`/`codex` CLI auth via ACP
|
||||||
|
# adapters instead of a separate Anthropic Console/OpenAI API key.
|
||||||
|
#
|
||||||
|
# Verified against https://codecompanion.olimorris.dev/configuration/adapters-acp
|
||||||
|
# (CodeCompanion >= v18.0.0, which is what's pinned by nixvim's nixpkgs as of
|
||||||
|
# 2026-08). Two things changed from an older/assumed layout:
|
||||||
|
# - the default-adapter key is `interactions.chat.adapter`, not
|
||||||
|
# `strategies.chat.adapter` (renamed in v18.0.0);
|
||||||
|
# - the built-in adapter name is `claude_code` (no `_acp` suffix) and
|
||||||
|
# lives under `adapters.acp.<name>`.
|
||||||
|
#
|
||||||
|
# Neither adapter has a true zero-config mode that silently piggybacks on
|
||||||
|
# an already-logged-in CLI session:
|
||||||
|
# - codex: extends the built-in `codex` preset. `defaults.auth_method`
|
||||||
|
# accepts "api-key" | "chat-gpt" (confirmed against the docs above,
|
||||||
|
# not "chatgpt"/"openai-api-key"/"codex-api-key"). "chat-gpt" reuses
|
||||||
|
# your ChatGPT/Codex CLI login instead of an OPENAI_API_KEY.
|
||||||
|
# - claude_code: there's no oauth-personal equivalent. Run
|
||||||
|
# `claude setup-token` once (ties to your Pro/Max subscription rather
|
||||||
|
# than a Console API key) and save the result to
|
||||||
|
# ~/.config/codecompanion/claude-oauth-token (chmod 600, outside the
|
||||||
|
# nix store). It's read at runtime via the `cmd:` prefix below rather
|
||||||
|
# than embedded in this file.
|
||||||
|
plugins.codecompanion = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
interactions.chat.adapter = "claude_code"; # switch to "codex" per-chat
|
||||||
|
interactions.inline.adapter = "claude_code";
|
||||||
|
adapters.acp = {
|
||||||
|
opts.show_presets = false;
|
||||||
|
claude_code.__raw = ''
|
||||||
|
function()
|
||||||
|
return require("codecompanion.adapters").extend("claude_code", {
|
||||||
|
env = {
|
||||||
|
CLAUDE_CODE_OAUTH_TOKEN = "cmd:cat ~/.config/codecompanion/claude-oauth-token",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
codex.__raw = ''
|
||||||
|
function()
|
||||||
|
return require("codecompanion.adapters").extend("codex", {
|
||||||
|
defaults = {
|
||||||
|
auth_method = "chat-gpt",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
adapters.http.opts.show_presets = false;
|
||||||
|
display.chat.window = {
|
||||||
|
layout = "vertical";
|
||||||
|
position = "right";
|
||||||
|
width = 0.4;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# --- Editor-level tooling only: formatters conform.nvim shells out to.
|
||||||
|
# Language toolchains themselves (cargo, go, dotnet-sdk, nodejs,
|
||||||
|
# a compiler, a python interpreter) come from your per-project
|
||||||
|
# nix-shell / flake devShell, not from here — launch nvim from
|
||||||
|
# inside that shell (`nix develop`, or nix-shell + direnv) so LSP
|
||||||
|
# servers resolve the right toolchain via PATH.
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
python3Packages.black
|
||||||
|
prettier
|
||||||
|
nixpkgs-fmt
|
||||||
|
file
|
||||||
|
ripgrep
|
||||||
|
sqlite
|
||||||
|
];
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{ mode = "n"; key = "<leader>e"; action = "<cmd>Neotree toggle<CR>"; }
|
||||||
|
{ mode = "n"; key = "<leader>ff"; action = "<cmd>Telescope find_files<CR>"; }
|
||||||
|
{ mode = "n"; key = "<leader>fg"; action = "<cmd>Telescope live_grep<CR>"; }
|
||||||
|
{ mode = "n"; key = "<leader>fb"; action = "<cmd>Telescope buffers<CR>"; }
|
||||||
|
|
||||||
|
# CodeCompanion
|
||||||
|
{ mode = [ "n" "v" ]; key = "<leader>ac"; action = "<cmd>CodeCompanionChat Toggle<CR>"; }
|
||||||
|
{ mode = "v"; key = "<leader>aa"; action = "<cmd>CodeCompanionChat Add<CR>"; }
|
||||||
|
{ mode = "n"; key = "<leader>ai"; action = "<cmd>CodeCompanion<CR>"; } # inline assistant
|
||||||
|
|
||||||
|
# Fugitive
|
||||||
|
{ mode = "n"; key = "<leader>gs"; action = "<cmd>Git<CR>"; } # status
|
||||||
|
{ mode = "n"; key = "<leader>gc"; action = "<cmd>Git commit<CR>"; } # interactive commit
|
||||||
|
{ mode = "n"; key = "<leader>gp"; action = "<cmd>Git push<CR>"; }
|
||||||
|
{ mode = "n"; key = "<leader>gl"; action = "<cmd>Git pull<CR>"; }
|
||||||
|
{ mode = "n"; key = "<leader>gd"; action = "<cmd>Gvdiffsplit<CR>"; } # diff current file
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
programs.btop.package = pkgs.btop.override { cudaSupport = false; rocmSupport = true; };
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# --- Base y Terminal ---
|
|
||||||
vim
|
|
||||||
fastfetch
|
|
||||||
(btop.override { cudaSupport = false; rocmSupport = true; })
|
|
||||||
nvtopPackages.full
|
nvtopPackages.full
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,23 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
home.packages = [ pkgs.bibata-cursors pkgs.breeze-enhanced ];
|
home.packages = [ pkgs.layan-cursors pkgs.breeze-enhanced ];
|
||||||
|
|
||||||
|
home.pointerCursor = {
|
||||||
|
enable = true;
|
||||||
|
name = "layan-cursors";
|
||||||
|
package = pkgs.layan-cursors;
|
||||||
|
size = 24;
|
||||||
|
gtk.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
programs.plasma = {
|
programs.plasma = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
workspace.cursor = {
|
||||||
|
theme = "layan-cursors";
|
||||||
|
size = 24;
|
||||||
|
};
|
||||||
|
|
||||||
shortcuts = {
|
shortcuts = {
|
||||||
|
|
||||||
# Atajos personalizados para scripts propios (net.local.*)
|
# Atajos personalizados para scripts propios (net.local.*)
|
||||||
|
|||||||
+112
-15
@@ -1,26 +1,105 @@
|
|||||||
{ pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../modules/security/secureboot.nix
|
../../modules/profiles/desktop.nix
|
||||||
../../modules/services/maintenance.nix
|
../../modules/profiles/server.nix
|
||||||
../../modules/services/flatpak.nix
|
../../modules/services/ollama.nix
|
||||||
../../modules/system/audio.nix
|
../../modules/services/samba.nix
|
||||||
../../modules/system/fonts.nix
|
../../modules/system/home-profile.nix
|
||||||
../../modules/system/gaming.nix
|
|
||||||
../../modules/system/graphics.nix
|
|
||||||
../../modules/system/nix-ld.nix
|
../../modules/system/nix-ld.nix
|
||||||
../../modules/system/packages.nix
|
../../modules/system/packages.nix
|
||||||
../../modules/system/shells.nix
|
|
||||||
../../modules/system/users.nix
|
|
||||||
../../modules/system/networking.nix
|
|
||||||
../../modules/desktop/firefox.nix
|
|
||||||
../../modules/desktop/plasma.nix
|
|
||||||
../../modules/services/containers.nix
|
|
||||||
../../modules/services/vscode-server.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
age.secrets.miku-homelab-wg.file = ../../secrets/miku-homelab-wg.age;
|
||||||
|
|
||||||
|
myPackages.extra = with pkgs; [
|
||||||
|
rocmPackages.rocm-smi
|
||||||
|
btrfs-progs
|
||||||
|
distrobox
|
||||||
|
steam-run
|
||||||
|
];
|
||||||
|
|
||||||
|
myHomeProfile.extraPrograms = [
|
||||||
|
../../home/emmatherock/agents.nix
|
||||||
|
../../home/emmatherock/audio.nix
|
||||||
|
../../home/emmatherock/desktop-apps.nix
|
||||||
|
../../home/emmatherock/deskflow.nix
|
||||||
|
../../home/emmatherock/gaming.nix
|
||||||
|
../../home/emmatherock/media.nix
|
||||||
|
#../../home/emmatherock/neovim.nix
|
||||||
|
../../home/emmatherock/packages.nix
|
||||||
|
../../home/emmatherock/plasma.nix
|
||||||
|
../../home/emmatherock/vscode.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
myNetworking = {
|
||||||
|
hostName = "miku-homelab";
|
||||||
|
useNetworkManager = true;
|
||||||
|
staticIp = {
|
||||||
|
interface = "enp6s0";
|
||||||
|
address = "10.1.1.21";
|
||||||
|
prefixLength = 24;
|
||||||
|
gateway = "10.1.1.1";
|
||||||
|
nameservers = [ "1.1.1.1" "8.8.8.8" ];
|
||||||
|
};
|
||||||
|
extraUdpPorts = [ 80 443 4242 49983 24800 26900 60977 ];
|
||||||
|
extraTcpPorts = [ 80 443 4242 49983 24800 26900 60977 ];
|
||||||
|
sshAllowUsers = [ "emmatherock" ];
|
||||||
|
wireguard = {
|
||||||
|
enable = true;
|
||||||
|
ips = [ "10.20.0.2/24" ];
|
||||||
|
privateKeyFile = config.age.secrets.miku-homelab-wg.path;
|
||||||
|
peers = [
|
||||||
|
{
|
||||||
|
publicKey = "BKs9VlsIEM1np6wHeVFL4NfbS1l69xnwins6Q12ByAM=";
|
||||||
|
allowedIPs = [ "10.20.0.1/32" ];
|
||||||
|
endpoint = "vps.external.mikufanclub.lat:51822";
|
||||||
|
persistentKeepalive = 25;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
myUsers = {
|
||||||
|
admins.emmatherock = {
|
||||||
|
description = "EmmaTheRock";
|
||||||
|
shell = pkgs.fish;
|
||||||
|
extraGroups = [ "plugdev" "networkmanager" "wheel" "video" "mikushare-group" "render" ];
|
||||||
|
authorizedKeys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA8vfwM5g9RJXqHtqTgNqsYg9SxSm+UMvFqTjBoAsLJ6 emmatherock@MAIN-PC"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO6pnKpUEaeoNXqlenc8MAz1GG8P6BRILyIHMSLtvdeF termius"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
serviceUsers.mikushare = {
|
||||||
|
description = "Acceso remoto Mikufanclub";
|
||||||
|
group = "mikushare-group";
|
||||||
|
createHome = false;
|
||||||
|
};
|
||||||
|
extraGroups = [ "mikushare-group" "plugdev" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
myContainers = {
|
||||||
|
enable = true;
|
||||||
|
storageDriver = "btrfs";
|
||||||
|
globalNetwork = "homelab_net";
|
||||||
|
composeStacks = {
|
||||||
|
tools = {
|
||||||
|
path = "/mnt/containers/tools";
|
||||||
|
after = [ "network-online.target" "tailscaled.service" ];
|
||||||
|
};
|
||||||
|
arrs = {
|
||||||
|
path = "/mnt/containers/arrs";
|
||||||
|
after = [ "docker-compose-tools.service" "local-fs.target" ];
|
||||||
|
};
|
||||||
|
gameservers = {
|
||||||
|
path = "/mnt/containers/gameserver";
|
||||||
|
after = [ "docker-compose-tools.service" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
loader = {
|
loader = {
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
@@ -63,10 +142,28 @@
|
|||||||
SUBSYSTEM=="drm", KERNEL=="card*", SUBSYSTEMS=="pci", DRIVERS=="amdgpu", RUN+="/bin/sh -c 'chmod -R g+r /sys/class/drm/%k/device/'"
|
SUBSYSTEM=="drm", KERNEL=="card*", SUBSYSTEMS=="pci", DRIVERS=="amdgpu", RUN+="/bin/sh -c 'chmod -R g+r /sys/class/drm/%k/device/'"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
systemd.services.tailscale-udp-gro = {
|
||||||
|
description = "Configurar UDP GRO para Tailscale";
|
||||||
|
after = [ "network.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${pkgs.ethtool}/bin/ethtool -K enp6s0 rx-udp-gro-forwarding on rx-gro-list on";
|
||||||
|
RemainAfterExit = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
zramSwap = {
|
||||||
|
enable = true;
|
||||||
|
algorithm = "zstd";
|
||||||
|
memoryPercent = 50;
|
||||||
|
priority = 100;
|
||||||
|
};
|
||||||
|
|
||||||
system.stateVersion = "25.11";
|
system.stateVersion = "25.11";
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
../../modules/profiles/server.nix
|
||||||
|
../../modules/system/home-profile.nix
|
||||||
|
../../modules/system/nix-ld.nix
|
||||||
|
../../modules/system/packages.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
age.secrets.vps-wg.file = ../../secrets/vps-wg.age;
|
||||||
|
|
||||||
|
myHomeProfile.extraPrograms = [
|
||||||
|
../../home/emmatherock/agents.nix
|
||||||
|
../../home/emmatherock/neovim.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
myNetworking = {
|
||||||
|
hostName = "vps";
|
||||||
|
useNetworkManager = false;
|
||||||
|
useNetworkd = true;
|
||||||
|
staticIp = {
|
||||||
|
interface = "ens3";
|
||||||
|
address = "23.175.41.196";
|
||||||
|
prefixLength = 27;
|
||||||
|
gateway = "23.175.41.225";
|
||||||
|
nameservers = [ "1.1.1.1" "1.0.0.1" ];
|
||||||
|
onlinkGateway = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
extraTcpPorts = [ 80 443 ];
|
||||||
|
extraUdpPorts = [ 51822 ];
|
||||||
|
sshAllowUsers = [ "emmatherock" ];
|
||||||
|
wireguard = {
|
||||||
|
enable = true;
|
||||||
|
ips = [ "10.20.0.1/24" ];
|
||||||
|
privateKeyFile = config.age.secrets.vps-wg.path;
|
||||||
|
listenPort = 51822;
|
||||||
|
peers = [
|
||||||
|
{
|
||||||
|
publicKey = "bqxDHQNxOSFpTo3We9ujC2WljtaRBgiNEewW+Rlu10k=";
|
||||||
|
allowedIPs = [ "10.20.0.2/32" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
publicKey = "6aw0w7v9uFGvLn/eSdf7z/ljvzz4kviYlSOSj0LKp1E=";
|
||||||
|
allowedIPs = [ "10.20.0.3/32" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
myUsers = {
|
||||||
|
admins.emmatherock = {
|
||||||
|
description = "EmmaTheRock";
|
||||||
|
shell = pkgs.fish;
|
||||||
|
extraGroups = [ "wheel" ];
|
||||||
|
authorizedKeys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA8vfwM5g9RJXqHtqTgNqsYg9SxSm+UMvFqTjBoAsLJ6 emmatherock@MAIN-PC"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEUCpjAuJobymPPAoPjLdL1eD6g4v6wrquu3cyHP22Wj emmatherock@NixOS"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO6pnKpUEaeoNXqlenc8MAz1GG8P6BRILyIHMSLtvdeF termius"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
myContainers = {
|
||||||
|
enable = true;
|
||||||
|
composeStacks.core = {
|
||||||
|
path = "/opt/containers/core";
|
||||||
|
after = [ "network-online.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.systemd-boot.configurationLimit = 10;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
# Required for this host to act as a Tailscale/Headscale exit node.
|
||||||
|
boot.kernel.sysctl = {
|
||||||
|
"net.ipv4.ip_forward" = 1;
|
||||||
|
"net.ipv6.conf.all.forwarding" = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
time.timeZone = "America/Argentina/Buenos_Aires";
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
|
system.stateVersion = "26.05";
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "ahci" "sd_mod" "sr_mod" "virtio_blk" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/9601-188F";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0022" "dmask=0022" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/2fe62056-55d1-4d2a-97a4-74451f7a63d0";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../desktop/firefox.nix
|
||||||
|
../desktop/plasma.nix
|
||||||
|
../system/gaming.nix
|
||||||
|
../system/audio.nix
|
||||||
|
../system/graphics.nix
|
||||||
|
../system/fonts.nix
|
||||||
|
../security/secureboot.nix
|
||||||
|
../services/flatpak.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../system/networking.nix
|
||||||
|
../system/users.nix
|
||||||
|
../system/shells.nix
|
||||||
|
../services/containers.nix
|
||||||
|
../services/maintenance.nix
|
||||||
|
../services/vscode-server.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,5 +1,63 @@
|
|||||||
{ pkgs, ... }:
|
{ lib, pkgs, config, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.myContainers;
|
||||||
|
|
||||||
|
composeStackOpts = { ... }: {
|
||||||
|
options = {
|
||||||
|
path = lib.mkOption {
|
||||||
|
type = lib.types.path;
|
||||||
|
description = "Directory containing the docker-compose.yml for this stack.";
|
||||||
|
};
|
||||||
|
after = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
default = [ ];
|
||||||
|
description = "Extra systemd units this stack's compose service should start after and want, beyond docker.service.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
mkComposeService = name: stack: {
|
||||||
|
name = "docker-compose-${name}";
|
||||||
|
value = {
|
||||||
|
description = "Docker Compose stack: ${name}";
|
||||||
|
after = [ "docker.service" ] ++ lib.optional (cfg.globalNetwork != null) "init-docker-networks.service" ++ stack.after;
|
||||||
|
wants = [ "docker.service" ] ++ lib.optional (cfg.globalNetwork != null) "init-docker-networks.service" ++ stack.after;
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = true;
|
||||||
|
WorkingDirectory = stack.path;
|
||||||
|
ExecStart = "${pkgs.docker}/bin/docker compose up -d --remove-orphans";
|
||||||
|
ExecStop = "${pkgs.docker}/bin/docker compose down";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
|
options.myContainers = {
|
||||||
|
enable = lib.mkEnableOption "Docker/Podman container support and Docker Compose stacks";
|
||||||
|
|
||||||
|
storageDriver = lib.mkOption {
|
||||||
|
type = lib.types.nullOr (lib.types.enum [ "aufs" "btrfs" "devicemapper" "overlay" "overlay2" "zfs" ]);
|
||||||
|
default = null;
|
||||||
|
description = "Docker storage driver to use. Leave null to let Docker choose.";
|
||||||
|
};
|
||||||
|
|
||||||
|
globalNetwork = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.str;
|
||||||
|
default = null;
|
||||||
|
description = "Name of a shared Docker network to create on boot, for compose stacks to join. Leave null to skip.";
|
||||||
|
};
|
||||||
|
|
||||||
|
composeStacks = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf (lib.types.submodule composeStackOpts);
|
||||||
|
default = { };
|
||||||
|
description = "Docker Compose stacks to run as systemd services, each producing a docker-compose-<name> unit.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
containers.enable = true;
|
containers.enable = true;
|
||||||
podman = {
|
podman = {
|
||||||
@@ -8,63 +66,27 @@
|
|||||||
};
|
};
|
||||||
docker = {
|
docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
storageDriver = "btrfs";
|
storageDriver = cfg.storageDriver;
|
||||||
daemon.settings = {
|
daemon.settings = {
|
||||||
dns = [ "1.1.1.1" "8.8.8.8" ];
|
dns = [ "1.1.1.1" "8.8.8.8" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services = {
|
systemd.services =
|
||||||
|
lib.optionalAttrs (cfg.globalNetwork != null) {
|
||||||
init-docker-networks = {
|
init-docker-networks = {
|
||||||
description = "Crear redes globales de Docker si no existen";
|
description = "Create the ${cfg.globalNetwork} Docker network if it doesn't exist";
|
||||||
after = [ "docker.service" ];
|
after = [ "docker.service" ];
|
||||||
requires = [ "docker.service" ];
|
requires = [ "docker.service" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
ExecStart = "${pkgs.bash}/bin/bash -c '${pkgs.docker}/bin/docker network inspect homelab_net >/dev/null 2>&1 || ${pkgs.docker}/bin/docker network create homelab_net'";
|
ExecStart = "${pkgs.bash}/bin/bash -c '${pkgs.docker}/bin/docker network inspect ${cfg.globalNetwork} >/dev/null 2>&1 || ${pkgs.docker}/bin/docker network create ${cfg.globalNetwork}'";
|
||||||
};
|
|
||||||
};
|
|
||||||
docker-compose-tools = {
|
|
||||||
description = "Stack de Docker Compose: Tools";
|
|
||||||
after = [ "docker.service" "network-online.target" "tailscaled.service" ];
|
|
||||||
wants = [ "docker.service" "network-online.target" ];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
RemainAfterExit = true;
|
|
||||||
WorkingDirectory = "/mnt/containers/tools";
|
|
||||||
ExecStart = "${pkgs.docker}/bin/docker compose up -d --remove-orphans";
|
|
||||||
ExecStop = "${pkgs.docker}/bin/docker compose down";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
docker-compose-arrs = {
|
|
||||||
description = "Stack de Docker Compose: Arrs";
|
|
||||||
after = [ "docker.service" "docker-compose-tools.service" "local-fs.target" ];
|
|
||||||
wants = [ "docker.service" "docker-compose-tools.service" ];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
RemainAfterExit = true;
|
|
||||||
WorkingDirectory = "/mnt/containers/arrs";
|
|
||||||
ExecStart = "${pkgs.docker}/bin/docker compose up -d --remove-orphans";
|
|
||||||
ExecStop = "${pkgs.docker}/bin/docker compose down";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
docker-compose-gameservers = {
|
|
||||||
description = "Stack de Docker Compose: Gameservers";
|
|
||||||
after = [ "docker.service" "docker-compose-tools.service" ];
|
|
||||||
wants = [ "docker.service" ];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
RemainAfterExit = true;
|
|
||||||
WorkingDirectory = "/mnt/containers/gameserver";
|
|
||||||
ExecStart = "${pkgs.docker}/bin/docker compose up -d --remove-orphans";
|
|
||||||
ExecStop = "${pkgs.docker}/bin/docker compose down";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
// lib.mapAttrs' mkComposeService cfg.composeStacks;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.ollama = {
|
||||||
|
enable = true;
|
||||||
|
# `services.ollama.acceleration` does not exist (that option only lives on
|
||||||
|
# services.tabby); GPU backend selection for ollama is done by package choice.
|
||||||
|
package = pkgs.ollama-rocm;
|
||||||
|
|
||||||
|
# Same "don't expose services directly" pattern as the rest of the homelab:
|
||||||
|
# bind to localhost only. If this needs to be reachable from other devices
|
||||||
|
# later, put it behind Traefik + Headscale like the other services instead
|
||||||
|
# of opening it up directly.
|
||||||
|
host = "127.0.0.1";
|
||||||
|
port = 11434;
|
||||||
|
|
||||||
|
environmentVariables = {
|
||||||
|
# Ollama is on-demand by design: it loads a model into VRAM on the first
|
||||||
|
# request and unloads it after this much idle time. 5m is already the
|
||||||
|
# ollama default, set explicitly so it's not an implicit behavior.
|
||||||
|
OLLAMA_KEEP_ALIVE = "5m";
|
||||||
|
};
|
||||||
|
|
||||||
|
# RDNA4 (gfx1200/gfx1201, incl. the RX 9060 XT) has official ROCm support
|
||||||
|
# since ROCm 6.4.4. Verified on this host (2026-08-30) with rocmPackages.clr
|
||||||
|
# 7.2.3: `rocminfo` correctly reports "Name: gfx1200" and `rocm-smi
|
||||||
|
# --showmeminfo vram` reports the full 16GiB, so the "detected with 0 VRAM,
|
||||||
|
# falls back to CPU" issue does not reproduce here and rocmOverrideGfx is
|
||||||
|
# not needed. If a future nixpkgs bump regresses this, re-check with:
|
||||||
|
# nix shell nixpkgs#rocmPackages.rocminfo -c rocminfo | grep -i gfx
|
||||||
|
# nix shell nixpkgs#rocmPackages.rocm-smi -c rocm-smi --showmeminfo vram
|
||||||
|
# and only then set rocmOverrideGfx = "12.0.0"; (gfx1200) if VRAM reports 0.
|
||||||
|
# rocmOverrideGfx = "12.0.0";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
services.samba = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
settings = {
|
||||||
|
global = {
|
||||||
|
"vfs objects" = "acl_xattr";
|
||||||
|
"map acl inherit" = "yes";
|
||||||
|
"store dos attributes" = "yes";
|
||||||
|
};
|
||||||
|
mikufanclub = {
|
||||||
|
path = "/mnt/data/mikufanclub";
|
||||||
|
writable = "yes";
|
||||||
|
"valid users" = "mikushare emmatherock";
|
||||||
|
"force group" = "mikushare-group";
|
||||||
|
"create mask" = "0660";
|
||||||
|
"directory mask" = "0770";
|
||||||
|
};
|
||||||
|
data-private = {
|
||||||
|
path = "/mnt/data";
|
||||||
|
writable = "yes";
|
||||||
|
"valid users" = "emmatherock";
|
||||||
|
"browseable" = "yes";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
options.myHomeProfile.extraPrograms = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.path;
|
||||||
|
default = [ ];
|
||||||
|
description = "Extra Home Manager modules to import for this user, on top of the core profile.";
|
||||||
|
};
|
||||||
|
}
|
||||||
+192
-66
@@ -1,81 +1,207 @@
|
|||||||
{ config, pkgs, ... }: {
|
{ config, lib, ... }:
|
||||||
networking = {
|
|
||||||
hostName = "miku-homelab";
|
let
|
||||||
networkmanager.enable = true;
|
cfg = config.myNetworking;
|
||||||
|
|
||||||
|
wireguardPeerOpts = { ... }: {
|
||||||
|
options = {
|
||||||
|
publicKey = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Public key of the remote WireGuard peer.";
|
||||||
|
};
|
||||||
|
allowedIPs = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
description = "IP ranges routed through this peer.";
|
||||||
|
};
|
||||||
|
endpoint = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.str;
|
||||||
|
default = null;
|
||||||
|
description = "Endpoint (host:port) of the remote peer, if it has a stable address.";
|
||||||
|
};
|
||||||
|
persistentKeepalive = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.int;
|
||||||
|
default = null;
|
||||||
|
description = "Interval in seconds for sending keepalive packets to this peer.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.myNetworking = {
|
||||||
|
hostName = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "The system hostname.";
|
||||||
|
};
|
||||||
|
|
||||||
|
useNetworkManager = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Whether to enable NetworkManager to manage network interfaces.";
|
||||||
|
};
|
||||||
|
|
||||||
|
useNetworkd = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Whether to configure the static IP via systemd-networkd instead of the classic scripted networking backend. Needed for reliable onlink default routes.";
|
||||||
|
};
|
||||||
|
|
||||||
|
staticIp = lib.mkOption {
|
||||||
|
type = lib.types.nullOr (lib.types.submodule {
|
||||||
|
options = {
|
||||||
|
interface = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Network interface to assign the static address to.";
|
||||||
|
};
|
||||||
|
address = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Static IPv4 address for the interface.";
|
||||||
|
};
|
||||||
|
prefixLength = lib.mkOption {
|
||||||
|
type = lib.types.int;
|
||||||
|
description = "IPv4 prefix length for the static address.";
|
||||||
|
};
|
||||||
|
gateway = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Default gateway address.";
|
||||||
|
};
|
||||||
|
nameservers = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
default = [ "1.1.1.1" "8.8.8.8" ];
|
||||||
|
description = "DNS nameservers to use.";
|
||||||
|
};
|
||||||
|
onlinkGateway = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Whether the gateway lies outside the interface's subnet, requiring the onlink flag on the default route.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
|
default = null;
|
||||||
|
description = "Static IPv4 configuration for this host. Leave null to rely on DHCP or NetworkManager.";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraUdpPorts = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.port;
|
||||||
|
default = [ ];
|
||||||
|
description = "Additional UDP ports to open in the firewall, beyond the Tailscale port.";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraTcpPorts = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.port;
|
||||||
|
default = [ ];
|
||||||
|
description = "Additional TCP ports to open in the firewall, beyond SSH.";
|
||||||
|
};
|
||||||
|
|
||||||
|
sshAllowUsers = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
default = [ ];
|
||||||
|
description = "Usernames allowed to log in over SSH. Empty means no restriction is applied.";
|
||||||
|
};
|
||||||
|
|
||||||
|
wireguard = {
|
||||||
|
enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Whether to configure a WireGuard interface named wg-<hostName> on this host.";
|
||||||
|
};
|
||||||
|
ips = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
default = [ ];
|
||||||
|
description = "IP addresses (with prefix length) assigned to the local WireGuard interface.";
|
||||||
|
};
|
||||||
|
privateKeyFile = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.str;
|
||||||
|
default = null;
|
||||||
|
description = "Path to the file containing this host's WireGuard private key.";
|
||||||
|
};
|
||||||
|
listenPort = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.port;
|
||||||
|
default = null;
|
||||||
|
description = "UDP port for the WireGuard interface to listen on. Leave null to auto-select, which is fine for hosts that only initiate connections outward.";
|
||||||
|
};
|
||||||
|
peers = lib.mkOption {
|
||||||
|
type = lib.types.listOf (lib.types.submodule wireguardPeerOpts);
|
||||||
|
default = [ ];
|
||||||
|
description = "WireGuard peers this host connects to.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
networking = lib.mkMerge [
|
||||||
|
{
|
||||||
|
hostName = cfg.hostName;
|
||||||
|
networkmanager.enable = cfg.useNetworkManager;
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedUDPPorts = [ config.services.tailscale.port 80 443 4242 49983 24800 26900 60977];
|
allowedUDPPorts = [ config.services.tailscale.port ] ++ cfg.extraUdpPorts;
|
||||||
allowedTCPPorts = [ 22 80 443 4242 49983 24800 26900 60977];
|
allowedTCPPorts = [ 22 ] ++ cfg.extraTcpPorts;
|
||||||
};
|
};
|
||||||
useDHCP = false;
|
|
||||||
interfaces.enp6s0.ipv4.addresses = [{
|
|
||||||
address = "10.1.1.21";
|
|
||||||
prefixLength = 24;
|
|
||||||
}];
|
|
||||||
defaultGateway = "10.1.1.1";
|
|
||||||
nameservers = [ "1.1.1.1" "8.8.8.8" ];
|
|
||||||
|
|
||||||
wireguard.interfaces = {
|
|
||||||
wg-miku-homelab = {
|
|
||||||
ips = [ "10.20.0.2/24" ];
|
|
||||||
privateKeyFile = "/etc/wireguard/miku-homelab_private.key";
|
|
||||||
|
|
||||||
peers = [
|
|
||||||
{
|
|
||||||
publicKey = "zERcSEQhan+xtmPOIjuVSkQaBynTjH96SgZZF9CZNV8=";
|
|
||||||
allowedIPs = [ "10.20.0.1/32" ];
|
|
||||||
endpoint = "vps.external.mikufanclub.lat:51822";
|
|
||||||
persistentKeepalive = 25;
|
|
||||||
}
|
}
|
||||||
|
(lib.mkIf (cfg.staticIp != null && !cfg.useNetworkd) {
|
||||||
|
useDHCP = false;
|
||||||
|
interfaces.${cfg.staticIp.interface}.ipv4.addresses = [{
|
||||||
|
address = cfg.staticIp.address;
|
||||||
|
prefixLength = cfg.staticIp.prefixLength;
|
||||||
|
}];
|
||||||
|
nameservers = cfg.staticIp.nameservers;
|
||||||
|
})
|
||||||
|
(lib.mkIf (cfg.staticIp != null && !cfg.useNetworkd && !cfg.staticIp.onlinkGateway) {
|
||||||
|
defaultGateway = cfg.staticIp.gateway;
|
||||||
|
})
|
||||||
|
(lib.mkIf cfg.wireguard.enable {
|
||||||
|
wireguard.interfaces."wg-${cfg.hostName}" = {
|
||||||
|
ips = cfg.wireguard.ips;
|
||||||
|
privateKeyFile = cfg.wireguard.privateKeyFile;
|
||||||
|
listenPort = cfg.wireguard.listenPort;
|
||||||
|
peers = map (peer: {
|
||||||
|
inherit (peer) publicKey allowedIPs;
|
||||||
|
} // lib.optionalAttrs (peer.endpoint != null) {
|
||||||
|
inherit (peer) endpoint;
|
||||||
|
} // lib.optionalAttrs (peer.persistentKeepalive != null) {
|
||||||
|
inherit (peer) persistentKeepalive;
|
||||||
|
}) cfg.wireguard.peers;
|
||||||
|
};
|
||||||
|
})
|
||||||
];
|
];
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
PermitRootLogin = "no";
|
PermitRootLogin = "no";
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
AllowUsers = [ "emmatherock" ];
|
} // lib.optionalAttrs (cfg.sshAllowUsers != [ ]) {
|
||||||
};
|
AllowUsers = cfg.sshAllowUsers;
|
||||||
};
|
|
||||||
|
|
||||||
services.samba = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
settings = {
|
|
||||||
global = {
|
|
||||||
"vfs objects" = "acl_xattr";
|
|
||||||
"map acl inherit" = "yes";
|
|
||||||
"store dos attributes" = "yes";
|
|
||||||
};
|
|
||||||
mikufanclub = {
|
|
||||||
path = "/mnt/data/mikufanclub";
|
|
||||||
writable = "yes";
|
|
||||||
"valid users" = "mikushare emmatherock";
|
|
||||||
"force group" = "mikushare-group";
|
|
||||||
"create mask" = "0660";
|
|
||||||
"directory mask" = "0770";
|
|
||||||
};
|
|
||||||
data-private = {
|
|
||||||
path = "/mnt/data";
|
|
||||||
writable = "yes";
|
|
||||||
"valid users" = "emmatherock";
|
|
||||||
"browseable" = "yes";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services.tailscale-udp-gro = {
|
|
||||||
description = "Configurar UDP GRO para Tailscale";
|
|
||||||
after = [ "network.target" ];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
ExecStart = "${pkgs.ethtool}/bin/ethtool -K enp6s0 rx-udp-gro-forwarding on rx-gro-list on";
|
|
||||||
RemainAfterExit = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(lib.mkIf (cfg.staticIp != null && cfg.useNetworkd) {
|
||||||
|
networking.useDHCP = false;
|
||||||
|
systemd.network.enable = true;
|
||||||
|
services.resolved.enable = true;
|
||||||
|
|
||||||
|
systemd.network.networks."10-${cfg.staticIp.interface}" = {
|
||||||
|
matchConfig.Name = cfg.staticIp.interface;
|
||||||
|
address = [ "${cfg.staticIp.address}/${toString cfg.staticIp.prefixLength}" ];
|
||||||
|
dns = cfg.staticIp.nameservers;
|
||||||
|
routes = [
|
||||||
|
({
|
||||||
|
routeConfig = {
|
||||||
|
Gateway = cfg.staticIp.gateway;
|
||||||
|
} // lib.optionalAttrs cfg.staticIp.onlinkGateway {
|
||||||
|
GatewayOnLink = true;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
networkConfig = {
|
||||||
|
DHCP = "no";
|
||||||
|
};
|
||||||
|
linkConfig.RequiredForOnline = "routable";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,14 +1,25 @@
|
|||||||
{pkgs, ... }:
|
{ lib, pkgs, config, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.myPackages;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
|
options.myPackages = {
|
||||||
|
extra = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.package;
|
||||||
|
default = [ ];
|
||||||
|
description = "Extra packages to install on this host, beyond the core set.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
git
|
git
|
||||||
wget
|
wget
|
||||||
curl
|
curl
|
||||||
ethtool
|
ethtool
|
||||||
fish
|
fish
|
||||||
rocmPackages.rocm-smi
|
tmux
|
||||||
btrfs-progs
|
] ++ cfg.extra;
|
||||||
distrobox
|
};
|
||||||
steam-run
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
+82
-19
@@ -1,25 +1,88 @@
|
|||||||
{ pkgs, ... }: {
|
{ lib, pkgs, config, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.myUsers;
|
||||||
|
|
||||||
|
adminOpts = { ... }: {
|
||||||
|
options = {
|
||||||
|
description = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Human-readable description (full name) for this user.";
|
||||||
|
};
|
||||||
|
shell = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = pkgs.bash;
|
||||||
|
description = "Login shell package for this user.";
|
||||||
|
};
|
||||||
|
extraGroups = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
default = [ ];
|
||||||
|
description = "Extra groups this user belongs to.";
|
||||||
|
};
|
||||||
|
authorizedKeys = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
default = [ ];
|
||||||
|
description = "OpenSSH public keys authorized to log in as this user.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
serviceUserOpts = { ... }: {
|
||||||
|
options = {
|
||||||
|
description = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Human-readable description for this service user.";
|
||||||
|
};
|
||||||
|
group = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Primary group for this service user.";
|
||||||
|
};
|
||||||
|
createHome = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Whether to create a home directory for this service user.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.myUsers = {
|
||||||
|
admins = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf (lib.types.submodule adminOpts);
|
||||||
|
default = { };
|
||||||
|
description = "Admin users with interactive shell access.";
|
||||||
|
};
|
||||||
|
|
||||||
|
serviceUsers = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf (lib.types.submodule serviceUserOpts);
|
||||||
|
default = { };
|
||||||
|
description = "Service users without administrative privileges, used for things like file shares.";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraGroups = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
default = [ ];
|
||||||
|
description = "Extra system groups to create, beyond the ones implied by admins/serviceUsers.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
environment.localBinInPath = true;
|
environment.localBinInPath = true;
|
||||||
|
|
||||||
users.groups.mikushare-group = {};
|
users.groups = lib.genAttrs cfg.extraGroups (_: { });
|
||||||
|
|
||||||
users.groups.plugdev = {};
|
users.users = lib.mapAttrs
|
||||||
|
(_: admin: {
|
||||||
users.users.emmatherock = {
|
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "EmmaTheRock";
|
inherit (admin) description shell extraGroups;
|
||||||
shell = pkgs.fish;
|
openssh.authorizedKeys.keys = admin.authorizedKeys;
|
||||||
extraGroups = [ "plugdev" "networkmanager" "wheel" "video" "mikushare-group" "render" ];
|
})
|
||||||
openssh.authorizedKeys.keys = [
|
cfg.admins
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA8vfwM5g9RJXqHtqTgNqsYg9SxSm+UMvFqTjBoAsLJ6 emmatherock@MAIN-PC"
|
// lib.mapAttrs
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIpTslcK0yQ6k+h8foNl17wVRyJUfEGzq7f1h3014WNB s21 plus"
|
(_: svc: {
|
||||||
];
|
isSystemUser = true;
|
||||||
};
|
inherit (svc) description group createHome;
|
||||||
|
})
|
||||||
users.users.mikushare = {
|
cfg.serviceUsers;
|
||||||
isNormalUser = true;
|
|
||||||
description = "Acceso remoto Mikufanclub";
|
|
||||||
group = "mikushare-group";
|
|
||||||
createHome = false;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 IW6ZLQ fGdkbwV5VE8c5ueKCr/q3Agl9cKnqzmpPUGQsOTMqVU
|
||||||
|
ZvXNujDfCWxuprM/2k7FR7aeNcpwU+cAd9H+ZByYOkE
|
||||||
|
-> ssh-ed25519 h0IYxQ 3PzwNp8Sn8eeYBNMBKOJ+hoH9uxVlgV0RtqsPdZNtnM
|
||||||
|
WDLCfjfmKsj3u0GL+luYLwwXit98RLbgwMBNzp+x24U
|
||||||
|
-> ssh-ed25519 4D7N4w 3ndiKKCZSJoZNpn1HElFnyPOx8DeFJPm9iAMQdtm4SM
|
||||||
|
KqX/oScwxOhOqHM1Z+uoXWMRZrCpl5ax6BuHiy6puwc
|
||||||
|
--- CEVnIJUTA60ffvNCDrodud14KIfucXHub+tl7tXX/N4
|
||||||
|
ÅШb³ú_zj(Ãö…s>îãF¼x£UßãFعÝÓÛñS·ˆ`†ŸOdÙ…N‰lÛFã%š LfÇ—FfÞ‡#ê6ò‘ðÎ
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
let
|
||||||
|
# Emma's personal SSH keys (same ones authorized in modules/system/users.nix),
|
||||||
|
# so secrets can be edited/re-keyed from his own workstations.
|
||||||
|
emma-main-pc = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA8vfwM5g9RJXqHtqTgNqsYg9SxSm+UMvFqTjBoAsLJ6 emmatherock@MAIN-PC";
|
||||||
|
emma-s21-plus = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIpTslcK0yQ6k+h8foNl17wVRyJUfEGzq7f1h3014WNB s21 plus";
|
||||||
|
emma-nixos = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEUCpjAuJobymPPAoPjLdL1eD6g4v6wrquu3cyHP22Wj emmatherock@NixOS";
|
||||||
|
|
||||||
|
# Host SSH host keys, used by agenix at runtime to decrypt (via the default
|
||||||
|
# age.identityPaths, which points at services.openssh host keys).
|
||||||
|
miku-homelab = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH7zsQdzX7RHRd2plwrTKJR89uwR2YfzBm1n+HkcYEbb root@NixOS";
|
||||||
|
|
||||||
|
vps = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDh8+hpWkGLRszFI4TC1/YHB8IiSdM0UUOsWbOwXPLn6 root@vps";
|
||||||
|
|
||||||
|
admins = [ emma-main-pc emma-s21-plus emma-nixos ];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
"miku-homelab-wg.age".publicKeys = admins ++ [ miku-homelab ];
|
||||||
|
"vps-wg.age".publicKeys = admins ++ [ vps ];
|
||||||
|
}
|
||||||
Binary file not shown.
Reference in new issue
Block a user