This commit is contained in:
ktkk 2025-10-17 19:58:11 +00:00
parent b89303566a
commit f9132abd53
12 changed files with 332 additions and 30 deletions

View file

@ -0,0 +1,32 @@
{
pkgs,
outputs,
inputs,
lib,
...
}:
{
imports = [
./hardware-configuration.nix
../shared
../../modules/forgejo
../../modules/nginx
../../modules/grafana
];
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
time.timeZone = "Europe/Brussels";
networking = {
hostName = "homelab";
firewall.allowedTCPPorts = [
80
443
];
};
}

View file

@ -0,0 +1,40 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/b743f428-9a9a-46e9-a536-7197b89e71c6";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/358C-11CA";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/77c5668b-fb30-4864-ad93-5357fb8363b4"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp5s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -6,14 +6,22 @@
...
}:
{
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
inputs.agenix.packages."${system}".default
home-manager
neovim
git
tree
wget
tmux
];
users.users."nixos" = {
isNormalUser = true;
};
programs.direnv = {
enable = true;
};
@ -24,8 +32,9 @@
networking = {
firewall = {
allowedTCPPorts = [ 22 ];
enable = true;
allowedTCPPorts = [ 22 ];
};
};

View file

@ -7,7 +7,6 @@
}:
{
imports = [
../../modules/grafana
../shared
];