Compare commits
43
Commits
933afc7d11
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
437697cbd5 | ||
|
|
367c4bde11 | ||
|
|
af50f7f39d | ||
|
|
627c848d1d | ||
|
|
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 |
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
|
||||
- Add additional hosts
|
||||
Generated
+35
-34
@@ -37,11 +37,11 @@
|
||||
"sf-pro": "sf-pro"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1786018145,
|
||||
"narHash": "sha256-4cjJFmq6JC0Gk9wWt3aZzqovtmM9mikrDWjsBL2ZWu8=",
|
||||
"lastModified": 1789419105,
|
||||
"narHash": "sha256-T5A/AqlF4iL908aIZh45e35Mvj8lTJKq8ddS5bk7nd8=",
|
||||
"owner": "Lyndeno",
|
||||
"repo": "apple-fonts.nix",
|
||||
"rev": "66b5379c6a429ad4ea6ff3943cc1f651df55cc70",
|
||||
"rev": "3861e2249cb244bfbc7cfab2303c152cf5f9d9e9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -96,15 +96,16 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1784665499,
|
||||
"narHash": "sha256-9BMxlTxCCDAeoNLtb1a/st7udtTIJep+wpUzquA29VU=",
|
||||
"owner": "nix-community",
|
||||
"lastModified": 1788011267,
|
||||
"narHash": "sha256-mEq2kU+ljompTToZ44Afvm7d/rHJ5iMBl0tjZuyShJs=",
|
||||
"owner": "Mic92",
|
||||
"repo": "bun2nix",
|
||||
"rev": "0f2a1f0b6f42cebe3b149bf62d38754c5e0e9729",
|
||||
"rev": "5765b0614591f75ee8ba5596e81ae85c167d1071",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"owner": "Mic92",
|
||||
"ref": "fix-structured-attrs-hook",
|
||||
"repo": "bun2nix",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -161,11 +162,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1785627969,
|
||||
"narHash": "sha256-4dtXQk/NMePegK/nWp5NSeuZKLATItOq61lpEvmXqGw=",
|
||||
"lastModified": 1788450739,
|
||||
"narHash": "sha256-glZLQlzIn1fXH6PazR2iUmTo7kzzyYSshrWhLS9TqCU=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "427bf4bd9435fdf21321c8cc628c24efc14c0f7a",
|
||||
"rev": "31729ca8cbdb4fa927b34e5f4353e6a83f39e993",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -220,11 +221,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1786356609,
|
||||
"narHash": "sha256-ou8fYz5w9yhXC8YbvvExybFIa19MyW5G/8dEPqa90hM=",
|
||||
"lastModified": 1789978077,
|
||||
"narHash": "sha256-p/e37FfVifxJQJM7OiiVbUXdpj6eXmOJk34TKLKyYe4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "c30c7955cec30d664a9baced6bc0112e263d4647",
|
||||
"rev": "a26f7158fbc4aa740fcc7fa79a01e1ed29910bc2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -242,11 +243,11 @@
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1786389530,
|
||||
"narHash": "sha256-YTLO0pwBI3eAxT6tssly2MY1lhntcNOV3Xg1agIL5x4=",
|
||||
"lastModified": 1789987094,
|
||||
"narHash": "sha256-jzlT1EofmNifqUjpiSJMPbm/GiU17r65WUi44Kfkmdc=",
|
||||
"owner": "numtide",
|
||||
"repo": "llm-agents.nix",
|
||||
"rev": "5b6721acbc198851658de3f93444d2be308ffe77",
|
||||
"rev": "7c0157f864d113d9f0ce324a78496de6da6e7e07",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -276,11 +277,11 @@
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1786328173,
|
||||
"narHash": "sha256-ghZYtP08BstfBD3keiUHM5KupIRY3+YS+naBsFPtGzc=",
|
||||
"lastModified": 1789964597,
|
||||
"narHash": "sha256-L+tPmy48VrsS/qVrj504pETaGEcVFMs1QpU5kKpBo0U=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-vscode-extensions",
|
||||
"rev": "f5911382d78f7d739197702509b83d790d592cea",
|
||||
"rev": "fa4ec37adf8d8c725bfd8915c497ed41c7cb0f70",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -322,11 +323,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1785975029,
|
||||
"narHash": "sha256-X44cn5rzytELc3NNoQsh0aLkjWA/QzPfc6HPQmsG3sU=",
|
||||
"lastModified": 1789813231,
|
||||
"narHash": "sha256-dsU+UU4X3ND95E/O6Z33qK5jPxIeB/7akn/+NfAk+nY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "70ce234312134a463ba7728e94da2486a1d237ac",
|
||||
"rev": "c80073788adf88abfdc443465311f00e7a231600",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -354,11 +355,11 @@
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1786106723,
|
||||
"narHash": "sha256-zDSUbpoeo/9ZmD2+wXnzxoo1+uhL8vxc0b8yuYMKYq0=",
|
||||
"lastModified": 1789785513,
|
||||
"narHash": "sha256-B44WL6h0XoLjJ41bUPJk0X5SDinLCII//6EcBLXKiJ0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f13ff45afd1bb73e640eaa08a7066dbed07e3238",
|
||||
"rev": "20b1ddd1aa5ace70c9468305030aa4f9ef79671b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -444,7 +445,7 @@
|
||||
"sf-compact": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-83JwqfF9O4+gemMQXWHLRg2GNz2jHxsej1F1IkM2dug=",
|
||||
"narHash": "sha256-KjCzuJOrNxgptsMLGaR8wcrU/bBxCpwtUGzGDcCxJTc=",
|
||||
"type": "file",
|
||||
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Compact.dmg"
|
||||
},
|
||||
@@ -492,7 +493,7 @@
|
||||
"sf-pro": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-vINUEMyFmNzZRBOX2aQ4heScWur6RyA/MPmsqlMPIx4=",
|
||||
"narHash": "sha256-dvGLO786y9ygKRSKDJlhIF6AGmn2NTJ5tBulKinPRxY=",
|
||||
"type": "file",
|
||||
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Pro.dmg"
|
||||
},
|
||||
@@ -508,11 +509,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1785827118,
|
||||
"narHash": "sha256-tS2eSSpa1uLPUyIAJBpf00+A9KSHpC92gKMLavmHuio=",
|
||||
"lastModified": 1789899222,
|
||||
"narHash": "sha256-B00sDpFqhTYuVQIesCdR7GeYJFNogz5U1VmJlSEJnmc=",
|
||||
"owner": "wimpysworld",
|
||||
"repo": "sidra",
|
||||
"rev": "0597e5438fe98fef935cb528c2c9aa5db60171c9",
|
||||
"rev": "ebba6a85eadd15de9d324503b012f84bf5eaf4ce",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -559,11 +560,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1785945821,
|
||||
"narHash": "sha256-NLSyTCW4K4ofhNBllt3omPasm6QpralXH1DBZOc91Dw=",
|
||||
"lastModified": 1786901030,
|
||||
"narHash": "sha256-WSFCsDSE5ffgD2MqzkM2CYjeFiKhRF/dJUN8uedb6YE=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "ae7910970dddc408fe6ab1c8e4b277bb21d72dc0",
|
||||
"rev": "27b3b12a8e6375f28ebe122f07d230ca5459bbfa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
description = "NixOS configuration for my homelab";
|
||||
description = "my nixos configurations";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
@@ -54,7 +54,9 @@
|
||||
home-manager.sharedModules = [
|
||||
plasma-manager.homeModules.plasma-manager
|
||||
];
|
||||
home-manager.users.emmatherock = import ./home/emmatherock/home.nix;
|
||||
home-manager.users.emmatherock = { osConfig, ... }: {
|
||||
imports = [ ./home/emmatherock/core.nix ] ++ osConfig.myHomeProfile.extraPrograms;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
@@ -65,8 +67,17 @@
|
||||
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.users.emmatherock = { osConfig, ... }: {
|
||||
imports = [ ./home/emmatherock/core.nix ] ++ osConfig.myHomeProfile.extraPrograms;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -5,8 +5,9 @@ let
|
||||
in
|
||||
{
|
||||
home.packages = with agents; [
|
||||
antigravity-cli
|
||||
codex
|
||||
codex-acp
|
||||
claude-code
|
||||
claude-agent-acp
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./git.nix
|
||||
./shell.nix
|
||||
];
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
programs.btop.enable = true;
|
||||
|
||||
# Per-project toolchain resolution through nix-shell / flake devShell.
|
||||
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";
|
||||
}
|
||||
@@ -1,10 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.btop.package = pkgs.btop.override { cudaSupport = false; rocmSupport = true; };
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# --- Base y Terminal ---
|
||||
vim
|
||||
fastfetch
|
||||
(btop.override { cudaSupport = false; rocmSupport = true; })
|
||||
nvtopPackages.full
|
||||
];
|
||||
}
|
||||
@@ -5,18 +5,39 @@
|
||||
./hardware-configuration.nix
|
||||
../../modules/profiles/desktop.nix
|
||||
../../modules/profiles/server.nix
|
||||
../../modules/services/ollama.nix
|
||||
../../modules/services/samba.nix
|
||||
../../modules/system/home-profile.nix
|
||||
../../modules/system/nix-ld.nix
|
||||
../../modules/system/packages.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/packages.nix
|
||||
../../home/emmatherock/plasma.nix
|
||||
../../home/emmatherock/vscode.nix
|
||||
];
|
||||
|
||||
myNetworking = {
|
||||
hostName = "miku-homelab";
|
||||
useNetworkManager = true;
|
||||
staticIp = {
|
||||
interface = "enp6s0";
|
||||
interface = "enp9s0";
|
||||
address = "10.1.1.21";
|
||||
prefixLength = 24;
|
||||
gateway = "10.1.1.1";
|
||||
@@ -31,7 +52,7 @@
|
||||
privateKeyFile = config.age.secrets.miku-homelab-wg.path;
|
||||
peers = [
|
||||
{
|
||||
publicKey = "zERcSEQhan+xtmPOIjuVSkQaBynTjH96SgZZF9CZNV8=";
|
||||
publicKey = "BKs9VlsIEM1np6wHeVFL4NfbS1l69xnwins6Q12ByAM=";
|
||||
allowedIPs = [ "10.20.0.1/32" ];
|
||||
endpoint = "vps.external.mikufanclub.lat:51822";
|
||||
persistentKeepalive = 25;
|
||||
@@ -47,7 +68,7 @@
|
||||
extraGroups = [ "plugdev" "networkmanager" "wheel" "video" "mikushare-group" "render" ];
|
||||
authorizedKeys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA8vfwM5g9RJXqHtqTgNqsYg9SxSm+UMvFqTjBoAsLJ6 emmatherock@MAIN-PC"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIpTslcK0yQ6k+h8foNl17wVRyJUfEGzq7f1h3014WNB s21 plus"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO6pnKpUEaeoNXqlenc8MAz1GG8P6BRILyIHMSLtvdeF termius"
|
||||
];
|
||||
};
|
||||
serviceUsers.mikushare = {
|
||||
@@ -90,7 +111,35 @@
|
||||
plymouth.enable = true;
|
||||
initrd.kernelModules = [ "amdgpu" ];
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
kernelParams = [ "quiet" "splash" "boot.shell_on_fail" "loglevel=3" "iommu=pt" ];
|
||||
kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"boot.shell_on_fail"
|
||||
"loglevel=3"
|
||||
"iommu=pt"
|
||||
"zswap.enabled=1"
|
||||
"zswap.compressor=zstd"
|
||||
"zswap.max_pool_percent=20"
|
||||
"zswap.zpool=zsmalloc"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/dev/disk/by-label/optane-swap-1";
|
||||
priority = 50;
|
||||
}
|
||||
{
|
||||
device = "/dev/disk/by-label/optane-swap-2";
|
||||
priority = 50;
|
||||
}
|
||||
];
|
||||
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "zstd";
|
||||
memoryPercent = 50;
|
||||
priority = 100;
|
||||
};
|
||||
|
||||
time.timeZone = "America/Argentina/Buenos_Aires";
|
||||
@@ -126,7 +175,7 @@
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.ethtool}/bin/ethtool -K enp6s0 rx-udp-gro-forwarding on rx-gro-list on";
|
||||
ExecStart = "${pkgs.ethtool}/bin/ethtool -K enp9s0 rx-udp-gro-forwarding on rx-gro-list on";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
};
|
||||
|
||||
+29
-13
@@ -1,26 +1,33 @@
|
||||
{ config, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules/profiles/server.nix
|
||||
../../modules/system/home-profile.nix
|
||||
../../modules/system/nix-ld.nix
|
||||
../../modules/system/packages.nix
|
||||
];
|
||||
|
||||
# PLACEHOLDER: secrets/vps-wg.age does not exist yet. It has to be created
|
||||
# (same way as secrets/miku-homelab-wg.age) once this host is installed and
|
||||
# its own WireGuard private key has been generated.
|
||||
age.secrets.vps-wg.file = ../../secrets/vps-wg.age;
|
||||
|
||||
myHomeProfile.extraPrograms = [
|
||||
../../home/emmatherock/agents.nix
|
||||
];
|
||||
|
||||
myNetworking = {
|
||||
hostName = "vps";
|
||||
useNetworkManager = false;
|
||||
useNetworkd = true;
|
||||
staticIp = {
|
||||
interface = "eth0";
|
||||
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" ];
|
||||
@@ -34,6 +41,10 @@
|
||||
publicKey = "bqxDHQNxOSFpTo3We9ujC2WljtaRBgiNEewW+Rlu10k=";
|
||||
allowedIPs = [ "10.20.0.2/32" ];
|
||||
}
|
||||
{
|
||||
publicKey = "6aw0w7v9uFGvLn/eSdf7z/ljvzz4kviYlSOSj0LKp1E=";
|
||||
allowedIPs = [ "10.20.0.3/32" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
@@ -41,10 +52,12 @@
|
||||
myUsers = {
|
||||
admins.emmatherock = {
|
||||
description = "EmmaTheRock";
|
||||
shell = pkgs.fish;
|
||||
extraGroups = [ "wheel" ];
|
||||
authorizedKeys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA8vfwM5g9RJXqHtqTgNqsYg9SxSm+UMvFqTjBoAsLJ6 emmatherock@MAIN-PC"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIpTslcK0yQ6k+h8foNl17wVRyJUfEGzq7f1h3014WNB s21 plus"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEUCpjAuJobymPPAoPjLdL1eD6g4v6wrquu3cyHP22Wj emmatherock@NixOS"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO6pnKpUEaeoNXqlenc8MAz1GG8P6BRILyIHMSLtvdeF termius"
|
||||
];
|
||||
};
|
||||
};
|
||||
@@ -57,17 +70,20 @@
|
||||
};
|
||||
};
|
||||
|
||||
# PLACEHOLDER: adjust once the real VPS image/provider is known (BIOS vs
|
||||
# UEFI, actual boot device). Assumes a generic BIOS-booted image for now.
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/sda";
|
||||
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 = "UTC";
|
||||
time.timeZone = "America/Argentina/Buenos_Aires";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
system.stateVersion = "26.05";
|
||||
}
|
||||
@@ -1,21 +1,28 @@
|
||||
{ lib, ... }:
|
||||
# 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, ... }:
|
||||
|
||||
# PLACEHOLDER: this host has not been installed yet. Replace this whole file
|
||||
# with the real hardware-configuration.nix generated by `nixos-generate-config`
|
||||
# during the actual installation (it will pick up the real disk UUIDs,
|
||||
# filesystem types, and kernel modules for the VPS provider's image).
|
||||
{
|
||||
imports = [ ];
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
||||
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."/" = {
|
||||
device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000";
|
||||
fsType = "ext4";
|
||||
};
|
||||
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 = [ ];
|
||||
|
||||
|
||||
@@ -9,5 +9,7 @@
|
||||
options = "--delete-older-than 14d";
|
||||
};
|
||||
|
||||
services.journald.extraConfig = "SystemMaxUse=500M";
|
||||
services.journald.settings.Journal = {
|
||||
SystemMaxUse = "500M";
|
||||
};
|
||||
}
|
||||
@@ -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,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.";
|
||||
};
|
||||
}
|
||||
@@ -39,6 +39,12 @@ in
|
||||
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 = {
|
||||
@@ -63,6 +69,11 @@ in
|
||||
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;
|
||||
@@ -116,52 +127,81 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
networking = lib.mkMerge [
|
||||
{
|
||||
hostName = cfg.hostName;
|
||||
networkmanager.enable = cfg.useNetworkManager;
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedUDPPorts = [ config.services.tailscale.port ] ++ cfg.extraUdpPorts;
|
||||
allowedTCPPorts = [ 22 ] ++ cfg.extraTcpPorts;
|
||||
};
|
||||
}
|
||||
(lib.mkIf (cfg.staticIp != null) {
|
||||
useDHCP = false;
|
||||
interfaces.${cfg.staticIp.interface}.ipv4.addresses = [{
|
||||
address = cfg.staticIp.address;
|
||||
prefixLength = cfg.staticIp.prefixLength;
|
||||
}];
|
||||
defaultGateway = cfg.staticIp.gateway;
|
||||
nameservers = cfg.staticIp.nameservers;
|
||||
})
|
||||
(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;
|
||||
};
|
||||
})
|
||||
];
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
networking = lib.mkMerge [
|
||||
{
|
||||
hostName = cfg.hostName;
|
||||
networkmanager.enable = cfg.useNetworkManager;
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedUDPPorts = [ config.services.tailscale.port ] ++ cfg.extraUdpPorts;
|
||||
allowedTCPPorts = [ 22 ] ++ cfg.extraTcpPorts;
|
||||
};
|
||||
}
|
||||
(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 = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
} // lib.optionalAttrs (cfg.sshAllowUsers != [ ]) {
|
||||
AllowUsers = cfg.sshAllowUsers;
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
} // lib.optionalAttrs (cfg.sshAllowUsers != [ ]) {
|
||||
AllowUsers = cfg.sshAllowUsers;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
(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";
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
+23
-12
@@ -1,14 +1,25 @@
|
||||
{pkgs, ... }:
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
let
|
||||
cfg = config.myPackages;
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
wget
|
||||
curl
|
||||
ethtool
|
||||
fish
|
||||
rocmPackages.rocm-smi
|
||||
btrfs-progs
|
||||
distrobox
|
||||
steam-run
|
||||
];
|
||||
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; [
|
||||
git
|
||||
wget
|
||||
curl
|
||||
ethtool
|
||||
fish
|
||||
tmux
|
||||
] ++ cfg.extra;
|
||||
};
|
||||
}
|
||||
+5
-6
@@ -1,20 +1,19 @@
|
||||
let
|
||||
# Emma's personal SSH keys (same ones authorized in modules/system/users.nix),
|
||||
# so secrets can be edited/re-keyed from her own workstations.
|
||||
# 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";
|
||||
|
||||
# TODO: replace with the real vps SSH host key once the host is installed
|
||||
# (e.g. via `ssh-keyscan` or by reading /etc/ssh/ssh_host_ed25519_key.pub on
|
||||
# the vps itself), then re-key any vps secrets that were encrypted without it.
|
||||
vps = "ssh-ed25519 REPLACE_ME_AFTER_VPS_INSTALL";
|
||||
vps = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDh8+hpWkGLRszFI4TC1/YHB8IiSdM0UUOsWbOwXPLn6 root@vps";
|
||||
|
||||
admins = [ emma-main-pc emma-s21-plus ];
|
||||
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