feat: introduce treefmt and fmt all
This commit is contained in:
parent
80250b0179
commit
27c6c4f9fa
237 changed files with 5440 additions and 5214 deletions
|
@ -5,11 +5,11 @@
|
|||
config,
|
||||
nodeFlake,
|
||||
nodeName,
|
||||
localDomainName,
|
||||
system,
|
||||
variables,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
imports = [
|
||||
|
@ -48,7 +48,7 @@
|
|||
boot.loader.grub.efiSupport = false;
|
||||
|
||||
# forcing seems required or else there's an error about duplicated devices
|
||||
boot.loader.grub.devices = lib.mkForce ["/dev/vda"];
|
||||
boot.loader.grub.devices = lib.mkForce [ "/dev/vda" ];
|
||||
|
||||
disko.devices.disk.vda = {
|
||||
device = "/dev/vda";
|
||||
|
@ -64,14 +64,14 @@
|
|||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"]; # Override existing partition
|
||||
extraArgs = [ "-f" ]; # Override existing partition
|
||||
subvolumes = {
|
||||
# Subvolume name is different from mountpoint
|
||||
"/rootfs" = {
|
||||
mountpoint = "/";
|
||||
};
|
||||
"/nix" = {
|
||||
mountOptions = ["noatime"];
|
||||
mountOptions = [ "noatime" ];
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
"/boot" = {
|
||||
|
@ -156,9 +156,7 @@
|
|||
interface = "eth0";
|
||||
address = variables.ipv4gateway;
|
||||
};
|
||||
nameservers = [
|
||||
variables.ipv4dns
|
||||
];
|
||||
nameservers = [ variables.ipv4dns ];
|
||||
|
||||
# these will be configured via nftables
|
||||
nat.enable = lib.mkForce false;
|
||||
|
@ -176,17 +174,20 @@
|
|||
snippets.nnf-common.enable = true;
|
||||
|
||||
zones.wan = {
|
||||
interfaces = ["eth0"];
|
||||
interfaces = [ "eth0" ];
|
||||
};
|
||||
|
||||
zones.vpn = {
|
||||
interfaces = ["wg0" "wg1"];
|
||||
interfaces = [
|
||||
"wg0"
|
||||
"wg1"
|
||||
];
|
||||
};
|
||||
|
||||
rules = {
|
||||
to-fw = {
|
||||
from = "all";
|
||||
to = ["fw"];
|
||||
to = [ "fw" ];
|
||||
verdict = "drop";
|
||||
|
||||
allowedTCPPorts = [
|
||||
|
@ -202,8 +203,8 @@
|
|||
};
|
||||
|
||||
vpn-to-wan-nat = {
|
||||
from = ["vpn"];
|
||||
to = ["wan"];
|
||||
from = [ "vpn" ];
|
||||
to = [ "wan" ];
|
||||
masquerade = true;
|
||||
verdict = "accept";
|
||||
};
|
||||
|
@ -283,9 +284,7 @@
|
|||
systemd.network.networks.wg0 = {
|
||||
enable = true;
|
||||
matchConfig.Name = "wg0";
|
||||
address = [
|
||||
"10.0.0.0/31"
|
||||
];
|
||||
address = [ "10.0.0.0/31" ];
|
||||
|
||||
routes = [
|
||||
{
|
||||
|
@ -299,9 +298,7 @@
|
|||
systemd.network.networks.wg1 = {
|
||||
enable = true;
|
||||
matchConfig.Name = "wg1";
|
||||
address = [
|
||||
"10.0.0.2/31"
|
||||
];
|
||||
address = [ "10.0.0.2/31" ];
|
||||
|
||||
routes = [
|
||||
{
|
||||
|
|
|
@ -4,20 +4,24 @@
|
|||
repoFlake,
|
||||
nodeFlake,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
variables = import ./variables.crypt.nix;
|
||||
in {
|
||||
in
|
||||
{
|
||||
meta.nodeSpecialArgs.${nodeName} = {
|
||||
inherit repoFlake nodeName nodeFlake system variables;
|
||||
inherit
|
||||
repoFlake
|
||||
nodeName
|
||||
nodeFlake
|
||||
system
|
||||
variables
|
||||
;
|
||||
packages' = repoFlake.packages.${system};
|
||||
nodePackages' = nodeFlake.packages.${system};
|
||||
};
|
||||
|
||||
meta.nodeNixpkgs.${nodeName} =
|
||||
import nodeFlake.inputs.nixpkgs.outPath
|
||||
{
|
||||
inherit system;
|
||||
};
|
||||
meta.nodeNixpkgs.${nodeName} = import nodeFlake.inputs.nixpkgs.outPath { inherit system; };
|
||||
|
||||
${nodeName} = {
|
||||
deployment.targetHost = variables.ipv4;
|
||||
|
|
|
@ -15,5 +15,5 @@
|
|||
nixos-nftables-firewall.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = _: {};
|
||||
outputs = _: { };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue