Start modularizing config
This commit is contained in:
parent
6033c6df4d
commit
59d79d306d
|
@ -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;
|
||||
|
|
5
sets/cpu/amd.nix
Normal file
5
sets/cpu/amd.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
}
|
8
sets/cpu/intel.nix
Normal file
8
sets/cpu/intel.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
i7z
|
||||
];
|
||||
}
|
11
sets/gpu/amd.nix
Normal file
11
sets/gpu/amd.nix
Normal file
|
@ -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 ];
|
||||
}
|
11
sets/gpu/intel.nix
Normal file
11
sets/gpu/intel.nix
Normal file
|
@ -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
|
||||
];
|
||||
}
|
12
sets/laptop.nix
Normal file
12
sets/laptop.nix
Normal file
|
@ -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
|
||||
];
|
||||
}
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue