parent
c0e7189efe
commit
19edb2b4c0
3 changed files with 122 additions and 0 deletions
67
modules/hosts/homelab/home01/configuration.nix
Normal file
67
modules/hosts/homelab/home01/configuration.nix
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
flake.modules.nixos."nixosConfigurations/home01" = {
|
||||
imports = with inputs.self.modules.nixos; [
|
||||
];
|
||||
|
||||
nix.settings = {
|
||||
auto-optimise-store = true;
|
||||
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
warn-dirty = false;
|
||||
};
|
||||
|
||||
networking.hostName = "home01";
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
time.timeZone = "Europe/London";
|
||||
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_GB.UTF-8";
|
||||
LC_IDENTIFICATION = "en_GB.UTF-8";
|
||||
LC_MEASUREMENT = "en_GB.UTF-8";
|
||||
LC_MONETARY = "en_GB.UTF-8";
|
||||
LC_NAME = "en_GB.UTF-8";
|
||||
LC_NUMERIC = "en_GB.UTF-8";
|
||||
LC_PAPER = "en_GB.UTF-8";
|
||||
LC_TELEPHONE = "en_GB.UTF-8";
|
||||
LC_TIME = "en_GB.UTF-8";
|
||||
};
|
||||
|
||||
services.xserver.xkb = {
|
||||
layout = "gb";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
console.keyMap = "uk";
|
||||
|
||||
users.users.opdavies = {
|
||||
isNormalUser = true;
|
||||
description = "Oliver Davies";
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
];
|
||||
packages = [ ];
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
};
|
||||
}
|
||||
50
modules/hosts/homelab/home01/hardware.nix
Normal file
50
modules/hosts/homelab/home01/hardware.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
flake.modules.nixos."nixosConfigurations/home01" =
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ahci"
|
||||
"nvme"
|
||||
"sd_mod"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"xhci_pci"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/06362cbf-d607-435b-b093-14e3e39462a1";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/5511-BA60";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/585f9f60-9235-4e15-b20b-879115a68260"; }
|
||||
];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
};
|
||||
}
|
||||
|
|
@ -47,6 +47,11 @@
|
|||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
home01 = mkHost {
|
||||
hostname = "home01";
|
||||
stateVersion = "25.05";
|
||||
};
|
||||
|
||||
home02 = mkHost {
|
||||
hostname = "home02";
|
||||
stateVersion = "25.05";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue