From ddd3490dfb592417163e801994a60854dac135fe Mon Sep 17 00:00:00 2001 From: spl3g Date: Thu, 26 Oct 2023 14:44:22 +0300 Subject: configs for my laptop --- nixos/#hardware-configuration.nix# | 90 -------------------------------------- nixos/configuration.nix | 68 +++++++++++++++++++--------- nixos/configuration.old.nix | 3 +- nixos/hardware-configuration.nix | 66 ++++++---------------------- 4 files changed, 63 insertions(+), 164 deletions(-) delete mode 100644 nixos/#hardware-configuration.nix# (limited to 'nixos') diff --git a/nixos/#hardware-configuration.nix# b/nixos/#hardware-configuration.nix# deleted file mode 100644 index 8d69197..0000000 --- a/nixos/#hardware-configuration.nix# +++ /dev/null @@ -1,90 +0,0 @@ -# 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" "ehci_pci" "ata_piix" "usb_storage" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/74a99a85-4705-4108-99ac-7e391f5a45d8"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/92C7-3768"; - fsType = "vfat"; - }; - - fileSystems."/home/jerpo/bigdrive" = - { device = "/dev/disk/by-uuid/15ed0e39-280c-42c7-a886-742f95866ded"; - fsType = "btrfs"; - options = [ - "user" - "auto" - "async" - "nofail" - "rw" - "dev" - "suid" - "exec" - ]; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/2b0e2731-0821-4795-8f37-c60069c0a9b9"; } - ]; - - # 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.enp3s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - # Nvidia drivers - # Make sure opengl is enabled - hardware.opengl = { - enable = true; - driSupport = true; - driSupport32Bit = true; - }; - - # NVIDIA drivers are unfree. - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "nvidia-x11" - ]; - - # Tell Xorg to use the nvidia driver - services.xserver.videoDrivers = ["nvidia"]; - - hardware.nvidia = { - - # Modesetting is needed for most wayland compositors - modesetting.enable = true; - - # Use the open source version of the kernel module - # Only available on driver 515.43.04+ - open = false; - - # Enable the nvidia settings menu - nvidiaSettings = true; - - # Optionally, you may need to select the appropriate driver version for your specific GPU. - package = config.boot.kernelPackages.nvidiaPackages.stable; - }; - hardware.opentabletdriver = { - enable = true; - daemon.enable = true; - }; -} diff --git a/nixos/configuration.nix b/nixos/configuration.nix index e07e670..068db8b 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -47,11 +47,16 @@ experimental-features = "nix-command flakes"; # Deduplicate and optimize nix store auto-optimise-store = true; + # Enable cachix + substituters = [ "https://nix-gaming.cachix.org" ]; + trusted-public-keys = [ "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4=" ]; + }; }; - + time.timeZone = "Europe/Moscow"; networking.hostName = "ltrr"; + networking.networkmanager.enable = true; boot.loader = { systemd-boot.enable = true; @@ -64,13 +69,17 @@ # dm displayManager = { - defaultSession = "none+bspwm"; - sddm = { - enable = true; - theme = "sugar-dark"; - }; + lightdm.enable = false; + # defaultSession = "none+bspwm"; + # sddm = { + # enable = true; + # theme = "sugar-dark"; + # }; }; + # libinput + libinput.enable = true; + # wm windowManager.bspwm.enable = true; @@ -79,41 +88,55 @@ xkbOptions = "grp:win_space_toggle"; }; - # Printing - printing.enable = true; - printing.drivers = [ pkgs.hplipWithPlugin ]; - avahi = { + acpid = { enable = true; - nssmdns = true; - openFirewall = true; + powerEventCommands = ""; + lidEventCommands = "firefox"; }; - pipewire = { + # Printing + # printing.enable = true; + # printing.drivers = [ pkgs.hplipWithPlugin ]; + # avahi = { + # enable = true; + # nssmdns = true; + # openFirewall = true; + # }; + }; + security.rtkit.enable = true; + services.pipewire = { enable = true; + audio.enable = true; + wireplumber.enable = true; alsa.enable = true; pulse.enable = true; jack.enable = true; }; - v2raya.enable = true; - }; + virtualisation.virtualbox.host.enable = true; + users.extraGroups.vboxusers.members = [ "jerpo" ]; environment.systemPackages = with pkgs; [ vim git - killall btrfs-progs ntfs3g - sddm-sugar-dark-theme + xorg.xinit + carapace ]; - services.udisks2 = { enable = true; mountOnMedia = true; }; - + + programs.dconf.enable = true; i18n.defaultLocale = "ru_RU.UTF-8"; + programs.adb.enable = true; + services.udev.packages = [ + pkgs.android-udev-rules + ]; + programs.fish.enable = true; users.users = { jerpo = { @@ -122,7 +145,7 @@ openssh.authorizedKeys.keys = [ # TODO: Add your SSH public key(s) here, if you plan on using SSH to connect ]; - extraGroups = [ "networkmanager" "wheel" ]; + extraGroups = [ "networkmanager" "wheel" "docker" "input" "adbusers" ]; }; }; @@ -133,6 +156,11 @@ users.jerpo = import ../home-manager/home.nix; }; + qt = { + platformTheme = "gtk"; + style = "gtk"; + }; + # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion system.stateVersion = "23.05"; } diff --git a/nixos/configuration.old.nix b/nixos/configuration.old.nix index 9f5bdb6..bb8a218 100644 --- a/nixos/configuration.old.nix +++ b/nixos/configuration.old.nix @@ -140,7 +140,6 @@ wineWowPackages.full wineWowPackages.fonts winetricks - nvtop-nvidia nix-prefetch-scripts xkb-switch pamixer @@ -149,7 +148,7 @@ v4l-utils ]; - services.v2raya.enable = true; + # services.v2raya.enable = true; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix index e173cbd..93f86c1 100644 --- a/nixos/hardware-configuration.nix +++ b/nixos/hardware-configuration.nix @@ -8,38 +8,23 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ata_piix" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" "v4l2loopback" ]; + boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/74a99a85-4705-4108-99ac-7e391f5a45d8"; + { device = "/dev/disk/by-uuid/6a01c356-7ba4-4499-84be-d3f94af19c71"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/92C7-3768"; + { device = "/dev/disk/by-uuid/AFC7-387A"; fsType = "vfat"; }; - fileSystems."/home/jerpo/bigdrive" = - { device = "/dev/disk/by-uuid/15ed0e39-280c-42c7-a886-742f95866ded"; - fsType = "btrfs"; - options = [ - "user" - "auto" - "async" - "nofail" - "rw" - "dev" - "suid" - "exec" - ]; - }; - swapDevices = - [ { device = "/dev/disk/by-uuid/2b0e2731-0821-4795-8f37-c60069c0a9b9"; } + [ { device = "/dev/disk/by-uuid/c52d36a0-3755-4407-a15c-1b021a12f32b"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking @@ -47,44 +32,21 @@ # 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.enp3s0.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"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - # Nvidia drivers - # Make sure opengl is enabled + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + }; hardware.opengl = { enable = true; driSupport = true; driSupport32Bit = true; + extraPackages = with pkgs; [ intel-compute-runtime ]; }; - - # NVIDIA drivers are unfree. - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "nvidia-x11" - ]; - - # Tell Xorg to use the nvidia driver - services.xserver.videoDrivers = ["nvidia"]; - - hardware.nvidia = { - - # Modesetting is needed for most wayland compositors - modesetting.enable = true; - - # Use the open source version of the kernel module - # Only available on driver 515.43.04+ - open = false; - - # Enable the nvidia settings menu - nvidiaSettings = true; - - # Optionally, you may need to select the appropriate driver version for your specific GPU. - package = config.boot.kernelPackages.nvidiaPackages.stable; - }; - hardware.opentabletdriver = { - enable = true; - daemon.enable = true; - }; + hardware.opentabletdriver.enable = true; } -- cgit v1.2.3