Restructure
- Restructure - Add sops+age
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
}
|
||||
@@ -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";
|
||||
}
|
||||
@@ -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";
|
||||
}
|
||||
@@ -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 = [ ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user