Restructure

- Restructure
- Add sops+age
This commit is contained in:
aloslider
2026-04-02 21:21:06 +03:00
parent 03548606e4
commit 6a3ff12527
39 changed files with 590 additions and 194 deletions
+7
View File
@@ -0,0 +1,7 @@
{ config, ... }:
{
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
}
+29
View File
@@ -0,0 +1,29 @@
{
config,
lib,
...
}:
{
imports = lib.flatten [
./boot.nix
./network.nix
./hardware-configuration.nix
(map lib.custom.relativeToRoot (
[
"hosts/common/core"
"hosts/common/users/benq.nix"
"home/benq/homelab.nix"
]
++ (map (f: "hosts/common/optional/${f}") [
"bbr.nix"
"docker.nix"
"endlessh.nix"
"fail2ban.nix"
"openssh.nix"
])
))
];
disko.cfg.mainDevice = "/dev/vda";
system.stateVersion = "26.05";
}
+35
View File
@@ -0,0 +1,35 @@
{
config,
lib,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [
"ahci"
"xhci_pci"
"virtio_pci"
"sr_mod"
"virtio_blk"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
# hdd
fileSystems."/mnt/data" = {
device = "/dev/disk/by-label/data";
fsType = "ext4";
options = [
"noatime"
"nofail"
"x-systemd.device-timeout=5s"
];
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}
+26
View File
@@ -0,0 +1,26 @@
{ config, ... }:
{
networking = {
hostName = "homelab";
networkmanager.enable = true;
useDHCP = false;
defaultGateway = "192.168.88.1";
nameservers = [
"192.168.88.1"
];
interfaces.enp1s0 = {
ipv4.addresses = [
{
address = "192.168.88.5";
prefixLength = 24;
}
];
};
firewall.allowedTCPPorts = [
22
80
443
];
firewall.allowedUDPPorts = [ ];
};
}