nixos: Modularize NixOS and Home Manager config

This commit is contained in:
emmatherock
2026-06-17 15:53:15 -03:00
parent 60df66aab0
commit 8b6090acdb
31 changed files with 297 additions and 276 deletions
+9
View File
@@ -0,0 +1,9 @@
{
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
}
+10
View File
@@ -0,0 +1,10 @@
{pkgs, apple-fonts, ... }:
{
fonts.packages = with pkgs; [
noto-fonts noto-fonts-cjk-sans noto-fonts-color-emoji
nerd-fonts.fira-code nerd-fonts.jetbrains-mono
apple-fonts.packages.${pkgs.stdenv.hostPlatform.system}.sf-pro
apple-fonts.packages.${pkgs.stdenv.hostPlatform.system}.sf-mono
apple-fonts.packages.${pkgs.stdenv.hostPlatform.system}.ny
];
}
+6
View File
@@ -0,0 +1,6 @@
{
programs = {
gamemode.enable = true;
steam = { enable = true; remotePlay.openFirewall = true; };
};
}
+10
View File
@@ -0,0 +1,10 @@
{pkgs, ... }:
{
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
rocmPackages.clr.icd
];
};
}
+67
View File
@@ -0,0 +1,67 @@
{ config, pkgs, ... }: {
networking = {
hostName = "miku-homelab";
networkmanager.enable = true;
firewall = {
enable = true;
allowedUDPPorts = [ config.services.tailscale.port 4242 49983 24800 26900 ];
allowedTCPPorts = [ 22 4242 49983 24800 26900 ];
};
useDHCP = false;
interfaces.enp6s0.ipv4.addresses = [{
address = "192.168.1.21";
prefixLength = 24;
}];
defaultGateway = "192.168.1.1";
# DNS rápidos para que la resolución de nombres sea instantánea
nameservers = [ "1.1.1.1" "8.8.8.8" ];
};
services.tailscale.enable = true;
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
AllowUsers = [ "emmatherock" ];
};
};
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;
};
};
}
+14
View File
@@ -0,0 +1,14 @@
{pkgs, ... }:
{
environment.systemPackages = with pkgs; [
git
wget
curl
ethtool
fish
rocmPackages.rocm-smi
btrfs-progs
distrobox
steam-run
];
}
+5
View File
@@ -0,0 +1,5 @@
{
programs = {
fish.enable = true;
};
}
+25
View File
@@ -0,0 +1,25 @@
{ pkgs, ... }: {
environment.localBinInPath = true;
users.groups.mikushare-group = {};
users.groups.plugdev = {};
users.users.emmatherock = {
isNormalUser = true;
description = "EmmaTheRock";
shell = pkgs.fish;
extraGroups = [ "plugdev" "networkmanager" "wheel" "video" "mikushare-group" "render" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA8vfwM5g9RJXqHtqTgNqsYg9SxSm+UMvFqTjBoAsLJ6 emmatherock@MAIN-PC"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIpTslcK0yQ6k+h8foNl17wVRyJUfEGzq7f1h3014WNB s21 plus"
];
};
users.users.mikushare = {
isNormalUser = true;
description = "Acceso remoto Mikufanclub";
group = "mikushare-group";
createHome = false;
};
}