This commit is contained in:
William 2026-02-12 18:50:38 -03:00
parent 7309074f25
commit 8f98f7d420
45 changed files with 932 additions and 723 deletions

View file

@ -1,7 +1,14 @@
# aspects/server/boot.nix
{ ... }:
{
flake.modules.nixos.server-boot = { config, lib, pkgs, ... }: {
boot.kernelPackages = pkgs.linuxPackages_hardened;
};
flake.modules.nixos.server-boot =
{
config,
lib,
pkgs,
...
}:
{
boot.kernelPackages = pkgs.linuxPackages_hardened;
};
}

View file

@ -1,15 +1,22 @@
# aspects/server/nix.nix
{ inputs, ... }:
{
flake.modules.nixos.server-nix = { config, lib, pkgs, ... }: {
environment.etc."channels/nixpkgs".source = inputs.nixpkgs-stable.outPath;
flake.modules.nixos.server-nix =
{
config,
lib,
pkgs,
...
}:
{
environment.etc."channels/nixpkgs".source = inputs.nixpkgs-stable.outPath;
nix = {
registry.nixpkgs.flake = inputs.nixpkgs-stable;
nixPath = [
"nixpkgs=/etc/channels/nixpkgs"
"/nix/var/nix/profiles/per-user/root/channels"
];
nix = {
registry.nixpkgs.flake = inputs.nixpkgs-stable;
nixPath = [
"nixpkgs=/etc/channels/nixpkgs"
"/nix/var/nix/profiles/per-user/root/channels"
];
};
};
};
}

View file

@ -1,15 +1,22 @@
# aspects/server/tailscale.nix
{ ... }:
{
flake.modules.nixos.server-tailscale = { config, lib, pkgs, ... }: {
services.tailscale = {
extraSetFlags = [ "--advertise-exit-node" ];
useRoutingFeatures = "server";
};
flake.modules.nixos.server-tailscale =
{
config,
lib,
pkgs,
...
}:
{
services.tailscale = {
extraSetFlags = [ "--advertise-exit-node" ];
useRoutingFeatures = "server";
};
boot.kernel.sysctl = {
"net.ipv4.ip_forward" = 1;
"net.ipv6.conf.all.forwarding" = 1;
boot.kernel.sysctl = {
"net.ipv4.ip_forward" = 1;
"net.ipv6.conf.all.forwarding" = 1;
};
};
};
}