diff --git a/configuration.nix b/configuration.nix index c0564b0..07e8e8d 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,7 +1,3 @@ -# 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, lib, ... }: { @@ -11,7 +7,7 @@ ./system/current ./packages.nix ./fonts.nix - ./sets/neovim.nix + ./sets/neovim ]; nix = { @@ -33,9 +29,7 @@ i18n.defaultLocale = "de_DE.UTF-8"; - nixpkgs = { - config.allowUnfree = true; - }; + nixpkgs.config.allowUnfree = true; time.timeZone = "Etc/UTC"; @@ -134,10 +128,6 @@ programs = { adb.enable = true; - java = { - enable = true; - package = pkgs.adoptopenjdk-bin; - }; gnupg.agent = { enable = true; enableSSHSupport = true; diff --git a/sets/cpu/amd.nix b/sets/cpu/amd.nix new file mode 100644 index 0000000..e16a7b0 --- /dev/null +++ b/sets/cpu/amd.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: + +{ + hardware.cpu.amd.updateMicrocode = true; +} diff --git a/sets/cpu/intel.nix b/sets/cpu/intel.nix new file mode 100644 index 0000000..5193449 --- /dev/null +++ b/sets/cpu/intel.nix @@ -0,0 +1,8 @@ +{ config, pkgs, ... }: + +{ + hardware.cpu.intel.updateMicrocode = true; + environment.systemPackages = with pkgs; [ + i7z + ]; +} diff --git a/sets/gpu/amd.nix b/sets/gpu/amd.nix new file mode 100644 index 0000000..c1e35e0 --- /dev/null +++ b/sets/gpu/amd.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: + +{ + hardware.opengl.extraPackages = with pkgs; [ + vaapiVdpau + libvdpau-va-gl + rocm-opencl-icd + rocm-runtime + ]; + environment.systemPackages = [ pkgs.rocm-smi ]; +} diff --git a/sets/gpu/intel.nix b/sets/gpu/intel.nix new file mode 100644 index 0000000..e7d527d --- /dev/null +++ b/sets/gpu/intel.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ...}: +{ + hardware.opengl.extraPackages = with pkgs; [ + intel-media-driver + vaapiIntel + intel-compute-runtime + ]; + environment.systemPackages = with pkgs; [ + intel-gpu-tools + ]; +} diff --git a/sets/laptop.nix b/sets/laptop.nix new file mode 100644 index 0000000..5e5ac95 --- /dev/null +++ b/sets/laptop.nix @@ -0,0 +1,12 @@ +{ config, pkgs }: + +{ + services = { + tlp.enable = true; + upower.enable = true; + }; + programs.light.enable = true; + environment.systemPackages = with pkgs; [ + config.boot.kernelPackages.cpupower + ]; +} diff --git a/sets/neovim.nix b/sets/neovim/default.nix similarity index 100% rename from sets/neovim.nix rename to sets/neovim/default.nix diff --git a/sets/init.vim b/sets/neovim/init.vim similarity index 100% rename from sets/init.vim rename to sets/neovim/init.vim diff --git a/system/rainbowdash/default.nix b/system/rainbowdash/default.nix index d8bf764..d8d9bee 100644 --- a/system/rainbowdash/default.nix +++ b/system/rainbowdash/default.nix @@ -1,29 +1,15 @@ { config, pkgs, ... }: { - imports = [ ./boot-config.nix ./secure-boot.nix ./hardware-configuration.nix ]; - - networking.hostName = "rainbowdash"; - - hardware = { - cpu.intel.updateMicrocode = true; - opengl.extraPackages = with pkgs; [ - intel-media-driver - vaapiIntel - ]; - }; - services = { - tlp.enable = true; - upower.enable = true; - throttled.enable = true; - }; - - programs.light.enable = true; - - environment.systemPackages = with pkgs; [ - i7z - linuxPackages.cpupower + imports = [ + ./boot-config.nix + ./secure-boot.nix + ./hardware-configuration.nix + ../../sets/gpu/intel.nix + ../../sets/cpu/intel.nix + ../../sets/laptop.nix ]; + networking.hostName = "rainbowdash"; system.stateVersion = "20.03"; } diff --git a/system/spike/default.nix b/system/spike/default.nix index 115be85..0126be9 100644 --- a/system/spike/default.nix +++ b/system/spike/default.nix @@ -5,30 +5,12 @@ ./boot-config.nix ./hardware-configuration.nix ../../services/ssh.nix + ../../sets/gpu/intel.nix + ../../sets/cpu/intel.nix + ../../sets/laptop.nix ]; networking.hostName = "spike"; - - hardware = { - cpu.intel.updateMicrocode = true; - opengl.extraPackages = with pkgs; [ - intel-media-driver - vaapiIntel - ]; - }; - - services = { - avahi.publish.enable = true; - tlp.enable = true; - upower.enable = true; - }; - - programs.light.enable = true; - - environment.systemPackages = with pkgs; [ - i7z - linuxPackages.cpupower - ]; - + services.avahi.publish.enable = true; system.stateVersion = "20.03"; } diff --git a/system/starlight/default.nix b/system/starlight/default.nix index 0c76aa3..b81a1f4 100644 --- a/system/starlight/default.nix +++ b/system/starlight/default.nix @@ -7,6 +7,8 @@ ./nginx.nix ../../services/ssh.nix ../../sets/fpga.nix + ../../sets/gpu/amd.nix + ../../sets/cpu/amd.nix ../../private/starlight.nix ]; @@ -17,7 +19,7 @@ KERNEL=="eth*", ATTR{address}=="00:0f:53:16:15:9d", NAME="lan10g1" ''; - networking.networkmanager.enable = lib.mkForce false; + networking.networkmanager.enable = false; networking.bridges.br0 = { rstp = true; interfaces = [ "lan10g0" "lan10g1" "enp4s0" ]; @@ -32,12 +34,6 @@ networking.dhcpcd.allowInterfaces = [ "br0" ]; hardware.cpu.amd.updateMicrocode = true; - hardware.opengl.extraPackages = with pkgs; [ - vaapiVdpau - libvdpau-va-gl - rocm-opencl-icd - rocm-runtime - ]; services = { tor = { enable = true;