From abda1acad998a4311e1db2ca7a71a5587578138c Mon Sep 17 00:00:00 2001 From: xezo360hye Date: Wed, 21 Aug 2024 15:52:22 +0300 Subject: [PATCH] feat: add new host, noma.nix --- flake.nix | 2 +- hardware/noma.nix | 39 +++++++++++++++++++++++++++++++++++++++ home/noma.nix | 5 +++++ system/common.nix | 2 +- system/noma.nix | 20 ++++++++++++++++++++ 5 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 hardware/noma.nix create mode 100644 home/noma.nix create mode 100644 system/noma.nix diff --git a/flake.nix b/flake.nix index 7248b80..427ae5c 100644 --- a/flake.nix +++ b/flake.nix @@ -37,7 +37,7 @@ inherit (nixpkgs) lib; username = "andrey"; - hostnames = [ "tokishiko" "maidena" ]; + hostnames = [ "tokishiko" "maidena" "noma" ]; stateVersion = "24.05"; makeSystem = hostname: { diff --git a/hardware/noma.nix b/hardware/noma.nix new file mode 100644 index 0000000..6dbc5b5 --- /dev/null +++ b/hardware/noma.nix @@ -0,0 +1,39 @@ +# 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" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/522d5c82-5a7b-4aa2-8b69-7c7a8b225924"; + fsType = "xfs"; + }; + + fileSystems."/boot/efi" = + { device = "/dev/disk/by-uuid/D219-B08E"; + 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.eno1.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; +} diff --git a/home/noma.nix b/home/noma.nix new file mode 100644 index 0000000..0c022f2 --- /dev/null +++ b/home/noma.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./modules/plasma + ]; +} diff --git a/system/common.nix b/system/common.nix index 8dff2da..b417783 100644 --- a/system/common.nix +++ b/system/common.nix @@ -4,7 +4,7 @@ in { # Bootloader boot.loader.grub.enable = true; - boot.loader.grub.device = "/dev/sda"; + boot.loader.grub.device = lib.mkDefault "/dev/sda"; # Networking diff --git a/system/noma.nix b/system/noma.nix new file mode 100644 index 0000000..c4b6f75 --- /dev/null +++ b/system/noma.nix @@ -0,0 +1,20 @@ +{ + boot.loader = { + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot/efi"; + }; + grub = { + efiSupport = true; + device = "nodev"; + }; + }; + + services = { + desktopManager.plasma6.enable = true; + displayManager.sddm = { + enable = true; + wayland.enable = true; + }; + }; +}