From b09fa5a3948f67fd559d4ab06c16e57aaacbc41d Mon Sep 17 00:00:00 2001 From: Andrey0189 Date: Sat, 30 Nov 2024 12:03:42 +0500 Subject: [PATCH] add new host (330-15ARR) --- flake.nix | 1 + hosts/330-15ARR/configuration.nix | 16 +++++++++ hosts/330-15ARR/hardware-configuration.nix | 40 ++++++++++++++++++++++ hosts/330-15ARR/local-packages.nix | 5 +++ 4 files changed, 62 insertions(+) create mode 100644 hosts/330-15ARR/configuration.nix create mode 100644 hosts/330-15ARR/hardware-configuration.nix create mode 100644 hosts/330-15ARR/local-packages.nix diff --git a/flake.nix b/flake.nix index 0156352..93a86bb 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,7 @@ user = "amper"; hosts = [ { hostname = "slim3"; stateVersion = "24.05"; } + { hostname = "330-15ARR"; stateVersion = "24.11"; } ]; makeSystem = { hostname, stateVersion }: nixpkgs.lib.nixosSystem { diff --git a/hosts/330-15ARR/configuration.nix b/hosts/330-15ARR/configuration.nix new file mode 100644 index 0000000..e6cdb37 --- /dev/null +++ b/hosts/330-15ARR/configuration.nix @@ -0,0 +1,16 @@ +{ stateVersion, hostname, ... }: + +{ + imports = + [ + ./hardware-configuration.nix + ../../nixos/packages.nix + ./local-packages.nix + ../../nixos/modules + ]; + + networking.hostName = hostname; + + system.stateVersion = stateVersion; +} + diff --git a/hosts/330-15ARR/hardware-configuration.nix b/hosts/330-15ARR/hardware-configuration.nix new file mode 100644 index 0000000..681a54f --- /dev/null +++ b/hosts/330-15ARR/hardware-configuration.nix @@ -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 = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/0002bf45-c10d-45c0-962e-d379b37c6bcb"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/B315-9D70"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp3s0f3u3.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/330-15ARR/local-packages.nix b/hosts/330-15ARR/local-packages.nix new file mode 100644 index 0000000..c930a90 --- /dev/null +++ b/hosts/330-15ARR/local-packages.nix @@ -0,0 +1,5 @@ +{ pkgs, ... }: { + environment.systemPackages = with pkgs; [ + + ]; +}