system: Add Rias configuration

This commit is contained in:
Sweetbread 2024-08-25 19:10:00 +03:00
parent c6a1fc025b
commit 4f4957a6da
4 changed files with 31 additions and 28 deletions

View File

@ -18,8 +18,7 @@
system = "x86_64-linux"; system = "x86_64-linux";
in { in {
# nixos - system hostname nixosConfigurations.Rias = nixpkgs.lib.nixosSystem {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
specialArgs = { specialArgs = {
pkgs-stable = import nixpkgs-stable { pkgs-stable = import nixpkgs-stable {
inherit system; inherit system;
@ -28,7 +27,7 @@
inherit inputs system; inherit inputs system;
}; };
modules = [ modules = [
./nixos/configuration.nix ./nixos/hosts/Rias/configuration.nix
]; ];
}; };

View File

@ -16,7 +16,7 @@
hms = "home-manager switch --flake ${flakeDir}"; hms = "home-manager switch --flake ${flakeDir}";
conf = "$EDITOR ${flakeDir}/nixos/configuration.nix"; conf = "$EDITOR ${flakeDir}/nixos/hosts/$(hostname)/configuration.nix";
pkgs = "$EDITOR ${flakeDir}/nixos/packages.nix"; pkgs = "$EDITOR ${flakeDir}/nixos/packages.nix";
ll = "ls -l"; ll = "ls -l";

View File

@ -1,28 +1,30 @@
{ config, ...}: { { config, pkgs, ...}: {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./packages.nix ../../packages.nix
./modules/bundle.nix ../../modules/bundle.nix
]; ];
disabledModules = [ disabledModules = [
./modules/xserver.nix ./modules/xserver.nix
]; ];
networking.hostName = "nixos"; # Define your hostname. networking.hostName = "Rias";
time.timeZone = "Europe/Moscow"; # Set your time zone. time.timeZone = "Europe/Moscow";
i18n.defaultLocale = "ru_RU.UTF-8"; # Select internationalisation properties. i18n.defaultLocale = "ru_RU.UTF-8";
nix.settings.experimental-features = [ "nix-command" "flakes" ]; # Enabling flakes nix.settings.experimental-features = [ "nix-command" "flakes" ];
system.stateVersion = "23.05"; # Don't change it bro system.stateVersion = "23.05";
hardware.opengl = { hardware.opengl = {
enable = true; enable = true;
driSupport = true; driSupport = true;
driSupport32Bit = true; driSupport32Bit = true;
extraPackages = with pkgs; [nvidia-vaapi-driver intel-media-driver];
extraPackages32 = with pkgs.pkgsi686Linux; [nvidia-vaapi-driver intel-media-driver];
}; };
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
@ -34,11 +36,5 @@
open = false; open = false;
nvidiaSettings = true; nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable; package = config.boot.kernelPackages.nvidiaPackages.stable;
prime = {
sync.enable = true;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
}; };
} }

View File

@ -4,20 +4,30 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/48ebb252-9212-49e3-a036-501d549477f5"; device = "/dev/disk/by-uuid/c32a41f3-f084-44ea-ac52-179a3bc44bbf";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/F3A3-D76B";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/mnt/D" = {
device = "/dev/disk/by-uuid/EC7C275B7C272036";
fsType = "ntfs";
options = ["umask=0022" "gid=100" "uid=1001"];
};
swapDevices = [ ]; swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
@ -26,8 +36,6 @@
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true; # networking.interfaces.eno1.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s20f0u6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;