diff --git a/modules/hosts/homelab/home02/configuration.nix b/modules/hosts/homelab/home02/configuration.nix new file mode 100644 index 00000000..ce2b11be --- /dev/null +++ b/modules/hosts/homelab/home02/configuration.nix @@ -0,0 +1,51 @@ +{ + flake.modules.nixos."nixosConfigurations/home02" = { + networking.hostName = "home02"; + + 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; + }; +} diff --git a/modules/hosts/homelab/home02/hardware.nix b/modules/hosts/homelab/home02/hardware.nix new file mode 100644 index 00000000..5784aad5 --- /dev/null +++ b/modules/hosts/homelab/home02/hardware.nix @@ -0,0 +1,50 @@ +{ + flake.modules.nixos."nixosConfigurations/home02" = + { + config, + lib, + modulesPath, + ... + }: + + { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "nvme" + "usb_storage" + "usbhid" + "sd_mod" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/68c1355f-83d5-4db0-8e84-1ad251c17a67"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/8FA9-8A4F"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/b7100541-175a-4e09-8c7e-97bce11015d1"; } + ]; + + networking.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + }; +} diff --git a/modules/hosts/homelab/home02/nginx.nix b/modules/hosts/homelab/home02/nginx.nix new file mode 100644 index 00000000..7099747d --- /dev/null +++ b/modules/hosts/homelab/home02/nginx.nix @@ -0,0 +1,5 @@ +{ + flake.modules.nixos."nixosConfigurations/home02".services.nginx = { + enable = true; + }; +} diff --git a/modules/nixos-configurations.nix b/modules/nixos-configurations.nix index 8c764d9b..f84e185b 100644 --- a/modules/nixos-configurations.nix +++ b/modules/nixos-configurations.nix @@ -47,6 +47,11 @@ in { nixosConfigurations = { + home02 = mkHost { + hostname = "home02"; + stateVersion = "25.05"; + }; + nixedo = mkHost { hostname = "nixedo"; stateVersion = "24.11";