initial config commit

This commit is contained in:
wi11-holdsworth 2025-07-11 16:57:21 +10:00
parent f8980b6805
commit f3dc1d15ff
79 changed files with 2725 additions and 0 deletions

View file

@ -0,0 +1,42 @@
{
pkgs,
hostName,
inputs,
userName,
...
}:
{
imports = [
../../modules/nixos/default.nix
./hardware-configuration.nix
];
# reusable modules
borgbackup-srv.enable = true;
intel-gpu.enable = true;
server.enable = true;
# config
networking.hostName = "${hostName}";
services.openssh.enable = true;
system.stateVersion = "24.11";
users = {
groups.${userName} = { };
users.${userName} = {
extraGroups = [
"wheel"
"docker"
];
home = "/home/srv";
isNormalUser = true;
shell = pkgs.bash;
};
};
virtualisation.docker.enable = true;
}

View file

@ -0,0 +1,58 @@
# 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 = [
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
"sdhci_pci"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/f202dcb2-1af3-4841-b0a7-303b18e68421";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/E591-819C";
fsType = "vfat";
options = [
"fmask=0767"
"dmask=0767"
];
};
swapDevices = [
{ device = "/dev/disk/by-uuid/8e471996-8a5d-4782-b87f-83f2b3839f53"; }
];
# 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.enp1s0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

13
hosts/server/home.nix Normal file
View file

@ -0,0 +1,13 @@
{
userName,
...
}:
{
imports = [ ../../modules/home-manager/default.nix ];
home = {
username = "${userName}";
homeDirectory = "/home/srv";
stateVersion = "24.11";
};
}