mirror of
https://codeberg.org/jopejoe1/nix-conf.git
synced 2025-01-04 10:16:33 +01:00
Move to old COnfig where nvidia worked
This commit is contained in:
parent
92421caf4a
commit
fe80b84447
4 changed files with 284 additions and 73 deletions
|
@ -1,39 +1,166 @@
|
||||||
{ pkgs, config, lib, channel, ... }:
|
# Edit this configuration file to define what should be installed on
|
||||||
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
#with lib.internal;
|
|
||||||
{
|
{
|
||||||
imports = [ ./hardware.nix ];
|
imports =
|
||||||
|
[ # Include the results of the hardware scan.
|
||||||
|
./hardware.nix
|
||||||
|
];
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
custom.system.boot.uefi.enable = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
#custom.system.xdg.enable = true;
|
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||||
#custom.system.fonts.enable = true;
|
|
||||||
custom.system.locale.enable = true;
|
|
||||||
custom.system.locale.layout = "de";
|
|
||||||
#custom.system.ssh.enable = true;
|
|
||||||
custom.nix.enable = true;
|
|
||||||
#custom.hardware.audio.enable = true;
|
|
||||||
#custom.hardware.printing.enable = true;
|
|
||||||
custom.desktop.plasma.enable = true;
|
|
||||||
|
|
||||||
custom.user.jopejoe1.enable =true;
|
|
||||||
custom.user.root.enable =true;
|
|
||||||
|
|
||||||
networking.hostName = "kami";
|
networking.hostName = "kami";
|
||||||
|
|
||||||
|
# networking.hostName = "nixos"; # Define your hostname.
|
||||||
|
# Pick only one of the below networking options.
|
||||||
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
|
i18n.defaultLocale = "en_NZ.UTF-8";
|
||||||
|
|
||||||
hardware.opengl.enable = true;
|
i18n.extraLocaleSettings = {
|
||||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
LC_ADDRESS = "de_DE.UTF-8";
|
||||||
boot.kernelParams = [ "module_blacklist=i915" ];
|
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||||
|
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||||
programs = {
|
LC_MONETARY = "de_DE.UTF-8";
|
||||||
dconf.enable = true;
|
LC_NAME = "de_DE.UTF-8";
|
||||||
#droidcam.enable = true;
|
LC_NUMERIC = "de_DE.UTF-8";
|
||||||
#sysdig.enable = true;
|
LC_PAPER = "de_DE.UTF-8";
|
||||||
#xwayland.enable = true;
|
LC_TELEPHONE = "de_DE.UTF-8";
|
||||||
|
LC_TIME = "de_DE.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
# i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
console = {
|
||||||
|
# font = "Lat2-Terminus16";
|
||||||
|
keyMap = "de";
|
||||||
|
# useXkbConfig = true; # use xkbOptions in tty.
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable the X11 windowing system.
|
||||||
|
services.xserver.enable = true;
|
||||||
|
|
||||||
|
|
||||||
|
# Enable the Plasma 5 Desktop Environment.
|
||||||
|
services.xserver.displayManager.sddm.enable = true;
|
||||||
|
services.xserver.desktopManager.plasma5.enable = true;
|
||||||
|
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
services.xserver.layout = "de";
|
||||||
|
# services.xserver.xkbOptions = {
|
||||||
|
# "eurosign:e";
|
||||||
|
# "caps:escape" # map caps to escape.
|
||||||
|
# };
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
# services.printing.enable = true;
|
||||||
|
|
||||||
|
# Enable sound.
|
||||||
|
# sound.enable = true;
|
||||||
|
# hardware.pulseaudio.enable = true;
|
||||||
|
sound.enable = true;
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
# If you want to use JACK applications, uncomment this
|
||||||
|
#jack.enable = true;
|
||||||
|
|
||||||
|
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||||
|
# no need to redefine it in your config for now)
|
||||||
|
#media-session.enable = true;
|
||||||
|
};
|
||||||
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
|
# services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
|
users.users.jopejoe1 = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "jopejoe1";
|
||||||
|
extraGroups = [ "networkmanager" "wheel" ];
|
||||||
|
packages = with pkgs; [
|
||||||
|
firefox
|
||||||
|
kate
|
||||||
|
# thunderbird
|
||||||
|
];
|
||||||
|
};
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
# users.users.alice = {
|
||||||
|
# isNormalUser = true;
|
||||||
|
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||||
|
# packages = with pkgs; [
|
||||||
|
# firefox
|
||||||
|
# thunderbird
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
|
||||||
|
# List packages installed in system profile. To search, run:
|
||||||
|
# $ nix search wget
|
||||||
|
# environment.systemPackages = with pkgs; [
|
||||||
|
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||||
|
# wget
|
||||||
|
# ];
|
||||||
|
|
||||||
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
|
# started in user sessions.
|
||||||
|
# programs.mtr.enable = true;
|
||||||
|
# programs.gnupg.agent = {
|
||||||
|
# enable = true;
|
||||||
|
# enableSSHSupport = true;
|
||||||
|
# };
|
||||||
|
|
||||||
|
# List services that you want to enable:
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
hardware.opengl.enable = true;
|
||||||
|
|
||||||
|
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||||
|
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
# List packages installed in system profile. To search, run:
|
||||||
|
boot.kernelParams = [ "module_blacklist=i915" ];
|
||||||
|
# $ nix search wget
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||||
|
# wget
|
||||||
|
];
|
||||||
|
# Enable the OpenSSH daemon.
|
||||||
|
# services.openssh.enable = true;
|
||||||
|
|
||||||
|
# Open ports in the firewall.
|
||||||
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
|
# Or disable the firewall altogether.
|
||||||
|
# networking.firewall.enable = false;
|
||||||
|
|
||||||
|
# Copy the NixOS configuration file and link it from the resulting system
|
||||||
|
# (/run/current-system/configuration.nix). This is useful in case you
|
||||||
|
# accidentally delete configuration.nix.
|
||||||
|
# system.copySystemConfiguration = true;
|
||||||
|
|
||||||
|
# This value determines the NixOS release from which the default
|
||||||
|
# settings for stateful data, like file locations and database versions
|
||||||
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
# this value at the release version of the first install of this system.
|
||||||
|
# Before changing this value read the documentation for this option
|
||||||
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
|
system.stateVersion = "22.11"; # Did you read the comment?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
39
systems/x86_64-linux/kami/default.nix.old
Normal file
39
systems/x86_64-linux/kami/default.nix.old
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
{ pkgs, config, lib, channel, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
#with lib.internal;
|
||||||
|
{
|
||||||
|
imports = [ ./hardware.nix ];
|
||||||
|
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
custom.system.boot.uefi.enable = true;
|
||||||
|
#custom.system.xdg.enable = true;
|
||||||
|
#custom.system.fonts.enable = true;
|
||||||
|
custom.system.locale.enable = true;
|
||||||
|
custom.system.locale.layout = "de";
|
||||||
|
#custom.system.ssh.enable = true;
|
||||||
|
custom.nix.enable = true;
|
||||||
|
#custom.hardware.audio.enable = true;
|
||||||
|
#custom.hardware.printing.enable = true;
|
||||||
|
custom.desktop.plasma.enable = true;
|
||||||
|
|
||||||
|
custom.user.jopejoe1.enable =true;
|
||||||
|
custom.user.root.enable =true;
|
||||||
|
|
||||||
|
networking.hostName = "kami";
|
||||||
|
|
||||||
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
|
hardware.opengl.enable = true;
|
||||||
|
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
boot.kernelParams = [ "module_blacklist=i915" ];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
dconf.enable = true;
|
||||||
|
#droidcam.enable = true;
|
||||||
|
#sysdig.enable = true;
|
||||||
|
#xwayland.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
|
@ -1,39 +1,17 @@
|
||||||
{ config, lib, pkgs, modulesPath, inputs, ... }:
|
# 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, ... }:
|
||||||
|
|
||||||
let
|
|
||||||
inherit (inputs) nixos-hardware;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports = with nixos-hardware.nixosModules; [
|
imports =
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
#common-cpu-intel
|
];
|
||||||
#common-gpu-nvidia
|
|
||||||
#common-pc
|
|
||||||
#common-pc-ssd
|
|
||||||
];
|
|
||||||
|
|
||||||
#hardware.nvidia.prime = {
|
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" "sr_mod" ];
|
||||||
# offload.enable = false;
|
boot.initrd.kernelModules = [ ];
|
||||||
#sync.enable = false;
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
# Bus ID of the Intel GPU. You can find it using lspci, either under 3D or VGA
|
|
||||||
#intelBusId = "PCI:0:2:0";
|
|
||||||
|
|
||||||
# Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA
|
|
||||||
#nvidiaBusId = "PCI:1:0:0";
|
|
||||||
# };
|
|
||||||
|
|
||||||
boot = {
|
|
||||||
#kernelPackages = pkgs.linuxPackages_5_10;
|
|
||||||
|
|
||||||
initrd = {
|
|
||||||
# kernelModules = [ "amdgpu" ];
|
|
||||||
availableKernelModules =
|
|
||||||
[ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" "sr_mod" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
extraModulePackages = [ ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-uuid/99a47ace-7e69-4520-b914-d4fe5b31dc79";
|
{ device = "/dev/disk/by-uuid/99a47ace-7e69-4520-b914-d4fe5b31dc79";
|
||||||
|
@ -53,18 +31,15 @@ in
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
# @NOTE(jakehamilton): NetworkManager will handle DHCP.
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
networking.interfaces.enp6s0.useDHCP = true;
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
networking.interfaces.wlo1.useDHCP = true;
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
hardware.enableRedistributableFirmware = true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp6s0.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;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
# high-resolution display
|
|
||||||
hardware.video.hidpi.enable = lib.mkDefault true;
|
|
||||||
|
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
|
||||||
|
|
||||||
#hardware.bluetooth.enable = false;
|
|
||||||
}
|
}
|
||||||
|
|
70
systems/x86_64-linux/kami/hardware.nix.old
Normal file
70
systems/x86_64-linux/kami/hardware.nix.old
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
{ config, lib, pkgs, modulesPath, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (inputs) nixos-hardware;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = with nixos-hardware.nixosModules; [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
#common-cpu-intel
|
||||||
|
#common-gpu-nvidia
|
||||||
|
#common-pc
|
||||||
|
#common-pc-ssd
|
||||||
|
];
|
||||||
|
|
||||||
|
#hardware.nvidia.prime = {
|
||||||
|
# offload.enable = false;
|
||||||
|
#sync.enable = false;
|
||||||
|
|
||||||
|
# Bus ID of the Intel GPU. You can find it using lspci, either under 3D or VGA
|
||||||
|
#intelBusId = "PCI:0:2:0";
|
||||||
|
|
||||||
|
# Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA
|
||||||
|
#nvidiaBusId = "PCI:1:0:0";
|
||||||
|
# };
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
#kernelPackages = pkgs.linuxPackages_5_10;
|
||||||
|
|
||||||
|
initrd = {
|
||||||
|
# kernelModules = [ "amdgpu" ];
|
||||||
|
availableKernelModules =
|
||||||
|
[ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" "sr_mod" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
extraModulePackages = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/99a47ace-7e69-4520-b914-d4fe5b31dc79";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot/efi" =
|
||||||
|
{ device = "/dev/disk/by-uuid/1F26-8168";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" =
|
||||||
|
{ device = "/dev/disk/by-uuid/78d6db21-b823-4ca4-b495-7782d3e56ddc";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
# @NOTE(jakehamilton): NetworkManager will handle DHCP.
|
||||||
|
networking.interfaces.enp6s0.useDHCP = true;
|
||||||
|
networking.interfaces.wlo1.useDHCP = true;
|
||||||
|
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
|
# high-resolution display
|
||||||
|
hardware.video.hidpi.enable = lib.mkDefault true;
|
||||||
|
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
||||||
|
#hardware.bluetooth.enable = false;
|
||||||
|
}
|
Loading…
Reference in a new issue